:root{--navy:#17345f;--blue:#2563eb;--bg:#f3f6fb;--card:#fff;--text:#172033;--muted:#64748b;--line:#e5eaf1;--green:#16805b;--amber:#b45309;--red:#b42318;--shadow:0 7px 24px rgba(20,42,78,.09)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);padding-bottom:env(safe-area-inset-bottom)}
header{background:linear-gradient(125deg,var(--navy),#285896);color:#fff;padding:calc(18px + env(safe-area-inset-top)) 20px 18px;display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}header h1{font-size:22px;margin:0 0 3px}header small{opacity:.82}.container{max-width:1450px;margin:auto;padding:18px}
nav{display:flex;gap:8px;overflow-x:auto;padding-bottom:5px;margin-bottom:16px;scrollbar-width:none}nav::-webkit-scrollbar{display:none}.tab{border:0;padding:10px 14px;border-radius:9px;background:#e4eaf4;color:#243b61;font-weight:700;cursor:pointer;white-space:nowrap}.tab.active{background:var(--blue);color:#fff}
.page{display:none}.page.active{display:block}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:12px;margin-bottom:18px}.card{background:var(--card);padding:16px;border-radius:14px;box-shadow:var(--shadow)}.card .label{font-size:13px;color:var(--muted)}.card .value{font-size:26px;font-weight:800;margin-top:6px}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.toolbar input,.toolbar select{padding:11px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;font:inherit}.search{min-width:220px;flex:1}
button.primary,button.secondary,button.danger,.button-link{border:0;border-radius:9px;padding:10px 13px;font-weight:700;cursor:pointer;font:inherit;text-decoration:none;display:inline-block}.primary{background:var(--blue);color:#fff}.secondary{background:#e8eef8;color:#243b61}.danger{background:#fee2e2;color:#991b1b}.compact{padding:6px 9px!important;font-size:12px!important}
.table-wrap{overflow:auto;background:#fff;border-radius:13px;box-shadow:var(--shadow)}table{width:100%;border-collapse:collapse;min-width:1120px}.documents-table{min-width:950px}th,td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:13px;vertical-align:top}th{position:sticky;top:0;background:#edf2f9;color:#334155;z-index:1}.status{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.Active,.Completed{background:#dcfce7;color:#166534}.Pending,.In-Progress{background:#fef3c7;color:#92400e}.Closed,.Not-Started{background:#e2e8f0;color:#475569}.On-Hold,.Blocked{background:#fee2e2;color:#991b1b}
dialog{border:0;border-radius:15px;padding:0;max-width:900px;width:95%;box-shadow:0 20px 70px #0005}dialog::backdrop{background:#0f172a99}.view-dialog{max-width:1050px}.modal-head{padding:16px 20px;background:var(--navy);color:#fff;display:flex;justify-content:space-between;align-items:center}.modal-head button{background:none;border:0;color:#fff;font-size:22px;cursor:pointer}.modal-body{padding:20px;max-height:78vh;overflow:auto}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.form-grid label{font-size:13px;font-weight:700}.form-grid input,.form-grid select,.form-grid textarea{width:100%;padding:10px;margin-top:5px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}.full{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.empty{text-align:center;padding:40px;color:var(--muted)}.notice{background:#eaf2ff;border-left:4px solid var(--blue);padding:14px;border-radius:8px;margin-bottom:15px}.danger-note{background:#fff1f2;border-left-color:#e11d48}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}.section-title h2{margin:0;font-size:21px}canvas{width:100%;height:250px;background:#fff;border-radius:13px}.mobile-list{display:none}.mobile-item{background:#fff;border-radius:13px;padding:14px;margin-bottom:10px;box-shadow:var(--shadow)}.mobile-item .top{display:flex;justify-content:space-between;gap:10px}.mobile-item dl{display:grid;grid-template-columns:110px 1fr;gap:6px;margin:12px 0;font-size:13px}.mobile-item dt{color:var(--muted)}.mobile-item dd{margin:0;word-break:break-word}.mobile-actions{display:flex;gap:7px;flex-wrap:wrap}.header-actions{display:flex;align-items:center;gap:12px}.header-actions a{color:#fff}.error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3;border-radius:9px;padding:10px;margin-bottom:12px}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#17345f,#2563eb)}.login-card{width:min(430px,100%);background:#fff;border-radius:18px;padding:28px;box-shadow:0 30px 80px #0004}.login-card h1{margin:0 0 8px}.login-card p{color:var(--muted)}.login-card label{display:block;font-weight:700;margin:12px 0 5px}.login-card input{width:100%;padding:11px;border:1px solid #cbd5e1;border-radius:9px;font:inherit}.login-card button{width:100%;margin-top:18px}
.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px}.detail-item{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:11px;min-height:67px}.detail-item .label{font-size:12px;color:var(--muted);margin-bottom:5px}.detail-item .detail-value{font-size:14px;font-weight:650;white-space:pre-wrap;overflow-wrap:anywhere}.detail-item.wide{grid-column:1/-1}.subsection{margin-top:22px}.subsection-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.subsection-head h3{margin:0;font-size:17px}.mini-table{min-width:0!important;border:1px solid var(--line);border-radius:10px;overflow:hidden}.mini-table th{position:static}.mini-table td,.mini-table th{font-size:12px;padding:9px}.related-link{font-weight:750;color:var(--blue);cursor:pointer;text-decoration:underline;text-underline-offset:2px}.file-name{font-weight:750}.file-meta{font-size:12px;color:var(--muted);margin-top:3px}.action-row{display:flex;gap:6px;flex-wrap:wrap}.pill{display:inline-block;background:#eef2ff;color:#3730a3;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:700}
@media(max-width:760px){.container{padding:12px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.table-wrap{display:none}.mobile-list{display:block}.cards{grid-template-columns:repeat(2,1fr)}header{align-items:flex-start}.card .value{font-size:22px}.detail-grid{grid-template-columns:1fr 1fr}.detail-item.wide{grid-column:1/-1}.view-dialog{width:98%}}
@media(max-width:500px){.detail-grid{grid-template-columns:1fr}.detail-item.wide{grid-column:auto}}
@media(max-width:410px){.cards{grid-template-columns:1fr}.toolbar>*{width:100%}}

/* v3 */
.archive-active{background:#17345f!important;color:#fff!important}.mode-label{font-size:12px;font-weight:800;color:#475569;background:#e8eef8;padding:6px 10px;border-radius:999px}.user-badge{font-size:12px;font-weight:800;background:#ffffff22;border:1px solid #ffffff44;padding:6px 9px;border-radius:999px}.field-help{display:block;margin-top:6px;color:var(--muted);font-weight:400}.users-table{min-width:680px}.toolbar select:disabled{opacity:.55;cursor:not-allowed}

/* v4 */
.expenses-table{min-width:900px}.account-card{max-width:980px}.account-card .form-grid input,.account-card .form-grid select{width:100%;padding:10px;margin-top:5px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}.account-card .form-grid label{font-size:13px;font-weight:700}.form-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:18px}.account-actions{border-top:1px solid var(--line);padding-top:18px}.money-positive{font-weight:800}.currency-note{font-size:12px;color:var(--muted)}


/* v6 - login deadline alert */
.due-alert-dialog{max-width:760px}.due-alert-head{background:linear-gradient(125deg,#9a3412,#c2410c)}.due-alert-note{background:#fff7ed;border-left-color:#ea580c;color:#7c2d12}.due-task-list{display:grid;gap:10px}.due-task-item{border:1px solid #fed7aa;background:#fffaf5;border-radius:12px;padding:13px}.due-task-main,.due-task-meta{display:flex;align-items:center;justify-content:space-between;gap:12px}.due-task-case{font-size:12px;color:var(--muted);margin-top:4px}.due-task-meta{margin-top:10px;font-size:13px;color:#475569}.due-chip{display:inline-block;background:#ffedd5;color:#9a3412;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;white-space:nowrap}
@media(max-width:600px){.due-task-main,.due-task-meta{align-items:flex-start;flex-direction:column}.due-task-meta button{width:100%}}

/* v7.2 - financial dashboard cards: keep long KHR amounts readable */
.cards{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.card{min-width:0}
.card .value{max-width:100%;overflow-wrap:anywhere}

/* Financial cards deliberately use two dashboard columns on desktop.
   This gives KHR amounts enough room instead of clipping them. */
.financial-card{
  grid-column:span 2;
  min-width:0;
  overflow:visible;
}
.financial-card .value{
  font-size:clamp(20px,1.35vw,27px);
  line-height:1.16;
  letter-spacing:-.02em;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  word-break:normal;
}

@media(max-width:1100px){
  .cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
  .financial-card{grid-column:span 2}
  .financial-card .value{font-size:22px}
}

@media(max-width:760px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .financial-card{grid-column:1/-1}
  .financial-card .value{font-size:23px}
}

@media(max-width:500px){
  .cards{grid-template-columns:1fr}
  .financial-card{grid-column:1}
  .financial-card .value{
    font-size:clamp(19px,6vw,24px);
    white-space:normal;
    overflow-wrap:anywhere;
  }
}

/* v7.4 - compact dashboard so the chart remains visible on standard displays */
#dashboard .cards{
  grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
  gap:10px;
  margin-bottom:14px;
}

#dashboard .card{
  padding:12px 14px;
}

#dashboard .cards .card{
  min-height:88px;
}

#dashboard .cards .card .label{
  font-size:12px;
  line-height:1.2;
}

#dashboard .cards .card .value{
  font-size:22px;
  line-height:1.08;
  margin-top:5px;
}

/* Financial cards no longer consume two grid columns. The KHR format is
   already compact (no decimals), so a normal card width is sufficient. */
#dashboard .financial-card{
  grid-column:span 1;
  min-width:0;
}

#dashboard .financial-card .value{
  font-size:clamp(17px,1.05vw,21px);
  line-height:1.08;
  letter-spacing:-.025em;
  white-space:nowrap;
  overflow:visible;
}

/* On common desktop widths, aim for eight cards per row: 16 dashboard
   indicators then fit into two compact rows. */
@media(min-width:1200px){
  #dashboard .cards{
    grid-template-columns:repeat(8,minmax(0,1fr));
  }
}

@media(min-width:761px) and (max-width:1199px){
  #dashboard .cards{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media(max-width:760px){
  #dashboard .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  #dashboard .financial-card{grid-column:span 1}
  #dashboard .financial-card .value{
    font-size:clamp(16px,3.8vw,20px);
    white-space:normal;
  }
}

@media(max-width:410px){
  #dashboard .cards{grid-template-columns:1fr}
}


/* v7.5 - dynamically fitted financial amounts. app.js measures each value
   after rendering and reduces only that value's font size when necessary. */
#dashboard .financial-card .value{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
  font-variant-numeric:tabular-nums;
}

