/* VertexEcom CRM — navy, teal and bright blue on white; orange reserved for primary actions. */
:root {
  --navy: #0b1f3a; --navy-2: #12305a; --navy-3: #1d4277;
  --teal: #0e9f9a; --teal-soft: #e3f5f4;
  --blue: #2563eb; --blue-soft: #e8efff;
  --orange: #f26a1b; --orange-dark: #d65a12;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-2: #cbd5e1; --bg: #f5f7fb; --card: #ffffff;
  --good: #15803d; --good-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fdf3e2; --bad: #b91c1c; --bad-soft: #fdecec;
  --grey-data: #b6c2d1;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hidden { display: none !important; }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cfd9ea; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font-weight: 700; letter-spacing: .01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--teal), var(--blue)); display: grid; place-items: center; font-size: 15px; color: #fff; }
.brand small { display: block; font-weight: 500; color: #8fa3c4; font-size: 11px; }
.nav a, .nav span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 7px; color: #cfd9ea; font-size: 13.5px; }
.nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.nav a.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav span.later { color: #6d82a6; cursor: default; }
.nav .pill { font-size: 10px; padding: 1px 6px; border-radius: 99px; background: #1b365f; color: #8fa3c4; }
.nav .count { background: var(--orange); color: #fff; }
.nav-sep { height: 1px; background: #1c355c; margin: 10px 6px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .role { font-size: 11px; color: var(--muted); }
.content { padding: 22px 28px 48px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; }
.demo-banner { background: #fff4e5; border-bottom: 1px solid #f6cf9a; color: #7a4a06; padding: 8px 28px; font-size: 13px; font-weight: 600; }
.env-banner { background: #e8efff; color: #1e3a8a; padding: 6px 28px; font-size: 12px; }

/* ---------- cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.span2 { grid-column: span 2; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 10px; font-weight: 700; }

/* ---------- KPI cards */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-height: 116px; position: relative; color: inherit; }
a.kpi:hover { border-color: var(--blue); text-decoration: none; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.kpi .value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; border: none; }
.kpi.hero .label, .kpi.hero .meta { color: #b9c8e2; }
.kpi.later { background: #fafbfd; border-style: dashed; }
.kpi.later .value { font-size: 14px; color: var(--faint); font-weight: 600; }
.info-i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--faint); font-size: 10px; display: inline-grid; place-items: center; cursor: help; flex: none; }
.trend { font-weight: 700; font-size: 12px; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }
.trend.inv.up { color: var(--bad); } .trend.inv.down { color: var(--good); }
.bar { height: 6px; background: #edf1f7; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 99px; }
.bar.warn > i { background: #e7a33a; } .bar.bad > i { background: #e05252; } .bar.good > i { background: var(--good); }
.kpi.hero .bar { background: rgba(255,255,255,.15); } .kpi.hero .bar > i { background: #5eead4; }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #eef2f7; color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.teal { background: var(--teal-soft); color: #0b7c78; } .badge.muted { background: #f1f5f9; color: var(--muted); }
.badge.demo { background: #fff4e5; color: #9a5b06; }

/* ---------- buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--faint); text-decoration: none; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-dark); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue); }
.btn.danger { color: var(--bad); border-color: #f2c4c4; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 12px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: span 2; } .form-grid .full { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.check input { width: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 130px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg a:last-child { border-right: none; }
.seg a.on { background: var(--navy); color: #fff; }
.seg a:hover { text-decoration: none; background: #f1f5f9; } .seg a.on:hover { background: var(--navy); }

/* ---------- alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; }
.alert.success { background: var(--good-soft); border-color: #b9e3c6; color: #14532d; }
.alert.error { background: var(--bad-soft); border-color: #f2c4c4; color: #7f1d1d; }
.alert.info { background: var(--blue-soft); border-color: #c7d6fb; color: #1e3a8a; }
.alert.warn { background: var(--warn-soft); border-color: #f3d9a8; color: #78350f; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 9px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr.overdue td { background: #fff8f8; }
table.plain th { background: none; }
.card table td, .card table th { padding-left: 8px; padding-right: 8px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; }

/* ---------- kanban */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 248px; background: #eef2f7; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.col-head { padding: 10px 12px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.col-head b { font-size: 12.5px; } .col-head span { font-size: 11.5px; color: var(--muted); }
.col.won .col-head { box-shadow: inset 0 3px 0 var(--good); border-radius: var(--radius) var(--radius) 0 0; }
.col.lost .col-head { box-shadow: inset 0 3px 0 var(--bad); border-radius: var(--radius) var(--radius) 0 0; }
.col-body { padding: 0 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.col-body.over { background: #dfe8f6; border-radius: 8px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: grab; box-shadow: var(--shadow); }
.kcard:active { cursor: grabbing; } .kcard.dragging { opacity: .5; }
.kcard .t { font-weight: 600; font-size: 13px; display: block; color: var(--ink); }
.kcard .m { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.kcard.late { border-left: 3px solid var(--bad); }

/* ---------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: none; }
.tl-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.tl-ico.sys { background: #f1f5f9; color: var(--muted); }
.tl-ico.meeting { background: var(--teal-soft); color: #0b7c78; }
.tl-ico.whatsapp { background: #e6f7ec; color: #15803d; }
.tl-meta { font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- charts */
.chart { width: 100%; min-height: 220px; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text { font-family: var(--font); fill: var(--muted); font-size: 13px; }
.chart svg .lbl-strong { fill: var(--ink); font-weight: 600; }
.chart svg .lbl-ink { fill: var(--ink-2); }
.chart .empty { display: grid; place-items: center; min-height: 200px; color: var(--muted); font-size: 13px; text-align: center; border: 1px dashed var(--line-2); border-radius: 8px; padding: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend i.line { height: 2px; vertical-align: 3px; width: 14px; }
.legend i.dash { height: 0; border-top: 2px dashed var(--orange); width: 14px; vertical-align: 3px; background: none !important; }
.tip { position: fixed; pointer-events: none; background: var(--navy); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; z-index: 100; max-width: 260px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.chart-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
svg .hit { cursor: pointer; }

/* ---------- lists */
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.risk-list li:last-child { border-bottom: none; }
.flag { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.flag:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--faint); }
.dot.good { background: var(--good); } .dot.warn { background: #e7a33a; } .dot.bad { background: var(--bad); }
.actions-list { counter-reset: a; list-style: none; padding: 0; margin: 0; }
.actions-list li { counter-increment: a; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.actions-list li::before { content: counter(a); width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 12px; }
.actions-list li:last-child { border-bottom: none; }

/* ---------- dialogs */
dialog { border: none; border-radius: 12px; padding: 0; width: min(440px, 92vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(11,31,58,.45); }
dialog form { padding: 20px; }
dialog h3 { font-size: 16px; margin-bottom: 12px; }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-3) 60%, #0e6e8c 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 32px; line-height: 1.15; max-width: 440px; margin-top: 40px; }
.login-art p { color: #b9c8e2; max-width: 420px; }
.login-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-form form { width: min(360px, 100%); }

/* ---------- responsive */
@media (max-width: 1200px) { .g6 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; } .topbar { padding: 10px 16px; } .demo-banner { padding: 8px 16px; }
  .g2, .g3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; }
  .kv { grid-template-columns: 110px 1fr; }
  .topbar .role { display: none; }
}
@media (max-width: 560px) { .g6, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .kpi .value { font-size: 20px; } h1 { font-size: 19px; } }
@media print { .sidebar, .topbar, .btn, .filters { display: none !important; } .shell { display: block; } }
.chart.short { min-height: 0; margin: 8px 0 4px; }
.grid.top { align-items: start; }
.mini { gap: 14px 24px; } .mini .big { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
td:last-child, th:last-child { padding-right: 16px; }
.grid > * { min-width: 0; }
.risk-list li > :last-child:not(:first-child) { flex: none; } .risk-list li > :first-child { min-width: 0; }
.chart.cap { max-width: 820px; }
.nowrap-row { flex-wrap: nowrap; } .nowrap-row input { flex: 1; min-width: 0; }
.w-sm { width: 130px !important; }
.setup-form { width: min(440px, 100%); } .setup-form fieldset { padding-bottom: 4px; }
.native-only.hidden-native { display: none; }
.brand-mark { background: #fff; overflow: hidden; } .brand-mark img { width: 24px; height: 24px; object-fit: contain; display: block; }
.powered { display: flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.powered img { height: 48px; width: auto; }
.setup-logo { height: 64px; width: auto; display: block; margin-bottom: 14px; }
.backup-banner { background: var(--bad-soft); border-color: #f2c4c4; color: #7f1d1d; } .backup-banner a { color: #7f1d1d; text-decoration: underline; }

/* ---------- Phase 2: clients, onboarding, projects, tasks */
.reasons { list-style: none; margin: 6px 0; padding: 0; font-size: 13px; }
.reasons li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.reasons li:last-child { border-bottom: none; }
.reasons .minus { color: var(--bad); font-weight: 700; min-width: 44px; font-variant-numeric: tabular-nums; }
.big-score { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.big-score small { font-size: 13px; font-weight: 600; color: var(--muted); }
.big-score.good { color: var(--good); } .big-score.warn { color: var(--warn); } .big-score.bad { color: var(--bad); } .big-score.info { color: var(--blue); }
.bad-text { color: var(--bad); } .good-text { color: var(--good); }
.pre { white-space: pre-line; }
details.add { margin-top: 12px; }
details.add > summary { list-style: none; display: inline-flex; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: 12px; }
details.inline-menu { margin-top: 6px; }
details.inline-menu summary { cursor: pointer; color: var(--blue); }
details.inline-menu form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 220px; }
.file-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13px; }
.file-list li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.upload input[type=file] { width: auto; flex: 1; min-width: 0; padding: 6px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: none; }
.checklist .done { text-decoration: line-through; color: var(--muted); }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; color: #fff; font-size: 12px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tick.on { background: var(--good); border-color: var(--good); }
.w-form { max-width: 560px; }
.later-box h2 + p { margin-bottom: 14px; }
.task-board .col.t-blocked .col-head { box-shadow: inset 0 3px 0 var(--bad); border-radius: var(--radius) var(--radius) 0 0; }
.task-board .col.t-completed .col-head { box-shadow: inset 0 3px 0 var(--good); border-radius: var(--radius) var(--radius) 0 0; }
.task-board .col.t-in_progress .col-head { box-shadow: inset 0 3px 0 var(--blue); border-radius: var(--radius) var(--radius) 0 0; }
.task-board .col { flex-basis: 260px; }
.kpi .value.bad-text { color: var(--bad); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.grid + .grid, .grid + .card, .card + .grid, .table-wrap + .grid, .grid + .table-wrap, .card + .table-wrap { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.risk-list li > :last-child { align-self: flex-start; }
.chart.wide { max-width: 900px; }
.risk-list.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 32px; } @media (max-width: 900px) { .risk-list.cols2 { grid-template-columns: 1fr; } }
.btn-row input:not([type]), .btn-row input[type=date] { width: auto; flex: 1; min-width: 120px; } details.inline-menu form input { width: 100%; }
.filters > div { max-width: 100%; } .filters select { max-width: 100%; }

/* ---------- Phase 3: finance */
.nav-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6d82a6; padding: 12px 10px 4px; font-weight: 700; }
.nav-head:first-child { padding-top: 4px; }
.totals { margin: 14px 0 6px auto; max-width: 360px; font-size: 13.5px; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 15px; }
.muted-row td { color: var(--faint); }
.top-gap { margin-top: 16px; }
.w-xs { width: 80px !important; }
table.lines input { min-width: 0; }
table.lines td:first-child input { min-width: 220px; }
.cal-wrap { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.cal h3 { font-size: 13px; margin: 6px 0; }
.cal-grid { table-layout: fixed; }
.cal-grid th { text-align: center; padding: 4px; }
.cal-grid td { height: 74px; padding: 3px 4px; border: 1px solid var(--line); vertical-align: top; overflow: hidden; }
.cal-grid td.out { background: #f8fafc; }
.cal-grid td.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-grid .dn { font-size: 11px; color: var(--muted); font-weight: 700; }
.ev { display: block; font-size: 10.5px; line-height: 1.3; padding: 1px 4px; border-radius: 3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.ev:hover { text-decoration: none; filter: brightness(.95); }
.ev-bill, .legend i.ev-bill { background: var(--teal-soft); } .ev-due, .legend i.ev-due { background: var(--blue-soft); }
.ev-overdue, .legend i.ev-overdue { background: var(--bad-soft); } .ev-renew, .legend i.ev-renew { background: #fff1e6; }
.ev.more { color: var(--muted); }
.cal-legend i { border: 1px solid var(--line-2); }
@media (max-width: 900px) { .cal-wrap { grid-template-columns: 1fr; } .cal-grid td { height: 56px; } .ev { font-size: 9.5px; } }

/* ---------- Phase 4: advertising budgets */
.util-list { list-style: none; margin: 0; padding: 0; }
.util-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.util-list li:last-child { border-bottom: none; }
.util-head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.util-head > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubar { position: relative; height: 10px; background: #edf1f7; border-radius: 99px; margin: 4px 0; }
.ubar > i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 99px; }
.ubar.hot > i { background: #e7a33a; } .ubar.over > i { background: var(--bad); }
.ubar .tick { position: absolute; top: -2px; width: 2px; height: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line-2); transform: translateX(-1px); }
.ubar .pace { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--navy); transform: translateX(-1px); opacity: .7; }
.budget-block { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.budget-block:last-of-type { border-bottom: none; }

/* ---------- Phase 5: planning and reports */
.assumptions { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.assumptions li { margin-bottom: 4px; }
.driver-list { list-style: none; margin: 10px 0 0; padding: 0; }
.driver-list .drv { padding: 10px 0; border-top: 1px solid var(--line); }
.driver-list .drv:first-child { border-top: none; }
.driver-list .drv.ok, .driver-list .drv.no_data { opacity: .78; }
.drv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 3px; }
.driver-list .drv:target { background: var(--warn-soft); }
tr.sumrow td { font-weight: 700; border-top: 2px solid var(--line-2); }
.g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1200px) { .g5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px) { .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.day-nav { align-items: center; }
.day-nav > div { margin: 0; }
.flag-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 24px; }
@media (max-width: 900px) { .flag-grid { grid-template-columns: 1fr; } }
.eod-box { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; }
.eod-box p { margin: 6px 0; }
.eod-form textarea { min-height: 0; }
.dot.muted { background: var(--faint); }
/* meetings */
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
fieldset.field { border: none; padding: 0; margin: 0 0 12px; }
fieldset.field legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.agenda { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.agenda > li.card h2 { font-size: 15px; margin: 0 0 10px; }
.note-field { margin-top: 10px; margin-bottom: 0; }
.note-field textarea { min-height: 0; }
.act-list { list-style: none; padding: 0; margin: 0; }
.act-list .act { padding: 9px 0; border-top: 1px solid var(--line); }
.act-list .act:first-child { border-top: none; }
.act-list .act.done, .act-list .act.dropped { opacity: .7; }
.act-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.act-edit summary { cursor: pointer; color: var(--accent, #2563eb); margin-top: 4px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.inline-form input:not([type=date]) { flex: 1 1 220px; }
.inline-form select, .inline-form input[type=date] { width: auto; }
.act:target { background: var(--warn-soft); }
/* renewal calendar */
.cal-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cal-week { border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 64px; background: #fff; }
.cal-week.empty { background: #fafbfd; }
.cal-week-head { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cal-item { display: block; border-left: 3px solid var(--line-2); padding: 3px 0 3px 7px; margin-bottom: 5px; font-size: 12px; line-height: 1.35; color: var(--ink); }
.cal-item:hover { text-decoration: none; background: #f6f8fb; }
.cal-item span { display: block; color: var(--muted); font-size: 11px; }
.cal-item.tone-good { border-color: var(--good); } .cal-item.tone-warn { border-color: #e7a33a; } .cal-item.tone-bad { border-color: var(--bad); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.link-list li:first-child { border-top: none; }
/* owner dashboard layout */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash > .dash-full, .dash > .dash-sec { grid-column: 1 / -1; }
.dash > .dash-sec { margin: 8px 0 -6px; }
.dash > section > .card { margin-bottom: 16px; }
.dash > section > .card:last-child { margin-bottom: 0; }
.dash > .dash-full > .grid { margin-bottom: 0; }
@media (max-width: 1000px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.seg-sm a { padding: 5px 10px; font-size: 12px; }
.customise summary { cursor: pointer; }
.customise input.pos { width: 70px; }
.seg { flex-wrap: wrap; max-width: 100%; }
.util-list .badge, .risk-list .small .badge { white-space: normal; text-align: left; }
/* company profile */
.company-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .company-grid { grid-template-columns: minmax(0, 1fr); } }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 12px; margin-top: 4px; }
input.upper { text-transform: uppercase; }
.logo-preview { border: 1px dashed var(--line-2); border-radius: 8px; padding: 12px; background: #fff; text-align: center; }
.logo-preview img { max-width: 100%; max-height: 90px; }
.invoice-preview { font-size: 13px; line-height: 1.55; border-left: 3px solid var(--teal, #0e9f9a); padding-left: 12px; }
