:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --ink: #102650;
  --muted: #7183a2;
  --line: #dce7f5;
  --blue: #2463eb;
  --blue-dark: #153979;
  --violet: #6843e9;
  --green: #129b78;
  --amber: #e9a11b;
  --shadow: 0 18px 55px rgba(29, 73, 139, .10);
}
html[data-theme="dark"] {
  --bg: #0b1425;
  --surface: #14233b;
  --surface-soft: #182b47;
  --ink: #f2f6ff;
  --muted: #aec0dc;
  --line: #294564;
  --blue: #73a2ff;
  --blue-dark: #d9e6ff;
  --shadow: 0 18px 55px rgba(0, 0, 0, .24);
}
html[data-theme="ocean"] { --bg:#eaf7fb; --surface:#ffffff; --surface-soft:#f0fbfd; --ink:#123047; --muted:#52758a; --line:#c6e4ee; --blue:#087ea4; --blue-dark:#075985; --violet:#2563eb; --green:#0f8a75; --amber:#b7791f; --shadow:0 18px 55px rgba(8,126,164,.12); }
html[data-theme="forest"] { --bg:#f1f8f3; --surface:#ffffff; --surface-soft:#f5fbf6; --ink:#173b2b; --muted:#5d7b6a; --line:#cde5d4; --blue:#19734a; --blue-dark:#14532d; --violet:#4f46e5; --green:#16845b; --amber:#a16207; --shadow:0 18px 55px rgba(22,132,91,.11); }
html[data-theme="plum"] { --bg:#faf5ff; --surface:#ffffff; --surface-soft:#fdf8ff; --ink:#35134f; --muted:#806b91; --line:#ead8f4; --blue:#7c3aed; --blue-dark:#5b21b6; --violet:#c026d3; --green:#15803d; --amber:#a16207; --shadow:0 18px 55px rgba(124,58,237,.11); }
html[data-theme="slate"] { --bg:#eef2f6; --surface:#ffffff; --surface-soft:#f6f8fa; --ink:#1e293b; --muted:#64748b; --line:#d4dde7; --blue:#334155; --blue-dark:#0f172a; --violet:#475569; --green:#15803d; --amber:#a16207; --shadow:0 18px 55px rgba(51,65,85,.12); }
html[data-theme="contrast"] { --bg:#ffffff; --surface:#ffffff; --surface-soft:#f3f4f6; --ink:#000000; --muted:#374151; --line:#6b7280; --blue:#0037b3; --blue-dark:#001b59; --violet:#5b00b8; --green:#056b36; --amber:#7a4100; --shadow:0 18px 55px rgba(0,0,0,.16); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
.box { max-width: 560px; margin: 7vh auto; padding: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand img { width: 178px; max-height: 60px; object-fit: contain; object-position: left center; }
.brand-home { display: block; line-height: 0; }
.brand span { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(27px, 4vw, 40px); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: 24px; letter-spacing: -.025em; }
p { color: var(--muted); }
.notice { padding: 13px 15px; border: 1px solid #f4d7a9; border-radius: 13px; background: #fff8ed; color: #985318; }
.form { display: grid; gap: 16px; margin-top: 28px; }
.form label { display: grid; gap: 7px; color: var(--ink); font-weight: 800; }
.form input, .search, .topbar input, .list-tools input, .list-tools select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface); color: var(--ink); }
.form input:focus, input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 99, 235, .12); }
.primary, .button-primary { border: 0; border-radius: 11px; padding: 13px 18px; background: linear-gradient(100deg, var(--blue), var(--violet)); color: #fff; font-weight: 900; cursor: pointer; }
.app { display: flex; min-height: 100vh; }
.side { width: 268px; flex: 0 0 268px; padding: 25px 16px; border-right: 1px solid var(--line); background: var(--surface); }
.side .brand { justify-content: flex-start; margin: 0 10px 28px; }
.side .brand img { width: 142px; }
.side .brand span { margin-left: auto; font-size: 10px; }
.search { margin: 0 0 25px; background: var(--surface-soft); }
.nav-group { margin: 22px 0; }
.nav-title { display: block; margin: 0 10px 8px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; min-height: 38px; margin: 3px 0; padding: 9px 11px; border-radius: 10px; color: var(--muted); font-weight: 800; text-decoration: none; }
.nav a:hover, .nav a.active { background: #eaf2ff; color: var(--blue); }
.nav-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 999px; background: #fff1d6; color: #a15c00; font-size: 11px; }
html[data-theme="dark"] .nav a:hover, html[data-theme="dark"] .nav a.active { background: #213e66; }
.subnav { margin: 4px 0 0 17px; padding-left: 10px; border-left: 2px solid var(--line); }
.subnav a { min-height: 32px; padding: 7px 9px; font-size: 12px; }
.content { width: min(1440px, calc(100% - 268px)); padding: 26px clamp(20px, 4vw, 55px) 60px; }
.topbar { display: flex; align-items: center; gap: 13px; }
.topbar input { flex: 1; min-width: 170px; background: var(--surface); }
.page-size-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.page-size-control select { min-height: 42px; padding: 9px 28px 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.portal-live-clock { display:grid; gap:4px; width:max-content; max-width:100%; margin-top:18px; padding:10px 13px; border:1px solid rgba(191,219,254,.75); border-radius:12px; background:rgba(255,255,255,.12); }
.portal-live-clock span { color:#dbeafe; font-size:10px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.portal-live-clock strong { color:#fff; font-size:13px; line-height:1.35; }
.tools { display: flex; gap: 8px; align-items: center; }
.theme-control { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; font-weight:900; white-space:nowrap; }
.theme-control select { min-height:42px; padding:9px 28px 9px 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font-weight:800; cursor:pointer; }
.tools button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.tools form { margin: 0; }
.notification-center { position: relative; }
.notification-button { position: relative; min-width: 44px; font-size: 20px; }
.alert-icon { display: inline-grid; width: 20px; height: 20px; place-items: center; color: var(--violet); }
.alert-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-count { position: absolute; top: -6px; right: -5px; min-width: 18px; height: 18px; padding: 2px 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10px; line-height: 14px; font-weight: 900; }
.notification-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: min(380px, calc(100vw - 32px)); padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 16px 40px rgba(15,23,42,.18); }
.notification-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); }
.notification-head button { padding: 5px 8px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 800; }
.notification-item { display: flex; align-items: flex-start; gap: 8px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.notification-item a { display: grid; flex: 1; gap: 3px; color: var(--ink); text-decoration: none; }
.notification-item a:hover strong { color: var(--blue); }
.notification-item span { color: var(--muted); font-size: 12px; }
.notification-item > button { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.notification-empty { margin: 14px 4px 6px; color: var(--muted); font-size: 13px; }
.live-toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; width: min(390px, calc(100vw - 32px)); gap: 10px; pointer-events: none; }
.live-toast { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 15px; border: 1px solid #cbdaf1; border-left: 4px solid var(--blue); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 35px rgba(15,23,42,.18); pointer-events: auto; animation: live-toast-in .18s ease-out; transition: opacity .18s ease, transform .18s ease; }
.live-toast.is-closing { opacity: 0; transform: translateY(8px); }
.live-toast-success { border-left-color: #059669; }
.live-toast-error { border-left-color: #dc2626; }
.live-toast-copy { display: grid; gap: 4px; min-width: 0; }
.live-toast-copy strong { color: var(--ink); font-size: 13px; }
.live-toast-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.live-toast-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.live-toast-actions button { min-height: 28px; padding: 5px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.live-toast-actions .live-toast-action { background: #e8efff; }
.live-toast-actions .live-toast-close { padding: 2px 5px; color: var(--muted); font-size: 19px; line-height: 1; }
@keyframes live-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.email-tracking-item { align-items: center; }
.email-tracking-item > div { min-width: 0; }
.report-catalog { margin: 20px 0 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.report-catalog-card:first-child .report-catalog-link { border-color: var(--violet); box-shadow: 0 8px 22px rgba(104,67,233,.12); }
.report-catalog .card-heading { margin-bottom: 14px; }
.report-catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.report-catalog-card { min-width: 0; }
.report-catalog-card button, .report-catalog-link, .report-catalog-disabled { width: 100%; min-height: 154px; display: flex; align-items: flex-start; gap: 11px; position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; box-sizing: border-box; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; text-decoration: none; }
.report-catalog-card button:hover, .report-catalog-link:hover, .report-catalog-link:focus-visible { border-color: var(--blue); box-shadow: 0 10px 25px rgba(36,99,235,.13); transform: translateY(-2px); outline: none; }
.report-catalog-disabled { cursor: default; opacity: .75; }
.report-catalog-icon { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #e0e7ff; color: #3730a3; font-size: 19px; font-weight: 900; }
.report-catalog-copy { display: grid; gap: 6px; padding-right: 15px; }
.report-catalog-copy strong { font-size: 15px; line-height: 1.2; }
.report-catalog-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.report-catalog-copy em { color: #a15c00; font-size: 11px; font-style: normal; font-weight: 800; }
.report-catalog-arrow { position: absolute; right: 14px; bottom: 13px; color: var(--blue); font-size: 19px; font-weight: 900; }
html[data-theme="dark"] .report-catalog-icon { background: #213e66; color: #bfdbfe; }
html[data-theme="dark"] .report-catalog-copy em { color: #fbbf24; }
.report-dashboard-status { margin: 20px 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, var(--surface), var(--surface-soft)); }
.analytics-report-archive { margin: 20px 0; overflow: hidden; }
.analytics-report-archive { border-top: 4px solid var(--violet); box-shadow: 0 14px 34px rgba(30,64,175,.08); }
.analytics-report-archive .card-heading { padding: 20px 20px 14px; margin: 0; }
.analytics-report-static-table { max-height: 620px; overflow: auto; border-top: 1px solid var(--line); }
.analytics-report-static-table .report-table { min-width: 720px; margin: 0; }
.analytics-report-static-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-soft); }
.analytics-report-static-table tbody tr { transition: background .14s ease; }
.analytics-report-static-table tbody tr:hover { background: #eef4ff; }
.analytics-report-static-table th:first-child, .analytics-report-static-table td:first-child { width: 44px; text-align: center; color: var(--muted); }
.analytics-report-static-table td:nth-child(2) { min-width: 260px; }
.analytics-report-static-table td:nth-child(n+3) { white-space: nowrap; }
html[data-theme="dark"] .analytics-report-static-table tbody tr:hover { background: #1c3150; }
.analytics-report-static-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-soft) 55%, transparent); }
.report-status-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.report-status-heading h3 { margin: 0 0 5px; color: var(--ink); }
.report-status-heading p { margin: 0; }
.report-status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.report-status-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.report-status-card strong, .report-status-card span, .report-status-card small { display: block; }
.report-status-card strong { color: var(--blue); font-size: 25px; line-height: 1.1; }
.report-status-card span { margin-top: 6px; color: var(--ink); font-size: 13px; font-weight: 800; }
.report-status-card small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.revenue-workspace { margin: 20px 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.revenue-ledger-panel, .revenue-ledger-report { margin: 20px 0; padding: 20px; }
.revenue-entry-form, .revenue-entry-row, .revenue-report-filters { display: grid; gap: 12px; align-items: end; }
.revenue-entry-form { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.revenue-entry-row { grid-template-columns: 1.2fr .7fr .8fr 1.3fr auto; padding: 14px 0; border-top: 1px solid var(--line); }
.revenue-entry-form label, .revenue-entry-row label, .revenue-report-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.revenue-entry-form input, .revenue-entry-form select, .revenue-entry-row input, .revenue-entry-row select, .revenue-report-filters input, .revenue-report-filters select { min-width: 0; }
.revenue-entry-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.revenue-report-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.revenue-report-filters button, .revenue-report-filters a { min-height: 42px; align-self: end; }
.revenue-ledger-kpis { margin: 16px 0; }
.revenue-server-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.revenue-server-charts > article { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.revenue-bars { display: grid; gap: 12px; }
.revenue-bar-row { display: grid; grid-template-columns: minmax(100px, .9fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.revenue-bar-row span { overflow-wrap: anywhere; }
.revenue-bar-row strong { white-space: nowrap; font-size: 12px; }
.revenue-bar-track { height: 10px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--line) 75%, transparent); }
.revenue-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2167e8, #5d42df); }
.revenue-bar-track i.is-alt { background: linear-gradient(90deg, #12a886, #1b78d4); }
.table-scroll { overflow-x: auto; }
.table-scroll .report-table { min-width: 760px; }
.report-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0 20px; }
.report-chart-card { padding: 16px; min-height: 190px; }
.report-chart-card .card-heading { margin-bottom: 12px; }
.report-chart-bars { display: grid; gap: 10px; }
.report-chart-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.report-chart-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.report-chart-row strong { font-size: 12px; color: var(--ink); white-space: nowrap; }
.report-chart-track { height: 11px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.report-chart-track i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--violet)); }
.report-chart-pie { width: 118px; height: 118px; margin: 7px auto 12px; border-radius: 50%; box-shadow: inset 0 0 0 18px var(--surface); }
.report-chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.report-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chart-dot-opd { background: var(--blue); } .chart-dot-ipd { background: var(--violet); }
.revenue-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.revenue-report-card, .missing-revenue-worklist { padding: 17px; }
.revenue-report-card .card-heading, .missing-revenue-worklist .card-heading { margin-bottom: 12px; }
.report-mini-tools { display: flex; gap: 9px; margin: 0 0 10px; }
.report-mini-tools input { min-width: 0; flex: 1; }
.report-mini-tools select { min-width: 145px; }
.compact-report-table { min-width: 390px; }
.status-warning { color: #a15c00; background: #fff1d6; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; white-space: nowrap; }
html[data-theme="dark"] .status-warning { color: #fbbf24; background: #352c1b; }
.profile { display: flex; align-items: center; gap: 9px; padding-left: 10px; white-space: nowrap; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; font-weight: 900; }
.panel { display: none; }
.panel.active { display: block; }
.hero { position: relative; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; margin: 26px 0 22px; padding: 36px; border-radius: 24px; background: linear-gradient(105deg, rgba(16, 46, 100, .98) 0%, rgba(33, 88, 190, .94) 49%, rgba(102, 63, 226, .78) 100%), url("assets/portal-care-hero-v1.png") right center / cover no-repeat; box-shadow: var(--shadow); }
.app-staff .hero, .app-administrator .hero, .app-hr .hero { background-image: linear-gradient(105deg, rgba(9,39,77,.98), rgba(79,70,229,.84)), url("assets/portal-operations-hero-v1.png"); }
.hero:after { position: absolute; top: -95px; right: -55px; width: 260px; height: 260px; border-radius: 50%; background: rgba(150, 122, 255, .25); content: ""; }
.hero .eyebrow, .hero h1, .hero p { position: relative; z-index: 1; color: #fff; }
.hero h1 { max-width: 650px; margin: 8px 0; font-size: clamp(28px, 4vw, 43px); }
.hero p { margin: 0; color: #d8e8ff; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric, .surface-card, .appointment { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 30px rgba(31, 77, 142, .05); }
.metric { min-height: 110px; padding: 18px; }
.metric-link { display: block; color: var(--ink); text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.metric-link:hover, .metric-link:focus-visible { border-color: var(--blue); box-shadow: 0 10px 28px rgba(36, 99, 235, .16); transform: translateY(-2px); outline: none; }
.metric-action { border-color: #f0d49b; background: #fffaf0; }
html[data-theme="dark"] .metric-action { background: #352c1b; border-color: #6d5523; }
.metric .icon { display: inline-grid; width: fit-content; min-width: 32px; height: 32px; padding: 0 9px; place-items: center; margin-bottom: 12px; border-radius: 9px; background: #eaf2ff; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .04em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
html[data-theme="dark"] .metric .icon { background: #213e66; }
.metric strong { display: block; font-size: 17px; }
.metric span { color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.dashboard-focus { min-height: 205px; padding: 22px; }
.dashboard-focus h2 { margin-bottom: 0; }
.dashboard-focus-title { display: block; margin: 20px 0 4px; color: var(--ink); font-size: 18px; }
.dashboard-focus .status { display: inline-flex; margin-top: 10px; }
.dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.dashboard-actions .tab { min-height: 48px; padding: 12px 14px; text-align: left; }
.dashboard-mini-list { display: grid; gap: 8px; margin-top: 14px; }
.dashboard-mini-list a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; background: var(--surface-soft); }
.dashboard-mini-list a:hover, .dashboard-mini-list a:focus-visible { border-color: var(--blue); outline: none; }
.dashboard-mini-list span { color: var(--muted); font-size: 12px; }
.empty-inline { margin: 28px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 30px 0 14px; }
.section-head h2 { margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 25px 0 14px; }
.tab { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-weight: 900; cursor: pointer; }
.tab.active, .tab:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.list-tools { display: flex; gap: 10px; margin: 16px 0; }
.list-tools input { max-width: 430px; }
.list-tools select { max-width: 180px; }
.appointment { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 10px 0; padding: 17px 20px; }
.appointment:hover { border-color: #9bbcf6; transform: translateY(-1px); }
.appointment.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 99, 235, .11), var(--shadow); }
.appointment.selected .appointment-detail { display: grid; }
.appointment-detail { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.appointment-detail strong { display: block; margin-bottom: 1px; color: var(--ink); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.appointment-edit { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); align-items: end; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.appointment-edit label { display: grid; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.appointment-edit select, .appointment-edit textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: normal; }
.appointment-edit button { white-space: nowrap; grid-column: 1 / -1; justify-self: start; }
.appointment-message { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.appointment-message label { display: grid; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.appointment-message textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: normal; }
.button-secondary { border: 0; border-radius: 9px; padding: 10px 14px; background: #e0e7ff; color: #27347d; font-weight: 800; cursor: pointer; white-space: nowrap; }
.appointment-edit input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; }
.appointment strong { display: block; margin-bottom: 3px; font-size: 15px; }
.appointment .muted { color: var(--muted); font-size: 13px; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: #e8f8f2; color: var(--green); font-size: 11px; font-weight: 900; text-transform: capitalize; white-space: nowrap; }
.status[data-status*="cancel"] { background: #fff0ef; color: #d64a4a; }
.appointment .view { white-space: nowrap; font-weight: 900; }
.appointment-actions { flex: 0 0 auto; min-width: 245px; }
.appointment-actions .action-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 13px; border-radius: 10px; font-size: 12px; font-weight: 900; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.appointment-actions .action-view { border: 1px solid #b9cdf3; background: #eef4ff; color: var(--blue); }
.appointment-actions .action-edit { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.appointment-page { margin-top: 18px; }
.appointment-page .section-head { align-items: flex-start; margin-top: 0; }
.appointment-page-heading { gap: 28px; }
.appointment-page-heading h2 { margin: 5px 0 14px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -.025em; }
.appointment-summary { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px; max-width: 720px; margin: 0 0 11px; }
.appointment-summary > div { display: grid; gap: 4px; padding: 11px 14px; border: 1px solid #d8e4f7; border-radius: 11px; background: #f7faff; }
.appointment-summary span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.appointment-summary strong { color: var(--ink); font-size: 14px; line-height: 1.35; }
.appointment-date-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.appointment-routing { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; color: var(--blue); font-size: 14px; font-weight: 800; }
.appointment-page .section-head > .record-actions { flex: 0 0 auto; max-width: 100%; }
.appointment-page .record-actions .view, .appointment-page .record-actions .button-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 13px; border-radius: 10px; font-size: 12px; font-weight: 900; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.appointment-page .record-actions .view { border: 1px solid #b9cdf3; background: #eef4ff; color: var(--blue); }
.view, .record-actions a.view, .card-heading a.view, .calendar-card-actions .table-action, .appointment .view { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; box-sizing: border-box; padding: 9px 13px; border: 1px solid #b9cdf3; border-radius: 10px; background: linear-gradient(180deg, #f8fbff, #eaf2ff); color: var(--blue); font-size: 12px; font-weight: 900; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.record-actions a.view:hover, .card-heading a.view:hover, .calendar-card-actions .table-action:hover, .appointment .view:hover { border-color: var(--blue); background: #dce9ff; transform: translateY(-1px); }
.view:hover, .view:focus-visible { border-color: var(--blue); background: #dce9ff; transform: translateY(-1px); }
.record-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.message-reply-state { display: inline-flex; align-items: center; width: fit-content; margin-top: 6px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.message-awaiting { color: #9a5800; background: #fff4d6; }
.message-replied { color: #087a55; background: #dcf8ec; }
.appointment-whatsapp-button { background: #128c7e !important; border-color: #128c7e !important; color: #fff !important; }
.appointment-whatsapp-note { display: grid; gap: 5px; margin: 18px 0 0; padding: 14px 16px; border: 1px solid #b9e5dc; border-radius: 12px; background: #f0fdfa; color: #135e56; font-size: 13px; line-height: 1.5; }
.appointment-whatsapp-note strong { color: #0f766e; }
.appointment-page-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid #dbe6f5; gap: 0 26px; }
.appointment-page-details > div { min-width: 0; padding: 0 0 18px; }
.appointment-page-details strong { margin-bottom: 5px; color: #536b91; font-size: 10px; letter-spacing: .1em; }
.appointment-page-details > div:not(:nth-child(3n+1)) { border-left: 1px solid #e7eef8; padding-left: 20px; }
.appointment-page-details > div { color: #38557e; font-size: 14px; line-height: 1.45; }
.appointment-full-edit { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.appointment-full-edit label { display: grid !important; min-width: 0; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: .08em; line-height: 1.35; text-transform: uppercase; }
.appointment-full-edit input, .appointment-full-edit select, .appointment-full-edit textarea { display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14px/1.35 inherit; letter-spacing: normal; text-transform: none; }
.appointment-full-edit textarea { resize: vertical; }
.appointment-full-edit .field-help { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.full-edit-actions { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.full-edit-help { grid-column: 1 / -1; margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.full-edit-actions a { display: inline-block; padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 800; text-decoration: none; }
.success-notice { border-color: #b7ead8; background: #effcf7; color: #087f62; }
.booking-link { display: inline-block; text-decoration: none; }
.portal-booking-form { margin: 18px 0 22px; }
.portal-booking-form form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-booking-form label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.portal-booking-form input, .portal-booking-form select, .portal-booking-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: normal; text-transform: none; }
.portal-booking-form small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.portal-booking-form .booking-full, .portal-booking-form button { grid-column: 1 / -1; }
.portal-booking-form .consent { display: flex; align-items: flex-start; flex-direction: row; text-transform: none; letter-spacing: normal; }
.portal-booking-form .consent input { width: auto; margin-top: 4px; }
.surface-card { padding: 24px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-form label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.profile-form input, .profile-form select, .profile-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.profile-full, .profile-form button { grid-column: 1 / -1; }
.saved-profiles { display: grid; gap: 10px; }
.saved-profile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.saved-profile strong, .saved-profile span { display: block; }
.saved-profile span { color: var(--muted); font-size: 12px; }
.empty { border-style: dashed; box-shadow: none; }
.record-list { display: grid; gap: 12px; }
.record-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.record-card > div:first-child { min-width: 0; flex: 1 1 auto; }
.record-card strong, .record-card span { display: block; }
.record-card span { color: var(--muted); font-size: 12px; }
.record-card > div:first-child > span { display: block; margin-top: 4px; line-height: 1.45; }
.record-card .button-primary { display: inline-block; white-space: nowrap; text-decoration: none; }
.record-card .record-actions { flex: 0 0 auto; }
.patient-calendar-panel { margin: 18px 0; }
.patient-calendar-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.patient-calendar-month { border: 1px solid var(--line, #dbe3ef); border-radius: 14px; padding: 16px; background: #fbfdff; }
.patient-calendar-month h3 { margin: 0 0 12px; }
.patient-calendar-weekdays, .patient-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.patient-calendar-weekdays { color: var(--muted, #64748b); font-size: 11px; font-weight: 700; text-align: center; }
.calendar-day, .calendar-empty { min-height: 66px; border-radius: 8px; }
.calendar-day { padding: 6px; background: #fff; border: 1px solid #e5eaf1; overflow: hidden; }
.calendar-day.has-events { border-color: #a5b4fc; background: #eef2ff; }
.calendar-day > strong { display: block; font-size: 12px; color: #475569; }
.calendar-day a { display: block; margin-top: 5px; color: #312e81; text-decoration: none; line-height: 1.15; }
.calendar-day a span, .calendar-day a small { display: block; font-size: 10px; }
.calendar-day a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-scheduled-list { margin-top: 18px; }
.patient-scheduled-list h3 { margin: 0 0 10px; }
.scheduled-booking-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line, #e2e8f0); text-decoration: none; color: inherit; }
.scheduled-booking-row small, .scheduled-booking-row strong { display: block; }
.scheduled-booking-row small { color: var(--muted, #64748b); margin-top: 4px; }
.reschedule-request-panel { margin-top: 20px; padding: 18px; border: 1px solid #c7d2fe; border-radius: 14px; background: #eef2ff; }
.reschedule-request-panel h3 { margin-top: 0; }
.reschedule-request-panel form { display: grid; gap: 12px; max-width: 620px; }
.reschedule-request-panel label { display: grid; gap: 6px; font-weight: 700; }
.reschedule-request-panel input, .reschedule-request-panel textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #b8c7dc; border-radius: 8px; font: inherit; }
.field-required { color: #991b1b; }
.queue-request-note { margin-top: 8px; padding: 8px 10px; border-left: 3px solid #4f46e5; background: #eef2ff; color: #3730a3; font-size: 12px; line-height: 1.5; }
.appointment-view-banner { padding: 12px 14px; border-left: 4px solid #4f46e5; background: #eef2ff; color: #312e81; }
.urgent-review-card { border-color: #f87171 !important; }
.urgent-review-banner { display: grid; gap: 4px; margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid #dc2626; border-radius: 10px; background: #fef2f2; color: #991b1b; }
.urgent-review-banner strong { font-size: 15px; }
@media (max-width: 650px) { .scheduled-booking-row { display: grid; } .patient-calendar-months { grid-template-columns: 1fr; } .calendar-day, .calendar-empty { min-height: 58px; } }
.changelog-card { display: grid; gap: 14px; }
.changelog-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.changelog-card-head strong, .changelog-card-head span { display: block; }
.changelog-card-head strong { color: var(--ink); font-size: 16px; line-height: 1.35; }
.changelog-card-head span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.changelog-card > p { margin: 0; color: var(--muted); line-height: 1.6; }
.changelog-items { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--ink); line-height: 1.55; }
.changelog-delivery { display: grid; gap: 5px; padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.45; }
.changelog-delivery strong { color: var(--ink); font-size: 13px; }
@media (max-width: 640px) { .changelog-card-head { display: grid; } }
.review-summary { display: grid; grid-template-columns: auto auto; gap: 2px 9px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); white-space: nowrap; }
.review-summary strong { color: var(--blue); font-size: 18px; }
.review-summary span { color: var(--muted); font-size: 11px; }
.review-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.review-card-main { min-width: 0; flex: 1 1 auto; }
.review-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.review-card p { max-width: 760px; margin: 10px 0 0; }
.review-stars { color: #e39a14; letter-spacing: .06em; white-space: nowrap; }
.review-detail-card { margin: 18px 0 22px; }
.review-detail-card blockquote { margin: 18px 0; padding: 18px 20px; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--surface-soft); color: var(--ink); white-space: pre-wrap; }
.review-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-actions form { margin: 0; }
.review-status-pending, .review-status-draft { background: #fff4dd; color: #a15c00; }
.chat-record-page { margin-top: 18px; }
.chat-transcript { display: grid; gap: 12px; margin: 18px 0; }
.chat-message { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.chat-message strong, .chat-message small { display: block; }
.chat-message small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.chat-message p { margin: 9px 0 0; white-space: pre-wrap; }
.chat-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chat-links a { padding: 7px 10px; border-radius: 8px; background: #e0e7ff; font-size: 12px; font-weight: 800; text-decoration: none; }
.chat-reply-form { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.chat-record-page { display: none !important; }
.chat-detail-modern { margin-top: 22px; padding: clamp(18px, 3vw, 30px); }
.chat-detail-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; }
.modern-transcript { display: grid; gap: 12px; max-height: 680px; overflow: auto; padding: 4px; }
.modern-transcript .chat-message { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.modern-transcript .chat-message p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.modern-transcript .chat-message small { display: block; margin-top: 4px; color: var(--muted); }
.chat-ops-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.chat-ops-card h3, .chat-reply-modern h3 { margin-top: 0; }
.chat-facts { display: grid; gap: 8px; margin: 14px 0 18px; }
.chat-facts span { display: grid; gap: 3px; padding: 9px 11px; border-radius: 9px; background: var(--surface); }
.chat-facts b { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.chat-workflow-form { display: grid; gap: 11px; }
.chat-workflow-form label, .chat-reply-modern label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.chat-workflow-form input, .chat-workflow-form select, .chat-workflow-form textarea, .chat-reply-modern select { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.chat-whatsapp-button { display: flex; justify-content: center; margin-top: 11px; background: #128c7e; border-color: #128c7e; color: #fff; }
.chat-warning { margin: 12px 0 0; padding: 11px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13px; }
.chat-reply-modern { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .chat-detail-layout { grid-template-columns: 1fr; } .modern-transcript { max-height: none; } }
.chat-reply-form label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.chat-reply-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); resize: vertical; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-catalog { max-width: none; }
.report-catalog-grid { display: block; }
.report-catalog-list-wrap { display: block; }
.report-catalog-page-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 2px; }
.report-catalog-page-controls button:disabled { opacity: .45; cursor: not-allowed; }
.report-catalog-page-label { min-width: 92px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.queue-item .record-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-item .record-actions a { text-decoration: none; }
.queue-item .muted { line-height: 1.5; }
.booking-warning { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #efc86b; border-radius: 10px; background: #fff8e7; color: #694900; font-size: 15px; font-weight: 700; line-height: 1.45; }
.report-detail-page .report-catalog { display: none; }
.report-detail-back { margin: 0 0 16px; }
.report-detail-page .report-builder { max-width: none; }
.report-detail-page .report-results { min-height: 280px; }

/* Reports hub: keep the category/list renderer full-width and compact. */
.report-catalog { width: 100%; padding: 22px; }
.report-catalog-grid { display: block !important; width: 100%; }
.report-catalog-tabs { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 9px; width: 100%; }
.report-catalog-tab { min-height: 44px; text-align: left; }
.report-catalog-grid > .report-catalog-list-wrap { display: block !important; width: 100%; margin-top: 14px; }
.report-catalog-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.report-catalog-list .report-catalog-card { width: 100%; }
.report-catalog-list .report-catalog-link, .report-catalog-list .report-catalog-disabled { width: 100%; min-height: 112px; }
.report-catalog-page-controls { min-height: 44px; }
@media (max-width: 1050px) { .report-catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .report-catalog { padding: 15px; } .report-catalog-list { grid-template-columns: 1fr; } .report-catalog-list .report-catalog-link, .report-catalog-list .report-catalog-disabled { min-height: 96px; } }

/* Final report-directory layout: no phantom column, no centred rail. */
.report-focus-overview .report-catalog { overflow: visible; }
.report-focus-overview .report-catalog-grid { display: block !important; width: 100% !important; min-height: 0 !important; }
.report-focus-overview .report-catalog-grid > .report-catalog-tabs { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: stretch; width: 100% !important; margin: 0 0 16px !important; }
.report-focus-overview .report-catalog-grid > .report-catalog-list-wrap { display: block !important; width: 100% !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
.report-focus-overview .report-catalog-list-wrap > .report-catalog-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; }
.report-focus-overview .report-catalog-list-wrap > .report-catalog-list > .report-catalog-card { display: block !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; }
.report-focus-overview .report-catalog-list .report-catalog-link, .report-focus-overview .report-catalog-list .report-catalog-disabled { display: grid !important; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; width: 100% !important; min-height: 118px !important; height: 100%; padding: 15px !important; }
.report-focus-overview .report-catalog-copy { min-width: 0; overflow-wrap: anywhere; }
.report-focus-overview .report-catalog-copy > span { display: block; }
.report-focus-overview .report-catalog-tab { min-height: 46px; border-radius: 11px; text-align: left; }
.report-focus-overview .report-catalog-page-controls { grid-column: 1 / -1; }
.report-focus-overview .section-head-actions { align-items: center; }
@media (max-width: 1050px) { .report-focus-overview .report-catalog-list-wrap > .report-catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .report-focus-overview .report-catalog { padding: 15px; } .report-focus-overview .report-catalog-grid > .report-catalog-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-focus-overview .report-catalog-list-wrap > .report-catalog-list { grid-template-columns: 1fr; } .report-focus-overview .report-catalog-list .report-catalog-link, .report-focus-overview .report-catalog-list .report-catalog-disabled { min-height: 100px !important; } }
.report-view-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.report-view-tab { min-width: 0; }
@media (max-width: 680px) { .report-view-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report-toolbar { display: flex; gap: 10px; margin: 18px 0; }
.report-toolbar input { flex: 1 1 360px; }
.report-toolbar select { max-width: 190px; }
.report-panel { min-width: 0; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-heading h3 { margin: 0; }
.report-row { min-height: 44px; }
.report-row strong { color: var(--blue); font-size: 15px; }
.report-pager { margin-bottom: 0; }
.application-card { align-items: center; }
.application-summary { min-width: 0; flex: 1 1 auto; }
.application-summary strong, .application-summary span { display: block; }
.application-role { margin-top: 5px; color: var(--ink) !important; font-size: 14px !important; font-weight: 800; }
.application-meta { display: flex !important; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.application-meta span { color: var(--muted); }
.application-detail-card { margin: 18px 0 24px; }
.application-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.application-fields strong, .application-fields span { display: block; }
.application-fields strong { margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.report-rows { display: grid; gap: 8px; }
.report-rows div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 9px; background: var(--surface-soft); }
.report-rows span { color: var(--muted); }
.report-builder { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(170px,.7fr) minmax(260px,1.5fr) minmax(170px,.7fr); gap: 12px; align-items: end; }
.report-builder label { display: flex; flex-direction: column; gap: 6px; color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.report-builder input, .report-builder select { width: 100%; box-sizing: border-box; }
.report-summary-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 10px 0 14px; }
.report-results { overflow: hidden; }
.live-badge { color: #047857; background: #d1fae5; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; }
.report-results #report-results-table .report-table { min-width: 1480px; }
.report-results #report-results-table td, .report-results #report-results-table th { white-space: nowrap; }
.report-results #report-results-table td:nth-child(6), .report-results #report-results-table td:nth-child(10) { white-space: normal; min-width: 180px; max-width: 280px; }
.report-table th { color: var(--muted); text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 11px 12px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.report-table td { padding: 14px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); color: var(--muted); }
.report-table tr:last-child td { border-bottom: 0; }
.report-table td strong { color: var(--navy); }
.table-action { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid #bfd3f5; border-radius: 9px; color: var(--blue); font-weight: 800; text-decoration: none; white-space: nowrap; }
.table-action:hover, .table-action:focus { background: #eaf2ff; }
.report-empty { text-align: center; padding: 34px !important; }
.panel > .section-head { position: relative; overflow: hidden; min-height: 142px; margin: 0 0 22px; padding: 26px 30px; border-radius: 22px; background: linear-gradient(115deg,#102f50,#3730a3); box-shadow: 0 14px 30px rgba(30,64,175,.14); }
.panel > .section-head::after { content: "✦"; position: absolute; right: 30px; bottom: 12px; color: rgba(255,255,255,.18); font-size: 120px; line-height: 1; pointer-events: none; }
.panel > .section-head h2, .panel > .section-head p { position: relative; z-index: 1; color: #fff; }
.panel > .section-head h2 { max-width: 72%; font-size: clamp(25px,3vw,36px); }
.panel > .section-head > div { position: relative; z-index: 1; }
.panel > .section-head .eyebrow { color: #bfdbfe; }
#appointments > .section-head { background: linear-gradient(115deg,rgba(16,47,80,.94),rgba(37,99,235,.88)), url("assets/portal-appointments-hero-v1.png") center/cover; }
#records > .section-head { background: linear-gradient(115deg,rgba(16,47,80,.94),rgba(14,116,144,.84)), url("assets/portal-care-hero-v1.png") center/cover; }
#messages > .section-head { background: linear-gradient(115deg,rgba(9,39,77,.96),rgba(15,118,110,.86)), url("assets/portal-messages-hero-v1.png") center/cover; }
#operations > .section-head { background: linear-gradient(115deg,rgba(9,39,77,.96),rgba(37,99,235,.86)), url("assets/portal-operations-hero-v1.png") center/cover; }
#reports > .section-head { background: linear-gradient(115deg,rgba(16,47,80,.94),rgba(79,70,229,.84)), url("assets/portal-reports-hero-v1.png") center/cover; }
#recruitment > .section-head { background: linear-gradient(115deg,rgba(9,39,77,.92),rgba(124,58,237,.78)), url("assets/portal-recruitment-hero-v1.png") center/cover; }
#admin > .section-head { background: linear-gradient(115deg,#102f50,#475569); }
#billing > .section-head, #profiles > .section-head, #candidate > .section-head { background: linear-gradient(115deg,#102f50,#0369a1); }
#appointments > .section-head::after { content: "◫"; }
#records > .section-head::after { content: "⌁"; }
#messages > .section-head::after { content: "☏"; }
#operations > .section-head::after { content: "✓"; }
#reports > .section-head::after { content: "▥"; }
#recruitment > .section-head::after { content: "♙"; }
#admin > .section-head::after { content: "⚙"; }
#billing > .section-head::after { content: "₹"; }
#profiles > .section-head::after, #candidate > .section-head::after { content: "◎"; }
.booking-calendar-page > .section-head { background: linear-gradient(115deg,rgba(9,39,77,.96),rgba(5,150,105,.86)), url("assets/portal-appointments-hero-v1.png") center/cover; }
.booking-calendar-page > .section-head::after { content: "▦"; }
.dashboard-urgent-card { border-color:#fca5a5 !important; background:linear-gradient(135deg,#fff1f2,#fff7ed) !important; }
.dashboard-urgent-card .icon, .dashboard-urgent-card strong { color:#b91c1c; }
.calendar-toolbar { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin-bottom:18px; padding:14px; }
.calendar-toolbar a, .calendar-date-form button { min-height:42px; }
.calendar-date-form { display:flex; align-items:end; gap:10px; flex:1 1 280px; margin:0; }
.calendar-date-form label { display:grid; gap:5px; color:var(--ink); font-size:12px; font-weight:800; flex:1; }
.calendar-date-form input { min-height:42px; box-sizing:border-box; width:100%; }
.calendar-day-heading { display:flex; align-items:end; justify-content:space-between; gap:15px; margin:20px 0 14px; }
.calendar-day-heading h3 { margin:3px 0 0; font-size:24px; color:var(--ink); }
.calendar-day-heading > strong { color:var(--blue); }
.booking-calendar-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(330px,.85fr); gap:18px; align-items:start; }
.booking-day-grid { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.calendar-hour { display:grid; grid-template-columns:76px minmax(0,1fr); min-height:82px; border-bottom:1px solid var(--line); }
.calendar-hour:last-child { border-bottom:0; }
.calendar-hour > span { padding:15px 10px; color:var(--muted); font-size:12px; font-weight:900; text-align:right; background:var(--surface-soft); border-right:1px solid var(--line); }
.calendar-hour-line { display:grid; gap:8px; padding:9px 10px; min-width:0; background:linear-gradient(to bottom, transparent 0, transparent 50%, rgba(148,163,184,.10) 51%, transparent 52%); }
.calendar-booking-card, .calendar-list-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; align-items:center; padding:11px 13px; border:1px solid #bfdbfe; border-left:4px solid var(--blue); border-radius:11px; background:#eff6ff; box-shadow:0 4px 10px rgba(30,64,175,.06); }
.calendar-booking-card > div:first-child, .calendar-list-item > div:first-child { display:grid; gap:3px; min-width:0; }
.calendar-booking-card strong, .calendar-list-item strong { color:var(--ink); overflow-wrap:anywhere; }
.calendar-booking-card span, .calendar-booking-card small, .calendar-list-item span { color:var(--muted); font-size:12px; }
.calendar-card-actions { display:flex; gap:6px; grid-column:1 / -1; }
.calendar-card-actions .table-action { min-height:32px; padding:0 10px; font-size:12px; }
.calendar-list-panel { position:sticky; top:18px; margin:0; }
.calendar-list-items { display:grid; gap:10px; }
.calendar-list-item { grid-template-columns:minmax(0,1fr) auto; background:var(--surface); border-left-color:#10b981; }
.calendar-list-item.urgent-review-card, .calendar-booking-card.urgent-review-card { border-color:#fca5a5; border-left-color:#dc2626; background:#fff1f2; }
@media (max-width:900px) { .booking-calendar-layout { grid-template-columns:1fr; } .calendar-list-panel { position:static; } }
@media (max-width:600px) { .calendar-toolbar { display:grid; align-items:stretch; } .calendar-toolbar a, .calendar-date-form, .calendar-date-form button { width:100%; } .calendar-date-form { display:grid; } .calendar-hour { grid-template-columns:60px minmax(0,1fr); } .calendar-hour > span { padding-left:5px; padding-right:7px; font-size:10px; } .calendar-booking-card, .calendar-list-item { grid-template-columns:1fr; } .calendar-booking-card > .status, .calendar-list-item > .status { justify-self:start; } }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0; }
.pager button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); cursor: pointer; }
.pager button:disabled { cursor: not-allowed; opacity: .45; }
.admin-user-metrics { margin-bottom: 22px; }
.admin-user-card { min-height: 76px; }
.admin-scope-note { margin-top: 18px; }
.audit-metrics { margin-bottom: 22px; }
.audit-card { min-height: 76px; }
.audit-card p { margin: 8px 0 0; color: var(--muted); }
.analytics-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.analytics-toolbar { align-items: end; }
.analytics-toolbar label { display: flex; flex: 1 1 180px; flex-direction: column; gap: 6px; color: var(--navy); font-size: 12px; font-weight: 800; }
.analytics-toolbar select { max-width: none; width: 100%; }
#analytics .report-results { margin-top: 18px; }
.report-builder { align-items: end; }
.report-builder label { min-width: 150px; }
.report-builder .report-search-label { flex: 1 1 260px; }
.report-builder input, .report-builder select, .report-builder button { min-height: 42px; }
.report-builder button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); cursor: pointer; }
.section-head-actions { margin-top: 12px; }
.section-head-actions button { padding: 10px 15px; border: 1px solid rgba(255,255,255,.6); border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-weight: 800; cursor: pointer; }
.medical-file-card { align-items: center; }
.document-tags { display:flex !important; flex-wrap:wrap; gap:5px; margin-top:5px; }
.listing-filter-link { color:var(--blue); font-weight:800; text-decoration:none; }
.listing-filter-link:hover, .listing-filter-link:focus-visible { text-decoration:underline; }
.document-tags b { padding:3px 8px; border-radius:999px; background:#e0e7ff; color:#3730a3; font-size:11px; }
.document-tag-editor { width:100%; max-width:330px; }
.document-tag-editor summary { padding:8px 10px; border:1px solid var(--line); border-radius:8px; color:var(--blue); cursor:pointer; font-weight:800; }
.document-tag-editor form { display:grid; gap:7px; margin-top:8px; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); }
.document-tag-editor label { display:grid; gap:5px; color:var(--ink); font-size:12px; font-weight:800; }
.document-tag-editor input { width:100%; box-sizing:border-box; min-height:36px; padding:7px 9px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); }
.medical-file-card .record-actions { flex-wrap: wrap; justify-content: flex-end; }
.medical-file-card form { margin: 0; }
.file-preview-modal[hidden] { display: none; }
.file-preview-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 22px; }
.file-preview-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.72); }
.file-preview-dialog { position: relative; z-index: 1; width: min(1000px, 100%); height: min(86vh, 780px); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(15,23,42,.3); }
.file-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.file-preview-head h2 { margin: 0; font-size: 18px; }
.file-preview-head button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.file-preview-dialog iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.button-danger { padding: 10px 13px; border: 1px solid #fecaca; border-radius: 9px; background: #fff1f2; color: #b91c1c; cursor: pointer; font-weight: 700; }
.mail-queue-page .section-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail-queue-page .mail-queue-delete-all { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.mail-queue-page .mail-queue-delete-all label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 800; }
.mail-queue-page .mail-queue-delete-all input { min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.mail-queue-page .mail-queue-item { position: relative; }
.mail-queue-page .mail-queue-summary { display: grid; gap: 4px; padding-right: 150px; }
.mail-queue-page .mail-queue-summary strong { color: var(--ink); }
.mail-queue-page .mail-queue-item > .status { position: absolute; top: 18px; right: 18px; }
.mail-queue-page .mail-queue-item details { margin-top: 14px; }
.mail-queue-page .mail-queue-item .record-actions { margin-top: 14px; }
.mail-queue-page .mail-queue-item .record-actions form { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-queue-page .mail-preview { overflow: auto; max-height: 480px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.medical-record-tools { align-items: center; margin: 18px 0 12px; }
.medical-record-tools input { flex: 1 1 280px; }
.medical-record-tools select { flex: 0 1 180px; }
.record-result-count { color: var(--muted); font-size: 13px; font-weight: 700; }
@media (max-width: 900px) { .side { width: 220px; flex-basis: 220px; } .content { width: calc(100% - 220px); padding-inline: 20px; } .quick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .app { display: block; } .side { width: 100%; padding: 13px; border-right: 0; border-bottom: 1px solid var(--line); } .side .brand { margin-bottom: 13px; } .nav { display: flex; gap: 4px; overflow-x: auto; } .nav-group { min-width: max-content; margin: 0; } .nav-title, .subnav { display: none; } .nav a { min-height: 34px; padding: 8px 10px; } .content { width: 100%; padding: 16px; } .hero { min-height: 270px; padding: 25px; background-position: 62% center; } .topbar { flex-wrap: wrap; } .topbar input { order: 2; flex-basis: 100%; } .page-size-control { order: 3; } .tools { margin-left: auto; } .profile { display: none; } .appointment { align-items: stretch; flex-direction: column; gap: 14px; } .appointment-actions { min-width: 0; width: 100%; justify-content: stretch; } .appointment-actions .action-button { flex: 1 1 0; } .appointment-detail, .appointment-page-details, .appointment-full-edit, .portal-booking-form form { grid-template-columns: 1fr; } .appointment-page-details > div:not(:nth-child(3n+1)) { border-left: 0; padding-left: 0; } .appointment-edit, .appointment-message { grid-template-columns: 1fr; align-items: stretch; } .list-tools { flex-direction: column; } .list-tools input, .list-tools select { max-width: none; } .profile-grid, .profile-form, .report-grid { grid-template-columns: 1fr; } .profile-full, .profile-form button { grid-column: auto; } .appointment-page .section-head { flex-direction: column; } .appointment-summary { grid-template-columns: 1fr; } .appointment-summary strong { font-size: 13px; } .record-actions { justify-content: flex-start; } .full-edit-actions { flex-wrap: wrap; } .portal-booking-form .booking-full, .portal-booking-form button { grid-column: auto; } .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .analytics-toolbar { display: flex; flex-direction: column; align-items: stretch; } .analytics-toolbar label, .analytics-toolbar button { width: 100%; } }
@media (max-width: 680px) { .notification-panel { position: fixed; top: 76px; right: 12px; } }
@media (max-width: 680px) { .live-toast-region { right: 12px; bottom: 12px; width: calc(100vw - 24px); } .live-toast { gap: 8px; padding: 12px; } .live-toast-actions { gap: 1px; } }
@media (max-width: 680px) { .application-card { align-items: stretch; } .application-card .record-actions { width: 100%; } .application-card .record-actions a { flex: 1 1 auto; text-align: center; } .application-fields { grid-template-columns: 1fr; } .report-toolbar { flex-direction: column; } .report-toolbar input, .report-toolbar select { max-width: none; width: 100%; } }
@media (max-width: 680px) { .review-card { display: block; } .review-card .record-actions { justify-content: flex-start; margin-top: 14px; } .review-card-heading { align-items: flex-start; flex-direction: column; gap: 5px; } .review-summary { width: 100%; } }
@media (max-width: 680px) { .medical-file-card { align-items: stretch; } .medical-file-card .record-actions { justify-content: flex-start; } .medical-file-card .record-actions > *, .medical-file-card form { flex: 1 1 140px; } .medical-file-card .record-actions a, .medical-file-card .record-actions button { width: 100%; text-align: center; } .file-preview-modal { padding: 8px; } .file-preview-dialog { height: 92vh; } }
@media (max-width: 680px) { .dashboard-grid { grid-template-columns: 1fr; } .dashboard-focus { min-height: 0; padding: 18px; } .dashboard-actions { gap: 10px; } .dashboard-actions .tab { min-height: 52px; } }
@media (max-width: 900px) { .report-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .report-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .revenue-report-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .report-catalog { padding: 14px; } .report-catalog-grid { grid-template-columns: 1fr; } .report-catalog-card button, .report-catalog-link, .report-catalog-disabled { min-height: 112px; } }
@media (max-width: 680px) { .revenue-workspace { padding: 14px; } .report-mini-tools { flex-direction: column; } .report-mini-tools input, .report-mini-tools select { width: 100%; min-height: 42px; } }
@media (max-width: 900px) { .revenue-entry-form, .revenue-report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .revenue-server-charts { grid-template-columns: 1fr; } .revenue-entry-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .revenue-entry-actions { grid-column: 1 / -1; } }
@media (max-width: 680px) { .revenue-entry-form, .revenue-report-filters, .revenue-entry-row { grid-template-columns: 1fr; } .revenue-report-filters button, .revenue-report-filters a, .revenue-entry-actions button { width: 100%; justify-content: center; } .revenue-bar-row { grid-template-columns: 1fr; gap: 5px; } }
@media (max-width: 680px) { .report-chart-grid { grid-template-columns: 1fr; } .report-chart-row { grid-template-columns: 78px 1fr auto; } }
@media (max-width: 680px) { .report-builder { display: flex; flex-direction: column; align-items: stretch; } .report-builder label { width: 100%; } .report-summary-line { display: block; } .report-summary-line span { display: block; margin-bottom: 5px; } }

.newsletter-signup { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr); gap:24px; margin:34px 0 18px; padding:25px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(135deg,#f3f9ff,#f7fffd); box-shadow:var(--shadow); }
.newsletter-copy h2 { margin:0 0 8px; color:var(--navy); font-size:24px; }
.newsletter-copy p:last-child { margin:0; color:var(--muted); font-size:14px; line-height:1.6; }
.newsletter-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.newsletter-form label { display:grid; gap:6px; color:var(--ink); font-size:11px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.newsletter-form input[type="text"],.newsletter-form input[type="email"],.newsletter-form input[type="tel"] { box-sizing:border-box; width:100%; min-height:42px; padding:10px 11px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink); font-size:14px; letter-spacing:normal; text-transform:none; }
.newsletter-form .newsletter-consent { display:flex; grid-column:1 / -1; gap:8px; align-items:flex-start; color:var(--muted); font-size:12px; font-weight:600; letter-spacing:normal; line-height:1.45; text-transform:none; }
.newsletter-form .newsletter-consent input { flex:0 0 auto; margin-top:3px; }
.newsletter-form button,.newsletter-form small { grid-column:1 / -1; }
.newsletter-form small { color:var(--muted); font-size:11px; line-height:1.45; }
.newsletter-honeypot { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; opacity:0 !important; }
.newsletter-notice { grid-column:1 / -1; margin:0; }
.newsletter-admin-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.newsletter-admin-form label { display:grid; gap:6px; color:var(--ink); font-size:11px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.newsletter-admin-form label:nth-of-type(n+3),.newsletter-admin-form button { grid-column:1 / -1; }
.newsletter-admin-form input,.newsletter-admin-form textarea { box-sizing:border-box; width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:500 14px/1.4 inherit; letter-spacing:normal; text-transform:none; }
.integration-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.integration-options div { display:grid; gap:6px; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.integration-options strong { color:var(--navy); font-size:14px; }
.integration-options span { color:var(--muted); font-size:12px; line-height:1.5; }
.portal-footer { display:flex; justify-content:space-between; gap:15px; margin:20px 0 8px; padding:17px 0 0; border-top:1px solid var(--line); color:var(--muted); font-size:11px; line-height:1.5; }
.portal-footer a { color:var(--blue); text-decoration:none; }
@media (max-width:680px) { .newsletter-signup { display:block; padding:18px; } .newsletter-copy { margin-bottom:18px; } .newsletter-form,.newsletter-admin-form,.integration-options { grid-template-columns:1fr; } .newsletter-admin-form label:nth-of-type(n+3),.newsletter-admin-form button { grid-column:auto; } .portal-footer { flex-direction:column; } }
@media (max-width: 680px) { .panel > .section-head { min-height: 112px; padding: 21px; border-radius: 17px; } .panel > .section-head h2 { max-width: 82%; font-size: 26px; } .panel > .section-head::after { right: 14px; font-size: 86px; } }
#messages { display: none !important; }
.helpdesk-panel { margin-top: 20px; }
.helpdesk-booking-bar, .helpdesk-tools { display: flex; align-items: end; gap: 14px; margin: 18px 0; }
.helpdesk-booking-bar label { display: grid; gap: 7px; flex: 1 1 460px; color: var(--ink); font-weight: 800; }
.helpdesk-booking-bar select, .helpdesk-tools input, .helpdesk-tools select { min-height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.helpdesk-booking-bar select { width: 100%; }
.helpdesk-booking-summary { display: grid; gap: 5px; flex: 1 1 420px; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 13px; }
.helpdesk-booking-summary strong { color: var(--ink); }
.helpdesk-booking-summary a { width: max-content; }
.helpdesk-tools input { flex: 1 1 360px; }
.helpdesk-tools select { flex: 0 1 210px; }
.helpdesk-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.helpdesk-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.helpdesk-table th { padding: 13px 14px; background: var(--surface-soft); color: var(--muted); text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.helpdesk-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.helpdesk-table td strong, .helpdesk-table td small { display: block; }
.helpdesk-table td strong { color: var(--ink); }
.helpdesk-table td small { margin-top: 4px; font-size: 12px; }
.helpdesk-message-cell { max-width: 460px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink) !important; }
.helpdesk-direction { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 12px; font-weight: 800; white-space: nowrap; }
.helpdesk-patient { background: #dcfce7; color: #047857; }
.helpdesk-staff { background: #dbeafe; color: #1d4ed8; }
.helpdesk-hospital-assistant { background: #fef3c7; color: #92400e; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.help-card { display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.help-card-head { display: flex; align-items: center; gap: 12px; }
.help-card-head strong, .help-card-head span { display: block; }
.help-card-head strong { color: var(--ink); font-size: 18px; }
.help-card-head span:not(.help-icon) { color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 2px; }
.help-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: #e8efff; color: var(--blue); font-size: 22px; font-weight: 900; }
.help-card details { margin-top: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.help-card summary { cursor: pointer; color: var(--blue); font-weight: 900; min-height: 24px; }
.help-card details ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.help-card details li { margin: 7px 0; }
.help-card .view { width: max-content; min-height: 42px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 680px) { .helpdesk-booking-bar, .helpdesk-tools { display: grid; align-items: stretch; } .helpdesk-booking-bar label, .helpdesk-booking-summary, .helpdesk-tools input, .helpdesk-tools select { width: 100%; } .helpdesk-table th, .helpdesk-table td { padding: 12px 10px; } }
.quality-issue-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:18px 0}.quality-issue-grid article{min-height:92px;display:flex;flex-direction:column;justify-content:center;background:#fff7ed;border-color:#fed7aa}.quality-issue-grid strong{font-size:26px;color:#c2410c}.quality-issue-grid span{margin-top:5px;color:#7c2d12;font-size:13px}
.panel.report-directory-only .report-kpis,
.panel.report-directory-only .revenue-workspace,
.panel.report-directory-only .report-builder,
.panel.report-directory-only .report-summary-line,
.panel.report-directory-only .report-results,
.panel.report-directory-only > .notice { display: block; }
.analytics-report-archive { margin: 18px 0; padding: 20px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface), var(--surface-soft)); }
.analytics-report-archive .card-heading { margin-bottom: 14px; }
.analytics-report-archive h3 { margin: 0; color: var(--navy); }
.report-archive-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.report-archive-tools input { flex: 1 1 280px; min-height: 42px; }
.report-archive-tools select, .report-archive-tools button { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.report-archive-tools button { cursor: pointer; font-weight: 800; }
.report-archive-tools button:hover, .report-archive-tools button:focus-visible { border-color: var(--blue); color: var(--blue); }

/* Reports are presented as focused sub-pages inside the portal shell. */
.reports-nav, .report-view-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; padding:8px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 8px 20px rgba(30,64,175,.05); }
.reports-nav a, .report-view-tabs a { display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:0 13px; border-radius:9px; color:var(--muted); font-size:12px; font-weight:900; text-decoration:none; }
.report-view-tabs a { flex:1 1 180px; justify-content:flex-start; }
.report-view-tabs a span { color:var(--blue); font-size:17px; line-height:1; }
.report-view-tabs a strong, .report-view-tabs a small { display:block; }
.report-view-tabs a small { margin-left:auto; color:var(--muted); font-size:11px; font-weight:700; }
.reports-nav a:hover, .reports-nav a:focus-visible, .reports-nav a.active, .report-view-tabs a:hover, .report-view-tabs a:focus-visible, .report-view-tabs a.is-active { background:#e8efff; color:var(--blue); }
#reports.reports-focus .report-dashboard-status, #reports.reports-focus .report-kpis, #reports.reports-focus .revenue-workspace, #reports.reports-focus .report-builder, #reports.reports-focus .report-summary-line, #reports.reports-focus .report-results, #reports.reports-focus .analytics-report-archive, #reports.reports-focus > .notice { display:none; }
#reports.reports-focus[data-report-focus="overview"] .report-dashboard-status, #reports.reports-focus[data-report-focus="overview"] .report-kpis, #reports.reports-focus[data-report-focus="overview"] > .notice { display:block; }
#reports.reports-focus[data-report-focus="register"] .report-builder, #reports.reports-focus[data-report-focus="register"] .report-summary-line, #reports.reports-focus[data-report-focus="register"] .report-results { display:block; }
#reports.reports-focus[data-report-focus="revenue"] .report-kpis, #reports.reports-focus[data-report-focus="revenue"] .revenue-workspace { display:block; }
#reports.reports-focus[data-report-focus="visitor"] .analytics-report-archive { display:block; }
@media (max-width:680px) { .reports-nav, .report-view-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .reports-nav a, .report-view-tabs a { min-width:0; justify-content:center; padding:8px 7px; text-align:center; } .report-view-tabs a small { display:none; } }

/* Help cards stay compact and aligned when guidance is opened. */
.help-grid { align-items: start; grid-auto-rows: auto; }
.help-card { min-height: 0; align-self: start; }

/* Keep every report control in a bounded grid cell. This prevents date
 * inputs from inheriting a card height and creating the large blank blocks
 * seen on direct report routes. */
#reports .report-builder { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; align-items:end; margin:18px 0; }
#reports .report-builder > label { display:grid; min-width:0; gap:6px; color:var(--navy); font-size:12px; font-weight:800; letter-spacing:.03em; line-height:1.25; }
#reports .report-builder > label input,
#reports .report-builder > label select { display:block; width:100%; height:42px; min-height:42px; max-height:42px; box-sizing:border-box; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); font:500 14px/1.2 inherit; }
#reports .report-builder .report-search-label { grid-column:span 2; }
#reports .report-builder > button { height:42px; min-height:42px; align-self:end; }
.report-detail-page .report-catalog { padding:18px; }
.report-detail-page .report-catalog-grid { display:block; }
.report-detail-page .report-catalog-card { max-width:720px; }
.report-detail-page .report-catalog-link { min-height:88px; align-items:center; }
@media (max-width:900px) { #reports .report-builder { grid-template-columns:repeat(2,minmax(0,1fr)); } #reports .report-builder .report-search-label { grid-column:span 2; } }
@media (max-width:600px) { #reports .report-builder { grid-template-columns:1fr; } #reports .report-builder .report-search-label { grid-column:span 1; } }
.help-card details { margin-top: 0; }
.help-card details[open] { background: var(--surface); box-shadow: 0 8px 20px rgba(30, 64, 175, .06); }
.help-card details[open] summary { margin-bottom: 8px; }
.help-card .view { margin-top: 0; }
.help-icon { border: 1px solid rgba(37, 99, 235, .12); box-shadow: inset 0 0 0 4px rgba(255,255,255,.24); }
.help-icon-ready { font-family: Arial, "Segoe UI Symbol", sans-serif; }
@media (max-width: 900px) { .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .help-grid { grid-template-columns: 1fr; gap: 12px; }
  .help-card { padding: 16px; }
  .help-card summary, .help-card .view { min-height: 48px; display: inline-flex; align-items: center; }
}
.role-preview-form { display: flex; align-items: center; gap: 7px; margin: 0; padding-left: 2px; }
.role-preview-form label { color: var(--muted); font-size: 11px; font-weight: 900; white-space: nowrap; }
.role-preview-form select { min-height: 42px; max-width: 150px; padding: 9px 10px; border: 1px solid #b9cdf3; border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 12px/1.2 inherit; cursor: pointer; }
.role-preview-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 12px 15px; border: 1px solid #f0c36d; border-radius: 12px; background: #fff8e8; color: #7c4a03; font-size: 13px; }
.role-preview-banner strong { color: #6b3f00; white-space: nowrap; }
.role-preview-banner span { flex: 1 1 auto; }
.role-preview-banner form { margin: 0; }
.role-preview-banner button { min-height: 40px; padding: 9px 12px; border: 1px solid #d99a27; border-radius: 9px; background: #fff; color: #7c4a03; cursor: pointer; font-weight: 900; white-space: nowrap; }
.admin-access-banner { border-color: #c2410c; background: #fff1eb; color: #7c2d12; }
.admin-access-banner strong { color: #9a3412; }
.admin-access-banner button { border-color: #c2410c; color: #9a3412; }
.admin-user-management { margin-top: 20px; }
#admin { display: none !important; }
.admin-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 26px; }
.admin-form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.permission-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.permission-fieldset legend { color: var(--ink); font-weight: 800; padding: 0 5px; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.permission-grid .checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.permission-grid input { width: auto; min-height: auto; }
.admin-profile-photo { display: block; width: 76px; height: 76px; object-fit: cover; border-radius: 50%; border: 3px solid var(--line); margin: 0 0 12px; }
.admin-management-grid > article { margin: 0; }
.admin-user-form { display: grid; gap: 12px; }
.admin-user-form label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.admin-user-form input, .admin-user-form select { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.admin-user-form small { color: var(--muted); font-weight: 500; }
.admin-user-form .checkbox-label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.admin-user-form .checkbox-label input { width: auto; min-height: auto; }
.admin-access-explainer { color: var(--muted); }
.admin-access-explainer h3 { color: var(--ink); margin-top: 0; }
.admin-user-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.admin-user-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.admin-user-table th, .admin-user-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-user-table th { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-soft); }
.admin-user-table tbody tr:last-child td { border-bottom: 0; }
.admin-user-table td:first-child { display: grid; gap: 4px; }
.admin-user-table td:first-child strong { color: var(--ink); }
.admin-user-table td:first-child span, .admin-user-table td:first-child small { color: var(--muted); overflow-wrap: anywhere; }
.admin-user-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.admin-user-actions form { margin: 0; }
.admin-user-actions button, .admin-user-actions .button-secondary { min-height: 36px; padding: 8px 10px; font-size: 12px; }
@media (max-width: 680px) {
  .role-preview-form { order: 4; flex: 1 1 100%; justify-content: flex-end; padding: 0; }
  .role-preview-form select { flex: 1 1 auto; max-width: none; min-height: 48px; }
  .role-preview-banner { align-items: stretch; flex-direction: column; gap: 8px; }
  .role-preview-banner strong { white-space: normal; }
  .role-preview-banner button { width: 100%; min-height: 48px; }
  .admin-management-grid { grid-template-columns: 1fr; }
  .admin-form-columns, .permission-grid { grid-template-columns: 1fr; }
  .admin-user-actions { align-items: stretch; flex-direction: column; }
  .admin-user-actions form, .admin-user-actions button, .admin-user-actions .button-secondary { width: 100%; }
}

.recruitment-detail-panel, .recruitment-directory-panel { margin-top: 20px; }
.recruitment-interview-directory-tools { margin-bottom: 14px; }
.recruitment-interview-directory-tools input, .recruitment-interview-directory-tools select { min-height: 44px; }
.recruitment-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.recruitment-detail-fields > div { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recruitment-detail-fields strong { color: var(--ink); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.recruitment-detail-fields span { color: var(--muted); overflow-wrap: anywhere; }
.recruitment-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.recruitment-detail-grid label { display: grid; gap: 7px; color: var(--ink); font-weight: 800; }
.recruitment-detail-grid input, .recruitment-detail-grid textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.recruitment-detail-grid textarea { min-height: 120px; resize: vertical; }
.recruitment-detail-grid .profile-full { grid-column: 1 / -1; }
.recruitment-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.recruitment-interview-directory { display: grid; gap: 12px; }
.recruitment-interview-directory-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; }
.recruitment-interview-directory-row > div:first-child { display: grid; gap: 6px; min-width: 0; }
.recruitment-interview-directory-row strong { color: var(--ink); font-size: 16px; }
.recruitment-interview-directory-row span { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .recruitment-detail-fields, .recruitment-detail-grid { grid-template-columns: 1fr; }
  .recruitment-detail-grid .profile-full { grid-column: auto; }
  .recruitment-detail-actions a, .recruitment-detail-actions button { width: 100%; justify-content: center; min-height: 48px; }
  .recruitment-interview-directory-row { align-items: stretch; flex-direction: column; }
}
@media (max-width: 1050px) { .report-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .report-dashboard-status { padding: 14px; } .report-status-heading { display: block; } .report-status-heading .live-badge { display: inline-flex; margin-top: 10px; } .report-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Final report workspace skin. Keep the catalogue and every report result
   inside the portal content column; older report experiments must not create
   a decorative rail or leave a large unused area beside the data. */
#reports {
  width: 100%;
  max-width: none;
  overflow: visible;
}
#reports > .section-head {
  margin-bottom: 16px;
}
#reports > .section-head h2 {
  max-width: 780px;
  letter-spacing: -.035em;
}
#reports > .section-head > div > p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.6;
}
#reports .report-view-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
#reports .report-view-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon hint";
  align-items: center;
  column-gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ink);
  text-decoration: none;
}
#reports .report-view-tab > span { grid-area: icon; font-size: 18px; color: var(--blue); }
#reports .report-view-tab > strong { grid-area: title; font-size: 13px; }
#reports .report-view-tab > small { grid-area: hint; color: var(--muted); font-size: 11px; }
#reports .report-view-tab:hover,
#reports .report-view-tab.is-active { border-color: #c8dafa; background: #edf4ff; color: #17488d; }
#reports .report-dashboard-status,
#reports .report-catalog,
#reports .report-results,
#reports .revenue-workspace,
#reports .analytics-report-archive {
  width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
}
#reports .report-dashboard-status { padding: 20px; margin: 0 0 18px; }
#reports .report-status-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}
#reports .report-status-card {
  min-height: 106px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
#reports .report-status-card strong { font-size: 24px; letter-spacing: -.03em; }
#reports .report-status-card span { font-size: 12px; font-weight: 800; line-height: 1.35; }
#reports .report-status-card small { color: var(--muted); font-size: 11px; line-height: 1.35; }
#reports .report-catalog {
  margin: 0 0 18px;
  padding: 20px;
  background: linear-gradient(145deg, #f8fbff, #eef5ff);
}
#reports .report-catalog-grid,
#reports .report-catalog-grid > .report-catalog-list-wrap,
#reports .report-catalog-list-wrap > .report-catalog-list {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#reports .report-catalog-grid > .report-catalog-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0 0 14px;
}
#reports .report-catalog-list-wrap > .report-catalog-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
#reports .report-catalog-list[hidden],
#reports .report-catalog-page-controls[hidden] { display: none !important; }
#reports .report-catalog-card { display: block !important; width: 100%; min-width: 0; }
#reports .report-catalog-list .report-catalog-link,
#reports .report-catalog-list .report-catalog-disabled {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100% !important;
  min-height: 122px !important;
  box-sizing: border-box;
  padding: 15px;
  border: 1px solid #d9e6f6;
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}
#reports .report-catalog-list .report-catalog-link:hover { border-color: var(--blue); box-shadow: 0 8px 22px rgba(27, 78, 143, .12); transform: translateY(-1px); }
#reports .report-catalog-copy { min-width: 0; gap: 5px; }
#reports .report-catalog-copy strong { color: var(--ink); font-size: 14px; line-height: 1.25; }
#reports .report-catalog-copy > span { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
#reports .report-catalog-arrow { position: static; font-size: 22px; }
#reports .report-builder {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
  margin: 0 0 12px;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
#reports .report-builder label { min-width: 0; }
#reports .report-builder .report-search-label { grid-column: span 2; }
#reports .report-builder input,
#reports .report-builder select,
#reports .report-builder button { width: 100%; min-width: 0; min-height: 42px; box-sizing: border-box; }
#reports .report-summary-line { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 12px; padding: 0 2px; color: var(--muted); font-size: 12px; }
#reports .report-summary-line span:first-child { color: var(--ink); font-weight: 800; }
#reports .report-results { padding: 20px; }
#reports .report-results > .card-heading { align-items: flex-start; }
#reports .report-results .report-export-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
#reports .report-results .report-export-tools button,
#reports .report-results .report-export-tools strong { min-height: 36px; }
#reports .report-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#reports .report-table { width: 100%; min-width: 1050px; border-collapse: separate; border-spacing: 0; }
#reports .report-table th { position: sticky; top: 0; z-index: 1; background: #edf4ff; color: #214876; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
#reports .report-table td, #reports .report-table th { padding: 12px 13px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
#reports .report-table tbody tr:nth-child(even) { background: #fbfdff; }
#reports .report-table tbody tr:hover { background: #f1f7ff; }
#reports .report-pager { margin-top: 14px; }
@media (max-width: 1080px) {
  #reports .report-catalog-list-wrap > .report-catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #reports .report-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #reports .report-builder .report-search-label { grid-column: span 2; }
}
@media (max-width: 680px) {
  #reports .report-view-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #reports .report-catalog, #reports .report-dashboard-status, #reports .report-results { padding: 14px; }
  #reports .report-catalog-list-wrap > .report-catalog-list,
  #reports .report-builder { grid-template-columns: 1fr; }
  #reports .report-builder .report-search-label { grid-column: span 1; }
  #reports .report-summary-line { display: grid; gap: 5px; }
}

/* Collapsible, touch-friendly portal navigation. */
.nav-group { margin: 9px 0; padding: 3px 0 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.nav-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; margin: 0; padding: 8px 10px; cursor: pointer; list-style: none; user-select: none; }
.nav-title::-webkit-details-marker, .nav-title::marker { display: none; }
.nav-chevron { color: var(--blue); font-size: 16px; line-height: 1; transition: transform .18s ease; }
.nav-group[open] .nav-chevron { transform: rotate(180deg); }
.nav a:focus-visible, .nav-title:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; }
@media (max-width: 680px) {
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .nav-group { min-width: 0; margin: 0; padding: 0 0 4px; }
  .nav-group[open] { grid-column: 1 / -1; }
  .nav-title { min-height: 40px; }
  .subnav { margin-left: 10px; }
}
 .profile-workspace,.document-workspace{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:18px}
.profile-identity-card{text-align:center;display:grid;place-items:center;align-content:start;gap:10px;padding:28px}
.profile-identity-card p{margin:0;color:var(--muted)}
.profile-avatar-large{width:128px;height:128px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,var(--blue),var(--purple));color:#fff;font-size:48px;font-weight:800}
.profile-avatar-large img{width:100%;height:100%;object-fit:cover}
.profile-form{display:grid;gap:18px}
.profile-form small,.workspace-document-main small{color:var(--muted)}
.document-workspace{grid-template-columns:minmax(0,1.4fr) minmax(240px,.6fr);margin-bottom:18px}
.document-dropzone{display:grid;gap:8px;place-items:center;text-align:center;border:2px dashed var(--line);border-radius:16px;padding:28px;background:var(--soft);cursor:pointer}
.document-dropzone.is-dragover,.folder-drop-zone.is-dragover{border-color:var(--blue);background:color-mix(in srgb,var(--blue) 8%,var(--surface))}
.document-dropzone input{max-width:100%}
.upload-file-list{display:grid;gap:4px;width:100%;font-size:13px;color:var(--muted)}
.workspace-document-list{display:grid;gap:12px}
.workspace-document{display:flex;align-items:flex-start;gap:14px}
.workspace-document[draggable=true]{cursor:grab}
.workspace-document-icon{min-width:54px;height:54px;border-radius:14px;display:grid;place-items:center;background:var(--soft);color:var(--blue);font-size:11px;font-weight:800}
.workspace-document-main{display:grid;gap:6px;min-width:0;flex:1}
.workspace-document-main strong{overflow-wrap:anywhere}
.workspace-document-main span,.workspace-document-main small{color:var(--muted)}
.document-tags{display:flex;gap:6px;flex-wrap:wrap}
.document-tags b{padding:4px 8px;border-radius:999px;background:var(--soft);font-size:12px;color:var(--blue)}
.document-edit-form{display:grid;gap:8px;min-width:220px;margin-top:12px}
.folder-dropzones,.document-folder-dropzones{margin-top:18px}
.folder-drop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.folder-drop-zone{display:grid;gap:6px;border:2px dashed var(--line);border-radius:14px;padding:16px;background:var(--surface);color:var(--muted)}
.folder-drop-zone strong{color:var(--ink)}
.profile-photo-review-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.profile-photo-review-card{display:grid;grid-template-columns:110px 1fr;gap:16px;align-items:start}
.profile-photo-review-card img{width:110px;height:110px;border-radius:16px;object-fit:cover;background:var(--soft)}
.profile-photo-review-card h3{margin:0 0 6px}
.profile-photo-review-card p{margin:0 0 6px;color:var(--muted);overflow-wrap:anywhere}
@media (max-width:760px){.profile-workspace,.document-workspace{grid-template-columns:1fr}.workspace-document{flex-wrap:wrap}.workspace-document .record-actions{width:100%}.profile-photo-review-card{grid-template-columns:80px 1fr}.profile-photo-review-card img{width:80px;height:80px}}
@media (max-width:680px){.mail-queue-page .mail-queue-summary{padding-right:0}.mail-queue-page .mail-queue-item>.status{position:static;display:inline-flex;margin-top:12px}.mail-queue-page .mail-queue-delete-all{align-items:stretch}.mail-queue-page .mail-queue-delete-all label,.mail-queue-page .mail-queue-delete-all button{width:100%}}

/* Canonical mobile shell: compact header, explicit navigation drawer, no horizontal clipping. */
.mobile-nav-toggle{display:none}
@media (max-width:900px){
 .box{box-sizing:border-box;width:calc(100% - 20px);max-width:calc(100% - 20px);min-width:0;margin:18px 10px;padding:26px 20px;border-radius:20px;overflow:hidden}
 .box .brand{align-items:flex-start;flex-wrap:wrap;gap:12px}
 .box .brand img{width:130px;max-width:48%}
 .box .brand span{max-width:46%;white-space:normal;text-align:right}
 .box .form,.box .form label,.box .form input,.box .primary{min-width:0;max-width:100%}
 html,body{max-width:100%;overflow-x:hidden}
 .app{display:block;min-width:0}
 .side{position:relative;width:100%;min-width:0;padding:10px 14px;border-right:0;border-bottom:1px solid var(--line)}
 .side .brand{min-height:52px;margin:0;gap:10px}
 .side .brand img{width:118px;max-height:48px}
 .side .brand-label{display:none}
 .mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;margin-left:auto;min-width:88px;min-height:42px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-weight:800;cursor:pointer}
 .mobile-nav-toggle span:first-child{font-size:20px;line-height:1}
 .side>.search,.side>.nav{display:none}
 .side.mobile-nav-open>.search{display:block;width:100%;margin:12px 0}
 .side.mobile-nav-open>.nav{display:block;width:100%;overflow:visible}
 .side .nav-group,.side .nav-group[open]{display:block;width:100%;min-width:0;margin:0;grid-column:auto}
 .side .nav-title{display:flex;width:100%;min-height:46px;padding:11px 4px}
 .side .nav-group>a,.side .subnav{width:100%}
 .side .subnav{margin:0 0 6px 10px}
 .content{width:100%;min-width:0;padding:12px 14px 44px}
 .topbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:14px}
 .topbar>input{order:2;width:100%;min-width:0}
 .tools{order:1;display:grid;grid-template-columns:minmax(0,1fr) auto auto;width:100%;min-width:0;gap:8px;margin:0;align-items:center}
 .theme-control{min-width:0;margin:0}
 .theme-control select{width:100%;min-width:0}
 .role-preview-form{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);width:100%;min-width:0;gap:8px;align-items:center}
 .role-preview-form select{width:100%;min-width:0}
 .profile{display:none}
 .tools>form:last-child button{min-width:76px;white-space:nowrap}
.notification-panel{position:fixed;top:68px;right:12px;left:12px;width:auto;max-height:calc(100vh - 84px)}
.hero{min-height:220px;padding:22px}
}

/* Report layout must win over legacy responsive rules above. */
#reports .report-catalog-grid,
#reports .report-catalog-grid > .report-catalog-list-wrap,
#reports .report-catalog-list-wrap > .report-catalog-list { display: block !important; width: 100% !important; min-height: 0 !important; }
#reports .report-catalog-list-wrap > .report-catalog-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
#reports .report-catalog-card { display: block !important; width: 100%; min-width: 0; }
#reports .report-catalog-list .report-catalog-link,
#reports .report-catalog-list .report-catalog-disabled { display: grid !important; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; width: 100% !important; min-height: 122px !important; box-sizing: border-box; }
#reports .report-builder { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; box-sizing: border-box; }
#reports .report-builder .report-search-label { grid-column: span 2; }
#reports .report-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
#reports .report-table { min-width: 1050px; }
@media (max-width: 1080px) {
  #reports .report-catalog-list-wrap > .report-catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #reports .report-builder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #reports .report-catalog-list-wrap > .report-catalog-list,
  #reports .report-builder { grid-template-columns: 1fr; }
  #reports .report-builder .report-search-label { grid-column: span 1; }
}

/* Final responsive layer: appointments and operational lists must not retain
   desktop flex widths inside narrow portal viewports. Keep this block last so
   it wins over older page-specific rules above. */
@media (max-width: 900px) {
  .content { min-width: 0; }
  .panel, .surface-card, .appointment { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .list-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: 100%; }
  .list-tools input { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .list-tools select { width: 100%; max-width: none; min-width: 0; }
  #appointments .list-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appointments .list-tools input { grid-column: 1 / -1; }
  .appointment { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 12px; padding: 16px; }
  .appointment > div:first-child { min-width: 0; }
  .appointment > div:first-child > strong { display: block; overflow-wrap: anywhere; }
  .appointment > div:first-child > .muted { overflow-wrap: anywhere; line-height: 1.55; }
  .appointment-detail { min-width: 0; }
  .appointment-actions, .appointment .record-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; justify-content: stretch; width: 100%; min-width: 0; gap: 8px; }
  .appointment-actions .action-button, .appointment .record-actions .action-button { width: 100%; min-width: 0; box-sizing: border-box; white-space: normal; text-align: center; }
  .appointment-actions .status { grid-column: 1 / -1; justify-self: start; }
  .appointment-page .section-head { min-width: 0; }
  .appointment-page .section-head > .record-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .appointment-page .section-head > .record-actions > * { min-width: 0; width: 100%; white-space: normal; text-align: center; }
  .appointment-summary, .appointment-page-details, .appointment-full-edit, .portal-booking-form form { min-width: 0; }
  .appointment-page-details { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 14px; }
  .appointment-page-details > div:not(:nth-child(3n+1)) { border-left: 0; padding-left: 0; }
  .appointment-page-details > div:nth-child(even) { border-left: 1px solid #e7eef8; padding-left: 14px; }
}

@media (max-width: 560px) {
  .content { padding: 10px 10px 36px; }
  .hero { min-height: 0; padding: 18px 16px; }
  .hero h1 { font-size: 25px; line-height: 1.12; }
  .section-head { gap: 12px; }
  .section-head h2 { font-size: 24px; line-height: 1.15; }
  .list-tools, #appointments .list-tools { grid-template-columns: 1fr; }
  #appointments .list-tools input { grid-column: auto; }
  .list-tools input, .list-tools select { min-height: 44px; }
  .appointment { padding: 14px; border-radius: 14px; }
  .appointment > div:first-child > .muted { font-size: 12px; }
  .appointment-actions, .appointment .record-actions, .appointment-page .section-head > .record-actions { grid-template-columns: 1fr; }
  .appointment-actions .status { grid-column: auto; justify-self: start; }
  .appointment-page-details { grid-template-columns: 1fr !important; }
  .appointment-page-details > div:nth-child(even) { border-left: 0; padding-left: 0; }
  .pager { flex-wrap: wrap; gap: 8px; }
  .portal-booking-form { padding: 16px; }
}

/* System-wide mobile contract. Every portal module uses the same stacking,
   wrapping and touch-target rules rather than page-specific desktop layouts. */
@media (max-width: 900px) {
  .quick, .dashboard-grid, .grid, .profile-grid, .report-grid, .profile-workspace, .document-workspace,
  .directory-workspace, .directory-grid, .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head, .card-heading, .list-head, .directory-list-head { min-width: 0; flex-wrap: wrap; }
  .section-head > *, .card-heading > *, .list-head > *, .directory-list-head > * { min-width: 0; max-width: 100%; }
  .section-head p, .card-heading p, .muted { overflow-wrap: anywhere; }
  .record-card, .application-card, .review-card, .directory-record, .workspace-document { min-width: 0; }
  .record-card .record-actions, .application-card .record-actions, .review-card .record-actions,
  .directory-record .record-actions, .workspace-document .record-actions { max-width: 100%; flex-wrap: wrap; }
  .record-actions a, .record-actions button, .directory-record button, .application-card a, .review-card a {
    min-height: 42px; box-sizing: border-box; max-width: 100%;
  }
  .form, .profile-form, .directory-form, .chat-workflow-form, .chat-reply-form { min-width: 0; }
  .form input, .form select, .form textarea, .profile-form input, .profile-form select,
  .profile-form textarea, .directory-form input, .directory-form select, .directory-form textarea,
  .chat-workflow-form input, .chat-workflow-form select, .chat-workflow-form textarea,
  .chat-reply-form textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .report-table-wrap, .table-wrap, .analytics-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .report-export-tools { display: flex; flex-wrap: wrap; gap: 8px; }
  .report-export-tools button { min-height: 42px; flex: 1 1 84px; }
  .pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 560px) {
  .quick, .dashboard-grid, .grid, .profile-grid, .report-grid, .profile-workspace, .document-workspace,
  .directory-workspace, .directory-grid, .analytics-kpis { grid-template-columns: 1fr; }
  .surface-card, .metric, .panel { border-radius: 14px; }
  .surface-card { padding: 16px; }
  .metric { padding: 15px; }
  .section-head h2, .card-heading h2 { font-size: 22px; line-height: 1.18; }
  .section-head > .view, .section-head > a, .card-heading > .view { width: 100%; text-align: center; }
  .record-card, .application-card, .review-card, .directory-record, .workspace-document { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
  .record-card .record-actions, .application-card .record-actions, .review-card .record-actions,
  .directory-record .record-actions, .workspace-document .record-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .record-card .record-actions > *, .application-card .record-actions > *, .review-card .record-actions > *,
  .directory-record .record-actions > *, .workspace-document .record-actions > * { width: 100%; text-align: center; }
  .directory-inline-fields { grid-template-columns: 1fr !important; }
  .application-fields { grid-template-columns: 1fr !important; }
  .report-results, .report-catalog, .report-detail-page { padding: 14px !important; }
  .report-summary-line { display: grid; gap: 5px; }
  .report-export-tools strong { flex: 1 1 100%; }
  .report-table { min-width: 760px; }
  .notification-panel { right: 8px; left: 8px; }
}