/* v7.6 - application footer */
.app-footer{
  max-width:1450px;
  margin:2px auto 18px;
  padding:12px 18px calc(12px + env(safe-area-inset-bottom));
  text-align:center;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.app-footer strong{
  color:var(--navy);
  font-weight:800;
}


/* v8 - per-user time zone */
.due-timezone-note{
  margin:0 0 10px;
  font-size:12px;
  color:var(--muted);
}
.users-table{min-width:900px}
#accountLocalTime{font-weight:700;color:var(--navy)}

/* v8.1 - protected personal-data deletion */
.data-help{
  margin:0 0 14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}
.delete-data-dialog{max-width:820px}
.delete-data-head{background:linear-gradient(125deg,#7f1d1d,#b91c1c)}
.delete-security-box{
  display:grid;
  gap:10px;
  margin:14px 0 16px;
}
.delete-step{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f8fafc;
}
.delete-step>span{
  display:grid;
  place-items:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:999px;
  background:var(--navy);
  color:#fff;
  font-weight:800;
  font-size:13px;
}
.delete-step small{color:var(--muted);line-height:1.45}
.delete-password-label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-top:10px;
}
.delete-password-label input{
  width:100%;
  padding:11px;
  margin-top:6px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  font:inherit;
}
.delete-backup-status{
  margin-top:13px;
  padding:11px 13px;
  border-radius:10px;
  font-size:13px;
  line-height:1.45;
  border:1px solid var(--line);
}
.delete-backup-status.pending{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.delete-backup-status.working{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}
.delete-backup-status.ready{background:#ecfdf5;border-color:#a7f3d0;color:#166534}
.delete-backup-status.error-state{background:#fff1f2;border-color:#fecdd3;color:#9f1239}
.delete-data-actions{align-items:center;flex-wrap:wrap}
.delete-data-actions .danger:disabled,
.delete-data-actions .secondary:disabled{
  opacity:.5;
  cursor:not-allowed;
}
@media(max-width:650px){
  .delete-data-actions button{width:100%}
}

/* v9 - MFA enrollment and recovery */
.mfa-account-card{margin-top:16px}
.mfa-dialog{max-width:530px}
.mfa-dialog .modal-body label{display:block;font-size:13px;font-weight:700;margin:12px 0 5px}
.mfa-dialog .modal-body input:not([type="checkbox"]){display:block;width:100%;padding:11px;border:1px solid #cbd5e1;border-radius:9px;margin-top:6px;font:inherit}
.qr-holder{display:flex;justify-content:center;align-items:center;margin:16px 0;padding:10px;background:white;border:1px solid #e5eaf1;border-radius:10px;min-height:260px}
.qr-holder svg{display:block;width:min(240px,100%);height:auto}
.mfa-secret{display:block;margin:10px 0;padding:12px;background:#eef2f7;overflow-wrap:anywhere;user-select:all;font-size:14px;letter-spacing:.08em}
.recovery-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:15px 0}
.recovery-list code{display:block;padding:11px 8px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;text-align:center;font-size:14px;font-weight:700;letter-spacing:.03em}
.mfa-checkbox{display:flex!important;align-items:center;gap:9px;font-size:13px;margin-top:15px;font-weight:600}
.mfa-checkbox input{width:auto!important;flex:0 0 auto}
[hidden]{display:none!important}
@media(max-width:430px){.recovery-list{grid-template-columns:1fr}}

/* v10 - explicit read-only profile, compact editing actions and Khmer readability */
#accountForm.account-readonly input:disabled,
#accountForm.account-readonly select:disabled,
#accountForm.account-readonly textarea:disabled {
  opacity: 1;
  color: #475569;
  background: #eef2f7;
  -webkit-text-fill-color: #475569;
  border-color: #d8e0e9;
  cursor: not-allowed;
}
#accountForm.account-readonly select:disabled { appearance: none; }
#accountForm .account-actions {flex-wrap: wrap;}
#accountForm .account-actions [hidden] {display: none !important;}
html[lang="km"] body {font-family: "Noto Sans Khmer", "Khmer OS System", "Leelawadee UI", system-ui, sans-serif;line-height:1.65;}
html[lang="km"] .tab,html[lang="km"] button {line-height:1.5;}
html[lang="km"] .card .label {line-height:1.5;}


/* v11 - Customer directory */
.customers-table{min-width:980px}
.customer-select-line{display:flex;gap:8px;align-items:flex-start}
.customer-select-line select{min-width:0;flex:1;width:auto}
.customer-select-line button{flex-shrink:0;margin-top:5px;white-space:nowrap}
.customer-related{max-width:100%;box-shadow:none;border:1px solid var(--line)}
.customer-related .mini-table{min-width:620px}
@media(max-width:600px){
  .customer-select-line{flex-direction:column}
  .customer-select-line select,.customer-select-line button{width:100%}
}

/* v12: accessible, mobile-friendly calendar */
.calendar-panel{padding:16px!important}
.cal-toolbar,.cal-controls,.cal-legend{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.cal-toolbar{justify-content:space-between;margin-bottom:14px}
.cal-controls strong{font-size:18px;margin-left:8px;min-width:0}
.cal-controls select{border:1px solid #cbd5e1;border-radius:9px;padding:9px;background:#fff;font:inherit}
.cal-controls button{min-width:35px}
.cal-legend{font-size:12px;color:var(--muted);margin:3px 0 13px;gap:7px}
.cal-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-left:6px}
.cal-dot.appointment,.cal-event.appointment{background:#dbeafe;color:#1e40af}
.cal-dot.meeting,.cal-event.meeting{background:#ede9fe;color:#5b21b6}
.cal-dot.reminder,.cal-event.reminder{background:#fef3c7;color:#92400e}
.cal-dot.hearing,.cal-event.hearing{background:#fee2e2;color:#9f1239}
.cal-dot.deadline,.cal-event.deadline{background:#dcfce7;color:#166534}
.cal-event.personal{background:#fce7f3;color:#9d174d}
.cal-event.other{background:#e2e8f0;color:#334155}
.cal-grid-head,.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.cal-grid-head{margin:0;border:1px solid var(--line);border-bottom:0;border-radius:11px 11px 0 0;overflow:hidden;background:#edf2f9}
.cal-grid-head div{text-align:center;padding:9px 2px;font-size:12px;color:#475569;font-weight:750}
.cal-grid{border-left:1px solid var(--line);border-top:1px solid var(--line)}
.cal-day{position:relative;min-width:0;min-height:105px;padding:7px 5px 8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}
.cal-day.cal-out-month{background:#f8fafc;color:#94a3b8}.cal-day.cal-today{box-shadow:inset 0 0 0 2px #2563eb}
.cal-day-head{border:0;border-radius:40px;background:transparent;color:inherit;cursor:pointer;padding:3px 7px;font:inherit;font-size:13px;font-weight:800}
.cal-today .cal-day-head{background:#2563eb;color:#fff}
.cal-day-events{display:flex;flex-direction:column;gap:3px;min-width:0}
.cal-event{display:block;width:100%;border:0;border-radius:5px;cursor:pointer;text-align:left;padding:5px 6px;font:inherit;font-size:11px;line-height:1.25;font-weight:650;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cal-event:hover{filter:brightness(.95);outline:1px solid #94a3b8}
.cal-more{background:none;border:0;color:var(--blue);text-align:left;font-size:11px;cursor:pointer}
.cal-quick-add{position:absolute;top:4px;right:5px;border:0;background:transparent;font-size:18px;color:#64748b;cursor:pointer;padding:0 5px}
.cal-week .cal-day{min-height:270px}
.cal-agenda-day{border:1px solid var(--line);border-radius:10px;margin-bottom:12px;overflow:hidden;background:#fff}
.cal-agenda-header{padding:11px 13px;display:flex;justify-content:space-between;align-items:center;background:#edf2f9;gap:8px}
.cal-agenda-entry{display:flex;align-items:center;gap:15px;padding:8px 12px;border-top:1px solid var(--line)}
.cal-agenda-entry .cal-event{width:auto;min-width:180px;max-width:65%;font-size:13px}
.cal-agenda-entry small{color:var(--muted);font-size:12px}
.cal-no-events{padding:14px;color:#64748b;font-size:13px}
.cal-hint{font-size:12px;color:var(--muted);line-height:1.6;margin:15px 0 0}
.cal-checkbox{display:flex;align-items:center;gap:9px;flex-direction:row;font-size:13px}
.cal-checkbox input{width:auto!important;margin:0!important}
.calendar-dialog{max-width:850px}
@media(max-width:800px){
 .cal-grid,.cal-grid-head{min-width:680px}
 #calBody{overflow-x:auto}
 .cal-controls strong{font-size:15px}
 .cal-day{min-height:100px}
}
@media(max-width:560px){
 .calendar-panel{padding:10px!important}
 .cal-toolbar{align-items:stretch;flex-direction:column}
 .cal-controls{gap:5px}
 .cal-controls select{flex:1}
 .cal-agenda-entry{align-items:flex-start;flex-direction:column;gap:5px}
 .cal-agenda-entry .cal-event{max-width:100%;min-width:0}
}

/* v13 subscription dashboard */
.billing-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0 16px}
.billing-stats>div{background:#f3f6fb;border:1px solid #e5eaf1;padding:13px;border-radius:11px;min-width:0}
.billing-stats b{font-size:12px;color:#64748b}
.billing-stats p{font-size:17px;font-weight:700;overflow-wrap:anywhere;margin:5px 0 0}
.billing-disclaimer{font-size:13px;color:#64748b;line-height:1.6}
.billing-table{min-width:480px}
#billingContent h3{margin:22px 0 10px}
#billingContent .toolbar{margin-top:16px}


/* v13.1 — Public landing, registration and pending subscription */
.public-body,.public-site {background:#f4f7fc;min-height:100vh;color:#1d2b41}
.public-body{display:flex;flex-direction:column}
.public-header{background:#fff;color:#17345f;box-shadow:0 1px 0 #e1e8f1;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px max(4vw,18px);flex-wrap:wrap;position:relative;z-index:2}
.public-brand{display:flex;align-items:center;gap:10px;color:#17345f;font-size:19px;font-weight:800;text-decoration:none;letter-spacing:-.5px}
.public-toplinks{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
.public-toplinks a{font-size:14px;color:#425572;font-weight:700;text-decoration:none}
.public-toplinks a:hover{color:#2563eb}
.public-toplinks select{padding:8px 10px;border:1px solid #d7e0ef;border-radius:9px;background:#f8fafc;color:#213858}
.public-hero{background:linear-gradient(130deg,#0e2648 0%,#173c70 58%,#2357a5 100%);color:#fff;padding:clamp(55px,7vw,110px) max(5vw,20px);display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr);gap:clamp(24px,5vw,95px);align-items:center;overflow:hidden}
.hero-copy{max-width:725px}.hero-kicker{text-transform:uppercase;letter-spacing:2px;font-size:12px;color:#b8d4ff;font-weight:800}
.hero-copy h1{font-size:clamp(38px,4.5vw,70px);line-height:1.06;letter-spacing:-2px;margin:18px 0 24px}.hero-copy h1 em{font-style:normal;color:#8ec5ff}
.hero-copy p{font-size:clamp(16px,1.35vw,20px);line-height:1.6;color:#e2ebfa;max-width:600px}
.public-hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin:30px 0}.hero-copy>small{color:#cfddf3;line-height:1.55;display:block}
.public-btn{display:inline-block;text-align:center;border-radius:10px;text-decoration:none;padding:13px 20px;font-size:14px;font-weight:800;transition:transform .15s ease,background .15s ease}
.public-btn:hover{transform:translateY(-1px)}.public-btn.primary{background:#2563eb;color:#fff}.public-btn.outline{border:1px solid #a3badc;background:#fff;color:#17345f}
.public-hero .public-btn.outline{background:transparent;color:#fff;border-color:#9bb6da}
.hero-preview{border:1px solid #b8d6ff4a;background:#fff;transform:rotate(1deg);padding:22px;border-radius:20px;box-shadow:0 25px 70px #05183366;color:#1b335a}
.preview-heading{display:flex;justify-content:space-between;align-items:center;font-weight:800;border-bottom:1px solid #e4eaf1;padding:0 0 16px}
.preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.preview-grid>div{background:#f1f5fb;padding:15px;border-radius:12px}.preview-grid b{display:block;font-size:28px;color:#123d7d}.preview-grid small{color:#63748a;display:block}
.preview-sheet{padding:13px 9px;border-bottom:1px solid #e8edf5;display:flex;align-items:center;gap:8px;color:#294464}.preview-sheet span:first-child{color:#16a34a}.preview-progress{margin-left:auto;font-size:11px;background:#ecfdf5;padding:5px 8px;border-radius:18px;color:#15803d}.preview-disclaimer{display:block;text-align:right;color:#8390a3;margin-top:12px}
.public-highlights{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:#fff;padding:28px max(5vw,20px);box-shadow:0 8px 18px #14305608}
.public-highlights>div{text-align:center;color:#28415c;font-size:14px;font-weight:800;padding:10px;border-right:1px solid #e8edf4}.public-highlights>div:last-child{border:0}
.public-section{max-width:1320px;margin:0 auto;padding:75px 22px}.public-section-heading{text-align:center;max-width:750px;margin:0 auto 35px}.public-section-heading>span{color:#2563eb;font-size:12px;letter-spacing:2px;font-weight:900}.public-section-heading h2{font-size:clamp(28px,3vw,44px);letter-spacing:-1px;color:#1b3357;margin:11px 0}.public-section-heading p{color:#64748b;line-height:1.6}
.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.feature-card,.price-card{background:#fff;border:1px solid #e0e9f6;border-radius:16px;padding:25px;box-shadow:0 9px 25px #132a480a}.feature-icon{width:52px;height:52px;display:grid;place-items:center;background:#eef5ff;border-radius:13px;font-size:24px}.feature-card h3{font-size:18px;margin:18px 0 8px;color:#24415e}.feature-card p{font-size:14px;line-height:1.6;color:#6d7b8f}
.public-pricing{max-width:1350px}.price-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.price-card{padding:29px;display:flex;flex-direction:column;gap:8px}.price-featured{border:2px solid #2563eb;box-shadow:0 18px 44px #214b921a}.price-eyebrow{font-size:10px;color:#778bad;font-weight:800;letter-spacing:1.4px}.price-card h3{font-size:24px;color:#1f385d;margin:6px 0}.price-amount{font-size:20px;font-weight:800;color:#2755a3}.price-card p{margin:5px 0;color:#53647d;line-height:1.45}.price-divider{border-top:1px solid #e7edf4;margin:13px 0}.price-card .public-btn{margin-top:auto}.payment-line{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:32px 0 8px}.payment-line span{border:1px solid #d8e3f3;background:#fff;border-radius:20px;padding:10px 16px;font-size:13px;font-weight:800;color:#29436a}.public-muted{text-align:center;font-size:13px;color:#718198}
.public-final{text-align:center;background:#e9f1fc;padding:60px 20px;display:flex;align-items:center;flex-direction:column;gap:12px}.public-final h2{margin:0;font-size:34px;color:#234672}.public-final p{color:#536a88;max-width:720px;line-height:1.65}.public-final small{max-width:750px;color:#74849d}
.public-footer{text-align:center;padding:25px;color:#70829c;font-size:13px;background:#fff}.public-footer strong{color:#183c72}.public-footer a{color:#2455a1;text-decoration:none}
.registration-wrap{flex:1;display:grid;place-items:center;padding:45px 16px}.registration-card{width:min(760px,100%);background:#fff;padding:clamp(20px,3vw,40px);border:1px solid #e0e6ef;border-radius:19px;box-shadow:0 18px 60px #1e3a6514}.registration-card h1{font-size:29px;margin:0 0 10px;color:#173e6e}.registration-card>p{color:#637792;line-height:1.6}
.public-register-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}.public-register-grid label{font-size:13px;font-weight:700;color:#33496b;display:flex;flex-direction:column;gap:7px;min-width:0}.public-register-grid input:not([type=checkbox]),.public-register-grid select{font:inherit;border:1px solid #cbd5e1;border-radius:9px;padding:11px;background:#fff;min-width:0;width:100%}.public-register-grid label.full,.public-register-grid div.full{grid-column:1/-1}.public-register-grid .reg-check{flex-direction:row;align-items:flex-start;font-weight:500;line-height:1.5}.public-register-grid .reg-check input{margin-top:4px}.public-register-grid button{width:100%;padding:13px}.reg-generated{background:#eef4ff;color:#1d4d92;border-radius:9px;padding:12px;font-size:17px;font-weight:900}.trap-field{position:absolute!important;left:-200vw!important;top:-200vh!important}.registration-card form>button{padding:13px;width:100%}
.subscription-pending-card{width:min(580px,100%)}.pending-symbol{font-size:40px}.pending-rows{margin:20px 0}.pending-rows>div{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #e5ebf4;gap:12px}.pending-rows span{word-break:break-all}.subscription-pending-card .public-btn{display:block;margin:9px 0}
@media(max-width:980px){.public-hero{grid-template-columns:1fr}.hero-preview{max-width:700px;width:100%;margin:auto}.feature-grid{grid-template-columns:repeat(2,1fr)}.public-highlights{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.public-header{align-items:flex-start}.public-toplinks{gap:12px}.public-hero{padding:55px 18px}.hero-copy h1{letter-spacing:-1px}.hero-preview{transform:none;padding:15px}.price-grid{grid-template-columns:1fr}.public-section{padding:48px 15px}.public-register-grid{grid-template-columns:1fr}.public-highlights>div{border:0}.public-brand{font-size:17px}}


/* v13.3 — per-user customizable dashboard. All rules are scoped to dashboard. */
#dashboard .dashboard-title{margin-bottom:12px}
#dashboard .dashboard-title button[aria-pressed="true"]{background:#17345f;color:white}
#dashboard .dashboard-editor{background:#eef4ff;border:1px solid #cbdcf8;border-radius:12px;padding:13px;margin-bottom:14px}
#dashboard .dashboard-editor[hidden],#dashboard .dashboard-empty[hidden]{display:none!important}
#dashboard .dashboard-help{margin:0 0 12px;color:#435672;font-size:13px}
#dashboard .dashboard-editor-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#dashboard .dashboard-editor-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#dashboard #dashboardSaveStatus{font-size:12px;color:#43617a;overflow-wrap:anywhere}
#dashboard .dashboard-hidden-list{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
#dashboard .dashboard-none-hidden{font-size:12px;color:#64748b}
#dashboard .dashboard-empty{padding:22px;text-align:center;background:white;border-radius:12px;color:#64748b}
#dashboard .dashboard-grid{grid-auto-flow:row;align-items:stretch}
#dashboard .dashboard-widget{position:relative;min-width:0;transition:outline-color .12s ease}
#dashboard .dashboard-widget .dashboard-widget-head{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}
#dashboard .dashboard-widget-head .label{min-width:0}
#dashboard .dashboard-widget-controls{display:flex;align-items:center;gap:2px;flex-shrink:0}
#dashboard .dashboard-control,#dashboard .dashboard-drag-handle{display:grid;place-items:center;width:25px;height:25px;min-width:25px;padding:0;border:1px solid #c9d7ee;border-radius:6px;background:#f0f5ff;color:#234875;font-size:15px;cursor:pointer}
#dashboard .dashboard-drag-handle{touch-action:none;cursor:grab;font-size:20px;user-select:none}
#dashboard .dashboard-drag-handle:active{cursor:grabbing}
#dashboard .dashboard-widget-controls button:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
#dashboard .dashboard-widget-wide{grid-column:span 2}
#dashboard .dashboard-widget-chart{grid-column:1/-1}
#dashboard .dashboard-widget-chart.dashboard-widget-wide{grid-column:span 2}
#dashboard .dashboard-widget-chart canvas{display:block;width:100%;height:250px}
#dashboard .dashboard-grid.dashboard-customizing .dashboard-widget{outline:1px dashed #a5bde1;outline-offset:-3px}
#dashboard .dashboard-widget.dashboard-dragging{opacity:.42}
#dashboard .dashboard-widget.dashboard-drop-target{outline:3px dashed #2563eb;outline-offset:-3px}
#dashboard .dashboard-widget.dashboard-drop-after{outline-color:#16805b}
@media(max-width:760px){
 #dashboard .dashboard-widget-wide,#dashboard .dashboard-widget-chart.dashboard-widget-wide{grid-column:span 2}
 #dashboard .dashboard-widget-controls{flex-wrap:wrap;max-width:110px;justify-content:flex-end}
 #dashboard .dashboard-control,#dashboard .dashboard-drag-handle{width:28px;height:28px}
}
@media(max-width:410px){
 #dashboard .dashboard-widget-wide,#dashboard .dashboard-widget-chart.dashboard-widget-wide{grid-column:span 1}
 #dashboard .dashboard-title{flex-wrap:wrap}
}
#dashboard .dashboard-customizing .dashboard-widget-head{display:block}
#dashboard .dashboard-customizing .dashboard-widget-controls{margin-top:6px;flex-wrap:wrap}

/* v13.4 — immutable case payment history and mobile financial notes */
.payment-breakdown { padding: 12px 14px; border-radius: 9px; background: var(--muted-bg,#f1f5f9); margin: 10px 0 14px; line-height: 1.8; }
.payment-breakdown small { opacity: .75; }
.case-payment-table { min-width: 570px; }
.payment-voided { opacity: .58; }
.payment-voided td:nth-child(2) b { text-decoration: line-through; }
.payment-void-reason { font-size: .85em; margin-top: 4px; }
.case-payment-hint small { display: block; opacity: .8; }
@media(max-width: 650px) { .payment-breakdown { padding: 10px; } .case-payment-table { min-width: 620px; } }
