:root {
  --navy: #142b4a;
  --blue: #2d75b9;
  --blue-soft: #eaf4fc;
  --ink: #1e2a36;
  --muted: #667384;
  --line: #dfe7ef;
  --paper: #ffffff;
  --bg: #f4f8fb;
  --green: #13795b;
  --red: #b42318;
  --shadow: 0 14px 40px rgba(20, 43, 74, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--blue); }
.shell { width: min(1180px, 94vw); margin: auto; padding: 28px 0 60px; }
.topbar { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 10px 0 24px; border-bottom: 1px solid var(--line); }
.brand, .topbar h1, h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
.brand { font-size: 1.35rem; color: var(--navy); text-decoration: none; font-weight: 700; }
.topbar h1 { margin: 0; font-size: 2rem; color: var(--navy); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { background: var(--blue-soft); color: var(--navy); border-radius: 999px; padding: 7px 12px; font-size: .86rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-top: 18px; box-shadow: var(--shadow); }
.card h2, .card h3 { color: var(--navy); margin: 0 0 8px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px; border-radius: 14px; background: var(--blue-soft); }
.stat strong { display: block; color: var(--navy); font: 700 2rem Georgia, serif; }
.stat span { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: block; margin: 12px 0 5px; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; font: inherit; }
textarea { min-height: 180px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(45,117,185,.16); border-color: var(--blue); }
.page-editor { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px; background: #f6f9fc; border-bottom: 1px solid var(--line); }
.editor-button, .editor-format { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); padding: 5px 9px; font: inherit; font-weight: 700; cursor: pointer; }
.editor-button:hover, .editor-format:focus { border-color: var(--blue); background: var(--blue-soft); }
.editor-button:nth-of-type(2), .editor-button:nth-of-type(3) { font-family: Georgia, serif; font-size: 1.05rem; }
.editor-canvas { min-height: 300px; padding: 16px; outline: none; line-height: 1.7; }
.editor-canvas:focus { box-shadow: inset 0 0 0 3px rgba(45,117,185,.12); }
.editor-canvas h2, .editor-canvas h3 { color: var(--navy); margin: 1em 0 .45em; }
.editor-canvas blockquote { border-left: 4px solid var(--blue); color: var(--muted); margin: 1em 0; padding-left: 14px; }
.editor-canvas img { max-width: 100%; height: auto; }
.editor-hint { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 10px 16px; background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; font-weight: 700; }
.btn:hover { background: var(--blue); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: #fff1f0; color: var(--red); }
.alert { padding: 12px 14px; border-radius: 10px; margin-top: 16px; font-weight: 600; }
.alert.error { background: #fff1f0; color: var(--red); }
.alert.success { background: #e9f8f1; color: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 12px 10px; vertical-align: top; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: .78rem; font-weight: 700; }
.status.published { background: #e9f8f1; color: var(--green); }
.status.draft { background: #eef1f4; color: var(--muted); }
.checks { display: grid; gap: 8px; margin-top: 12px; }
.check { display: flex; gap: 8px; align-items: center; padding: 9px 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; }
.check input { width: auto; }
.narrow { width: min(470px, 94vw); margin: 8vh auto; }
.login-mark { color: var(--blue); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.public-page { background: linear-gradient(135deg, #eef7fd, #f7fbf5); }
.public-shell { width: min(850px, 92vw); margin: auto; padding: 44px 0 80px; }
.public-card { background: var(--paper); border-radius: 24px; padding: clamp(28px, 6vw, 64px); margin-top: 30px; box-shadow: var(--shadow); }
.public-card h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.03; color: var(--navy); margin: 0 0 14px; }
.eyebrow { color: var(--blue); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
.lead { font-size: 1.1rem; color: var(--muted); }
.page-content { margin-top: 32px; font-size: 1.06rem; }
.page-content img { max-width: 100%; height: auto; }
.portal-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 24px; }
.portal-nav { position: sticky; top: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.portal-nav-title, .portal-nav-group > span { display: block; margin: 5px 10px 9px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.portal-nav-group { margin: 10px 0; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-nav-link { display: block; border-radius: 9px; padding: 9px 10px; color: var(--navy); text-decoration: none; font-weight: 700; }
.portal-nav-link:hover, .portal-nav-link.active { background: var(--blue-soft); color: var(--blue); }
.portal-nav-group .portal-nav-link { padding-left: 20px; font-size: .92rem; font-weight: 600; }
.portal-content { min-width: 0; }
.portal-section { scroll-margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.portal-section h2 { margin: 0 0 7px; color: var(--navy); }
.portal-kicker { margin: 0 0 6px; color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.portal-hero { background: linear-gradient(135deg, #eef7fd, #f7fbf5); }
.portal-stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.portal-stat { min-width: 150px; padding: 13px 16px; border: 1px solid rgba(45,117,185,.14); border-radius: 12px; background: rgba(255,255,255,.72); }
.portal-stat strong { display: block; color: var(--navy); font: 700 1.65rem Georgia, serif; }
.portal-stat span { color: var(--muted); font-size: .87rem; }
.portal-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.portal-link-card { display: flex; flex-direction: column; gap: 7px; min-height: 120px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); text-decoration: none; background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; }
.portal-link-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,43,74,.08); }
.portal-link-card strong { font: 700 1.15rem Georgia, serif; }
.portal-link-card span:not(.portal-number) { color: var(--muted); font-size: .9rem; }
.portal-link-card.disabled { cursor: default; opacity: .65; background: #f8fafc; }
.portal-link-card.disabled:hover { border-color: var(--line); transform: none; box-shadow: none; }
.portal-number { color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.invoice-app { background: #eef2f7; color: #0f172a; font-size: 14.5px; }
.invoice-shell { width: min(1240px, 94vw); margin: auto; padding: 24px 0 70px; }
.invoice-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0 22px; border-bottom: 1px solid #e2e8f0; }
.invoice-brand { display: inline-flex; align-items: center; gap: 10px; color: #1e3a8a; font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.invoice-brand svg { width: 32px; height: 32px; fill: none; stroke: #1e3a8a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.invoice-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.invoice-actions a { color: #1e3a8a; text-decoration: none; font-weight: 700; }
.invoice-user { color: #64748b; font-size: .88rem; }
.invoice-overview-hero, .invoice-detail-hero { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 30px 32px; margin-top: 24px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); }
.invoice-overview-hero h1, .invoice-detail-hero h1 { margin: 0 0 7px; color: #0f172a; font: 700 clamp(2rem, 4vw, 3rem) Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
.invoice-overview-hero p:not(.invoice-kicker), .invoice-detail-hero p:not(.invoice-kicker) { max-width: 760px; margin: 0; color: #64748b; font-size: 1rem; }
.invoice-detail-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.invoice-kicker { margin: 0 0 7px; color: #64748b; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.invoice-overview-copy { margin: 22px 0 34px; color: #64748b; font-size: 1rem; }
.invoice-section-label { margin-top: 12px; }
.invoice-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.invoice-summary-card { min-height: 150px; padding: 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); }
.invoice-summary-card.orange { color: #fff; background: linear-gradient(135deg, #9a3f0f, #c55f0b); border-color: #9a3f0f; }
.invoice-summary-card span { display: block; color: #64748b; font-weight: 700; }
.invoice-summary-card.orange span { color: #ffedc2; }
.invoice-summary-card strong { display: block; margin-top: 17px; color: #0f172a; font: 700 clamp(1.45rem, 2.5vw, 2rem) Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.03em; }
.invoice-summary-card.orange strong { color: #fff; }
.invoice-summary-card small { display: block; margin-top: 8px; color: #64748b; }
.invoice-summary-card.orange small { color: #ffedc2; }
.invoice-panel { margin-top: 24px; padding: 25px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); }
.invoice-panel h2 { margin: 0; color: #0f172a; font: 700 1.35rem Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; }
.invoice-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.invoice-muted { color: #64748b; font-size: .88rem; }
.invoice-primary-button, .invoice-secondary-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; border-radius: 9px; text-decoration: none; font-weight: 750; white-space: nowrap; }
.invoice-primary-button { color: #fff; background: #2563eb; }
.invoice-secondary-button { color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; }
.invoice-back { display: inline-block; margin-top: 22px; color: #1e3a8a; font-weight: 750; text-decoration: none; }
.invoice-list { display: grid; gap: 8px; }
.invoice-list-row { display: grid; grid-template-columns: 48px minmax(180px, 1.2fr) minmax(180px, 1fr) 110px 18px; align-items: center; gap: 14px; padding: 15px 12px; color: #0f172a; border-top: 1px solid #e2e8f0; text-decoration: none; }
.invoice-list-row:hover { background: #f8fafc; }
.invoice-file-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; color: #1e3a8a; background: #eff6ff; font-size: .7rem; font-weight: 850; }
.invoice-list-main { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.invoice-list-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-list-main small { color: #64748b; }
.invoice-list-categories { display: flex; gap: 5px; flex-wrap: wrap; }
.invoice-list-total { text-align: right; color: #b45309; }
.invoice-chevron { color: #94a3b8; font-size: 1.4rem; }
.category-pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.category-pill i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; font-style: normal; font-size: .76rem; }
.category-pill.personal-care { color: #166534; background: #dcfce7; }
.category-pill.daily-living { color: #1d4ed8; background: #dbeafe; }
.category-pill.transport-travel { color: #0369a1; background: #e0f2fe; }
.category-pill.community-support { color: #1e3a8a; background: #e0e7ff; }
.category-pill.other-support { color: #475569; background: #f1f5f9; }
.invoice-calendar-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.invoice-calendar { padding: 15px; border: 1px solid #e2e8f0; border-radius: 12px; }
.invoice-calendar h3 { margin: 0 0 12px; color: #1e3a8a; font: 700 1rem Inter, ui-sans-serif, system-ui, sans-serif; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekdays { margin-bottom: 4px; color: #94a3b8; font-size: .68rem; font-weight: 800; text-align: center; }
.calendar-day { position: relative; min-height: 40px; padding: 5px; border-radius: 7px; background: #f8fafc; color: #64748b; font-size: .74rem; }
.calendar-day.empty { background: transparent; }
.calendar-day.has-services { color: #0f172a; background: #eff6ff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.calendar-day strong { display: block; }
.calendar-day small { color: #64748b; }
.calendar-dot { display: inline-block; width: 6px; height: 6px; margin: 7px 2px 0 0; border-radius: 50%; }
.calendar-dot.personal-care { background: #16a34a; }
.calendar-dot.daily-living { background: #2563eb; }
.calendar-dot.transport-travel { background: #0ea5e9; }
.calendar-dot.community-support { background: #1e3a8a; }
.calendar-dot.other-support { background: #64748b; }
.invoice-category-legend { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.invoice-service-table { overflow-x: auto; }
.invoice-service-row { display: grid; grid-template-columns: 125px minmax(260px, 1fr) 110px 100px; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid #e2e8f0; color: #334155; }
.invoice-service-row > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; }
.invoice-service-row small { color: #64748b; overflow-wrap: anywhere; }
.invoice-service-row strong { text-align: right; color: #b45309; }
.invoice-service-header { border-top: 0; color: #64748b; font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.category-overview-list { display: grid; gap: 13px; }
.category-overview-row { display: grid; grid-template-columns: 250px minmax(120px, 1fr) 50px; gap: 14px; align-items: center; }
.category-bar { height: 9px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.category-bar span { display: block; height: 100%; border-radius: inherit; background: #16a34a; }
.category-overview-row strong { color: #64748b; text-align: right; }
@media (max-width: 850px) { .invoice-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .invoice-list-row { grid-template-columns: 42px minmax(180px, 1fr) 18px; } .invoice-list-categories, .invoice-list-total { grid-column: 2; text-align: left; } .invoice-chevron { grid-column: 3; grid-row: 1 / span 2; } .category-overview-row { grid-template-columns: 1fr 80px; } .category-overview-row .category-bar { grid-column: 1; } .category-overview-row strong { grid-column: 2; grid-row: 1; } }
@media (max-width: 600px) { .invoice-summary-grid { grid-template-columns: 1fr; } .invoice-detail-hero, .invoice-panel-heading { flex-direction: column; } .invoice-service-row { grid-template-columns: 1fr 1fr; } .invoice-service-header { display: none; } .invoice-service-row > span:nth-child(2) { grid-column: 1 / -1; } .invoice-service-row strong { text-align: right; } }
@media (max-width: 760px) { .grid, .grid-2 { grid-template-columns: 1fr; } .topbar { align-items: flex-start; flex-direction: column; } .actions { width: 100%; } }
@media (max-width: 860px) { .portal-layout { grid-template-columns: 1fr; } .portal-nav { position: static; } .portal-card-grid { grid-template-columns: 1fr; } }
.login-shell { min-height: 100vh; padding-top: 24px; }
.login-card { width: min(430px, 100%); margin: 12vh auto 0; padding: 30px 32px 34px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); }
.login-card h1 { margin: 0 0 22px; color: #0f172a; font: 700 2rem Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
.login-card .field { margin-bottom: 17px; }
.login-card label { display: block; margin: 0 0 7px; color: #0f172a; font-size: .88rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.login-card input { min-height: 44px; border-radius: 9px; border-color: #cbd5e1; }
.login-button { width: 100%; border: 0; cursor: pointer; }
.portal-shell { position: relative; }
.portal-topbar { border-bottom-color: #dbe3ed; }
.portal-top-actions { display: flex; align-items: center; gap: 16px; }
.portal-top-actions > a { color: #1e3a8a; font-weight: 700; text-decoration: none; }
.portal-menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 11px; border: 1px solid #bfdbfe; border-radius: 9px; color: #1e3a8a; background: #eff6ff; cursor: pointer; font: inherit; font-weight: 750; }
.portal-menu-toggle span { display: block; width: 16px; height: 2px; border-radius: 2px; background: #1e3a8a; }
.portal-menu-toggle b { font-size: .86rem; }
.portal-drawer { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); padding: 22px; overflow-y: auto; background: #fff; box-shadow: -12px 0 35px rgba(15,23,42,.18); transform: translateX(105%); transition: transform .2s ease; }
.menu-open .portal-drawer { transform: translateX(0); }
.portal-drawer-backdrop { position: fixed; z-index: 19; inset: 0; display: none; border: 0; background: rgba(15,23,42,.35); cursor: pointer; }
.menu-open .portal-drawer-backdrop { display: block; }
.portal-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 18px; color: #0f172a; border-bottom: 1px solid #e2e8f0; font-size: 1.08rem; }
.portal-menu-close { width: 32px; height: 32px; border: 1px solid #cbd5e1; border-radius: 8px; color: #1e3a8a; background: #fff; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.portal-menu-list { padding-top: 14px; }
.portal-menu-link { display: flex; align-items: flex-start; gap: 12px; padding: 12px 10px; border-radius: 9px; color: #0f172a; text-decoration: none; font-weight: 750; }
.portal-menu-link:hover, .portal-menu-link.active { color: #1e3a8a; background: #eff6ff; }
.portal-menu-link.disabled { color: #94a3b8; cursor: default; }
.portal-menu-link.disabled:hover { background: transparent; }
.portal-menu-link small { display: block; margin-top: 2px; color: #94a3b8; font-size: .72rem; font-weight: 600; }
.portal-menu-number { min-width: 30px; color: #64748b; font-size: .78rem; font-weight: 850; letter-spacing: .05em; }
.portal-menu-sublist { margin: 0 0 8px 20px; padding-left: 10px; border-left: 1px solid #dbe3ed; }
.portal-menu-child { padding-top: 9px; padding-bottom: 9px; font-size: .9rem; font-weight: 650; }
.portal-main { min-width: 0; }
.portal-hero-card { margin-top: 24px; padding: 30px 32px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05); }
.portal-hero-card h1 { margin: 0 0 8px; color: #0f172a; font: 700 clamp(2rem, 4vw, 3rem) Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
.portal-hero-card p:not(.invoice-kicker) { max-width: 760px; margin: 0; color: #64748b; font-size: 1rem; }
.portal-section-label { margin: 26px 0 0; }
.portal-summary-grid { margin-top: 14px; }
.portal-page-content .page-content { margin-top: 20px; color: #334155; }
.portal-page-content .page-content h2, .portal-page-content .page-content h3 { color: #0f172a; }
@media (max-width: 620px) { .invoice-shell { width: min(94vw, 1240px); } .portal-top-actions { gap: 9px; } .portal-top-actions .invoice-user { display: none; } .portal-hero-card { padding: 24px 22px; } .login-card { margin-top: 8vh; padding: 26px 22px 30px; } }
