
/* v1.10.87 true early theme apply */
body.theme-booting{
  background:inherit;
  color:inherit;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .main,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-card{
  color:var(--text);
}


/* v1.10.86 central anti-flash page boot */
html, body{
  min-height:100%;
  background:var(--page-bg, #eef6fb);
}
html[data-theme="dark"],
html[data-theme="dark"] body,
body.theme-dark{
  background:#0f172a;
  color:#f8fafc;
}
html[data-theme="light"],
html[data-theme="light"] body,
body.theme-light{
  background:#eef6fb;
  color:#07162f;
}

:root{--bg:#0f172a;--panel:#111827;--card:#1f2937;--text:#f9fafb;--muted:#9ca3af;--accent:#22c55e;--danger:#ef4444;--line:#374151}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}a{color:#86efac;text-decoration:none}.layout{display:flex;min-height:100vh}.sidebar{width:260px;background:#020617;padding:22px;border-right:1px solid var(--line)}.sidebar h2{font-size:18px;margin:0 0 22px}.sidebar a{display:block;padding:10px 12px;border-radius:10px;color:var(--text);margin-bottom:6px}.sidebar a:hover,.sidebar .active{background:#172554}.main{flex:1;padding:24px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 8px 24px #0003}.metric{font-size:28px;font-weight:bold;margin-top:8px}.muted{color:var(--muted)}table{width:100%;border-collapse:collapse;background:var(--panel);border-radius:14px;overflow:hidden}th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left}th{background:#0b1220}.btn,button,input[type=submit]{background:var(--accent);color:#052e16;border:0;border-radius:10px;padding:10px 14px;font-weight:bold;cursor:pointer}.btn.secondary{background:#334155;color:#fff}.btn.danger{background:var(--danger);color:white}input,select,textarea{width:100%;background:#020617;color:#fff;border:1px solid var(--line);border-radius:10px;padding:10px;margin:6px 0 14px}label{font-weight:bold}.form-card{max-width:760px}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.login{max-width:420px;margin:80px auto}.pill{display:inline-block;padding:4px 8px;border-radius:999px;background:#334155;color:#fff;font-size:12px}@media(max-width:760px){.layout{display:block}.sidebar{width:100%;border-right:0}.row{grid-template-columns:1fr}.main{padding:16px}}
.alert{padding:12px 14px;border-radius:12px;margin:12px 0;border:1px solid var(--line)}.alert.success{background:#052e16;color:#dcfce7;border-color:#166534}.alert.error{background:#450a0a;color:#fee2e2;border-color:#991b1b}code{background:#020617;border:1px solid var(--line);border-radius:6px;padding:2px 5px}small{display:block;margin-top:-8px;margin-bottom:10px}

.mt{margin-top:18px}.two-col{grid-template-columns:repeat(auto-fit,minmax(360px,1fr))}.inline{display:inline-block;margin:0 4px}.inline input{display:none}.danger,button.danger{background:var(--danger)!important;color:#fff!important}.timeline-item{display:grid;grid-template-columns:150px 1fr;gap:16px;border-left:3px solid var(--accent);padding:12px 0 12px 18px;margin-left:8px}.timeline-date{font-weight:bold;color:#86efac}.due{background:#451a03}.card ol{line-height:1.8}.card h2{margin-top:0}@media(max-width:760px){.timeline-item{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}}

/* v1.3 usability cleanup */
.table-wrap{overflow-x:auto}.users-table td{vertical-align:middle}.center{text-align:center}.checkline{display:flex;align-items:center;gap:8px;font-weight:normal}.checkline input{width:auto;margin:0}.reset-box{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:10px;align-items:center}.reset-box input{margin:0}.reset-box button{margin:0}.form-actions{display:flex;align-items:end;padding-bottom:14px}.secondary,button.secondary{background:#334155;color:#fff}.inline-form{margin:0}.inline-form button{white-space:nowrap}.progress{height:12px;background:#020617;border:1px solid var(--line);border-radius:999px;overflow:hidden;margin:8px 0}.progress span{display:block;height:100%;background:var(--accent)}.compact-form{border:1px solid var(--line);border-radius:14px;padding:14px;margin:14px 0;background:#0b1220}@media(max-width:900px){.reset-box{grid-template-columns:1fr}.users-table input,.users-table select{min-width:160px}}

/* v1.4 branding, recovery, and updater polish */
.brand{display:flex;align-items:center;gap:10px;margin-bottom:20px}.brand h2{margin:0}.brand img{width:38px;height:38px;object-fit:contain;border-radius:10px;background:#fff;padding:3px}.login-logo{display:block;width:76px;height:76px;object-fit:contain;margin:0 auto 10px;border-radius:16px;background:#fff;padding:6px}.logo-preview{display:flex;align-items:center;gap:14px;margin:8px 0 12px}.logo-preview img{width:82px;height:82px;object-fit:contain;background:#fff;border-radius:14px;padding:6px}.login h2{margin-top:0}.login hr{border:0;border-top:1px solid var(--line);margin:20px 0}.users-table .reset-box{min-width:330px}.users-table td:last-child{vertical-align:top}.users-table button{white-space:nowrap}@media(max-width:900px){.brand{justify-content:center}.users-table .reset-box{min-width:220px}}


/* v1.5 grouped navigation and recurring payments */
.side-nav{display:block}.nav-main{font-weight:bold}.nav-group{border:1px solid transparent;border-radius:12px;margin:8px 0}.nav-group summary{cursor:pointer;color:var(--muted);font-weight:bold;padding:9px 12px;border-radius:10px;list-style:none}.nav-group summary::-webkit-details-marker{display:none}.nav-group summary:after{content:'▾';float:right;color:var(--muted)}.nav-group:not([open]) summary:after{content:'▸'}.nav-group[open]{background:#030b1b;border-color:#0f1f38}.nav-group a{margin:2px 8px 6px 18px;padding:8px 10px;font-size:14px}.small-metric{font-size:18px;line-height:1.3}.sidebar .nav-group a.active,.sidebar .nav-main.active{background:#172554}.due td{background:#451a03}.inline{display:inline-block}.side-nav .btn{display:block}@media(max-width:760px){.nav-group a{margin-left:10px}.topbar{display:block}.topbar>div{margin-bottom:8px}}


/* v1.5.2 daily-use controls */
.actions{min-width:260px}.actions .btn,.actions button{margin:2px 2px 2px 0;padding:8px 10px}.project-card{padding:0;overflow:hidden}.project-card summary{list-style:none;cursor:pointer;padding:13px 16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.project-card summary::-webkit-details-marker{display:none}.project-card summary:before{content:'▸';color:var(--muted);font-weight:bold}.project-card[open] summary:before{content:'▾'}.project-card[open]{padding-bottom:16px}.project-card[open]>*:not(summary){margin-left:18px;margin-right:18px}.project-title{font-weight:bold;font-size:16px;min-width:220px}.project-progress{font-weight:bold;color:#86efac}.project-money{color:var(--muted)}.mt{margin-top:16px}button.danger{background:var(--danger);color:#fff}.table-wrap{overflow-x:auto}@media(max-width:760px){.project-card summary{display:block}.project-card summary>*{display:inline-block;margin:3px 4px}.project-title{display:block;min-width:0}.actions{min-width:180px}}

/* v1.6 clean workflow and modal polish */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.page-head h1{margin:0}.page-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.summary-strip{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 18px}.summary-chip{background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:8px 12px;color:var(--muted)}.summary-chip strong{color:var(--text)}.clean-list{display:grid;gap:12px}.list-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px 16px}.list-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.list-title{font-weight:bold;font-size:16px}.list-meta{color:var(--muted);font-size:13px;margin-top:4px}.list-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.amount-income{color:#86efac;font-weight:bold}.amount-expense{color:#fca5a5;font-weight:bold}.modal-backdrop{position:fixed;inset:0;background:rgba(2,6,23,.74);display:none;align-items:flex-start;justify-content:center;padding:6vh 18px;z-index:1000;overflow:auto}.modal-backdrop.open{display:flex}.modal-card{width:min(820px,100%);background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.45);padding:0;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:#0b1220}.modal-header h2{margin:0;font-size:19px}.modal-body{padding:18px}.modal-footer{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:8px}.icon-btn{background:#334155;color:#fff;border-radius:10px;padding:8px 10px}.btn.small,button.small{padding:7px 9px;font-size:13px;border-radius:9px}.ghost-card{background:transparent;border:1px dashed var(--line);border-radius:16px;padding:18px;color:var(--muted)}.filter-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.filter-bar input,.filter-bar select{max-width:260px;margin:0}.compact-table td,.compact-table th{padding:10px}.modal-card form input,.modal-card form select,.modal-card form textarea{margin-bottom:12px}.status-open{background:#172554}.status-done{background:#14532d}.status-paused{background:#334155}.status-due{background:#7c2d12}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:22px 0 10px}.section-title h2{margin:0}.project-card .list-actions{margin-left:auto}.note-list{display:grid;gap:8px;margin-top:10px}.note-item{border-top:1px solid var(--line);padding-top:8px}.help-text{line-height:1.6}.table-empty{text-align:center;color:var(--muted);padding:20px}.action-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.inline-form.inline{display:inline-block}@media(max-width:760px){.page-head,.list-card-head{display:block}.page-actions,.list-actions{justify-content:flex-start;margin-top:10px}.modal-backdrop{padding:2vh 10px}.modal-body{padding:14px}.summary-chip{width:100%}.filter-bar input,.filter-bar select{max-width:none}}


/* v1.6.1 ClearChat-style readable light theme
   Default is now a soft light workspace. A dark theme remains available
   from the theme buttons in the top bar. */
:root,
html[data-theme="light"],
body.theme-light {
  --bg: #eef4f8;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent-strong: #1d4ed8;
  --danger: #dc2626;
  --line: #d7e2ea;
  --sidebar-bg: #f8fbfd;
  --sidebar-active: #e0f2fe;
  --sidebar-active-text: #0f3f68;
  --input-bg: #ffffff;
  --input-text: #172033;
  --header-bg: #f1f7fb;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
}

html[data-theme="dark"],
body.theme-dark {
  --bg: #0f172a;
  --panel: #111827;
  --card: #1f2937;
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-soft: #172554;
  --accent-strong: #16a34a;
  --danger: #ef4444;
  --line: #374151;
  --sidebar-bg: #020617;
  --sidebar-active: #172554;
  --sidebar-active-text: #f9fafb;
  --input-bg: #020617;
  --input-text: #ffffff;
  --header-bg: #0b1220;
  --success-bg: #052e16;
  --success-text: #dcfce7;
  --error-bg: #450a0a;
  --error-text: #fee2e2;
}

body {
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent-strong);
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.05);
}

.sidebar h2,
.sidebar a {
  color: var(--text);
}

.sidebar a:hover,
.sidebar .active,
.sidebar .nav-group a.active,
.sidebar .nav-main.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
}

.nav-group summary {
  color: var(--muted);
}

.nav-group[open] {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
}

html[data-theme="dark"] .nav-group[open] {
  background: #030b1b;
  border-color: #0f1f38;
}

.card,
.list-card,
.summary-chip,
table,
.modal-card {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

th,
.modal-header,
.compact-form {
  background: var(--header-bg);
}

th,
td {
  border-bottom-color: var(--line);
}

input,
select,
textarea {
  background: var(--input-bg);
  color: var(--input-text);
  border-color: var(--line);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.btn,
button,
input[type=submit] {
  background: var(--accent);
  color: #ffffff;
}

.btn:hover,
button:hover,
input[type=submit]:hover {
  filter: brightness(0.96);
}

.btn.secondary,
.secondary,
button.secondary,
.icon-btn {
  background: #e2e8f0;
  color: #172033;
}

html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .icon-btn {
  background: #334155;
  color: #ffffff;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #86efac;
}

.alert.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #fecaca;
}

.amount-income,
.project-progress,
.timeline-date {
  color: #15803d;
}

.amount-expense {
  color: #b91c1c;
}

html[data-theme="dark"] .amount-income,
html[data-theme="dark"] .project-progress,
html[data-theme="dark"] .timeline-date {
  color: #86efac;
}

html[data-theme="dark"] .amount-expense {
  color: #fca5a5;
}

.pill,
.status-paused {
  background: #e2e8f0;
  color: #172033;
}

.status-open {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-done {
  background: #dcfce7;
  color: #14532d;
}

.status-due {
  background: #ffedd5;
  color: #9a3412;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .status-paused {
  background: #334155;
  color: #ffffff;
}

html[data-theme="dark"] .status-open {
  background: #172554;
  color: #ffffff;
}

html[data-theme="dark"] .status-done {
  background: #14532d;
  color: #ffffff;
}

html[data-theme="dark"] .status-due {
  background: #7c2d12;
  color: #ffffff;
}

.due,
.due td {
  background: #fff7ed;
}

html[data-theme="dark"] .due,
html[data-theme="dark"] .due td {
  background: #451a03;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 12px;
}

.theme-switcher button {
  background: #e2e8f0;
  color: #172033;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.theme-switcher button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

html[data-theme="dark"] .theme-switcher button {
  background: #334155;
  color: #ffffff;
}

html[data-theme="dark"] .theme-switcher button.active {
  background: var(--accent);
  color: #052e16;
}

.topbar {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

html[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.55);
  border-color: var(--line);
  padding: 12px 14px;
}

/* v1.6.2 workflow polish */
.field-hint {
  color: var(--muted);
  font-size: 12px;
  margin: -6px 0 12px;
}
.status-todo { background: #e2e8f0; color: #172033; }
.status-doing { background: #dbeafe; color: #1e3a8a; }
.status-blocked { background: #fee2e2; color: #991b1b; }
.status-planned { background: #e2e8f0; color: #172033; }
.status-in_progress { background: #dbeafe; color: #1e3a8a; }
html[data-theme="dark"] .status-todo,
html[data-theme="dark"] .status-planned { background: #334155; color: #ffffff; }
html[data-theme="dark"] .status-doing,
html[data-theme="dark"] .status-in_progress { background: #172554; color: #ffffff; }
html[data-theme="dark"] .status-blocked { background: #7f1d1d; color: #ffffff; }
.action-row select { min-width: 120px; }
.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin-left: 8px;
}
.timeline-item + .timeline-item { border-top: 1px solid var(--line); }
@media(max-width:760px){
  .timeline-item { grid-template-columns: 1fr; }
}


/* v1.6.3 workflow cleanup */
.action-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.action-stack form { margin: 0; }
.reminder-due-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 10px 12px;
  margin: -6px 0 18px;
}
.reminder-due-banner span {
  background: rgba(255,255,255,.75);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 5px 9px;
}
html[data-theme="dark"] .reminder-due-banner {
  background: #451a03;
  color: #ffedd5;
  border-color: #7c2d12;
}
html[data-theme="dark"] .reminder-due-banner span {
  background: #7c2d12;
  border-color: #9a3412;
}
input[type="time"] {
  min-height: 42px;
}

/* v1.6.4 navigation + safety polish */
button.warn,
.btn.warn,
.warn {
  background: #f59e0b !important;
  color: #111827 !important;
}
html[data-theme="dark"] button.warn,
html[data-theme="dark"] .btn.warn,
html[data-theme="dark"] .warn {
  background: #fbbf24 !important;
  color: #111827 !important;
}
.nav-group:not([open]) > *:not(summary) {
  display: none;
}


/* v1.7.0 document import assistant */
.status-pending { background: #fef3c7; color: #92400e; }
.status-imported { background: #dcfce7; color: #166534; }
.status-ignored { background: #e5e7eb; color: #374151; }
html[data-theme="dark"] .status-pending { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .status-imported { background: #14532d; color: #dcfce7; }
html[data-theme="dark"] .status-ignored { background: #374151; color: #f8fafc; }

/* v1.7.7 readable inline code polish */
code{background:#eef3f8;color:#1f3b57;border:1px solid #c9d7e6;border-radius:6px;padding:2px 6px;}
[data-theme=dark] code{background:#1e293b;color:#dbeafe;border-color:#334155;}

.spaced-action{ margin-top:6px; }
.actions form.inline{ margin-top:4px; }


/* v1.8.1 import UX and confidence */
.drop-zone{
  border:2px dashed var(--line);
  border-radius:16px;
  padding:18px;
  background:rgba(255,255,255,.55);
  display:grid;
  gap:6px;
  cursor:pointer;
  margin-bottom:10px;
}
.drop-zone strong{font-size:17px;color:var(--text)}
.drop-zone span{color:var(--muted)}
.drop-zone input[type=file]{margin-top:8px;background:var(--panel)}
.drop-zone.dragover{border-color:var(--accent);background:#eff6ff;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
html[data-theme="dark"] .drop-zone{background:rgba(15,23,42,.45)}
html[data-theme="dark"] .drop-zone.dragover{background:#172554}
.processing-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:2000;padding:20px}.processing-overlay.open{display:flex}.processing-card{width:min(560px,100%);background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 60px rgba(0,0,0,.28);padding:24px;text-align:center}.spinner{width:42px;height:42px;border-radius:50%;border:4px solid #dbeafe;border-top-color:var(--accent);animation:acctSpin 1s linear infinite;margin:0 auto 12px}@keyframes acctSpin{to{transform:rotate(360deg)}}.file-processing-list{display:grid;gap:6px;margin:10px 0;text-align:left}.file-status-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);background:rgba(255,255,255,.55);border-radius:10px;padding:7px 9px}.status-badge{border-radius:999px;padding:3px 8px;font-size:12px;font-weight:700}.status-badge.queued{background:#e2e8f0;color:#334155}.status-badge.processing{background:#dbeafe;color:#1e3a8a}.status-badge.done{background:#dcfce7;color:#166534}.status-badge.error{background:#fee2e2;color:#991b1b}.receipt-btn{white-space:nowrap}.actions .btn,.actions button{margin:2px 2px 2px 0}.actions form.inline{display:inline-block;margin:2px 2px 2px 0}.actions .spaced-action{margin-top:4px}
html[data-theme="dark"] .file-status-row{background:rgba(15,23,42,.45)}
html[data-theme="dark"] .status-badge.queued{background:#334155;color:#f8fafc}
html[data-theme="dark"] .status-badge.processing{background:#172554;color:#dbeafe}
html[data-theme="dark"] .status-badge.done{background:#14532d;color:#dcfce7}
html[data-theme="dark"] .status-badge.error{background:#7f1d1d;color:#fecaca}

/* v1.8.2 attachment preview modal */
.preview-backdrop{align-items:center;padding:18px;}
.preview-card{width:min(1120px,96vw);height:min(860px,92vh);display:flex;flex-direction:column;}
.preview-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line);background:rgba(241,245,249,.75);}
html[data-theme="dark"] .preview-toolbar{background:rgba(15,23,42,.75);}
.preview-frame-wrap{flex:1;min-height:360px;overflow:auto;background:#f8fafc;}
html[data-theme="dark"] .preview-frame-wrap{background:#0f172a;}
.preview-frame-wrap iframe{width:100%;height:100%;min-height:650px;border:0;background:#fff;}
@media(max-width:760px){.preview-card{height:94vh;width:98vw}.preview-frame-wrap iframe{min-height:560px}.preview-toolbar .muted{width:100%}}

.amount-refund{color:#0f8a3b;font-weight:800;}
.pill.status-refund,.pill.type-refund{background:#dcfce7;color:#166534;}


/* v1.9.0 reporting foundation */
.report-filters{margin-bottom:16px;}
.row.four-cols{grid-template-columns:repeat(4,minmax(0,1fr));}
.filter-actions{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;}
.report-summary{grid-template-columns:repeat(6,minmax(0,1fr));margin:14px 0 18px;}
.report-grid.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px;}
.report-transactions .small-text{font-size:12px;}
.amount-refund{color:#0f766e;font-weight:700;}
html[data-theme="dark"] .amount-refund{color:#5eead4;}
@media(max-width:1100px){.report-summary{grid-template-columns:repeat(3,minmax(0,1fr));}.report-grid.two-col{grid-template-columns:1fr}.row.four-cols{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){.report-summary{grid-template-columns:1fr}.row.four-cols{grid-template-columns:1fr}.filter-actions{align-items:stretch}.filter-actions .btn,.filter-actions button{width:100%;}}


/* v1.9.1 professional accounting report tables */
.report-kpi-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
  margin:14px 0 18px;
}
.report-kpi{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px 18px;
  box-shadow:0 10px 28px rgba(15,23,42,.08);
  min-height:112px;
}
.report-kpi span{
  display:block;
  color:var(--muted);
  font-size:14px;
  margin-bottom:8px;
}
.report-kpi strong{
  display:block;
  font-size:26px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.report-kpi small{
  display:block;
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
}
.report-kpi-net{
  border-color:#bfdbfe;
  background:linear-gradient(180deg,rgba(239,246,255,.92),var(--panel));
}
html[data-theme="dark"] .report-kpi-net{
  border-color:#1d4ed8;
  background:linear-gradient(180deg,rgba(23,37,84,.55),var(--panel));
}
.report-panel{padding:18px 18px 20px;}
.report-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}
.report-panel-head h2{margin:0;}
.report-panel-head p{margin:5px 0 0;}
.ledger-count{
  background:var(--header-bg);
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
}
.accounting-table{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:var(--panel);
  font-size:14px;
}
.accounting-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--header-bg);
  color:var(--text);
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.accounting-table tbody tr:nth-child(even) td{background:rgba(148,163,184,.08);}
.accounting-table tbody tr:hover td{background:rgba(37,99,235,.08);}
.accounting-table td,.accounting-table th{vertical-align:middle;}
.accounting-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.ledger-table .date-cell{white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums;}
.ledger-table .ledger-amount{font-size:15px;font-weight:800;}
.type-pill{font-weight:700;white-space:nowrap;}
.type-pill.type-income{background:#dcfce7;color:#166534;}
.type-pill.type-expense{background:#fff1f2;color:#991b1b;}
.type-pill.type-refund{background:#ccfbf1;color:#0f766e;}
html[data-theme="dark"] .type-pill.type-income{background:#14532d;color:#dcfce7;}
html[data-theme="dark"] .type-pill.type-expense{background:#7f1d1d;color:#fecaca;}
html[data-theme="dark"] .type-pill.type-refund{background:#134e4a;color:#ccfbf1;}
.ledger-row.type-expense td,
.ledger-row.type-income td,
.ledger-row.type-refund td{background:transparent;}
.accounting-table tbody tr:nth-child(even) td{background:rgba(148,163,184,.05);}
.accounting-table tbody tr:hover td{background:rgba(37,99,235,.07);}
.ledger-amount.money-expense{color:#b91c1c;}
.ledger-amount.money-refund,.ledger-amount.money-income{color:#047857;}
html[data-theme="dark"] .ledger-amount.money-expense{color:#fca5a5;}
html[data-theme="dark"] .ledger-amount.money-refund,html[data-theme="dark"] .ledger-amount.money-income{color:#86efac;}
@media(max-width:1200px){.report-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:700px){.report-kpi-grid{grid-template-columns:1fr}.report-panel-head{display:block}.ledger-count{display:inline-block;margin-top:8px}.accounting-table{font-size:13px}}


/* v1.9.3 report center + cleaner ledger polish */
.report-center-card{margin:14px 0 18px;padding:18px;}
.report-template-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.report-template{
  border:1px solid var(--line);
  background:var(--header-bg);
  border-radius:12px;
  padding:10px 12px;
  font-weight:700;
  color:var(--text);
  min-height:42px;
  display:flex;
  align-items:center;
}
.report-template.active{
  border-color:#93c5fd;
  background:linear-gradient(180deg,#eff6ff,#ffffff);
  color:#1d4ed8;
}
html[data-theme="dark"] .report-template.active{
  border-color:#1d4ed8;
  background:linear-gradient(180deg,rgba(30,64,175,.32),rgba(15,23,42,.75));
  color:#bfdbfe;
}
.report-transactions td strong{font-weight:700;}
@media(max-width:900px){.report-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.report-template-grid{grid-template-columns:1fr;}}


/* v1.9.4 document import recurring helper */
.recurring-import-box{margin:14px 0;padding:14px;border:1px solid var(--line);background:rgba(248,250,252,.78)}
.recurring-import-box h3{margin:0 0 6px;font-size:16px}
html[data-theme="dark"] .recurring-import-box{background:rgba(15,23,42,.55)}

/* v1.9.5 transaction drill-down */
.clickable-row{cursor:pointer;}
.clickable-row:focus{outline:2px solid #60a5fa;outline-offset:-2px;}
.transaction-detail-card{width:min(900px,96vw);}
.detail-summary-row,.detail-grid{display:grid;gap:12px;margin-bottom:16px;}
.detail-summary-row{grid-template-columns:repeat(3,minmax(0,1fr));}
.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.detail-summary-row>div,.detail-grid>div,.detail-block{border:1px solid var(--line);background:var(--header-bg);border-radius:14px;padding:12px;}
.detail-label{display:block;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-bottom:5px;}
.preserve-lines{white-space:pre-wrap;margin:0;color:var(--text);}
.detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;}
.small-note{font-size:13px;margin:10px 0 0;}
@media(max-width:760px){.detail-summary-row,.detail-grid{grid-template-columns:1fr;}}


/* v1.9.6 clean ledger indicators */
.ledger-table tbody tr td:first-child{border-left:0 !important;}
.tx-indicators{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-left:8px;
  vertical-align:middle;
}
.tx-indicator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 5px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--header-bg);
  color:var(--muted);
  font-size:12px;
  line-height:1;
  cursor:help;
}
.tx-indicator.receipt{background:#eef6ff;color:#1d4ed8;border-color:#bfdbfe;}
.tx-indicator.recurring{background:#f0fdf4;color:#15803d;border-color:#bbf7d0;}
.tx-indicator.refund{background:#ccfbf1;color:#0f766e;border-color:#99f6e4;}
html[data-theme="dark"] .tx-indicator{background:rgba(15,23,42,.78);color:#cbd5e1;border-color:#334155;}
html[data-theme="dark"] .tx-indicator.receipt{background:rgba(30,64,175,.28);color:#bfdbfe;border-color:#1d4ed8;}
html[data-theme="dark"] .tx-indicator.recurring{background:rgba(20,83,45,.32);color:#bbf7d0;border-color:#166534;}
html[data-theme="dark"] .tx-indicator.refund{background:rgba(19,78,74,.35);color:#99f6e4;border-color:#0f766e;}
.ledger-table .vendor-cell strong{vertical-align:middle;}
.ledger-table .receipt-btn{white-space:nowrap;}

/* v1.9.7 report polish */
.report-kpi-grid{gap:14px;}
.report-kpi{min-height:92px;}
.transaction-detail-grid{gap:12px;}
.tx-indicators{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle;}
.tx-indicator{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:#edf4fb;border:1px solid #c9d9ea;font-size:12px;line-height:1;}
.tx-indicator.refund{background:#e7fff5;border-color:#afe8d1;}
.tx-indicator.recurring{background:#ecfff1;border-color:#b9ebc7;}

/* v1.9.8 report controls and grouping */
.report-template-sections{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
.report-template-section{border:1px solid var(--border,#d8e3ee);border-radius:14px;padding:10px;background:rgba(255,255,255,.55)}
.report-template-section h3{font-size:14px;margin:0 0 8px;color:var(--muted,#516987);font-weight:800}
.report-control-note{margin-top:12px;padding:10px 12px;border:1px dashed var(--border,#d8e3ee);border-radius:12px;background:rgba(239,246,255,.65);color:var(--muted,#516987);font-size:14px}
.grouped-report-panel{margin:14px 0}
@media (max-width:900px){.report-template-sections{grid-template-columns:1fr}}

/* v1.9.9 working report buttons */
.report-template-grid a.report-template {
  text-decoration: none;
}
.report-template-grid a.report-template:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}
html[data-theme="dark"] .report-template-grid a.report-template:hover {
  border-color: #1d4ed8;
  background: rgba(30, 64, 175, .28);
  color: #bfdbfe;
}
.report-template-section {
  border-color: var(--line);
}
.report-control-note {
  border-color: var(--line);
}

/* v1.9.11 selected report output */
.selected-report-panel{margin-top:16px;}
.report-subhead{font-size:15px;margin:18px 0 8px;color:#0f172a;}
html[data-theme="dark"] .report-subhead{color:#f8fafc;}
.pill.good{background:#dcfce7;color:#166534;}
.pill.warn{background:#fef3c7;color:#92400e;}
html[data-theme="dark"] .pill.good{background:#14532d;color:#dcfce7;}
html[data-theme="dark"] .pill.warn{background:#78350f;color:#fde68a;}

/* v1.9.15 reporting polish */
.report-filters{
  position: sticky;
  top: 12px;
  z-index: 50;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.active-filter-card{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin: 14px 0;
}
.filter-pill{
  background:#e0f2fe;
  color:#075985;
  border:1px solid #bae6fd;
}
html[data-theme="dark"] .filter-pill{
  background:#0c4a6e;
  color:#e0f2fe;
  border-color:#075985;
}
.drill-row:hover{
  background:rgba(59,130,246,.08);
}
.drill-link{
  color:var(--accent);
  text-decoration:none;
}
.drill-link:hover{
  text-decoration:underline;
}
.drill-hint{
  display:block;
  font-size:11px;
  margin-top:2px;
}
.matching-ledger-panel{
  margin-top:18px;
}
.selected-report-panel .table-wrap + .report-subhead,
.selected-report-panel .report-subhead{
  margin-top:22px;
}
@media(max-width:760px){
  .report-filters{position:static;}
}

/* v1.9.16 Duplicate Review */
.duplicate-help-box{background:rgba(254,243,199,.78);border:1px solid #fbbf24;color:#78350f;border-radius:14px;padding:12px 14px;margin-bottom:14px;line-height:1.45;}
[data-theme=dark] .duplicate-help-box{background:rgba(120,53,15,.28);border-color:#92400e;color:#fde68a;}
.duplicate-table td{vertical-align:top;}
.duplicate-desc{margin-top:8px;max-width:260px;white-space:pre-wrap;font-size:12px;}
.duplicate-table .actions{min-width:230px;}
.duplicate-table .actions form{margin:2px 4px 4px 0;}

/* v1.9.17 Duplicate Review polish */
.duplicate-table .duplicate-actions{
  min-width:260px;
}
.duplicate-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.duplicate-actions form.inline,
.duplicate-actions .btn,
.duplicate-actions button{
  margin:0;
}
.duplicate-actions .small{
  min-height:32px;
  white-space:nowrap;
}
.duplicate-review-btn{
  min-width:76px;
}
.duplicate-file-name{
  margin-top:6px;
  max-width:260px;
  font-size:12px;
  color:var(--muted);
  word-break:break-word;
}
.duplicate-review-card{
  width:min(1040px,96vw);
}
.duplicate-compare-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}
.duplicate-compare-card{
  border:1px solid var(--line);
  background:rgba(255,255,255,.58);
  border-radius:16px;
  padding:14px;
}
[data-theme=dark] .duplicate-compare-card{
  background:rgba(15,23,42,.42);
}
.duplicate-compare-card h3{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:0;
}
.detail-grid.single-col{
  grid-template-columns:1fr;
}
@media(max-width:820px){
  .duplicate-compare-grid{grid-template-columns:1fr;}
  .duplicate-actions{min-width:0;}
}

/* v1.9.18 duplicate action availability */
.duplicate-quick-panel{border-color:#bfdbfe;background:rgba(239,246,255,.78);}
[data-theme=dark] .duplicate-quick-panel{background:rgba(30,41,59,.58);border-color:#334155;}
.duplicate-modal-actions{justify-content:flex-start;border-top:1px solid var(--line);padding-top:14px;margin-top:16px;}
.duplicate-modal-actions form{margin:0;}
.duplicate-modal-actions .btn{white-space:nowrap;}

/* v1.9.19 compact reports + duplicate reference polish */
.report-center-card{padding:14px 16px;}
.report-center-card .report-panel-head{margin-bottom:8px;}
.report-template-sections{gap:12px;}
.report-template-section{padding:10px 12px;}
.report-template-section h3{font-size:13px;margin:0 0 7px;}
.report-template-grid{gap:8px;}
.report-template{
  min-height:42px;
  padding:8px 10px;
  font-size:13px;
  line-height:1.15;
  border-radius:10px;
}
.report-control-note{padding:8px 10px;font-size:12px;margin-top:10px;}
.duplicate-reference{
  display:inline-block;
  margin-top:6px;
  padding:3px 7px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
}
[data-theme=dark] .duplicate-reference{background:rgba(30,64,175,.28);border-color:#1d4ed8;color:#bfdbfe;}
.duplicate-compare-card .detail-grid.single-col{gap:8px;}
@media(max-width:900px){.report-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.report-template{min-height:40px;}}


/* v1.9.20 compact report button alignment + dark theme report cleanup */
.report-template{
  justify-content:center;
  text-align:center;
  min-width:0;
}
.report-template-grid a.report-template{
  justify-content:center;
  text-align:center;
}
.report-template-section{
  background:rgba(255,255,255,.62);
}
html[data-theme="dark"] .report-center-card{
  background:#111827;
  border-color:#374151;
}
html[data-theme="dark"] .report-template-section{
  background:#0f172a;
  border-color:#334155;
}
html[data-theme="dark"] .report-template-section h3{
  color:#cbd5e1;
}
html[data-theme="dark"] .report-template{
  background:#111827;
  border-color:#334155;
  color:#f8fafc;
}
html[data-theme="dark"] .report-template:not(.active):hover{
  background:#172554;
  border-color:#2563eb;
  color:#dbeafe;
}
html[data-theme="dark"] .report-control-note{
  background:rgba(15,23,42,.85);
  border-color:#334155;
  color:#cbd5e1;
}


/* v1.9.21 reports center tightening + consistency polish */
.report-center-card{
  padding:12px 16px 14px;
}
.report-center-card .report-panel-head{
  margin-bottom:6px;
}
.report-template-sections{
  gap:10px;
  margin-top:8px;
}
.report-template-section{
  padding:9px 11px;
  min-height:116px;
}
.report-template-section h3{
  margin-bottom:6px;
}
.report-template-grid{
  gap:7px;
}
.report-template{
  min-height:38px;
  padding:7px 9px;
}
.report-control-note{
  margin-top:9px;
  padding:7px 10px;
}
.selected-report-panel,
.grouped-report-panel{
  margin-top:12px;
}
.duplicate-quick-panel{
  margin-top:10px;
}
.duplicate-action-row{
  gap:8px;
}
.duplicate-action-row .btn,
.duplicate-action-row button{
  margin-right:6px;
  margin-bottom:6px;
}
html[data-theme="dark"] .report-center-card,
html[data-theme="dark"] .report-template-section,
html[data-theme="dark"] .duplicate-quick-panel{
  box-shadow:none;
}
html[data-theme="dark"] .report-center-card{
  border-color:#2f3b4d;
}
html[data-theme="dark"] .report-template-section{
  border-color:#2b3748;
}
html[data-theme="dark"] .report-template{
  border-color:#334155;
}
html[data-theme="dark"] .report-control-note{
  border-color:#2b3748;
}
@media(max-width:900px){
  .report-template-section{min-height:auto;}
  .report-template{min-height:38px;}
}


/* v1.9.22 corrected duplicate review visual polish */
.duplicate-table tbody tr td{
  background:rgba(241,245,249,.72);
}
.duplicate-table tbody tr:nth-child(even) td{
  background:rgba(248,250,252,.92);
}
.duplicate-table tbody tr:hover td{
  background:rgba(219,234,254,.88);
}
.duplicate-table td.duplicate-actions,
.duplicate-table td.actions{
  background:inherit;
}
body.theme-light .duplicate-help-box,
body:not(.theme-dark) .duplicate-help-box{
  background:#fff7ed;
  border-color:#f97316;
  color:#7c2d12;
}
body.theme-light .duplicate-help-box .muted,
body:not(.theme-dark) .duplicate-help-box .muted{
  color:#475569;
}
html[data-theme="dark"] .duplicate-help-box{
  background:rgba(69,26,3,.72);
  border-color:#f59e0b;
  color:#fde68a;
}
html[data-theme="dark"] .duplicate-help-box .muted{
  color:#e2e8f0;
}
html[data-theme="dark"] .duplicate-table tbody tr td{
  background:#111827;
}
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(even) td{
  background:#162033;
}
html[data-theme="dark"] .duplicate-table tbody tr:hover td{
  background:#1e293b;
}
html[data-theme="dark"] .duplicate-desc,
html[data-theme="dark"] .duplicate-file-name{
  color:#cbd5e1;
}
html[data-theme="dark"] .duplicate-table .muted{
  color:#cbd5e1;
}
body.theme-light .duplicate-desc,
body.theme-light .duplicate-file-name,
body:not(.theme-dark) .duplicate-desc,
body:not(.theme-dark) .duplicate-file-name{
  color:#475569;
}


/* v1.9.23 duplicate review final table polish */
.duplicate-table tbody tr:nth-child(odd) td,
.duplicate-table tbody tr:nth-child(odd) td.duplicate-actions,
.duplicate-table tbody tr:nth-child(odd) td.actions{
  background:#eaf4ff !important;
}
.duplicate-table tbody tr:nth-child(even) td,
.duplicate-table tbody tr:nth-child(even) td.duplicate-actions,
.duplicate-table tbody tr:nth-child(even) td.actions{
  background:#f8fafc !important;
}
.duplicate-table tbody tr:hover td,
.duplicate-table tbody tr:hover td.duplicate-actions,
.duplicate-table tbody tr:hover td.actions{
  background:#dbeafe !important;
}
.duplicate-table td.duplicate-actions{
  display:table-cell !important;
  vertical-align:top;
  min-width:230px;
}
.duplicate-table td.duplicate-actions .btn,
.duplicate-table td.duplicate-actions form,
.duplicate-table td.duplicate-actions button{
  display:inline-block;
  margin:0 6px 8px 0;
  vertical-align:top;
}
body.theme-light .duplicate-help-box,
body:not(.theme-dark) .duplicate-help-box{
  background:#fff7ed !important;
  border-color:#f97316 !important;
  color:#7c2d12 !important;
}
body.theme-light .duplicate-help-box strong,
body:not(.theme-dark) .duplicate-help-box strong{
  color:#9a3412 !important;
}
body.theme-light .duplicate-help-box .muted,
body:not(.theme-dark) .duplicate-help-box .muted{
  color:#334155 !important;
}
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(odd) td,
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(odd) td.duplicate-actions,
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(odd) td.actions{
  background:#111827 !important;
}
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(even) td.duplicate-actions,
html[data-theme="dark"] .duplicate-table tbody tr:nth-child(even) td.actions{
  background:#162033 !important;
}
html[data-theme="dark"] .duplicate-table tbody tr:hover td,
html[data-theme="dark"] .duplicate-table tbody tr:hover td.duplicate-actions,
html[data-theme="dark"] .duplicate-table tbody tr:hover td.actions{
  background:#1e293b !important;
}
html[data-theme="dark"] .duplicate-help-box{
  background:rgba(69,26,3,.82) !important;
  border-color:#f59e0b !important;
  color:#fde68a !important;
}
html[data-theme="dark"] .duplicate-help-box .muted{
  color:#e5e7eb !important;
}


/* v1.9.24 customer and invoice foundation */
.invoice-modal{width:min(1040px,100%)}
.invoice-lines{border:1px solid var(--line);border-radius:14px;padding:10px;margin:10px 0 14px;background:rgba(148,163,184,.08)}
.invoice-line{display:grid;grid-template-columns:1.5fr 90px 120px 70px 120px 42px;gap:8px;align-items:center;margin-bottom:8px}
.invoice-line-head{font-size:12px;color:var(--muted);font-weight:bold;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.invoice-line input{margin:0}.invoice-line .line-total{text-align:right;font-weight:bold}.invoice-summary{display:grid;grid-template-columns:160px 120px 1fr 1fr 1fr;gap:10px;align-items:end;margin:12px 0}.invoice-summary label{margin:0}.invoice-summary input{margin:0}.invoice-summary>div{border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--header-bg);display:flex;justify-content:space-between;gap:10px}.invoice-grand{font-size:17px}.status-draft{background:#fef3c7;color:#92400e}html[data-theme="dark"] .status-draft{background:#78350f;color:#fde68a}@media(max-width:900px){.invoice-line,.invoice-line-head{grid-template-columns:1fr 70px 90px 55px}.invoice-line .line-total,.invoice-line-head span:nth-child(5){display:none}.invoice-summary{grid-template-columns:1fr}.invoice-summary>div{width:100%}}

/* v1.9.25 quick customer invoice entry */
.invoice-customer-choice{display:flex;gap:14px;align-items:center;margin:4px 0 12px;padding:10px;border:1px dashed var(--line);border-radius:12px;background:rgba(148,163,184,.08)}
.quick-customer-panel{border:1px solid var(--line);border-radius:14px;padding:12px;margin:0 0 12px;background:rgba(37,99,235,.05)}
html[data-theme="dark"] .quick-customer-panel{background:rgba(37,99,235,.12)}
@media(max-width:700px){.invoice-customer-choice{flex-direction:column;align-items:flex-start}}

/* v1.9.26 invoice print/PDF actions */
.actions .btn.small{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}


/* v1.9.27 invoice preview modal */
.invoice-preview-card{width:min(980px,96vw);height:min(92vh,920px);display:flex;flex-direction:column;}
.invoice-preview-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--header-bg);}
.invoice-preview-frame-wrap{flex:1;min-height:420px;background:#eaf1f7;}
.invoice-preview-frame-wrap iframe{width:100%;height:100%;border:0;background:#fff;}
@media(max-width:700px){.invoice-preview-backdrop{padding:1vh 6px}.invoice-preview-card{width:100%;height:96vh;border-radius:14px}.invoice-preview-toolbar .muted{font-size:12px}.invoice-preview-frame-wrap{min-height:520px}}

/* v1.9.28 branding line breaks + subtle product mark */
.sidebar{display:flex;flex-direction:column;min-height:100vh}.side-nav{flex:1}.brand{align-items:flex-start}.brand h2{line-height:1.16;white-space:normal}.sidebar-product-brand{margin-top:auto;padding:16px 12px 4px;border-top:1px solid var(--line);color:var(--muted);text-align:left}.product-mark{font-family:Georgia,'Times New Roman',serif;font-size:21px;font-weight:700;letter-spacing:.02em;color:var(--text)}.product-tagline{font-size:12px;margin-top:3px}.product-version{font-size:11px;margin-top:8px;opacity:.78}.invoice-sheet .brand h1{line-height:1.18;white-space:normal}.invoice-sheet .brand h1 br{display:block}.settings-tip code, small code{font-size:12px}
html[data-theme="dark"] .sidebar-product-brand{border-top-color:#22314a}.brand h2 br{display:block}
@media(max-width:760px){.sidebar{min-height:auto}.sidebar-product-brand{text-align:center;margin-top:12px}.brand h2{text-align:left}}


/* v1.9.29 sidebar business branding refinement */
.sidebar-company-brand{display:block;padding:16px 12px 14px;text-align:left;border-bottom:1px solid var(--line);}
.sidebar-company-brand .company-name{font-size:18px;line-height:1.16;font-weight:800;color:var(--text);letter-spacing:.01em;word-break:break-word;}
.sidebar-company-brand .company-line{font-size:12px;line-height:1.28;color:var(--muted);margin-top:3px;word-break:break-word;}
html[data-theme="dark"] .sidebar-company-brand{border-bottom-color:#22314a;}
.settings-branding-tip{display:block;line-height:1.45;margin-top:6px;}
.settings-branding-tip code{white-space:normal;word-break:break-word;}
@media(max-width:760px){.sidebar-company-brand{text-align:left}.sidebar-company-brand .company-name{font-size:17px}}


/* v1.9.30 SMTP/email settings foundation */
.smtp-settings-card input[type=password]::placeholder{letter-spacing:.08em;}
.smtp-password-clear{display:flex;align-items:center;}
.smtp-actions{align-self:end;display:flex;gap:8px;flex-wrap:wrap;}
html[data-theme="dark"] .smtp-settings-card input[type=password]::placeholder{color:#94a3b8;}

/* v1.9.31 invoice email workflow */
.invoice-email-card{max-width:760px;}
.invoice-email-card textarea{min-height:130px;}
.actions [data-email-invoice]{white-space:nowrap;}

/* v1.9.35 invoice number settings */
.invoice-settings-card .invoice-preview-box{display:flex;flex-direction:column;justify-content:center;}
.invoice-preview-number{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:var(--panel-soft);font-size:1.35rem;font-weight:900;letter-spacing:.04em;color:var(--text);}
.compact-alert{padding:10px 12px;margin:12px 0;}

/* v1.9.36 invoice tax settings polish */
.invoice-summary-clean{align-items:stretch;}
.invoice-tax-note{background:var(--card-bg,#fff);border:1px solid var(--border,#d8e2ef);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:170px;}
.invoice-tax-note span{font-size:.85rem;color:var(--muted,#526b8f);}
.invoice-tax-note strong{font-size:1.05rem;}
.invoice-tax-note small{font-size:.78rem;}


/* v1.9.37 invoice entry totals cleanup */
.invoice-summary-totals-only{
  grid-template-columns:repeat(3,minmax(145px,1fr));
  max-width:620px;
  margin:12px auto;
  align-items:stretch;
}
.invoice-summary-totals-only>div{
  min-height:58px;
  align-items:center;
  text-align:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
}
.invoice-summary-totals-only>div span{
  font-size:.82rem;
  color:var(--muted);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.invoice-summary-totals-only>div strong{
  font-size:1.05rem;
}
.invoice-summary-totals-only .invoice-grand strong{
  font-size:1.2rem;
}
@media(max-width:700px){
  .invoice-summary-totals-only{grid-template-columns:1fr;max-width:none;}
}

/* v1.9.38 invoice entry totals right alignment */
.invoice-summary-totals-only{
  display:grid;
  grid-template-columns:1fr;
  width:min(330px,100%);
  max-width:330px;
  margin:12px 0 14px auto;
  gap:0;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:var(--header-bg);
}
.invoice-summary-totals-only>div{
  min-height:auto;
  border:0;
  border-radius:0;
  padding:9px 12px;
  background:transparent;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  gap:18px;
  border-bottom:1px solid var(--line);
}
.invoice-summary-totals-only>div:last-child{border-bottom:0;}
.invoice-summary-totals-only>div span{
  font-size:.92rem;
  color:var(--text);
  font-weight:500;
  text-transform:none;
  letter-spacing:0;
}
.invoice-summary-totals-only>div strong{
  font-size:1rem;
  white-space:nowrap;
}
.invoice-summary-totals-only .invoice-grand{
  background:rgba(37,99,235,.05);
}
.invoice-summary-totals-only .invoice-grand span,
.invoice-summary-totals-only .invoice-grand strong{
  font-weight:900;
  font-size:1.12rem;
}
html[data-theme="dark"] .invoice-summary-totals-only .invoice-grand{
  background:rgba(37,99,235,.12);
}
@media(max-width:700px){
  .invoice-summary-totals-only{width:100%;max-width:none;margin:12px 0 14px;}
}


/* v1.10.0 receipt OCR review workspace */
.receipt-review-backdrop{align-items:center;padding:14px;}
.receipt-review-card{width:min(1180px,98vw);height:min(900px,94vh);display:flex;flex-direction:column;}
.receipt-review-body{display:grid;grid-template-columns:minmax(360px,1.05fr) minmax(420px,.95fr);gap:14px;overflow:hidden;flex:1;}
.receipt-review-preview,.receipt-review-form{min-height:0;overflow:auto;border:1px solid var(--line);border-radius:14px;background:rgba(148,163,184,.08);padding:12px;}
.receipt-review-preview{display:flex;flex-direction:column;}
.receipt-review-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
.receipt-review-preview iframe{width:100%;flex:1;min-height:560px;border:0;border-radius:10px;background:#fff;}
.review-section-title{font-weight:800;margin-bottom:10px;color:var(--text);}
.quick-inline{display:flex;gap:8px;align-items:center;}
.quick-inline input,.quick-inline select{flex:1;min-width:0;}
.quick-inline .btn,.quick-inline button{white-space:nowrap;margin-top:0;align-self:center;min-height:38px;display:inline-flex;align-items:center;justify-content:center;}
.quick-add-box{border:1px dashed var(--line);border-radius:12px;background:rgba(37,99,235,.06);padding:10px;margin:0 0 12px;}
html[data-theme="dark"] .quick-add-box{background:rgba(37,99,235,.12);}
@media(max-width:900px){.receipt-review-card{height:96vh}.receipt-review-body{grid-template-columns:1fr;overflow:auto}.receipt-review-preview iframe{min-height:460px}.quick-inline{display:block}.quick-inline .btn,.quick-inline button{margin:4px 0 10px}}

/* v1.10.2 OCR review/import queue polish */
.document-import-table .import-actions-cell{ text-align:right; white-space:nowrap; }
.import-status{ display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:999px; font-weight:700; font-size:.88rem; }
.import-status-pending{ background:#fff7d6; color:#7a5600; border:1px solid #f2d36b; }
.import-status-imported{ background:#e7f8ed; color:#176638; border:1px solid #a8dfbb; }
.import-status-ignored{ background:#f1f3f5; color:#5d6670; border:1px solid #d7dce1; }
.import-row-pending{ background:rgba(255, 247, 214, .28); }
body.dark .import-row-pending{ background:rgba(180, 132, 20, .14); }
body.dark .import-status-pending{ background:rgba(180,132,20,.22); color:#ffd56a; border-color:rgba(255,213,106,.35); }
body.dark .import-status-imported{ background:rgba(36,145,83,.18); color:#8be0a8; border-color:rgba(139,224,168,.35); }
body.dark .import-status-ignored{ background:rgba(140,150,160,.14); color:#c8d0d8; border-color:rgba(200,208,216,.25); }
.row-action-menu{ position:relative; display:inline-block; }
.row-action-menu summary{ list-style:none; cursor:pointer; border:1px solid var(--border); border-radius:9px; padding:4px 10px; min-width:34px; text-align:center; font-size:1.1rem; line-height:1; background:var(--card); color:var(--text); }
.row-action-menu summary::-webkit-details-marker{ display:none; }
.row-action-menu[open] summary{ box-shadow:0 0 0 3px rgba(59,130,246,.15); }
.row-action-menu-list{ position:absolute; right:0; top:calc(100% + 6px); z-index:50; min-width:210px; background:var(--card); border:1px solid var(--border); border-radius:12px; box-shadow:0 16px 40px rgba(0,0,0,.18); padding:6px; text-align:left; }
.row-action-menu-list a,.row-action-menu-list button{ display:block; width:100%; box-sizing:border-box; border:0; background:transparent; color:var(--text); text-decoration:none; text-align:left; padding:9px 10px; border-radius:8px; font:inherit; cursor:pointer; }
.row-action-menu-list a:hover,.row-action-menu-list button:hover{ background:var(--hover); }
.row-action-menu-list form{ margin:0; }
.row-action-menu-list .danger-link{ color:#b42318; }
body.dark .row-action-menu-list .danger-link{ color:#ff9c8f; }
.receipt-review-form select[name="vendor"], .category-review-select{ min-width:0; width:100%; }
.category-review-select option:checked{ font-weight:700; }
/* v1.10.3 Document Import status/action cleanup */
.document-import-table th.status-actions-head,
.document-import-table td.status-actions-cell{ text-align:right; white-space:nowrap; width:190px; }
.status-action-wrap{ display:inline-flex; align-items:center; justify-content:flex-end; gap:8px; }
.status-actions-cell .row-action-menu-list{ text-align:left; }
.status-actions-cell .import-status{ min-width:116px; justify-content:center; }
@media(max-width:760px){
  .document-import-table th.status-actions-head,
  .document-import-table td.status-actions-cell{ text-align:left; width:auto; }
  .status-action-wrap{ justify-content:flex-start; }
}

/* v1.10.4 Document Import status/action alignment */
.document-import-table td.status-actions-cell{ vertical-align:middle; }
.document-import-table td.status-actions-cell .status-action-wrap{ align-items:center; }
.document-import-table th.status-actions-head{ vertical-align:middle; }

/* v1.10.6 OCR review recurring hint */
.alert.warning{background:#fff7ed;color:#7c2d12;border-color:#fed7aa}
body.dark .alert.warning,.theme-dark .alert.warning{background:#422006;color:#ffedd5;border-color:#f59e0b}
.recurring-suggestion{font-weight:700}

/* v1.10.7 Document Import active/processed workflow */
.import-view-tabs .btn{margin-right:6px;}
.archive-search-row{display:grid;grid-template-columns:auto minmax(160px,220px) minmax(240px,1fr) auto auto;gap:10px;align-items:end;margin:0;}
.archive-search-row label{margin:0;font-weight:700;align-self:center;}
.archive-search-row select,.archive-search-row input{margin:0;}
.processed-documents-table td{vertical-align:middle;}
.processed-documents-table td strong{font-weight:700;}
.document-import-table.processed-documents-table th.status-actions-head,
.document-import-table.processed-documents-table td.status-actions-cell{width:170px;}
@media(max-width:850px){.archive-search-row{grid-template-columns:1fr}.archive-search-row label{margin-bottom:0}.archive-search-row .btn,.archive-search-row button{width:100%;}}

/* v1.10.8 Processed Documents menu + search tip spacing */
.archive-search-card .field-hint{
  display:block;
  clear:both;
  margin:10px 0 0 0;
  padding:0;
  line-height:1.35;
}
.archive-search-card .archive-search-row{
  margin-bottom:0;
}

/* v1.10.9 invoice preview and print readability polish */
.invoice-lines{border-color:#64748b !important;}
.invoice-summary>div{border-color:#64748b !important;}
.invoice-preview-card{border:1px solid #64748b;}
.invoice-preview-toolbar{border-bottom-color:#64748b;}
html[data-theme="dark"] .invoice-lines,
html[data-theme="dark"] .invoice-summary>div,
html[data-theme="dark"] .invoice-preview-card,
html[data-theme="dark"] .invoice-preview-toolbar{border-color:#334155 !important;}


/* v1.10.10 Dashboard two-line readability polish
   Keeps Quick Notes, Recent Activity, and Upcoming Recurring Payments detail lines readable. */
.dashboard-widget .dashboard-two-line-table td{
  vertical-align:middle;
  line-height:1.35;
}

.dashboard-two-line-cell{
  min-height:46px;
}

.dashboard-primary-line{
  display:block;
  line-height:1.35;
  font-weight:600;
  margin-bottom:7px;
}

.dashboard-detail-line{
  display:block;
  font-size:12px;
  line-height:1.35;
  margin-top:0;
  margin-bottom:0;
  opacity:.95;
}

.dashboard-quick-notes .dashboard-primary-line{
  white-space:normal;
  word-break:break-word;
}

.dashboard-recent-activity .dashboard-primary-line,
.dashboard-upcoming-recurring .dashboard-primary-line{
  white-space:normal;
}

.dashboard-widget table th,
.dashboard-widget table td{
  padding-top:13px;
  padding-bottom:13px;
}

@media(max-width:760px){
  .dashboard-primary-line{
    margin-bottom:8px;
  }
  .dashboard-detail-line{
    font-size:12px;
  }
}


/* v1.10.13 Row action menu clipping fix
   The ⋮ menu is moved to fixed positioning while open so table/card overflow cannot cut it off. */
.row-action-menu[open] .row-action-menu-list{
  position:fixed;
  right:auto;
  top:auto;
  z-index:2500;
  max-width:min(280px, calc(100vw - 24px));
  max-height:min(70vh, 420px);
  overflow:auto;
}

.row-action-menu-list{
  white-space:normal;
}

.document-import-table,
.document-import-table tbody,
.document-import-table tr,
.document-import-table td.status-actions-cell{
  overflow:visible;
}

.status-action-wrap{
  position:relative;
}


/* v1.10.14 Row action menu right-edge visibility fix
   Keeps ⋮ menus fully on-screen by giving the floating menu a real width and JS-positioning it inward. */
.row-action-menu[open] .row-action-menu-list{
  position:fixed !important;
  right:auto !important;
  top:auto !important;
  z-index:5000 !important;
  width:240px;
  min-width:240px;
  max-width:calc(100vw - 24px);
  max-height:min(70vh, 420px);
  overflow:auto;
  white-space:normal;
}

.row-action-menu-list a,
.row-action-menu-list button{
  white-space:normal;
  overflow-wrap:anywhere;
}

.document-import-table,
.document-import-table tbody,
.document-import-table tr,
.document-import-table td.status-actions-cell,
.status-action-wrap{
  overflow:visible !important;
}


/* v1.10.15 Row action menu bottom-edge fix
   Lets the fixed ⋮ menu open upward when there is not enough room below the row. */
.row-action-menu[open] .row-action-menu-list{
  position:fixed !important;
  z-index:9000 !important;
  width:240px !important;
  min-width:240px !important;
  max-width:calc(100vw - 24px) !important;
  max-height:calc(100vh - 24px) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.row-action-menu-list{
  box-sizing:border-box;
}

.row-action-menu-list a,
.row-action-menu-list button{
  min-height:38px;
  line-height:1.25;
}


/* v1.10.16 Document Import row menu final visibility polish */
.document-import-table .row-action-menu[open] .row-action-menu-list{
  position:fixed !important;
  z-index:10000 !important;
  width:240px !important;
  min-width:240px !important;
  max-width:calc(100vw - 28px) !important;
  max-height:calc(100vh - 28px) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.document-import-table .row-action-menu-list a,
.document-import-table .row-action-menu-list button{
  min-height:38px;
  line-height:1.25;
}

.document-import-table .row-action-menu-list .danger-link{
  color:#ff5c5c !important;
}

.document-import-table .table-wrap,
.document-import-table,
.document-import-table tbody,
.document-import-table tr,
.document-import-table td,
.document-import-table td.status-actions-cell,
.document-import-table .status-action-wrap{
  overflow:visible !important;
}


/* v1.10.17 Document Import inline row action menu
   The Document Import Assistant has low rows near the bottom of the viewport.
   Instead of floating off-screen, these ⋮ menus expand inside the table row so all actions remain visible. */
.document-import-table .status-action-wrap{
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
  gap:8px;
  overflow:visible !important;
}

.document-import-table .row-action-menu{
  position:relative !important;
  display:inline-block;
  text-align:left;
}

.document-import-table .row-action-menu[open]{
  min-width:245px;
}

.document-import-table .row-action-menu[open] .row-action-menu-list{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  z-index:auto !important;
  display:block !important;
  width:240px !important;
  min-width:240px !important;
  max-width:240px !important;
  max-height:none !important;
  overflow:visible !important;
  margin-top:8px;
  margin-left:auto;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:none;
}

.document-import-table .row-action-menu-list a,
.document-import-table .row-action-menu-list button{
  min-height:38px;
  white-space:normal;
  line-height:1.25;
}

.document-import-table td.status-actions-cell{
  vertical-align:top !important;
}

.document-import-table tr:has(.row-action-menu[open]) td{
  vertical-align:top !important;
}

.document-import-table tr:has(.row-action-menu[open]) td.status-actions-cell{
  min-width:310px;
}

@media(max-width:760px){
  .document-import-table .status-action-wrap{
    justify-content:flex-start;
    flex-wrap:wrap;
  }
  .document-import-table .row-action-menu[open]{
    min-width:220px;
  }
  .document-import-table .row-action-menu[open] .row-action-menu-list{
    width:220px !important;
    min-width:220px !important;
    max-width:220px !important;
  }
}


/* v1.10.18 Document Import action popup
   Uses a centered action popup instead of a row dropdown so it cannot be cut off by the table, browser bottom, or taskbar. */
.document-import-table .row-action-menu{
  position:relative !important;
  display:inline-block !important;
  min-width:0 !important;
}

.document-import-table .row-action-menu summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.document-import-table .row-action-menu-list{
  display:none !important;
}

.document-import-table .status-action-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.document-action-popup{
  position:fixed;
  inset:0;
  z-index:20000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,6,23,.62);
}

.document-action-popup.open{
  display:flex;
}

.document-action-popup-card{
  width:min(360px, calc(100vw - 36px));
  max-height:calc(100vh - 36px);
  overflow:auto;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}

.document-action-popup-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:#0b1220;
}

.document-action-popup-body{
  padding:8px;
}

.document-action-popup-body a,
.document-action-popup-body button{
  display:block;
  width:100%;
  box-sizing:border-box;
  border:0;
  background:transparent;
  color:var(--text);
  text-decoration:none;
  text-align:left;
  padding:11px 12px;
  border-radius:10px;
  font:inherit;
  cursor:pointer;
}

.document-action-popup-body a:hover,
.document-action-popup-body button:hover{
  background:rgba(148,163,184,.14);
}

.document-action-popup-body form{
  margin:0;
}

.document-action-popup-body .danger-link{
  color:#ff5c5c !important;
}


/* v1.10.19 Unified row action popup
   Standardizes ⋮ row menus across ClearCount using the same centered action popup pattern. */
.row-action-menu{
  position:relative !important;
  display:inline-block !important;
  min-width:0 !important;
}

.row-action-menu summary{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
}

.row-action-menu .row-action-menu-list{
  display:none !important;
}

.row-action-popup{
  position:fixed;
  inset:0;
  z-index:22000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,6,23,.62);
}

.row-action-popup.open{
  display:flex;
}

.row-action-popup-card{
  width:min(380px, calc(100vw - 36px));
  max-height:calc(100vh - 36px);
  overflow:auto;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}

.row-action-popup-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:#0b1220;
}

.row-action-popup-body{
  padding:8px;
}

.row-action-popup-body a,
.row-action-popup-body button{
  display:block;
  width:100%;
  box-sizing:border-box;
  border:0;
  background:transparent;
  color:var(--text);
  text-decoration:none;
  text-align:left;
  padding:11px 12px;
  border-radius:10px;
  font:inherit;
  cursor:pointer;
}

.row-action-popup-body a:hover,
.row-action-popup-body button:hover{
  background:rgba(148,163,184,.14);
}

.row-action-popup-body form{
  margin:0;
}

.row-action-popup-body .danger-link,
.row-action-popup-body .danger,
.row-action-popup-body button.danger{
  color:#ff5c5c !important;
}

.row-action-popup-body button.danger{
  background:transparent !important;
}


/* v1.10.20 Row action menu standardization polish */
.actions .row-action-menu summary{
  border:1px solid var(--line);
  border-radius:10px;
  background:#1e293b;
  color:var(--text);
  padding:6px 10px;
  min-width:36px;
  min-height:32px;
  font-weight:700;
}

.actions .row-action-menu summary:hover{
  background:#334155;
}

.row-action-popup-body button.receipt-btn{
  background:transparent !important;
  color:var(--text) !important;
}

.row-action-popup-body .danger-link{
  color:#ff5c5c !important;
}

.row-action-popup-body button.danger-link{
  background:transparent !important;
}

.row-action-popup-body form button{
  margin:0;
}


/* v1.10.21 Light theme action popup readability polish
   Keeps the standardized Actions popup readable in both dark and light themes. */

/* Popup shell */
body.light .row-action-popup-card,
body:not(.dark) .row-action-popup-card{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}

/* Popup header/title: dark header with readable white title */
body.light .row-action-popup-head,
body:not(.dark) .row-action-popup-head{
  background:#0f172a !important;
  color:#ffffff !important;
  border-bottom-color:#334155 !important;
}

body.light .row-action-popup-head strong,
body:not(.dark) .row-action-popup-head strong,
body.light #rowActionPopupTitle,
body:not(.dark) #rowActionPopupTitle{
  color:#ffffff !important;
  opacity:1 !important;
}

/* Close button */
body.light .row-action-popup-close,
body:not(.dark) .row-action-popup-close{
  background:#e2e8f0 !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
}

body.light .row-action-popup-close:hover,
body:not(.dark) .row-action-popup-close:hover{
  background:#cbd5e1 !important;
}

/* Popup body actions */
body.light .row-action-popup-body,
body:not(.dark) .row-action-popup-body{
  background:#ffffff !important;
  color:#0f172a !important;
}

body.light .row-action-popup-body a,
body.light .row-action-popup-body button,
body:not(.dark) .row-action-popup-body a,
body:not(.dark) .row-action-popup-body button{
  color:#0f172a !important;
  background:transparent !important;
}

body.light .row-action-popup-body a:hover,
body.light .row-action-popup-body button:hover,
body:not(.dark) .row-action-popup-body a:hover,
body:not(.dark) .row-action-popup-body button:hover{
  background:#e2e8f0 !important;
  color:#0f172a !important;
}

/* Danger actions stay red/readable */
body.light .row-action-popup-body .danger-link,
body.light .row-action-popup-body button.danger-link,
body.light .row-action-popup-body .danger,
body.light .row-action-popup-body button.danger,
body:not(.dark) .row-action-popup-body .danger-link,
body:not(.dark) .row-action-popup-body button.danger-link,
body:not(.dark) .row-action-popup-body .danger,
body:not(.dark) .row-action-popup-body button.danger{
  color:#dc2626 !important;
  background:transparent !important;
}

body.light .row-action-popup-body .danger-link:hover,
body.light .row-action-popup-body button.danger-link:hover,
body.light .row-action-popup-body .danger:hover,
body.light .row-action-popup-body button.danger:hover,
body:not(.dark) .row-action-popup-body .danger-link:hover,
body:not(.dark) .row-action-popup-body button.danger-link:hover,
body:not(.dark) .row-action-popup-body .danger:hover,
body:not(.dark) .row-action-popup-body button.danger:hover{
  background:#fee2e2 !important;
  color:#b91c1c !important;
}

/* Row ⋮ button contrast in light theme */
body.light .actions .row-action-menu summary,
body:not(.dark) .actions .row-action-menu summary,
body.light .document-import-table .row-action-menu summary,
body:not(.dark) .document-import-table .row-action-menu summary{
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  box-shadow:0 1px 2px rgba(15,23,42,.08) !important;
}

body.light .actions .row-action-menu summary:hover,
body:not(.dark) .actions .row-action-menu summary:hover,
body.light .document-import-table .row-action-menu summary:hover,
body:not(.dark) .document-import-table .row-action-menu summary:hover{
  background:#e2e8f0 !important;
  border-color:#94a3b8 !important;
}

/* Document Actions popup compatibility from v1.10.18 if any older popup remains */
body.light .document-action-popup-card,
body:not(.dark) .document-action-popup-card{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}

body.light .document-action-popup-head,
body:not(.dark) .document-action-popup-head{
  background:#0f172a !important;
  color:#ffffff !important;
  border-bottom-color:#334155 !important;
}

body.light .document-action-popup-head strong,
body:not(.dark) .document-action-popup-head strong{
  color:#ffffff !important;
}

body.light .document-action-popup-body a,
body.light .document-action-popup-body button,
body:not(.dark) .document-action-popup-body a,
body:not(.dark) .document-action-popup-body button{
  color:#0f172a !important;
  background:transparent !important;
}

body.light .document-action-popup-body a:hover,
body.light .document-action-popup-body button:hover,
body:not(.dark) .document-action-popup-body a:hover,
body:not(.dark) .document-action-popup-body button:hover{
  background:#e2e8f0 !important;
}


/* v1.10.22 Popup JS-action forwarding support
   Visual style unchanged; JS buttons in cloned action popups now trigger their original row handlers. */


/* v1.10.23 Income & Expenses edit-with-receipt modal */
.transaction-edit-card{
  width:min(1180px,100%);
}

.transaction-edit-body{
  display:block;
}

.transaction-edit-backdrop.has-transaction-preview .transaction-edit-body,
#transactionModal.has-transaction-preview .transaction-edit-body{
  display:grid;
  grid-template-columns:minmax(360px,1.05fr) minmax(420px,.95fr);
  gap:14px;
  align-items:start;
}

.transaction-receipt-preview{
  min-height:0;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(148,163,184,.08);
  padding:12px;
}

.transaction-receipt-preview iframe{
  width:100%;
  min-height:560px;
  border:0;
  border-radius:10px;
  background:#fff;
}

.transaction-edit-form{
  min-width:0;
}

body.light .transaction-receipt-preview,
body:not(.dark) .transaction-receipt-preview{
  background:#f8fafc;
  border-color:#cbd5e1;
}

@media(max-width:980px){
  .transaction-edit-backdrop.has-transaction-preview .transaction-edit-body,
  #transactionModal.has-transaction-preview .transaction-edit-body{
    grid-template-columns:1fr;
  }
  .transaction-receipt-preview iframe{
    min-height:420px;
  }
}


/* v1.10.24 Linked accounting entry popup */
.linked-entry-card{
  width:min(1120px,100%);
}

.linked-entry-body{
  display:grid;
  grid-template-columns:minmax(320px,.9fr) minmax(420px,1.1fr);
  gap:14px;
  align-items:start;
}

.linked-entry-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:14px;
}

.linked-entry-grid div{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:rgba(148,163,184,.08);
}

.linked-entry-grid span,
.linked-entry-grid strong{
  display:block;
}

.linked-entry-description{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  min-height:90px;
  white-space:pre-wrap;
  background:rgba(148,163,184,.08);
}

.linked-entry-preview{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:rgba(148,163,184,.08);
}

.linked-entry-preview iframe{
  width:100%;
  min-height:560px;
  border:0;
  border-radius:10px;
  background:#fff;
}

body.light .linked-entry-grid div,
body:not(.dark) .linked-entry-grid div,
body.light .linked-entry-description,
body:not(.dark) .linked-entry-description,
body.light .linked-entry-preview,
body:not(.dark) .linked-entry-preview{
  background:#f8fafc;
  border-color:#cbd5e1;
}

@media(max-width:980px){
  .linked-entry-body{
    grid-template-columns:1fr;
  }
  .linked-entry-preview iframe{
    min-height:420px;
  }
  .linked-entry-grid{
    grid-template-columns:1fr;
  }
}


/* v1.10.25 Customer invoices popup */
.customer-invoices-card{
  width:min(980px,100%);
}

.customer-invoice-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  margin-bottom:14px;
}

.customer-invoice-summary div{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:rgba(148,163,184,.08);
}

.customer-invoice-summary span,
.customer-invoice-summary strong{
  display:block;
}

body.light .customer-invoice-summary div,
body:not(.dark) .customer-invoice-summary div{
  background:#f8fafc;
  border-color:#cbd5e1;
}


/* v1.10.26 Customer invoice in-page preview popup */
.customer-invoice-preview-card{
  width:min(980px,100%);
}


/* v1.10.28 Invoice email validation hint */
.email-validity-hint{
  display:block;
  margin-top:5px;
}
.email-validity-hint.email-invalid{
  color:#ef4444 !important;
  font-weight:700;
}
body.light .email-validity-hint.email-invalid,
body:not(.dark) .email-validity-hint.email-invalid{
  color:#dc2626 !important;
}


/* v1.10.29 Invoice email bounce status */
.email-bounced-label{
  display:inline-block;
  margin-top:3px;
  padding:3px 8px;
  border-radius:999px;
  background:#7f1d1d;
  color:#fecaca;
  font-size:.82rem;
  font-weight:700;
}

body.light .email-bounced-label,
body:not(.dark) .email-bounced-label{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
}


/* v1.10.35 Accounting Health Check */
.alert.info{
  background:#0f766e;
  color:#ecfeff;
  border:1px solid #14b8a6;
  border-radius:14px;
  padding:12px 14px;
  margin:12px 0 16px;
}

body.light .alert.info,
body:not(.dark) .alert.info{
  background:#ccfbf1;
  color:#134e4a;
  border-color:#5eead4;
}

.health-check-list{
  display:grid;
  gap:10px;
}

.health-check-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:rgba(148,163,184,.08);
}

.health-check-value{
  font-weight:800;
  font-size:1.1rem;
  white-space:nowrap;
}

.health-ok{
  border-left:5px solid #22c55e;
}

.health-warn{
  border-left:5px solid #f59e0b;
}

.health-danger{
  border-left:5px solid #ef4444;
}

body.light .health-check-row,
body:not(.dark) .health-check-row{
  background:#f8fafc;
  border-color:#cbd5e1;
}


/* v1.10.36 Health Check issue detail improvements */
.health-check-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.section-head-inline{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:6px;
}

.issue-detail{
  scroll-margin-top:18px;
}

.issue-detail:target{
  outline:3px solid rgba(37,99,235,.45);
  box-shadow:0 0 0 6px rgba(37,99,235,.12);
}

@media(max-width:760px){
  .health-check-row{
    grid-template-columns:1fr;
  }
  .health-check-actions{
    justify-content:space-between;
  }
  .section-head-inline{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v1.10.37 Health Check local review flow */
.leave-health-link::after{
  content:" ↗";
  font-weight:700;
}

.health-check-row .health-check-actions a[href^="#"]::after{
  content:" ↓";
  font-weight:700;
}


/* v1.10.39 Updater invalid token recovery */
.update-recovery{
  margin:12px 0;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #f59e0b;
  background:rgba(245,158,11,.14);
  color:var(--text);
}
body.light .update-recovery,
body:not(.dark) .update-recovery{
  background:#fffbeb;
  border-color:#fbbf24;
  color:#78350f;
}


/* v1.10.40 Backup & Restore Center */
button.warn,
.btn.warn{
  background:#b45309;
  color:#fff;
  border-color:#b45309;
}

button.warn:hover,
.btn.warn:hover{
  background:#92400e;
}

button[disabled],
input[disabled]{
  opacity:.55;
  cursor:not-allowed;
}


/* v1.10.43 Updater diagnostics */
.debug-log{
  white-space:pre-wrap;
  max-height:360px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:rgba(2,6,23,.85);
  color:#e5e7eb;
}
body.light .debug-log,
body:not(.dark) .debug-log{
  background:#0f172a;
  color:#e5e7eb;
}


/* v1.10.44 Updater diagnostics status labels */
.diag-ok{
  color:#15803d;
  font-weight:800;
}
.diag-warn{
  color:#b45309;
  font-weight:800;
}
.diag-neutral{
  color:var(--muted);
  font-weight:700;
}
body.dark .diag-ok{ color:#86efac; }
body.dark .diag-warn{ color:#fbbf24; }


/* v1.10.45 Contact field validation polish */
input:invalid{
  border-color:#ef4444;
}


/* v1.10.46 Backup restore chooser */
.restore-chooser-card{
  max-width:980px;
  width:min(980px,96vw);
}

.restore-chooser-table td,
.restore-chooser-table th{
  vertical-align:top;
}

.restore-chooser-table form{
  margin:0;
}

@media(max-width:760px){
  .restore-chooser-card{
    width:96vw;
  }
}


/* v1.10.47 Restore result clarity */
.restore-result{
  font-size:1rem;
  line-height:1.45;
}


/* v1.10.48 Backup & Restore working overlay */
.working-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(4px);
}

.working-backdrop.show{
  display:flex;
}

.working-card{
  width:min(460px,92vw);
  border-radius:18px;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--text);
  box-shadow:0 24px 70px rgba(0,0,0,.35);
  padding:28px;
  text-align:center;
}

.working-card h2{
  margin:12px 0 8px;
}

.working-spinner{
  width:54px;
  height:54px;
  margin:0 auto;
  border-radius:999px;
  border:5px solid rgba(148,163,184,.35);
  border-top-color:#2563eb;
  animation:cc-spin .9s linear infinite;
}

body.dark .working-spinner{
  border-top-color:#22c55e;
}

@keyframes cc-spin{
  to{ transform:rotate(360deg); }
}


/* v1.10.49 Company / Workspace foundation */
.company-context{
  display:inline-block;
  margin-top:3px;
  font-size:.86rem;
  color:var(--muted);
}

body.light .company-context,
body:not(.dark) .company-context{
  color:#475569;
}


/* v1.10.50 User password confirmation polish */
.password-confirm-box{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.password-confirm-box input{
  min-width:160px;
}


/* v1.10.51 Password match indicators */
input.password-match{
  border-color:#16a34a !important;
  box-shadow:0 0 0 2px rgba(22,163,74,.14);
}

input.password-mismatch{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.12);
}

body.dark input.password-match{
  border-color:#22c55e !important;
  box-shadow:0 0 0 2px rgba(34,197,94,.18);
}


/* v1.10.52 Manage Users password reset spacing */
.users-table .reset-box.password-confirm-box{
  align-items:flex-start;
  margin-bottom:8px;
}

.users-table .reset-box.password-confirm-box + small.muted{
  display:block;
  clear:both;
  margin-top:10px;
  line-height:1.35;
  max-width:520px;
}

.users-table td{
  vertical-align:middle;
}

.users-table td .reset-box.password-confirm-box{
  padding-top:2px;
}


/* v1.10.54 My Password match indicator support */
.self-password-form input.password-match{
  border-color:#16a34a !important;
  box-shadow:0 0 0 2px rgba(22,163,74,.14);
}

.self-password-form input.password-mismatch{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.12);
}


/* v1.10.55 Admin Users password match indicators */
.users-table input.password-match,
.form-card input.password-match,
input.password-match{
  border-color:#16a34a !important;
  box-shadow:0 0 0 2px rgba(22,163,74,.14) !important;
}

.users-table input.password-mismatch,
.form-card input.password-mismatch,
input.password-mismatch{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.12) !important;
}

body.dark .users-table input.password-match,
body.dark .form-card input.password-match,
body.dark input.password-match{
  border-color:#22c55e !important;
  box-shadow:0 0 0 2px rgba(34,197,94,.18) !important;
}


/* v1.10.56 Strong password match focus indicators */
input.password-match,
input.password-match:focus,
.users-table input.password-match,
.users-table input.password-match:focus,
.form-card input.password-match,
.form-card input.password-match:focus{
  border-color:#16a34a !important;
  outline-color:#16a34a !important;
  box-shadow:0 0 0 2px rgba(22,163,74,.22) !important;
}

input.password-mismatch,
input.password-mismatch:focus,
.users-table input.password-mismatch,
.users-table input.password-mismatch:focus,
.form-card input.password-mismatch,
.form-card input.password-mismatch:focus{
  border-color:#ef4444 !important;
  outline-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.18) !important;
}


/* v1.10.57 Sidebar logout placement */
.sidebar-logout-link{
  margin-top:10px;
  color:#991b1b;
  font-weight:800;
}

.sidebar-logout-link:hover{
  color:#7f1d1d;
}

body.dark .sidebar-logout-link{
  color:#fecaca;
}


/* v1.10.58 Logout final sidebar item */
.side-nav > .sidebar-logout-link{
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:14px;
  color:#991b1b;
  font-weight:800;
}

.side-nav > .sidebar-logout-link:hover{
  color:#7f1d1d;
}

body.dark .side-nav > .sidebar-logout-link{
  color:#fecaca;
}


/* v1.10.59 Users compact layout and search */
.users-section-head{
  align-items:flex-start;
  gap:18px;
}

.user-search-wrap{
  min-width:260px;
}

.user-search-wrap label{
  display:block;
  font-weight:800;
  margin-bottom:6px;
}

.user-card-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.user-compact-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.48);
  padding:14px;
}

body.dark .user-compact-card{
  background:rgba(15,23,42,.32);
}

.compact-user-grid{
  display:grid;
  grid-template-columns: minmax(120px,1fr) minmax(150px,1.1fr) minmax(180px,1.35fr) 100px 90px 82px;
  gap:10px;
  align-items:end;
}

.compact-user-grid label,
.compact-password-row .password-row-title{
  display:block;
  font-size:.86rem;
  font-weight:800;
  margin-bottom:5px;
  color:var(--muted);
}

.user-active-cell .checkline{
  min-height:38px;
  display:flex;
  align-items:center;
}

.user-save-cell{
  display:flex;
  justify-content:flex-end;
}

.compact-password-row{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed var(--line);
  display:grid;
  grid-template-columns: 150px minmax(180px,1fr) minmax(180px,1fr) auto;
  gap:10px;
  align-items:start;
}

.compact-password-row .password-row-title{
  padding-top:10px;
  color:var(--text);
}

.compact-password-row .password-help{
  grid-column:2 / -1;
  margin-top:-2px;
  line-height:1.35;
}

@media(max-width:980px){
  .compact-user-grid{
    grid-template-columns:1fr 1fr;
  }
  .user-save-cell{
    justify-content:flex-start;
  }
  .compact-password-row{
    grid-template-columns:1fr;
  }
  .compact-password-row .password-help{
    grid-column:auto;
  }
  .user-search-wrap{
    min-width:0;
    width:100%;
  }
}


/* v1.10.60 Users compact spacing refinement */
.user-compact-card{
  padding:12px 14px;
}

.compact-user-grid{
  grid-template-columns: minmax(120px,1fr) minmax(150px,1.05fr) minmax(190px,1.35fr) 100px 92px 76px;
  gap:8px 10px;
}

.compact-user-grid label,
.compact-password-row .password-row-title{
  margin-bottom:4px;
}

.compact-user-grid input,
.compact-user-grid select{
  min-height:36px;
}

.user-active-cell .checkline{
  min-height:36px;
}

.compact-password-row{
  margin-top:8px;
  padding-top:8px;
  grid-template-columns: 150px 220px 240px auto;
  gap:8px 10px;
  align-items:start;
}

.compact-password-row input{
  min-height:36px;
  max-width:260px;
}

.compact-password-row button{
  min-height:36px;
  white-space:nowrap;
}

.compact-password-row .password-row-title{
  padding-top:9px;
}

.compact-password-row .password-help{
  grid-column:2 / 4;
  margin-top:-4px;
  font-size:.86rem;
  line-height:1.25;
}

.user-card-list{
  gap:10px;
}

.users-section-head{
  margin-bottom:10px;
}

@media(max-width:1100px){
  .compact-password-row{
    grid-template-columns:130px minmax(180px,1fr) minmax(180px,1fr) auto;
  }
  .compact-password-row input{
    max-width:none;
  }
}

@media(max-width:760px){
  .compact-user-grid{
    grid-template-columns:1fr;
  }
  .compact-password-row{
    grid-template-columns:1fr;
  }
  .compact-password-row .password-row-title{
    padding-top:0;
  }
  .compact-password-row .password-help{
    grid-column:auto;
    margin-top:0;
  }
}


/* v1.10.61 Users password row button width fix */
.compact-password-row{
  grid-template-columns: 150px 220px 240px max-content !important;
  justify-content:start;
}

.compact-password-row button{
  width:auto !important;
  min-width:150px;
  max-width:190px;
  padding-left:16px;
  padding-right:16px;
}

.compact-password-row .password-help{
  grid-column:2 / 5;
  max-width:560px;
}

@media(max-width:760px){
  .compact-password-row{
    grid-template-columns:1fr !important;
  }
  .compact-password-row button{
    max-width:none;
    width:max-content !important;
  }
  .compact-password-row .password-help{
    grid-column:auto;
    max-width:none;
  }
}


/* v1.10.62 Users true compact height pass */
.user-compact-card{
  padding:10px 12px !important;
  border-radius:14px;
}

.compact-user-grid{
  grid-template-columns: 240px 250px minmax(260px,1fr) 100px 95px 70px !important;
  gap:6px 10px !important;
  align-items:end !important;
}

.compact-user-grid label,
.compact-password-row .password-row-title{
  margin-bottom:3px !important;
  font-size:.82rem !important;
}

.compact-user-grid input,
.compact-user-grid select{
  min-height:34px !important;
  height:34px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
}

.user-active-cell .checkline{
  min-height:34px !important;
}

.compact-password-row{
  margin-top:6px !important;
  padding-top:6px !important;
  grid-template-columns: 150px 220px 240px 150px minmax(260px,1fr) !important;
  gap:6px 10px !important;
  align-items:center !important;
}

.compact-password-row .password-row-title{
  padding-top:0 !important;
  margin-bottom:0 !important;
  color:var(--text);
}

.compact-password-row input{
  min-height:34px !important;
  height:34px !important;
  max-width:240px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
}

.compact-password-row button{
  min-height:34px !important;
  height:34px !important;
  min-width:140px !important;
  max-width:160px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
  white-space:nowrap;
}

.compact-password-row .password-help{
  grid-column:auto !important;
  margin:0 !important;
  max-width:360px !important;
  font-size:.8rem !important;
  line-height:1.18 !important;
}

.user-card-list{
  gap:8px !important;
}

.users-section-head{
  margin-bottom:8px !important;
}

@media(max-width:1180px){
  .compact-user-grid{
    grid-template-columns: minmax(150px,1fr) minmax(160px,1fr) minmax(220px,1.4fr) 100px 95px 70px !important;
  }

  .compact-password-row{
    grid-template-columns: 140px 200px 220px 145px !important;
  }

  .compact-password-row .password-help{
    grid-column:2 / -1 !important;
    margin-top:-2px !important;
    max-width:620px !important;
  }
}

@media(max-width:900px){
  .compact-user-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .compact-password-row{
    grid-template-columns:1fr 1fr !important;
    align-items:start !important;
  }

  .compact-password-row .password-row-title,
  .compact-password-row button,
  .compact-password-row .password-help{
    grid-column:auto !important;
  }

  .compact-password-row input{
    max-width:none !important;
  }
}


/* v1.10.63 Users row alignment refinement */
.compact-user-grid{
  align-items:end !important;
}

.user-save-cell{
  align-self:end !important;
  display:flex !important;
  align-items:flex-end !important;
  justify-content:flex-end !important;
  padding-bottom:0 !important;
}

.user-save-cell button{
  height:34px !important;
  min-height:34px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
}

.compact-password-row{
  margin-top:4px !important;
  padding-top:5px !important;
  align-items:center !important;
}

.compact-password-row .password-row-title{
  align-self:center !important;
}

.compact-password-row input{
  align-self:center !important;
}

.compact-password-row button{
  align-self:center !important;
  height:34px !important;
  min-height:34px !important;
  line-height:1.1 !important;
}

.compact-password-row .password-help{
  align-self:center !important;
}

.user-compact-card{
  padding-top:9px !important;
  padding-bottom:9px !important;
}

.user-card-list{
  gap:7px !important;
}

@media(max-width:900px){
  .user-save-cell{
    justify-content:flex-start !important;
  }
}


/* v1.10.64 Users ultra compact password row */
.user-compact-card{
  padding:8px 12px !important;
}

.compact-user-grid{
  grid-template-columns: 240px 250px minmax(260px,1fr) 100px 86px 70px !important;
  gap:5px 10px !important;
}

.compact-user-grid label{
  margin-bottom:2px !important;
  font-size:.8rem !important;
}

.compact-user-grid input,
.compact-user-grid select,
.user-save-cell button{
  height:32px !important;
  min-height:32px !important;
  padding-top:5px !important;
  padding-bottom:5px !important;
}

.user-active-cell .checkline{
  min-height:32px !important;
}

.ultra-compact-password-row{
  margin-top:4px !important;
  padding-top:4px !important;
  border-top:1px dotted var(--line) !important;
  display:grid !important;
  grid-template-columns: 150px 190px 210px 145px auto !important;
  gap:6px 10px !important;
  align-items:center !important;
}

.ultra-compact-password-row .password-row-title{
  margin:0 !important;
  padding:0 !important;
  font-size:.86rem !important;
  line-height:32px !important;
  color:var(--text) !important;
}

.ultra-compact-password-row input{
  width:100% !important;
  max-width:none !important;
  height:32px !important;
  min-height:32px !important;
  padding-top:5px !important;
  padding-bottom:5px !important;
}

.ultra-compact-password-row button{
  width:auto !important;
  min-width:138px !important;
  max-width:150px !important;
  height:32px !important;
  min-height:32px !important;
  padding:5px 12px !important;
  line-height:1 !important;
}

.ultra-compact-password-row .password-help{
  grid-column:auto !important;
  margin:0 !important;
  max-width:none !important;
  font-size:.78rem !important;
  line-height:1.15 !important;
}

.user-card-list{
  gap:6px !important;
}

@media(max-width:1180px){
  .compact-user-grid{
    grid-template-columns: minmax(150px,1fr) minmax(160px,1fr) minmax(220px,1.4fr) 100px 86px 70px !important;
  }

  .ultra-compact-password-row{
    grid-template-columns: 120px minmax(170px,1fr) minmax(180px,1fr) 145px !important;
  }

  .ultra-compact-password-row .password-help{
    grid-column:2 / -1 !important;
  }
}

@media(max-width:900px){
  .compact-user-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .ultra-compact-password-row{
    grid-template-columns:1fr 1fr !important;
  }

  .ultra-compact-password-row .password-row-title,
  .ultra-compact-password-row button,
  .ultra-compact-password-row .password-help{
    grid-column:auto !important;
  }
}


/* v1.10.65 Users final row alignment polish */
.user-save-cell{
  align-self:center !important;
  justify-content:center !important;
  padding-top:15px !important;
}

.user-save-cell button{
  height:34px !important;
  min-height:34px !important;
}

.ultra-compact-password-row{
  margin-top:1px !important;
  padding-top:3px !important;
  align-items:center !important;
}

.ultra-compact-password-row .password-row-title{
  line-height:30px !important;
}

.ultra-compact-password-row input,
.ultra-compact-password-row button{
  height:30px !important;
  min-height:30px !important;
  padding-top:4px !important;
  padding-bottom:4px !important;
}

.ultra-compact-password-row .password-help{
  transform:translateY(-1px);
}

.user-compact-card{
  padding-top:7px !important;
  padding-bottom:7px !important;
}


/* v1.10.66 Dark mode Users helper text readability */
body.dark .user-compact-card .muted,
body.dark .user-compact-card .password-help,
body.dark .users-section-head .muted,
body.dark .user-search-wrap label,
html[data-theme="dark"] .user-compact-card .muted,
html[data-theme="dark"] .user-compact-card .password-help,
html[data-theme="dark"] .users-section-head .muted,
html[data-theme="dark"] .user-search-wrap label{
  color:#e5e7eb !important;
  opacity:1 !important;
}

body.dark .user-compact-card label,
html[data-theme="dark"] .user-compact-card label{
  color:#f1f5f9 !important;
  opacity:1 !important;
}

body.dark .user-compact-card .password-help,
html[data-theme="dark"] .user-compact-card .password-help{
  color:#dbeafe !important;
}

body.dark .user-compact-card{
  background:rgba(30,41,59,.72) !important;
}


/* v1.10.67 Users light/dark readability balance */
html[data-theme="light"] .user-compact-card label,
body.theme-light .user-compact-card label,
body:not(.dark) .user-compact-card label{
  color:#334155 !important;
  opacity:1 !important;
}

html[data-theme="light"] .users-section-head .muted,
html[data-theme="light"] .user-compact-card .muted,
html[data-theme="light"] .user-compact-card .password-help,
body.theme-light .users-section-head .muted,
body.theme-light .user-compact-card .muted,
body.theme-light .user-compact-card .password-help,
body:not(.dark) .users-section-head .muted,
body:not(.dark) .user-compact-card .muted,
body:not(.dark) .user-compact-card .password-help{
  color:#475569 !important;
  opacity:1 !important;
}

html[data-theme="light"] .user-search-wrap label,
body.theme-light .user-search-wrap label,
body:not(.dark) .user-search-wrap label{
  color:#0f172a !important;
  opacity:1 !important;
}

html[data-theme="light"] .user-compact-card,
body.theme-light .user-compact-card,
body:not(.dark) .user-compact-card{
  background:#ffffff !important;
}

html[data-theme="light"] .user-compact-card .password-row-title,
body.theme-light .user-compact-card .password-row-title,
body:not(.dark) .user-compact-card .password-row-title{
  color:#0f172a !important;
}

/* Keep dark mode readable without affecting light mode. */
html[data-theme="dark"] .user-compact-card .muted,
html[data-theme="dark"] .user-compact-card .password-help,
html[data-theme="dark"] .users-section-head .muted,
html[data-theme="dark"] .user-search-wrap label{
  color:#e5e7eb !important;
  opacity:1 !important;
}

html[data-theme="dark"] .user-compact-card label,
html[data-theme="dark"] .user-compact-card .password-row-title{
  color:#f8fafc !important;
  opacity:1 !important;
}


/* v1.10.68 Central Theme Cleanup Pass
   Keep common page colors controlled here instead of patching each page.
   Future pages should use these variables/classes rather than hard-coded colors. */

:root,
html[data-theme="light"],
body.theme-light,
body.light{
  --bg: #eef4f8;
  --panel: #ffffff;
  --card: #ffffff;
  --card-soft: #f8fbfd;
  --text: #0f172a;
  --muted: #475569;
  --muted-strong: #334155;
  --heading: #0f172a;
  --line: #d7e2ea;
  --border: #d7e2ea;
  --input-bg: #ffffff;
  --input-text: #0f172a;
  --input-border: #cbd5e1;
  --input-placeholder: #64748b;
  --table-head: #eef6fb;
  --table-row: #ffffff;
  --button-secondary-bg: #e2e8f0;
  --button-secondary-text: #0f172a;
}

html[data-theme="dark"],
body.theme-dark,
body.dark{
  --bg: #0f172a;
  --panel: #111827;
  --card: #1f2937;
  --card-soft: #172033;
  --text: #f8fafc;
  --muted: #d1d5db;
  --muted-strong: #e5e7eb;
  --heading: #ffffff;
  --line: #374151;
  --border: #374151;
  --input-bg: #020617;
  --input-text: #ffffff;
  --input-border: #475569;
  --input-placeholder: #cbd5e1;
  --table-head: #0b1220;
  --table-row: #111827;
  --button-secondary-bg: #334155;
  --button-secondary-text: #ffffff;
}

/* Shared surfaces */
body{
  background:var(--bg) !important;
  color:var(--text) !important;
}

h1,h2,h3,h4,h5,h6,
label,
strong{
  color:var(--heading);
}

.card,
.modal-card,
.login,
.form-card{
  background:var(--panel) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}

.muted,
small,
.help-text,
.card p,
.form-card p{
  color:var(--muted) !important;
  opacity:1 !important;
}

input,
select,
textarea{
  background:var(--input-bg) !important;
  color:var(--input-text) !important;
  border-color:var(--input-border) !important;
}

input::placeholder,
textarea::placeholder{
  color:var(--input-placeholder) !important;
  opacity:1 !important;
}

table{
  background:var(--panel) !important;
  color:var(--text) !important;
}

th{
  background:var(--table-head) !important;
  color:var(--heading) !important;
}

td{
  color:var(--text);
  border-bottom-color:var(--line) !important;
}

.secondary,
button.secondary,
.btn.secondary{
  background:var(--button-secondary-bg) !important;
  color:var(--button-secondary-text) !important;
}

/* Users page now follows the central theme instead of one-off light/dark fixes. */
.user-compact-card{
  background:var(--panel) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}

.user-compact-card label,
.user-compact-card .password-row-title,
.user-search-wrap label{
  color:var(--heading) !important;
  opacity:1 !important;
}

.user-compact-card .muted,
.user-compact-card .password-help,
.users-section-head .muted{
  color:var(--muted) !important;
  opacity:1 !important;
}

html[data-theme="dark"] .user-compact-card,
html[data-theme="dark"] .user-compact-card,
body.dark .user-compact-card{
  background:#1f2937 !important;
}

/* Common settings pages also inherit the same input/card readability. */
.settings-card,
.email-settings-card,
.invoice-settings-card{
  background:var(--panel) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}


/* v1.10.69 Users card theme enforcement
   Fixes older Users-page compact-card rules overriding the central theme. */

/* LIGHT THEME */
body.theme-light .user-compact-card,
body.light .user-compact-card,
html[data-theme="light"] .user-compact-card,
body:not(.theme-dark):not(.dark) .user-compact-card{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#d7e2ea !important;
}

body.theme-light .user-compact-card input,
body.theme-light .user-compact-card select,
body.light .user-compact-card input,
body.light .user-compact-card select,
html[data-theme="light"] .user-compact-card input,
html[data-theme="light"] .user-compact-card select,
body:not(.theme-dark):not(.dark) .user-compact-card input,
body:not(.theme-dark):not(.dark) .user-compact-card select{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}

body.theme-light .user-compact-card label,
body.theme-light .user-compact-card .password-row-title,
body.theme-light .user-search-wrap label,
body.light .user-compact-card label,
body.light .user-compact-card .password-row-title,
body.light .user-search-wrap label,
html[data-theme="light"] .user-compact-card label,
html[data-theme="light"] .user-compact-card .password-row-title,
html[data-theme="light"] .user-search-wrap label,
body:not(.theme-dark):not(.dark) .user-compact-card label,
body:not(.theme-dark):not(.dark) .user-compact-card .password-row-title,
body:not(.theme-dark):not(.dark) .user-search-wrap label{
  color:#0f172a !important;
  opacity:1 !important;
}

body.theme-light .user-compact-card .muted,
body.theme-light .user-compact-card .password-help,
body.theme-light .users-section-head .muted,
body.light .user-compact-card .muted,
body.light .user-compact-card .password-help,
body.light .users-section-head .muted,
html[data-theme="light"] .user-compact-card .muted,
html[data-theme="light"] .user-compact-card .password-help,
html[data-theme="light"] .users-section-head .muted,
body:not(.theme-dark):not(.dark) .user-compact-card .muted,
body:not(.theme-dark):not(.dark) .user-compact-card .password-help,
body:not(.theme-dark):not(.dark) .users-section-head .muted{
  color:#475569 !important;
  opacity:1 !important;
}

/* DARK THEME */
html[data-theme="dark"] .user-compact-card,
body.dark .user-compact-card,
html[data-theme="dark"] .user-compact-card{
  background:#1f2937 !important;
  color:#f8fafc !important;
  border-color:#475569 !important;
}

html[data-theme="dark"] .user-compact-card input,
html[data-theme="dark"] .user-compact-card select,
body.dark .user-compact-card input,
body.dark .user-compact-card select,
html[data-theme="dark"] .user-compact-card input,
html[data-theme="dark"] .user-compact-card select{
  background:#020617 !important;
  color:#ffffff !important;
  border-color:#475569 !important;
}

html[data-theme="dark"] .user-compact-card label,
html[data-theme="dark"] .user-compact-card .password-row-title,
html[data-theme="dark"] .user-search-wrap label,
body.dark .user-compact-card label,
body.dark .user-compact-card .password-row-title,
body.dark .user-search-wrap label,
html[data-theme="dark"] .user-compact-card label,
html[data-theme="dark"] .user-compact-card .password-row-title,
html[data-theme="dark"] .user-search-wrap label{
  color:#f8fafc !important;
  opacity:1 !important;
}

html[data-theme="dark"] .user-compact-card .muted,
html[data-theme="dark"] .user-compact-card .password-help,
html[data-theme="dark"] .users-section-head .muted,
body.dark .user-compact-card .muted,
body.dark .user-compact-card .password-help,
body.dark .users-section-head .muted,
html[data-theme="dark"] .user-compact-card .muted,
html[data-theme="dark"] .user-compact-card .password-help,
html[data-theme="dark"] .users-section-head .muted{
  color:#e5e7eb !important;
  opacity:1 !important;
}

/* v1.10.78 workspace/license cleanup */
.sidebar-workspace-context{
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card-soft);
  color:var(--text);
}
.sidebar-workspace-context span{
  display:block;
  font-size:.78rem;
  color:var(--muted);
  margin-bottom:3px;
}
.sidebar-workspace-context strong{
  display:block;
  color:var(--heading);
  line-height:1.2;
}
.license-edition-display{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--card-soft);
  font-weight:700;
}
.workspace-test-note{
  margin-top:12px;
  color:var(--text);
}

/* v1.10.84 OCR debug panel */
.ocr-debug-panel{
  margin:12px 0;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card-soft);
}
.ocr-debug-panel summary{
  cursor:pointer;
  font-weight:800;
  color:var(--heading);
}
.ocr-debug-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}
.ocr-debug-grid div{
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 10px;
  background:var(--card);
}
.ocr-debug-grid span{
  display:block;
  font-size:.78rem;
  margin-bottom:4px;
}
.ocr-debug-grid strong{
  display:block;
  color:var(--heading);
  word-break:break-word;
}
.ocr-debug-text{
  max-height:210px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--input-bg);
  color:var(--text);
  font-size:.86rem;
  line-height:1.35;
}
@media(max-width:900px){
  .ocr-debug-grid{grid-template-columns:1fr 1fr;}
}


/* v1.10.88 Health Check theme polish */
.health-check-list{
  display:grid;
  gap:10px;
}
.health-check-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  color:var(--text);
}
.health-check-row strong{
  color:var(--text);
}
.health-check-row .muted{
  color:var(--muted);
}
.health-check-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.health-check-value{
  min-width:44px;
  text-align:right;
  font-weight:800;
  color:var(--text);
}
.health-ok{
  border-left:4px solid var(--accent);
}
.health-warn{
  border-left:4px solid #f59e0b;
}
.health-danger{
  border-left:4px solid var(--danger);
}
html[data-theme="dark"] .health-check-row,
body.theme-dark .health-check-row{
  background:var(--card);
  color:var(--text);
  border-color:var(--line);
}
html[data-theme="dark"] .health-check-row .muted,
body.theme-dark .health-check-row .muted{
  color:var(--muted);
}
html[data-theme="dark"] .health-check-row .btn.secondary,
body.theme-dark .health-check-row .btn.secondary{
  background:#334155;
  color:#ffffff;
}
html[data-theme="light"] .health-check-row,
body.theme-light .health-check-row{
  background:#ffffff;
  color:#172033;
  border-color:#d7e2ea;
}
html[data-theme="light"] .health-check-row .muted,
body.theme-light .health-check-row .muted{
  color:#475569;
}
@media(max-width:760px){
  .health-check-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .health-check-actions{
    width:100%;
    justify-content:space-between;
  }
}


/* v1.10.90 Header/Dashboard workspace cleanup */
.compact-topbar{
  margin-bottom:14px;
  min-height:auto;
  padding-top:10px;
  padding-bottom:10px;
}
.main > h1:first-child{
  margin-top:2px;
}

/* v1.10.96 Field Invoice mobile workflow */
.field-invoice-head .page-actions{display:flex;gap:10px;flex-wrap:wrap;}
.field-invoice-form{max-width:820px;margin:0 auto 40px;}
.field-card{margin-top:16px;}
.field-card h2{margin:0 0 14px;font-size:1.22rem;}
.field-sticky-summary{position:sticky;top:8px;z-index:20;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 16px;margin:10px 0;border:1px solid var(--border);border-radius:16px;background:var(--card);box-shadow:0 12px 24px rgba(15,23,42,.12);}
.field-sticky-summary div{display:flex;flex-direction:column;gap:2px;}
.field-sticky-summary strong{font-size:1.25rem;}
.field-choice-row{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.field-two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.field-quick-customer label,.field-existing-customer label,.field-card label{font-weight:700;margin-top:10px;}
.field-line{border:1px solid var(--border);border-radius:14px;padding:12px;margin:12px 0;background:rgba(148,163,184,.08);}
.field-line-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;}
.field-taxable{margin-bottom:9px;white-space:nowrap;}
.field-line-total{text-align:right;margin-top:8px;}
.field-wide-btn,.field-save-btn{width:100%;justify-content:center;min-height:46px;margin-top:12px;}
.field-save-btn{font-size:1.05rem;font-weight:900;}
.field-paid-now{padding:12px;border:1px solid var(--border);border-radius:12px;background:rgba(34,197,94,.08);}
.field-total-box{margin:16px 0;}
.field-created-card{max-width:820px;margin:14px auto;}
.field-action-stack{display:flex;gap:10px;flex-wrap:wrap;}
.field-money-input{display:flex;align-items:center;min-height:44px;border:1px solid var(--border);border-radius:12px;background:#fff;overflow:hidden;}
.field-money-input span{display:flex;align-items:center;justify-content:center;min-width:40px;padding:0 10px;font-weight:800;color:#475569;background:rgba(148,163,184,.10);border-right:1px solid var(--border);}
.field-money-input input{border:0 !important;box-shadow:none !important;background:transparent !important;margin:0 !important;border-radius:0 !important;padding-left:12px;padding-right:12px;width:100%;min-height:42px;}
.field-created-card p{font-size:1.05rem;line-height:1.45;}
.field-created-card .btn{min-height:48px;}
.field-email-panel>summary{min-height:48px;display:flex;align-items:center;justify-content:center;font-weight:800;}
.field-email-panel[open]>summary{margin-bottom:2px;}
.field-portal-body .field-action-stack .secondary{background:#eef2ff !important;border-color:#c7d2fe !important;color:#1e293b !important;}
.field-portal-body .field-action-stack .secondary:hover{background:#e0e7ff !important;}
@media (max-width: 720px){
  .field-invoice-head{align-items:stretch;}
  .field-invoice-head .page-actions{width:100%;}
  .field-invoice-head .page-actions .btn,.field-invoice-head .page-actions button{flex:1;justify-content:center;}
  .field-invoice-form{max-width:none;margin-bottom:80px;}
  .field-sticky-summary{top:4px;margin:8px 0;padding:10px 12px;border-radius:14px;}
  .field-sticky-summary strong{font-size:1.15rem;}
  .field-card{padding:16px;margin-left:-2px;margin-right:-2px;border-radius:16px;}
  .field-two-col,.field-line-grid{grid-template-columns:1fr;gap:6px;}
  .field-taxable{margin-top:6px;margin-bottom:2px;}
  .field-line input,.field-card input,.field-card select,.field-card textarea{font-size:16px;min-height:44px;}
  .field-choice-row .checkline{flex:1;padding:12px;border:1px solid var(--border);border-radius:12px;justify-content:center;}
  .field-action-stack{flex-direction:column;}
  .field-action-stack .btn{width:100%;justify-content:center;}
}

/* v1.10.97 Field Invoice Portal + responsive login cleanup */
.responsive-login-body,
.field-login-body{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:linear-gradient(180deg,#eef6fb 0%,#f8fbff 100%) !important;
  color:#0f172a !important;
}
.responsive-login-card,
.field-login-card{
  width:min(420px,100%);
  max-width:420px;
  margin:0 auto !important;
  border-radius:20px !important;
  padding:24px !important;
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #d6e2ee !important;
  box-shadow:0 16px 40px rgba(15,23,42,.12) !important;
}
.responsive-login-card h1,
.responsive-login-card h2,
.field-login-card h1,
.field-login-card h2{
  color:#0f172a !important;
  text-align:center;
  margin-top:0;
}
.responsive-login-card input,
.field-login-card input{
  min-height:48px;
  font-size:16px;
  background:#fff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}
.responsive-login-card button,
.field-login-card button,
.field-login-btn{
  width:100%;
  min-height:50px;
  font-size:16px;
  margin-top:4px;
}
.field-login-wrap{width:100%;}
.small-note{font-size:13px;text-align:center;}
.field-portal-body{
  background:linear-gradient(180deg,#eef6fb 0%,#f8fbff 100%) !important;
  color:#0f172a !important;
}
.field-portal-shell{
  width:min(880px,100%);
  margin:0 auto;
  padding:16px;
}
.field-portal-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
  padding:12px 14px;
  background:#ffffff;
  border:1px solid #d6e2ee;
  border-radius:16px;
  color:#0f172a;
}
.field-portal-body .card,
.field-portal-body .field-sticky-summary{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#d6e2ee !important;
}
.field-portal-body input,
.field-portal-body select,
.field-portal-body textarea{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
  font-size:16px;
}
.field-portal-body h1,
.field-portal-body h2,
.field-portal-body h3,
.field-portal-body label,
.field-portal-body strong{color:#0f172a !important;}
.field-portal-body .muted{color:#475569 !important;}
.field-portal-body .field-choice-row .checkline,
.field-portal-body .field-paid-now{
  background:#f8fafc !important;
  border-color:#d6e2ee !important;
  color:#0f172a !important;
}
.field-portal-settings-card input[readonly]{cursor:pointer;}
@media(max-width:560px){
  .responsive-login-body,.field-login-body{align-items:flex-start;padding:12px;padding-top:28px;}
  .responsive-login-card,.field-login-card{padding:20px !important;border-radius:18px !important;}
  .responsive-login-card .login-logo,.field-login-card .login-logo{width:64px;height:64px;}
  .responsive-login-card h1,.field-login-card h1{font-size:24px;line-height:1.15;}
  .field-portal-shell{padding:10px;}
  .field-portal-top{position:sticky;top:0;z-index:6;}
}

/* v1.10.98 field portal email/mobile polish */
.field-email-panel{display:block;width:100%;}
.field-email-panel>summary{list-style:none;cursor:pointer;text-align:center;}
.field-email-panel>summary::-webkit-details-marker{display:none;}
.field-email-form{margin-top:12px;padding:14px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.55);display:grid;gap:10px;}
.field-email-form input,.field-email-form textarea{width:100%;font-size:16px;}
.field-portal-body .field-email-form{background:#fff;}


/* v1.10.100 field portal button polish */
.field-created-card .field-action-stack{display:grid;grid-template-columns:1fr;gap:14px;margin-top:14px;}
.field-created-card .field-action-stack > .btn,
.field-created-card .field-action-stack > .field-email-panel > summary{width:100%;min-height:56px;border-radius:16px;font-size:1.04rem;font-weight:900;letter-spacing:.01em;box-shadow:0 10px 24px rgba(15,23,42,.08);transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;}
.field-created-card .field-action-stack > .btn:hover,
.field-created-card .field-action-stack > .field-email-panel > summary:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(15,23,42,.12);}
.field-created-card .field-action-stack > .btn:active,
.field-created-card .field-action-stack > .field-email-panel > summary:active{transform:translateY(0);}
.field-portal-body .field-created-card .field-action-stack .btn:not(.secondary){background:linear-gradient(180deg,#4169e1 0%,#335dde 100%) !important;border-color:#335dde !important;color:#fff !important;}
.field-portal-body .field-created-card .field-action-stack .secondary,
.field-portal-body .field-created-card .field-action-stack .field-email-panel > summary{background:#ffffff !important;border:2px solid #cbd5e1 !important;color:#0f172a !important;}
.field-portal-body .field-created-card .field-action-stack .secondary:hover,
.field-portal-body .field-created-card .field-action-stack .field-email-panel > summary:hover{background:#f8fbff !important;border-color:#b6c6ea !important;color:#0f172a !important;}
.field-portal-body .field-created-card .field-email-form{margin-top:0;border-top-left-radius:0;border-top-right-radius:0;border-top:0;box-shadow:0 12px 24px rgba(15,23,42,.08);}
.field-created-card .field-email-panel[open] > summary{border-bottom-left-radius:0;border-bottom-right-radius:0;}


/* v1.10.101 field portal button text alignment */
.field-created-card .field-action-stack > .btn,
.field-created-card .field-action-stack > .field-email-panel > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.2 !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.field-created-card .field-action-stack > .field-email-panel > summary {
  box-sizing: border-box;
}


/* v1.10.103 demo account foundation */
.demo-login-panel{
  margin-top:16px;
  padding:14px;
  border:1px solid #cbd5e1;
  border-radius:16px;
  background:#f8fafc;
  text-align:center;
}
.demo-login-panel p{margin:8px 0 12px;}
.demo-signup-card .alert.warning{
  text-align:left;
}
.demo-account-banner{
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #facc15;
  border-radius:14px;
  background:#fef9c3;
  color:#713f12;
  font-weight:700;
}
body.theme-dark .demo-account-banner{
  background:#422006;
  border-color:#854d0e;
  color:#fef3c7;
}
.status-pill{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  background:#e2e8f0;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}
body.theme-dark .status-pill{background:#334155;color:#f8fafc;}


/* v1.10.104 demo safety and branding polish */
.side-nav .nav-disabled{
  display:block;
  padding:9px 12px;
  margin:2px 0;
  border-radius:10px;
  color:var(--muted);
  opacity:.55;
  cursor:not-allowed;
  background:rgba(148,163,184,.08);
}
.side-nav .nav-disabled::after{
  content:"  🔒";
  font-size:.85em;
}
.demo-inline-note{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
  color:#1e3a8a;
}
body.theme-dark .demo-inline-note{
  background:#172554;
  color:#dbeafe;
  border-color:#1d4ed8;
}


/* v1.10.105 demo logo defaults */
.sidebar-company-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.sidebar-brand-logo{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:12px;
  box-shadow:0 8px 18px rgba(15,23,42,.16);
}
.sidebar-brand-text{
  min-width:0;
}
.responsive-login-card .login-logo,
.field-login-card .login-logo,
.demo-signup-card .login-logo{
  display:block;
  width:74px;
  height:74px;
  margin:0 auto 12px;
  border-radius:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.14);
}
.logo-preview img{
  max-width:96px;
  max-height:96px;
  border-radius:16px;
}
@media(max-width:720px){
  .sidebar-brand-logo{width:34px;height:34px;flex-basis:34px;border-radius:10px;}
}


/* v1.10.106 demo access guard */
.inline-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.responsive-login-card .btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  text-decoration:none;
}


/* v1.10.107 demo welcome and guided start */
.demo-welcome-card{
  margin-bottom:18px;
  border:1px solid #bfdbfe;
  background:linear-gradient(135deg, rgba(239,246,255,.98), rgba(240,253,244,.96));
  overflow:hidden;
}
.demo-welcome-main{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}
.demo-kicker{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:900;
  font-size:.82rem;
  letter-spacing:.03em;
  text-transform:uppercase;
  margin-bottom:8px;
}
.demo-welcome-card h2{
  margin:0 0 8px;
}
.demo-welcome-card p{
  max-width:920px;
}
.demo-days-badge{
  min-width:92px;
  text-align:center;
  border:1px solid #bbf7d0;
  background:#ecfdf5;
  color:#14532d;
  border-radius:18px;
  padding:12px;
}
.demo-days-badge strong{
  display:block;
  font-size:2rem;
  line-height:1;
}
.demo-days-badge span{
  display:block;
  margin-top:4px;
  font-weight:800;
  font-size:.82rem;
  text-transform:uppercase;
}
.demo-start-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.demo-start-tile{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:#ffffff;
  color:#0f172a;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.demo-start-tile:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}
.demo-start-tile strong{
  color:#0f172a;
}
.demo-start-tile span{
  color:#475569;
  font-size:.92rem;
}
.demo-checklist{
  margin-top:14px;
  border:1px dashed #93c5fd;
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.55);
}
.demo-checklist summary{
  cursor:pointer;
  font-weight:900;
}
.demo-checklist-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px 14px;
  margin:12px 0 8px;
}
.demo-checklist-grid label{
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:700;
}
.demo-checklist-grid input{
  width:18px;
  height:18px;
}
body.theme-dark .demo-welcome-card{
  border-color:#1d4ed8;
  background:linear-gradient(135deg, rgba(30,41,59,.98), rgba(20,83,45,.45));
}
body.theme-dark .demo-kicker{
  background:#1e3a8a;
  color:#dbeafe;
}
body.theme-dark .demo-start-tile{
  background:#0f172a;
  border-color:#334155;
  color:#f8fafc;
}
body.theme-dark .demo-start-tile strong{
  color:#f8fafc;
}
body.theme-dark .demo-start-tile span{
  color:#cbd5e1;
}
body.theme-dark .demo-checklist{
  background:rgba(15,23,42,.72);
  border-color:#475569;
}
body.theme-dark .demo-days-badge{
  background:#052e16;
  color:#dcfce7;
  border-color:#166534;
}
@media(max-width:900px){
  .demo-start-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .demo-checklist-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:620px){
  .demo-welcome-main{flex-direction:column;}
  .demo-days-badge{width:100%;}
  .demo-start-grid{grid-template-columns:1fr;}
  .demo-checklist-grid{grid-template-columns:1fr;}
}


/* v1.10.108 compact demo welcome */
.demo-welcome-card.demo-welcome-compact{
  padding:14px 16px;
  margin-bottom:14px;
}
.demo-welcome-compact .demo-welcome-main{
  align-items:center;
}
.demo-welcome-compact .demo-kicker{
  margin-bottom:4px;
  padding:3px 9px;
  font-size:.76rem;
}
.demo-welcome-compact h2{
  font-size:1.2rem;
  margin:0 0 4px;
}
.demo-welcome-compact p{
  margin:0;
  font-size:.94rem;
}
.demo-days-badge.compact{
  min-width:72px;
  border-radius:14px;
  padding:8px 10px;
}
.demo-days-badge.compact strong{
  font-size:1.55rem;
}
.demo-days-badge.compact span{
  font-size:.74rem;
}
.demo-start-grid.compact{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.demo-start-grid.compact .demo-start-tile{
  min-height:42px;
  padding:10px 12px;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.demo-start-grid.compact .demo-start-tile strong{
  font-size:.95rem;
}
.demo-checklist.compact{
  margin-top:10px;
  padding:8px 12px;
}
.demo-checklist.compact summary{
  font-size:.95rem;
}
@media(max-width:900px){
  .demo-start-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:620px){
  .demo-start-grid.compact{grid-template-columns:1fr;}
}


/* v1.10.110 demo quick start guide */
.demo-guide-head{
  align-items:flex-start;
}
.demo-guide-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.demo-guide-card{
  margin-bottom:16px;
}
.demo-guide-cover{
  display:flex;
  gap:18px;
  align-items:center;
}
.demo-guide-cover img{
  width:82px;
  height:82px;
  border-radius:20px;
  box-shadow:0 12px 28px rgba(15,23,42,.14);
}
.demo-guide-cover h2{
  margin:4px 0 6px;
}
.demo-guide-cover p{
  margin:0;
  max-width:900px;
}
.demo-guide-grid .card h2{
  margin-top:0;
}
.demo-locked-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.demo-locked-list span{
  display:inline-flex;
  padding:7px 10px;
  border-radius:999px;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#1e3a8a;
  font-weight:800;
}
.demo-guide-finish ol{
  margin-top:8px;
  padding-left:22px;
}
.demo-guide-finish li{
  margin:6px 0;
}
.demo-guide-mini-row{
  margin-top:10px;
  display:flex;
  justify-content:flex-start;
}
body.theme-dark .demo-locked-list span{
  background:#172554;
  border-color:#1d4ed8;
  color:#dbeafe;
}
@media print{
  .sidebar,.topbar,.theme-switcher,.demo-account-banner,.demo-guide-actions,.side-nav,.sidebar-product-brand{display:none !important;}
  .layout{display:block !important;}
  .main{margin:0 !important;padding:0 !important;width:100% !important;}
  body{background:#fff !important;color:#000 !important;}
  .card{box-shadow:none !important;border:1px solid #cbd5e1 !important;break-inside:avoid;}
  a{color:#000 !important;text-decoration:none !important;}
}
@media(max-width:720px){
  .demo-guide-cover{align-items:flex-start;}
  .demo-guide-cover img{width:64px;height:64px;border-radius:16px;}
  .demo-guide-actions{width:100%;}
  .demo-guide-actions .btn{width:100%;justify-content:center;}
}


/* v1.10.111 demo guide instructional walkthrough */
.demo-guide-walkthrough{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-bottom:16px;
}
.demo-step-card h2{
  margin-top:0;
}
.demo-step-purpose{
  color:#334155;
  margin-bottom:10px;
}
.demo-step-card ol{
  margin:10px 0 12px;
  padding-left:22px;
}
.demo-step-card li{
  margin:7px 0;
  line-height:1.35;
}
.demo-example-box{
  margin:12px 0;
  padding:10px 12px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
  color:#1e3a8a;
}
.demo-example-box code{
  background:#dbeafe;
  padding:2px 5px;
  border-radius:6px;
}
body.theme-dark .demo-step-purpose{
  color:#cbd5e1;
}
body.theme-dark .demo-example-box{
  background:#172554;
  color:#dbeafe;
  border-color:#1d4ed8;
}
body.theme-dark .demo-example-box code{
  background:#1e3a8a;
}
@media(max-width:900px){
  .demo-guide-walkthrough{
    grid-template-columns:1fr;
  }
}
@media print{
  .demo-guide-walkthrough{
    grid-template-columns:1fr 1fr;
  }
  .demo-example-box{
    border:1px solid #cbd5e1 !important;
    background:#fff !important;
    color:#000 !important;
  }
}


/* v1.10.114 demo manager action polish */
.demo-manager-actions{
  min-width:190px;
  padding:8px;
}
.demo-manager-actions form{
  margin:0;
}
.demo-manager-actions button{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-height:38px;
  padding:9px 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#0f172a;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}
.demo-manager-actions button:hover{
  background:#eef2ff;
}
.demo-manager-actions button.danger-link{
  color:#b91c1c;
}
.demo-manager-actions button.danger-link:hover{
  background:#fee2e2;
}
body.theme-dark .demo-manager-actions button{
  color:#f8fafc;
}
body.theme-dark .demo-manager-actions button:hover{
  background:#1e293b;
}
body.theme-dark .demo-manager-actions button.danger-link{
  color:#fca5a5;
}
body.theme-dark .demo-manager-actions button.danger-link:hover{
  background:#450a0a;
}


/* v1.10.115 demo edition switcher and setup preview */
.demo-edition-switcher{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 8px;
  padding:8px 10px;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:rgba(239,246,255,.75);
}
.demo-edition-switcher label{
  font-weight:900;
  margin:0;
}
.demo-edition-switcher select{
  min-width:120px;
  max-width:150px;
  padding:7px 10px;
  border-radius:10px;
}
.demo-edition-switcher button{
  padding:7px 12px;
  border-radius:10px;
}
.demo-edition-switcher span{
  color:#475569;
  font-weight:800;
}
body.theme-dark .demo-edition-switcher{
  background:rgba(30,41,59,.75);
  border-color:#334155;
}
body.theme-dark .demo-edition-switcher span{
  color:#cbd5e1;
}


/* v1.10.116 demo preview pages */
.demo-preview-head{
  align-items:flex-start;
}
.demo-preview-grid{
  margin-bottom:16px;
}
.demo-preview-list{
  margin:8px 0 0;
  padding-left:22px;
}
.demo-preview-list li{
  margin:8px 0;
}
.demo-preview-card button[disabled],
.demo-preview-card input[disabled]{
  opacity:.55;
  cursor:not-allowed;
}
.subtle-card{
  background:rgba(148,163,184,.08);
}
body.theme-dark .subtle-card{
  background:rgba(15,23,42,.45);
}


/* v1.10.117 compact inline demo edition switcher */
.demo-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  flex-wrap:wrap;
}
.demo-edition-switcher.inline{
  margin:0;
  padding:4px 8px;
  gap:6px;
  border-radius:12px;
}
.demo-edition-switcher.inline label{
  font-size:.88rem;
}
.demo-edition-switcher.inline select{
  min-width:96px;
  max-width:115px;
  padding:5px 8px;
}
.demo-edition-switcher.inline button{
  padding:5px 9px;
}
.demo-edition-switcher.inline span{
  font-size:.88rem;
  white-space:nowrap;
}
@media(max-width:720px){
  .demo-action-row{
    align-items:stretch;
  }
  .demo-action-row > .btn,
  .demo-edition-switcher.inline{
    width:100%;
  }
  .demo-edition-switcher.inline{
    justify-content:flex-start;
  }
}


/* v1.10.118 tighter inline edition switcher */
.demo-action-row{
  flex-wrap:wrap;
}
.demo-edition-switcher.inline{
  display:inline-flex;
  width:auto;
  max-width:none;
  min-height:36px;
  align-items:center;
  flex-wrap:nowrap;
}
.demo-edition-switcher.inline span{
  display:inline-flex;
  align-items:center;
  margin-left:2px;
  white-space:nowrap;
}
.demo-edition-switcher.inline select{
  height:34px;
}
.demo-edition-switcher.inline button{
  height:34px;
  display:inline-flex;
  align-items:center;
}
@media(min-width:721px){
  .demo-action-row{
    flex-wrap:nowrap;
  }
  .demo-edition-switcher.inline{
    flex:0 0 auto;
  }
}
@media(max-width:720px){
  .demo-edition-switcher.inline{
    flex-wrap:wrap;
  }
  .demo-edition-switcher.inline span{
    width:100%;
    margin-top:4px;
  }
}


/* v1.10.119 flattened demo edition switcher */
.demo-edition-switcher.inline{
  border:0;
  background:transparent;
  padding:0;
  min-height:34px;
  box-shadow:none;
}
.demo-edition-switcher.inline label{
  white-space:nowrap;
  font-weight:900;
}
.demo-edition-switcher.inline select{
  min-width:112px;
}
.demo-edition-switcher.inline span{
  color:#334155;
}
body.theme-dark .demo-edition-switcher.inline{
  background:transparent;
  border:0;
}
body.theme-dark .demo-edition-switcher.inline span{
  color:#cbd5e1;
}
@media(max-width:720px){
  .demo-edition-switcher.inline{
    padding:8px 0 0;
  }
}


/* v1.10.120 edition switcher starts to affect the demo */
.demo-invoice-edition-tile{
  gap:8px;
}
.demo-invoice-edition-tile > a{
  display:block;
  color:inherit;
  text-decoration:none;
  width:100%;
  text-align:center;
}
.demo-invoice-edition-tile .demo-edition-switcher.inline{
  justify-content:center;
  width:100%;
  gap:5px;
  margin-top:2px;
}
.demo-invoice-edition-tile .demo-edition-switcher.inline label{
  font-size:.82rem;
}
.demo-invoice-edition-tile .demo-edition-switcher.inline select{
  min-width:88px;
  height:30px;
  padding:4px 7px;
}
.demo-invoice-edition-tile .demo-edition-switcher.inline button{
  height:30px;
  padding:4px 8px;
}
.demo-edition-summary{
  margin:10px 0 0;
  padding:9px 12px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
  color:#1e3a8a;
}
.demo-edition-status{
  display:inline-flex;
  align-items:center;
  color:#334155;
  font-weight:900;
}
body.theme-dark .demo-edition-summary{
  background:#172554;
  color:#dbeafe;
  border-color:#1d4ed8;
}
body.theme-dark .demo-edition-status{
  color:#cbd5e1;
}
@media(max-width:900px){
  .demo-invoice-edition-tile .demo-edition-switcher.inline{
    flex-wrap:wrap;
  }
}


/* v1.10.121 compact edition row under Invoice button */
.demo-action-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  align-items:center;
  margin-top:10px;
}
.demo-guide-action{
  justify-content:center;
  width:100%;
}
.demo-edition-action{
  grid-column:2 / span 2;
  justify-self:start;
}
.demo-edition-switcher.inline.demo-edition-action{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  width:auto;
  flex-wrap:nowrap;
}
.demo-edition-action label{
  white-space:nowrap;
  font-weight:900;
}
.demo-edition-action select{
  min-width:112px;
  height:34px;
}
.demo-edition-action button{
  height:34px;
  display:inline-flex;
  align-items:center;
}
.demo-edition-action span{
  white-space:nowrap;
  color:#334155;
  font-weight:900;
}
body.theme-dark .demo-edition-action span{
  color:#cbd5e1;
}
@media(max-width:900px){
  .demo-action-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .demo-edition-action{
    grid-column:2;
  }
}
@media(max-width:720px){
  .demo-action-row{
    grid-template-columns:1fr;
  }
  .demo-edition-action{
    grid-column:1;
    width:100%;
    flex-wrap:wrap !important;
  }
  .demo-edition-action span{
    white-space:normal;
  }
}


/* v1.10.122 inline edition summary */
.demo-edition-inline-summary{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding-left:10px;
  border-left:1px solid #cbd5e1;
  color:#475569;
  font-style:normal;
  font-size:.9rem;
  white-space:nowrap;
}
body.theme-dark .demo-edition-inline-summary{
  color:#cbd5e1;
  border-left-color:#475569;
}
@media(max-width:1100px){
  .demo-edition-inline-summary{
    width:100%;
    margin-left:0;
    padding-left:0;
    border-left:0;
    margin-top:4px;
  }
}


/* v1.10.123 auto-apply demo edition switcher */
.demo-edition-action select{
  cursor:pointer;
}
.demo-edition-action span{
  margin-left:4px;
}


/* v1.10.126 demo polish: generic user examples and document import helper text */
.import-tab-help{
  display:inline-flex;
  align-items:center;
  line-height:1.35;
}
@media(max-width:760px){
  .import-tab-help{
    display:block;
    margin-top:8px;
  }
}


/* v1.10.127 demo feedback / review collection */
.demo-feedback-card textarea{
  width:100%;
  resize:vertical;
}
.feedback-quote-line{
  margin-top:10px;
}
.feedback-message-cell{
  max-width:520px;
  white-space:normal;
  line-height:1.35;
}
.demo-feedback-action{
  justify-content:center;
  width:100%;
}
@media(max-width:900px){
  .demo-feedback-action{
    width:auto;
  }
}


/* v1.10.128 one-line guided start action row */
.demo-action-row{
  display:grid;
  grid-template-columns:minmax(180px, 1fr) minmax(130px, .65fr) auto minmax(260px, 1.4fr);
  gap:8px;
  align-items:center;
  margin-top:10px;
}
.demo-guide-action,
.demo-feedback-action{
  min-height:30px;
  padding:7px 10px;
  justify-content:center;
  width:100%;
  font-size:.9rem;
}
.demo-edition-action{
  grid-column:auto;
  justify-self:start;
}
.demo-edition-switcher.inline.demo-edition-action{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  width:auto;
  flex-wrap:nowrap;
}
.demo-edition-action label{
  white-space:nowrap;
  font-weight:900;
}
.demo-edition-action select{
  min-width:112px;
  height:32px;
  padding:5px 8px;
}
.demo-edition-status-wrap{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  white-space:nowrap;
}
.demo-edition-status-wrap strong{
  color:#334155;
}
.demo-edition-status-wrap .demo-edition-inline-summary{
  margin-left:0;
  padding-left:10px;
  border-left:1px solid #cbd5e1;
  font-size:.9rem;
  color:#475569;
  font-style:normal;
}
body.theme-dark .demo-edition-status-wrap strong{
  color:#cbd5e1;
}
body.theme-dark .demo-edition-status-wrap .demo-edition-inline-summary{
  color:#cbd5e1;
  border-left-color:#475569;
}
@media(max-width:1200px){
  .demo-action-row{
    grid-template-columns:minmax(170px, 1fr) minmax(125px, .75fr) auto;
  }
  .demo-edition-status-wrap{
    grid-column:1 / -1;
  }
}
@media(max-width:760px){
  .demo-action-row{
    grid-template-columns:1fr;
  }
  .demo-edition-action,
  .demo-edition-status-wrap{
    width:100%;
    justify-self:stretch;
  }
  .demo-edition-status-wrap{
    flex-wrap:wrap;
    white-space:normal;
  }
  .demo-edition-status-wrap .demo-edition-inline-summary{
    border-left:0;
    padding-left:0;
  }
}


/* v1.10.129 compact guide/feedback buttons and right-aligned feedback */
.demo-action-row{
  display:grid;
  grid-template-columns:auto auto minmax(220px, 1fr) auto;
  gap:8px;
  align-items:center;
  margin-top:10px;
}
.demo-guide-action,
.demo-feedback-action{
  width:auto !important;
  min-height:30px;
  padding:7px 12px;
  justify-content:center;
  white-space:nowrap;
  font-size:.9rem;
}
.demo-feedback-action{
  justify-self:end;
}
.demo-edition-action{
  grid-column:auto;
  justify-self:start;
}
.demo-edition-status-wrap{
  justify-self:start;
  min-width:0;
  overflow:hidden;
}
.demo-edition-status-wrap .demo-edition-inline-summary{
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:1250px){
  .demo-action-row{
    grid-template-columns:auto auto 1fr;
  }
  .demo-feedback-action{
    grid-column:3;
    grid-row:1;
  }
  .demo-edition-status-wrap{
    grid-column:1 / -1;
    grid-row:2;
  }
}
@media(max-width:760px){
  .demo-action-row{
    grid-template-columns:1fr;
  }
  .demo-guide-action,
  .demo-feedback-action{
    width:100% !important;
    justify-self:stretch;
  }
  .demo-feedback-action,
  .demo-edition-status-wrap{
    grid-column:1;
    grid-row:auto;
  }
  .demo-edition-status-wrap{
    white-space:normal;
    flex-wrap:wrap;
  }
}


/* v1.10.130 feedback form spacing polish */
.demo-feedback-card textarea{
  margin-top:6px;
}
.demo-feedback-card .feedback-quote-line{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:14px;
  margin-bottom:12px;
  line-height:1.35;
}
.demo-feedback-card .feedback-quote-line input{
  margin-top:3px;
}
.demo-feedback-card .form-actions{
  margin-top:4px;
  gap:10px;
}
.demo-feedback-card .form-actions .btn,
.demo-feedback-card .form-actions button{
  min-height:36px;
}


/* v1.10.131 demo manager filtering and sample data clarity */
.demo-manager-filter-card{
  padding-top:12px;
  padding-bottom:12px;
}
.demo-manager-filter-card .inline-form{
  align-items:center;
}
