/* ============================================
   LIST & HERO PATTERNS
   Scheduled Events, Advisory Notes, Onboarding and the
   dashboard onboarding prompt. Grouping by panel, whitespace
   and type — no edge rails or keylines. Loaded after as-theme.css.
   ============================================ */
:root {
  --ui-navy: #003262;
  --ui-yellow: #FFD32F;
  --ui-green: #1f9d55;
  --ui-ink: #1d2b3a;
  --ui-muted: #6f7d8c;
  --ui-faint: #eef0f2;
  --ui-line: #ecebe5;
  --ui-cond: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
}

/* ---------- Weekly groups / panels ---------- */
.ui-group { margin-bottom: 28px; }
.ui-group-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.ui-group-title { font-family: var(--ui-cond); font-weight: 800; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--ui-navy); }
.ui-group-meta { font-size: 13px; font-weight: 600; color: var(--ui-muted); }
.ui-group-meta strong { color: var(--ui-navy); font-family: var(--ui-cond); font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.ui-panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,26,53,.06), 0 6px 18px rgba(0,26,53,.05); overflow: hidden; }

/* ---------- Event rows ---------- */
.ui-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; padding: 16px 22px; }
.ui-row + .ui-row { box-shadow: inset 0 1px 0 var(--ui-line); }
.ui-date { width: 64px; height: 64px; border-radius: 10px; background: var(--ui-faint); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ui-date .d { font-family: var(--ui-cond); font-weight: 900; font-size: 28px; color: var(--ui-navy); }
.ui-date .m { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ui-muted); margin-top: 3px; }
.ui-date.is-onsite { background: var(--ui-yellow); }
.ui-date.is-onsite .m { color: var(--ui-navy); }
.ui-title { font-size: 16.5px; font-weight: 600; color: var(--ui-ink); margin-bottom: 5px; }
.ui-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ui-muted); font-weight: 500; }
.ui-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ui-meta svg { width: 14px; height: 14px; opacity: .7; }
.ui-cat { color: var(--ui-navy); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
.ui-right { text-align: right; min-width: 96px; }
.ui-dur { font-family: var(--ui-cond); font-weight: 800; font-size: 22px; color: var(--ui-navy); line-height: 1; }
.ui-time { font-size: 12.5px; color: var(--ui-muted); margin-top: 4px; font-weight: 500; }
.ui-nobill { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9a6b00; background: #fff4cc; padding: 2px 7px; border-radius: 4px; }
.ui-row.is-dim .ui-dur { color: #9aa6b2; }

.ui-milestone { display: flex; align-items: center; justify-content: space-between; background: var(--ui-navy); color: #fff; border-radius: 12px; padding: 14px 22px; margin: 0 0 28px; }
.ui-milestone .l { font-family: var(--ui-cond); font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; }
.ui-milestone .l b { color: var(--ui-yellow); font-weight: 900; }
.ui-milestone .r { font-size: 13px; color: #c4d2e2; font-weight: 600; }
.ui-milestone.is-end { background: #e7e9ec; color: var(--ui-navy); }
.ui-milestone.is-end .l b { color: var(--ui-navy); }
.ui-milestone.is-end .r { color: var(--ui-muted); }

/* ---------- Navy grid hero (Next up / onboarding / featured note) ---------- */
.ui-hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background-color: var(--ui-navy); color: #fff; border-radius: 14px; padding: 26px 30px; margin-bottom: 30px;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.ui-hero-date { font-family: var(--ui-cond); font-weight: 900; line-height: .85; text-align: center; }
.ui-hero-date .d { font-size: 64px; color: var(--ui-yellow); display: block; }
.ui-hero-date .m { font-size: 16px; letter-spacing: .16em; color: #fff; }
.ui-hero-kicker { font-family: var(--ui-cond); font-weight: 800; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ui-yellow); margin-bottom: 6px; }
.ui-hero-title { font-family: var(--ui-cond); font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; margin-bottom: 8px; letter-spacing: .01em; }
.ui-hero-sub { font-size: 14px; color: #c4d2e2; font-weight: 500; }
.ui-hero-side { text-align: right; }
.ui-hero-when { font-family: var(--ui-cond); font-weight: 900; font-size: 26px; text-transform: uppercase; color: #fff; }
.ui-hero-clock { font-size: 14px; color: #c4d2e2; margin-top: 4px; }
.ui-btn-yellow, .ui-btn-navy {
  display: inline-block; border: none; border-radius: 6px; padding: 11px 18px; cursor: pointer;
  font-family: 'Barlow', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.ui-btn-yellow { background: var(--ui-yellow); color: var(--ui-navy); }
.ui-btn-yellow:hover { background: #ffdc5c; }
.ui-btn-navy { background: var(--ui-navy); color: #fff; }
.ui-btn-navy:hover { background: #004380; }
.ui-hero-side .ui-btn-yellow { margin-top: 12px; }

/* ---------- Progress ring ---------- */
.ui-ring { position: relative; flex: none; }
.ui-ring svg { display: block; }
.ui-ring circle { fill: none; stroke-width: 8; }
.ui-ring-track { stroke: rgba(255,255,255,.14); }
.ui-ring-value { stroke: var(--ui-yellow); stroke-linecap: round; transition: stroke-dashoffset .5s ease-in-out; }
.ui-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ui-ring-text b { font-family: var(--ui-cond); font-weight: 900; font-size: 30px; color: #fff; }
.ui-ring-text span { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c4d2e2; margin-top: 4px; }

/* ---------- Advisory notes ---------- */
.ui-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.ui-chip { border: none; cursor: pointer; font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ui-navy); box-shadow: 0 1px 2px rgba(0,26,53,.08); }
.ui-chip.is-on { background: var(--ui-navy); color: #fff; }
.ui-chip .c { opacity: .6; margin-left: 6px; }
.ui-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ui-note { background: #fff; border-radius: 12px; padding: 22px 24px 18px; box-shadow: 0 1px 2px rgba(0,26,53,.06), 0 6px 18px rgba(0,26,53,.05); display: flex; flex-direction: column; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.ui-note:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,26,53,.08), 0 10px 24px rgba(0,26,53,.08); }
.ui-note.is-feature {
  grid-column: 1 / -1; background-color: var(--ui-navy); color: #fff;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.ui-note-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ui-pri { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ui-pri i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ui-pri.high { color: #b42318; } .ui-pri.high i { background: #e5484d; }
.ui-pri.medium { color: #9a6b00; } .ui-pri.medium i { background: #f5a524; }
.ui-pri.low { color: #2563a8; } .ui-pri.low i { background: #4a90d9; }
.ui-pri.info { color: var(--ui-muted); } .ui-pri.info i { background: #9aa6b2; }
.ui-note.is-feature .ui-pri { color: var(--ui-yellow); }
.ui-note-date { font-size: 12.5px; color: var(--ui-muted); font-weight: 600; }
.ui-note.is-feature .ui-note-date { color: #c4d2e2; }
.ui-note-title { font-family: var(--ui-cond); font-weight: 800; font-size: 23px; line-height: 1.05; text-transform: uppercase; color: var(--ui-navy); margin-bottom: 8px; letter-spacing: .01em; }
.ui-note.is-feature .ui-note-title { color: #fff; font-size: 30px; }
.ui-note-desc { font-size: 14.5px; line-height: 1.5; color: #4a5a6a; flex: 1; }
.ui-note.is-feature .ui-note-desc { color: #dbe4ee; font-size: 15.5px; max-width: 640px; }
.ui-note-foot { display: flex; justify-content: flex-end; align-items: center; margin-top: 16px; font-size: 12.5px; font-weight: 700; }
.ui-note-read { color: var(--ui-navy); text-transform: uppercase; letter-spacing: .08em; }
.ui-note.is-feature .ui-note-read { background: var(--ui-yellow); padding: 8px 14px; border-radius: 6px; }

/* ---------- Onboarding steps ---------- */
.ui-step { display: grid; grid-template-columns: 44px 1fr auto; gap: 20px; align-items: center; padding: 20px 24px; }
.ui-step + .ui-step { box-shadow: inset 0 1px 0 var(--ui-line); }
.ui-step.is-done { cursor: pointer; }
.ui-step.is-todo { background: #fffbea; }
.ui-step-num { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--ui-cond); font-weight: 900; font-size: 20px; }
.ui-step.is-done .ui-step-num { background: var(--ui-green); color: #fff; }
.ui-step.is-done .ui-step-num svg { width: 20px; height: 20px; }
.ui-step.is-todo .ui-step-num { background: var(--ui-yellow); color: var(--ui-navy); }
.ui-step-outcome { font-family: var(--ui-cond); font-weight: 800; font-size: 18px; color: var(--ui-navy); text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Dashboard onboarding prompt ---------- */
.ui-hero.ui-dash-onb { margin: 0 0 36px; text-align: left; }
.ui-dash-onb .ui-hero-title { font-size: 32px; }
.ui-ministeps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ui-ministep { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; padding: 6px 14px 6px 6px; font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; background: rgba(255,255,255,.08); color: #fff; }
.ui-ministep:hover { background: rgba(255,255,255,.14); }
.ui-ministep .n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--ui-cond); font-weight: 900; font-size: 13px; }
.ui-ministep .n svg { width: 13px; height: 13px; }
.ui-ministep.is-done { color: #c4d2e2; }
.ui-ministep.is-done .n { background: var(--ui-green); color: #fff; }
.ui-ministep.is-todo { background: rgba(255,211,47,.16); }
.ui-ministep.is-todo .n { background: var(--ui-yellow); color: var(--ui-navy); }


/* ---------- Amount hero (invoices / quotes) ---------- */
.ui-hero-amount { font-family: var(--ui-cond); font-weight: 900; font-size: 46px; line-height: 1; color: var(--ui-yellow); letter-spacing: .01em; }
.ui-hero-when.is-alert { color: #ff8a80; }
.ui-hero-side .ui-hero-clock + .ui-btn-yellow { margin-top: 12px; }
a.ui-btn-yellow, a.ui-btn-navy { text-decoration: none; }

/* ---------- Ledger tables (invoices / quotes) ---------- */
.ui-ledger { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 120px 36px; gap: 18px; align-items: center; padding: 16px 22px; cursor: pointer; }
.ui-ledger + .ui-ledger { box-shadow: inset 0 1px 0 var(--ui-line); }
.ui-ledger:not(.is-head):hover { background: #fafaf7; }
.ui-ledger.is-head { cursor: default; padding: 12px 22px; background: #fafaf7; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ui-muted); }
.ui-ledger .r { text-align: right; }
.ui-ledger .ui-title { margin-bottom: 2px; }
.ui-sub { font-size: 12.5px; color: var(--ui-muted); margin-top: 3px; }
.ui-cell { font-size: 13.5px; color: #4a5a6a; font-weight: 500; }
.ui-cell.is-alert { color: #b42318; font-weight: 700; }
.ui-amount { font-family: var(--ui-cond); font-weight: 800; font-size: 20px; color: var(--ui-navy); }
.ui-status { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 5px; }
.ui-status.paid, .ui-status.accepted { background: #e3f5eb; color: #157347; }
.ui-status.outstanding, .ui-status.sent { background: #fff4cc; color: #8a5d00; }
.ui-status.overdue, .ui-status.declined { background: #fde7e6; color: #b42318; }
.ui-status.voided, .ui-status.expired, .ui-status.invoiced { background: var(--ui-faint); color: var(--ui-muted); }
.ui-dl { width: 34px; height: 34px; border-radius: 8px; background: var(--ui-yellow); display: flex; align-items: center; justify-content: center; color: var(--ui-navy); }
.ui-dl svg { width: 16px; height: 16px; }

/* ---------- Documents ---------- */
.ui-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.ui-toolbar .ui-chips { margin: 0; }
.ui-search { border: none; background: #fff; border-radius: 8px; padding: 10px 14px; width: 260px; font-family: 'Barlow', sans-serif; font-size: 14px; color: var(--ui-ink); box-shadow: 0 1px 2px rgba(0,26,53,.08); }
.ui-search:focus { outline: 2px solid var(--ui-yellow); outline-offset: 1px; }
.ui-doc { display: grid; grid-template-columns: 48px 1fr 120px 90px 120px 36px; gap: 18px; align-items: center; padding: 14px 22px; text-decoration: none; color: inherit; }
.ui-doc + .ui-doc { box-shadow: inset 0 1px 0 var(--ui-line); }
a.ui-doc:hover { background: #fafaf7; }
.ui-doc.is-head { padding: 12px 22px; background: #fafaf7; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ui-muted); }
.ui-doc .ui-title { margin-bottom: 0; }
.ui-ftype { width: 44px; height: 52px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; font-family: var(--ui-cond); font-weight: 800; font-size: 12px; letter-spacing: .06em; color: #fff; position: relative; overflow: hidden; }
.ui-ftype::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: linear-gradient(225deg, #fff 50%, rgba(255,255,255,.4) 50%); }
.ui-ftype.pdf { background: #d64545; } .ui-ftype.xlsx { background: #1f8a5b; } .ui-ftype.pptx { background: #e07a2e; }
.ui-ftype.docx { background: #2f6db5; } .ui-ftype.img { background: #7a5bd6; } .ui-ftype.other { background: #6f7d8c; }
.ui-tag { font-size: 11.5px; font-weight: 700; color: var(--ui-navy); background: var(--ui-faint); padding: 4px 9px; border-radius: 5px; justify-self: start; }
.ui-new { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--ui-yellow); color: var(--ui-navy); padding: 2px 6px; border-radius: 4px; vertical-align: 2px; }
.ui-empty { padding: 28px 22px; text-align: center; color: var(--ui-muted); font-size: 14px; }

/* ---------- Report rows ---------- */
a.ui-row-link { text-decoration: none; color: inherit; }
a.ui-row-link:hover { background: #fafaf7; }
.ui-stat, .ui-right .ui-time { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.ui-stat { font-family: var(--ui-cond); font-weight: 800; font-size: 17px; color: var(--ui-navy); }
.ui-stat svg, .ui-right .ui-time svg { width: 14px; height: 14px; opacity: .6; }
.ui-right .ui-time { display: flex; }

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  .ui-hero { grid-template-columns: 1fr; gap: 16px; padding: 22px; }
  .ui-hero-side, .ui-hero-date { text-align: left; }
  .ui-notes { grid-template-columns: 1fr; }
  .ui-row { grid-template-columns: 52px 1fr; gap: 14px; padding: 14px 16px; }
  .ui-row .ui-right { grid-column: 2; text-align: left; }
  .ui-date { width: 52px; height: 52px; }
  .ui-date .d { font-size: 22px; }
  .ui-step { grid-template-columns: 40px 1fr; padding: 16px; }
  .ui-step > .ui-right { grid-column: 2; text-align: left; }
  .ui-toolbar { flex-direction: column; }
  .ui-search { width: 100%; }
  .ui-ledger { grid-template-columns: 1fr auto; gap: 6px 14px; padding: 14px 16px; }
  .ui-ledger.is-head { display: none; }
  .ui-ledger > .ui-cell, .ui-ledger > .ui-dl { display: none; }
  .ui-doc { grid-template-columns: 44px 1fr 34px; gap: 12px; padding: 12px 16px; }
  .ui-doc.is-head, .ui-doc > .ui-tag, .ui-doc > .ui-cell { display: none; }
  .ui-hero-amount { font-size: 38px; }
  .ui-row .ui-stat, .ui-row .ui-right .ui-time { justify-content: flex-start; }
}
.ui-doc.is-unavailable { opacity: .6; }
