/* Bosheng / Aurora Glass. Local assets only; no data or workflow rules here. */
:root {
  color-scheme: dark;
  --bg: #080c17;
  --panel: rgba(22, 28, 45, .80);
  --panel2: rgba(128, 145, 190, .085);
  --panel3: rgba(125, 145, 198, .14);
  --line: rgba(177, 193, 239, .16);
  --line-soft: rgba(177, 193, 239, .09);
  --text: #f1f4ff;
  --muted: #a7b2cd;
  --faint: #98a6c4;
  --a1: #527fff;
  --a2: #8960f3;
  --accent: #a0b6ff;
  --accent-soft: rgba(110, 140, 255, .15);
  --accent2: #74e2c1;
  --green-soft: rgba(56, 195, 153, .13);
  --warn: #f4d17f;
  --warn-soft: rgba(228, 180, 74, .12);
  --danger: #ff91a3;
  --red: #ff91a3;
  --red-soft: rgba(239, 100, 130, .13);
  --glow: rgba(109, 137, 255, .26);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .035);
}

body.theme-workspace, body.theme-login, body.theme-admin {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 1050px 760px at -8% -3%, rgba(61, 103, 235, .40), transparent 74%),
    radial-gradient(ellipse 760px 690px at 108% 47%, rgba(104, 47, 188, .32), transparent 73%),
    radial-gradient(ellipse 830px 580px at 45% 105%, rgba(41, 131, 144, .16), transparent 75%),
    var(--bg);
  background-attachment: fixed;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { scrollbar-width: thin; scrollbar-color: #54618b transparent; }
::selection { background: rgba(115, 139, 255, .42); color: #fff; }
:where(button, a, input, select, textarea, summary, [role="button"]):focus-visible {
  outline: 2px solid #b4c7ff;
  outline-offset: 4px;
}
input, select, textarea { color-scheme: dark; }
input[type="checkbox"], input[type="radio"] { accent-color: #8d9cff; }
select option { background: #171e32; color: var(--text); }
input::placeholder, textarea::placeholder { color: #8e9bb8; opacity: 1; }
button { touch-action: manipulation; }
button:not(:disabled), a, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: 4px; }
.skip-link { position: fixed; left: 24px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 12px; color: #fff; background: #4058b7; }
.skip-link:focus { top: 16px; }

/* A single, floating application bar, matching the reference's hierarchy. */
.theme-workspace .app-shell { display: block; max-width: 1720px; margin: 0 auto; padding: 18px 32px 42px; }
.theme-workspace .side {
  flex-direction: row;
  align-items: center;
  gap: 22px;
  position: sticky;
  top: 12px;
  z-index: 30;
  width: 100%;
  height: auto;
  min-height: 76px;
  padding: 12px 18px;
  border: 1px solid rgba(173, 194, 255, .20);
  border-radius: 22px;
  background: linear-gradient(115deg, rgba(65, 95, 168, .58), rgba(24, 34, 63, .91) 47%, rgba(28, 34, 63, .85));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .19), inset 0 1px 0 rgba(230, 239, 255, .10);
}
.theme-workspace .side .logo { padding: 0; gap: 12px; flex: 0 0 auto; }
.theme-workspace .side .logo .lg {
  width: 42px; height: 42px; border-radius: 15px; font-size: 20px;
  background: linear-gradient(145deg, #9baaff, #7752d9 58%, #634195);
  border: 1px solid rgba(230, 229, 255, .42);
  box-shadow: 0 0 24px rgba(146, 111, 255, .34), inset 0 1px 9px rgba(255, 255, 255, .22);
}
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 18px; letter-spacing: .08em; font-weight: 750; }
.brand-copy > span { color: #b3c2e3; font-size: 10px; letter-spacing: .035em; white-space: nowrap; }
.theme-workspace .snav {
  display: flex; align-items: center; justify-content: center; flex: 1 1 auto;
  min-width: 0; gap: 3px; padding: 5px; margin: 0;
  border: 1px solid rgba(210, 223, 255, .07); border-radius: 15px;
  background: rgba(201, 218, 255, .055); overflow: visible;
}
.theme-workspace .snav li {
  flex: 0 1 auto; justify-content: center; gap: 7px; padding: 10px 12px; margin: 0;
  border-radius: 11px; border: 1px solid transparent; white-space: nowrap;
  color: #b5c2df; font-size: 12px; font-weight: 500;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.theme-workspace .snav li:hover { background: rgba(207, 222, 255, .08); color: #fff; }
.theme-workspace .snav li.on {
  background: linear-gradient(135deg, rgba(90, 135, 255, .95), rgba(119, 81, 223, .92));
  border-color: rgba(198, 215, 255, .30); color: #fff;
  box-shadow: 0 3px 14px rgba(92, 115, 245, .33), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.theme-workspace .snav li.on::before { display: none; }
.nav-icon { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .90; }
.theme-workspace .snav .bdg { margin-left: 0; font-size: 10px; padding: 0 5px; min-width: 16px; text-align: center; }
.topbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex: 0 0 auto; }
.theme-workspace #health { margin: 0; padding: 6px 10px; white-space: nowrap; border-radius: 20px; background: rgba(8, 20, 32, .24); font-size: 10px; border-color: rgba(168, 220, 205, .17); }
.account-menu { position: relative; font-size: 12px; }
.account-menu > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; color: #dfe7ff; border-radius: 12px; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: #e3eaff; border: 1px solid rgba(177, 195, 246, .24); background: linear-gradient(135deg, #567bb0, #635393); }
.account-chevron { color: #b1bedc; }
#account_name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover { position: absolute; top: calc(100% + 17px); right: -4px; width: 195px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #192138; box-shadow: 0 18px 45px rgba(0, 0, 0, .45); }
.menu-caption { display: block; margin: 2px 6px 10px; color: var(--muted); font-size: 11px; }
.account-popover a { display: flex; justify-content: space-between; padding: 9px; color: var(--text); text-decoration: none; border-radius: 9px; background: var(--panel2); }
.theme-workspace .account-popover button { width: 100%; margin: 6px 0 0; padding: 9px; box-shadow: none; text-align: left; }
.theme-workspace .main-area { min-width: 0; padding: 24px 0 0; }

/* The welcome area is decoration, not a source of fabricated business metrics. */
.theme-workspace .home-hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 232px;
  align-items: center; padding: 30px 34px; margin-bottom: 20px;
  border: 1px solid rgba(178, 195, 247, .17); border-radius: 25px;
  background: linear-gradient(112deg, rgba(69, 98, 170, .50), rgba(24, 30, 47, .91) 52%, rgba(68, 39, 112, .59));
  box-shadow: var(--glass-shadow);
}
.home-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 3% 100%, rgba(71, 129, 251, .14), transparent 58%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 68%; }
.eyebrow { color: #bbc8eb; letter-spacing: .12em; font-size: 10px; font-weight: 600; }
.eyebrow-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: #a2b7ff; box-shadow: 0 0 10px rgba(132, 164, 255, .5); }
.theme-workspace .home-hero h1 { font-size: clamp(27px, 2.3vw, 38px); line-height: 1.3; letter-spacing: -.035em; margin: 10px 0; font-weight: 780; }
.gradient-text { color: #a8b6ff; background: linear-gradient(95deg, #9aaaff, #80d4e5); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-description { font-size: 13px; line-height: 1.85; color: #bac6e1; margin: 0 0 13px; }
.theme-workspace .home-hero .sub { color: #afbddb; font-size: 11px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; position: relative; z-index: 2; margin-left: auto; max-width: 42%; }
.theme-workspace .hero-actions button { min-height: 43px; }
.hero-art { position: absolute; right: 7%; top: 20px; width: 260px; height: 210px; z-index: -1; opacity: .22; pointer-events: none; }
.hero-orbit { position: absolute; width: 210px; height: 210px; border: 1px solid #b6baff; border-radius: 50%; }
.orbit-one { top: -42px; right: -55px; }
.orbit-two { bottom: -62px; left: 4px; width: 250px; height: 250px; border-style: dashed; }
.hero-paper { position: absolute; left: 55px; top: 20px; width: 116px; height: 162px; padding: 13px; border: 1px solid #b5bdf7; border-radius: 14px; background: linear-gradient(140deg, rgba(203, 220, 255, .35), rgba(100, 91, 177, .12)); transform: rotate(12deg); }
.paper-top { display: flex; justify-content: space-between; padding-bottom: 13px; }
.paper-top span { display: block; width: 31px; height: 5px; border-radius: 3px; background: #c7d4ff; }
.paper-top span:last-child { width: 18px; }
.paper-grid { height: 102px; border: 1px solid #abbcff; background: repeating-linear-gradient(0deg, transparent 0 18px, #a5b8ff 18px 19px), repeating-linear-gradient(90deg, transparent 0 20px, #a5b8ff 20px 21px); }
.paper-check { position: absolute; right: -20px; bottom: 12px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #9991f3; border: 2px solid #d5d8ff; color: white; font-size: 26px; }
.hero-spark { position: absolute; height: 6px; width: 6px; background: #b3beff; border-radius: 2px; transform: rotate(45deg); }
.spark-one { top: 12px; left: 26px; }.spark-two { right: -20px; bottom: 57px; width: 9px; height: 9px; }

/* Cards: quiet glass surfaces, with color reserved for workflow status. */
.theme-workspace .stats { gap: 16px; margin-bottom: 18px; }
.theme-workspace .stat, .theme-workspace .qcard, .theme-workspace .panel {
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(125deg, rgba(163, 182, 224, .07), rgba(17, 23, 37, .52)), var(--panel);
  box-shadow: var(--glass-shadow);
}
.theme-workspace .stat { padding: 19px 22px; min-height: 119px; }
.theme-workspace .stat::after { top: 20px; left: 0; right: auto; width: 3px; height: 35px; opacity: .9; border-radius: 0 4px 4px 0; }
.theme-workspace .stat .k { font-size: 12px; color: #adb9d5; }
.theme-workspace .stat .v { font-size: 31px; line-height: 1.35; font-weight: 740; margin: 5px 0 4px; }
.theme-workspace .stat .delta { color: #9dabc8; font-size: 11px; }
.theme-workspace .stat.alert .v { color: #f4cf83; }
.theme-workspace .stat.alert::after { background: linear-gradient(#e2b665, #b18beb); }
.theme-workspace .panel { padding: 22px; }
.theme-workspace .panel h2 { color: #e0e7fa; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 650; margin-bottom: 16px; }
.theme-workspace #home_batch_setup { position: relative; padding: 23px 25px; }
.theme-workspace #home_batch_setup > h2 { font-size: 17px; }
.theme-workspace #home_batch_setup > .row > div { min-width: 165px; max-width: 320px; }
.theme-workspace #daily_stats:empty { display: none; }
.theme-workspace #daily_stats { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 12px; margin-bottom: 13px; border-top: 1px solid var(--line-soft); }
.theme-workspace #daily_stats .kv { gap: 10px; padding: 0; border: 0; font-size: 11px; }
.theme-workspace #daily_stats .kv .v { color: #d8e4ff; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 26px 2px 15px; }
.section-heading h2 { margin: 4px 0 0; font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.section-heading > .muted { font-size: 11px; }
.theme-workspace .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.theme-workspace .qcard { padding: 22px; min-height: 195px; }
.theme-workspace .qcard .qi { width: 42px; height: 42px; border-radius: 13px; font-size: 19px; background: rgba(112, 135, 235, .14); margin-bottom: 15px; border: 1px solid rgba(142, 160, 244, .13); }
.theme-workspace .qcard h4 { margin-bottom: 8px; font-size: 15px; }
.theme-workspace .qcard p { font-size: 12px; line-height: 1.7; }
.theme-workspace .qcard:hover { transform: translateY(-2px); border-color: rgba(155, 176, 255, .48); box-shadow: 0 14px 36px rgba(0, 0, 0, .23); }
.theme-workspace .qcard.current { background: linear-gradient(120deg, rgba(77, 102, 190, .21), rgba(73, 49, 129, .13)), var(--panel); border-color: rgba(144, 167, 255, .40); }
.theme-workspace .qcard.done { border-color: rgba(113, 222, 186, .28); }
.theme-workspace .qcard .step-state { padding: 4px 9px; font-size: 10px; border: 1px solid var(--line-soft); }
.card-link { display: flex; justify-content: space-between; font-size: 11px; color: #aebfff; margin-top: 20px; }
.theme-workspace .home-month { padding: 18px 22px; min-height: 66px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(100deg, rgba(67, 105, 153, .17), rgba(53, 48, 99, .12)), var(--panel); }
.theme-workspace .home-month b { color: #d5e4ff; font-size: 20px; }
.theme-workspace .alertbar { padding: 14px 18px; border-radius: 16px; border-width: 1px; }
.theme-workspace .alertbar .t { font-size: 12px; }
.theme-workspace .alertbar .ic { width: 32px; height: 32px; }

/* Keep dense payroll/review tools legible, rather than decorating the photos. */
.theme-workspace button {
  border: 1px solid rgba(199, 210, 255, .17); border-radius: 11px;
  background: linear-gradient(115deg, #4c80f5, #7e56e2); color: #fff;
  box-shadow: 0 4px 14px rgba(74, 102, 228, .20), inset 0 1px 0 rgba(255, 255, 255, .10);
  padding: 10px 15px; font-size: 12px; line-height: 1.5;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.theme-workspace button:hover:not(:disabled) { filter: brightness(1.09); box-shadow: 0 6px 18px rgba(99, 111, 241, .28); }
.theme-workspace button:disabled { opacity: .50; box-shadow: none; }
.theme-workspace button.ghost { background: rgba(174, 194, 236, .065); border: 1px solid var(--line); color: #d8e2fc; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }
.theme-workspace button.ghost:hover:not(:disabled) { border-color: rgba(169, 189, 250, .42); background: rgba(166, 187, 244, .12); }
.theme-workspace :is(input, select, textarea):not(:where([type="checkbox"], [type="radio"], [type="file"])) {
  background: rgba(9, 16, 31, .44); color: var(--text); border: 1px solid rgba(165, 186, 237, .19);
  border-radius: 9px; font: inherit; font-size: 13px; padding: 9px 11px; width: 100%; max-width: 100%; min-width: 0;
}
.theme-workspace input:focus, .theme-workspace select:focus, .theme-workspace textarea:focus { border-color: #8fafff; }
.theme-workspace input[type="file"] { color: var(--muted); font-size: 12px; max-width: 100%; }
.theme-workspace input[type="file"]::file-selector-button { color: #d8e3ff; background: #283353; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; margin-right: 10px; cursor: pointer; }
.theme-workspace .focus-table input.Valid { border-color: #3cae89; background: rgba(35, 142, 111, .14); }
.theme-workspace .focus-table input.Review { border-color: #b2934f; background: rgba(174, 132, 49, .14); }
.theme-workspace .focus-table input.Missing { border-color: #ac5a70; background: rgba(167, 66, 88, .13); }
.theme-workspace .focus-table input { text-align: center; font-family: Consolas, ui-monospace, monospace; font-weight: 600; }
.theme-workspace label { font-size: 12px; color: #b0bdd8; }
.theme-workspace .row { min-width: 0; flex-wrap: wrap; }
.theme-workspace .row > * { min-width: 0; }
.theme-workspace table { color: #dce5fa; font-size: 12px; }
.theme-workspace th { color: #aebddc; background: rgba(161, 180, 227, .065); font-size: 11px; white-space: nowrap; }
.theme-workspace th, .theme-workspace td { padding: 12px 13px; border-bottom-color: var(--line-soft); }
.theme-workspace tbody tr:hover td { background: rgba(133, 159, 226, .055); }
.theme-workspace #home_recent, .theme-workspace #daily_items,
.theme-workspace #bc_table, .theme-workspace #by_worker_table, .theme-workspace #anomaly_table,
.theme-workspace #records_table { max-width: 100%; overflow-x: auto; }
.theme-workspace #home_recent table { min-width: 660px; }
.theme-workspace .tag, .theme-workspace .badge, .theme-workspace .pill { white-space: nowrap; }
.theme-workspace .workflow-fold { border-radius: 13px; background: rgba(137, 158, 212, .045); border-color: var(--line); }
.theme-workspace .workflow-fold > summary { padding: 13px 15px; font-size: 12px; }
.theme-workspace .workflow-fold-body { padding: 14px 15px; }
.theme-workspace .empty-state { background: rgba(128, 150, 211, .025); border-color: rgba(162, 182, 236, .17); border-radius: 13px; padding: 34px 16px; font-size: 12px; }
.theme-workspace .drop { padding: 28px 14px; border: 1px dashed rgba(156, 183, 255, .37); border-radius: 15px; background: linear-gradient(130deg, rgba(94, 128, 255, .09), rgba(127, 78, 197, .065)); color: #b9c7e8; line-height: 1.8; }
.theme-workspace .drop:hover { border-color: #9bb5ff; background: rgba(116, 146, 255, .13); }
.theme-workspace .draft-item { padding: 11px; border-radius: 12px; background: rgba(136, 155, 207, .07); }
.theme-workspace .draft-item.active { background: linear-gradient(110deg, rgba(99, 133, 255, .14), rgba(116, 77, 190, .09)); border-color: #93a8ff; box-shadow: 0 0 0 1px rgba(145, 168, 255, .24); }
.theme-workspace .review-filter button { border-radius: 9px; padding: 6px 10px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); box-shadow: none; }
.theme-workspace .review-filter button.on { border-color: #91aafa; background: rgba(104, 136, 250, .17); color: #c6d5ff; }
.theme-workspace .warnbox { border-radius: 11px; background: rgba(105, 78, 19, .20); border-color: rgba(221, 176, 73, .35); color: #f7d989; }
.theme-workspace .modal-mask { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }
.theme-workspace .modal-box, .theme-workspace dialog { border-radius: 19px; background: #172039; border-color: rgba(168, 191, 255, .26); box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
.theme-workspace dialog::backdrop { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }
.theme-workspace #view_ocr .ocr-left-panel { top: 110px; max-height: calc(100vh - 130px); scrollbar-width: thin; }
.theme-workspace #view_ocr .ocr-right-panel { min-height: 560px; }
.theme-workspace #p_daily > h2, .theme-workspace #p_batch_confirm > h2, .theme-workspace #p_payroll > h2 { font-size: 21px; margin-bottom: 23px; }
.theme-workspace .mhead .sub { margin-top: 7px; }
.theme-workspace #rv_target_rows img, .theme-workspace .rv-name-strip, .theme-workspace #rv_original { filter: none; transform: none; }

/* Shared identity and form surfaces for the separate account pages. */
.theme-login .auth-card, .theme-admin .admin-card, .theme-admin dialog {
  border: 1px solid rgba(177, 195, 242, .19); border-radius: 22px;
  background: linear-gradient(125deg, rgba(127, 158, 228, .09), rgba(77, 50, 125, .07)), rgba(21, 28, 46, .89);
  box-shadow: var(--glass-shadow);
}
.theme-login .auth-card { backdrop-filter: blur(18px); }
.theme-login input, .theme-admin input, .theme-admin select { background: rgba(9, 16, 31, .5); border: 1px solid rgba(170, 189, 239, .22); color: var(--text); border-radius: 10px; }
.theme-login button, .theme-admin button { color: #fff; background: linear-gradient(110deg, #4e80f6, #8259e5); border: 1px solid rgba(197, 210, 255, .20); border-radius: 10px; box-shadow: 0 6px 18px rgba(78, 109, 232, .18); }
.theme-admin button.danger { color: #ffc4cf; background: rgba(198, 68, 96, .18); border-color: rgba(237, 121, 149, .29); box-shadow: none; }
.theme-admin th { color: #adbbd9; background: rgba(155, 176, 226, .045); }
.theme-admin td, .theme-admin th { border-color: var(--line-soft); }
.theme-admin dialog::backdrop { background: rgba(3, 8, 20, .72); backdrop-filter: blur(6px); }

@media (max-width: 1450px) {
  .theme-workspace .app-shell { padding: 15px 24px 32px; }
  .theme-workspace .side { gap: 14px; padding: 11px 14px; }
  .theme-workspace .snav li { padding: 10px 9px; gap: 6px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy > span { font-size: 9px; }
  .topbar-tools { gap: 9px; }
  .theme-workspace #health { font-size: 9px; padding: 6px 8px; }
  .theme-workspace .home-hero { padding: 28px; }
}
@media (max-width: 1180px) {
  .theme-workspace .side { flex-wrap: wrap; gap: 10px 15px; }
  .theme-workspace .snav { order: 3; flex: 1 1 100%; justify-content: flex-start; }
  .theme-workspace .snav li { flex: 1; padding: 9px; }
  .topbar-tools { margin-left: auto; }
  .theme-workspace #view_ocr .ocr-left-panel { position: static; max-height: none; overflow: visible; }
  .theme-workspace #view_ocr { grid-template-columns: 1fr; }
  .theme-workspace .home-hero { min-height: 230px; }
  .hero-copy { max-width: 65%; }
  .hero-actions { max-width: 34%; justify-content: flex-end; }
  .hero-actions button { max-width: 100%; }
}
@media (max-width: 800px) {
  .theme-workspace .app-shell { padding: 12px 16px 28px; }
  .theme-workspace .side { top: 8px; border-radius: 18px; }
  .theme-workspace .main-area { padding-top: 18px; }
  .theme-workspace .home-hero { padding: 25px; align-items: flex-start; flex-direction: column; gap: 18px; min-height: 280px; border-radius: 21px; }
  .hero-copy { max-width: 100%; }
  .hero-actions { margin: 0; max-width: 100%; justify-content: flex-start; }
  .hero-art { right: -25px; opacity: .11; }
  .theme-workspace .quick { grid-template-columns: 1fr; }
  .theme-workspace .qcard { min-height: 0; }
  .theme-workspace .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .theme-workspace .stat { padding: 16px; min-height: 116px; }
  .theme-workspace .stat .v { font-size: 26px; }
  .theme-workspace .panel { padding: 18px; }
  .theme-workspace #home_batch_setup { padding: 20px; }
  .theme-workspace .alertbar { flex-wrap: wrap; gap: 10px; }
  .theme-workspace .alertbar .t { min-width: 160px; }
  .theme-workspace .home-month { gap: 15px 22px; }
  .theme-workspace #bc_autosave { display: block; }
}
@media (max-width: 540px) {
  .theme-workspace .app-shell { padding: 9px 10px 24px; }
  .theme-workspace .side { padding: 10px; gap: 10px; }
  .theme-workspace .side .logo { gap: 8px; }
  .theme-workspace .side .logo .lg { width: 33px; height: 33px; border-radius: 11px; font-size: 17px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy > span { font-size: 8px; }
  .theme-workspace #health { max-width: 126px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-tools { gap: 7px; }
  .account-avatar { width: 29px; height: 29px; border-radius: 10px; }
  .account-menu > summary { gap: 4px; }
  #account_name, .account-chevron { display: none; }
  .theme-workspace .snav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: 100%; padding: 4px; border-radius: 12px; }
  .theme-workspace .snav li { grid-column: span 2; padding: 8px 4px; gap: 5px; font-size: 11px; }
  .theme-workspace .snav li:nth-child(n+4) { grid-column: span 3; }
  .nav-icon { width: 14px; height: 14px; }
  .theme-workspace .main-area { padding-top: 13px; }
  .theme-workspace .home-hero { padding: 22px 20px; gap: 17px; }
  .theme-workspace .home-hero h1 { font-size: 28px; }
  .hero-description { font-size: 12px; }
  .theme-workspace .home-hero .sub { line-height: 1.8; font-size: 10px; }
  .hero-actions { width: 100%; gap: 8px; }
  .theme-workspace .hero-actions button { font-size: 11px; padding: 9px 11px !important; min-height: 41px; }
  .theme-workspace .panel { padding: 16px; border-radius: 17px; }
  .theme-workspace #home_batch_setup { padding: 18px; }
  .theme-workspace #home_batch_setup > .row > div { max-width: none; }
  .theme-workspace #daily_stats { gap: 10px 16px; }
  .theme-workspace #daily_stats .kv { flex: 1 1 40%; justify-content: space-between; }
  .theme-workspace .row { gap: 10px; }
  .theme-workspace .row > div { flex: 1 1 100% !important; }
  .theme-workspace .row > button { flex: 1 1 auto; max-width: 100%; white-space: normal; }
  .theme-workspace .row > span { flex-basis: 100%; }
  .theme-workspace .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .section-heading h2 { font-size: 18px; }
  .theme-workspace .stat { padding: 15px; }
  .theme-workspace .stat .v { font-size: 25px; }
  .theme-workspace .stat .delta { font-size: 10px; }
  .theme-workspace .home-month { padding: 16px; gap: 14px; }
  .theme-workspace .home-month span:first-child { flex-basis: 100%; }
  .theme-workspace #rv_target_rows { flex-direction: column; }
  .theme-workspace #rv_target_rows > div { flex: auto !important; min-width: 0 !important; }
  .theme-workspace #rv_save_next { white-space: normal; }
  .theme-workspace #view_ocr .ocr-right-panel { min-height: 300px; }
  .theme-workspace #bc_autosave { flex-basis: 100%; font-size: 10px !important; }
  .theme-workspace #p_batch_confirm > .row, .theme-workspace #p_batch_confirm > div[style*="display:flex"] { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@supports not (backdrop-filter: blur(1px)) {
  .theme-workspace .side { background: #1e2c50; }
  .theme-login .auth-card { background: #192139; }
}

/* HOME POLISH START
   Paint-only refinement: keep the existing DOM, geometry and semantic colors.
   Every selector is confined to the home view; hidden home means no extra glow.
*/
#view_home {
  --home-polish-version: 1;
  position: relative;
  isolation: isolate;
}
#view_home::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72vw 65vh at 1% 7%, rgba(91, 131, 255, .09), transparent 75%),
    radial-gradient(ellipse 57vw 83vh at 102% 36%, rgba(143, 83, 218, .09), transparent 77%),
    radial-gradient(ellipse 70vw 53vh at 49% 102%, rgba(62, 156, 165, .065), transparent 79%);
}
#view_home .home-hero {
  border-color: rgba(185, 202, 252, .23);
  background:
    radial-gradient(ellipse 78% 180% at 0% 0%, rgba(140, 177, 255, .14), transparent 73%),
    radial-gradient(ellipse 60% 160% at 100% 100%, rgba(157, 105, 235, .16), transparent 74%),
    linear-gradient(112deg, rgba(48, 75, 133, .84), rgba(25, 32, 52, .96) 52%, rgba(63, 39, 104, .86));
  box-shadow:
    0 19px 49px rgba(3, 7, 20, .23),
    0 3px 10px rgba(3, 7, 20, .10),
    inset 0 1px 0 rgba(222, 233, 255, .17),
    inset 0 -1px 0 rgba(168, 182, 233, .035);
}
#view_home .home-hero::after {
  background: linear-gradient(124deg, rgba(212, 228, 255, .035), transparent 40%, rgba(170, 153, 235, .025));
}
#view_home .home-hero h1 {
  text-shadow: 0 2px 21px rgba(125, 160, 255, .09);
}
#view_home .gradient-text {
  background-image: linear-gradient(100deg, #b8c5ff 2%, #a5c5f4 54%, #92deeb);
}
#view_home .hero-description { color: #c5d0e8; }
#view_home .home-hero .sub { color: #b4c3df; }
#view_home .hero-art { opacity: .33; }
#view_home .hero-orbit { border-color: rgba(190, 196, 255, .69); }
#view_home .hero-paper {
  border-color: rgba(211, 222, 255, .85);
  background:
    radial-gradient(ellipse at 0 0, rgba(233, 240, 255, .28), transparent 70%),
    linear-gradient(140deg, rgba(177, 199, 245, .24), rgba(116, 100, 188, .13));
  box-shadow: 0 14px 28px rgba(12, 11, 37, .14), inset 0 1px 0 rgba(240, 244, 255, .32);
}
#view_home .paper-check {
  background: linear-gradient(145deg, #b0a7f6, #8f82d8);
  box-shadow: 0 7px 19px rgba(18, 13, 49, .22), inset 0 1px 0 rgba(255, 255, 255, .27);
}
#view_home :is(.stat, .qcard, .panel) {
  border-color: rgba(175, 193, 237, .19);
  background:
    radial-gradient(ellipse 125% 165% at 0% 0%, rgba(155, 182, 239, .07), transparent 62%),
    linear-gradient(131deg, rgba(30, 40, 61, .92), rgba(21, 27, 44, .94));
  box-shadow:
    0 14px 35px rgba(3, 7, 19, .19),
    0 2px 5px rgba(3, 7, 19, .09),
    inset 0 1px 0 rgba(222, 233, 255, .115),
    inset 1px 0 0 rgba(210, 226, 255, .025),
    inset 0 -1px 0 rgba(159, 179, 223, .025);
}
#view_home .stat .k { color: #b5c2dc; }
#view_home .stat .delta { color: #a0aecb; }
#view_home :is(.stat .v, .home-month b, .kv .v, td) {
  font-variant-numeric: lining-nums tabular-nums;
}
#view_home .qcard {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
#view_home .qcard.current {
  border-color: rgba(151, 174, 255, .46);
  background:
    radial-gradient(ellipse 100% 160% at 0 0, rgba(132, 161, 255, .09), transparent 68%),
    linear-gradient(127deg, rgba(43, 54, 92, .94), rgba(35, 33, 64, .94));
}
#view_home .qcard.done { border-color: rgba(113, 222, 186, .28); }
#view_home .qcard .qi {
  border-color: rgba(174, 192, 249, .22);
  background: linear-gradient(138deg, rgba(140, 171, 255, .16), rgba(138, 107, 219, .10));
  box-shadow: 0 4px 12px rgba(4, 9, 26, .10), inset 0 1px 0 rgba(226, 235, 255, .12);
}
#view_home .qcard .step-state { box-shadow: inset 0 1px 0 rgba(220, 235, 255, .045); }
#view_home .qcard h4, #view_home .panel h2 { text-shadow: 0 1px 7px rgba(7, 11, 29, .12); }
#view_home .qcard p, #view_home .muted { color: #aebbd5; }
#view_home .card-link { color: #b5c7ff; }
#view_home .home-month {
  border-color: rgba(177, 200, 240, .20);
  background:
    radial-gradient(ellipse 70% 160% at 3% 0%, rgba(126, 190, 206, .07), transparent 75%),
    linear-gradient(106deg, rgba(27, 43, 63, .94), rgba(30, 30, 53, .94));
  box-shadow: 0 10px 25px rgba(3, 7, 19, .13), inset 0 1px 0 rgba(217, 235, 255, .105);
}
#view_home .home-month b { color: #e0ecff; }
#view_home button {
  transition: border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease, transform 180ms ease;
}
#view_home button:not(.ghost) {
  border-color: rgba(209, 222, 255, .26);
  background:
    linear-gradient(180deg, rgba(228, 239, 255, .14), transparent 55%, rgba(45, 34, 108, .055)),
    linear-gradient(112deg, #4e82f7, #8159e4);
  box-shadow: 0 6px 17px rgba(65, 92, 219, .24), inset 0 1px 0 rgba(240, 245, 255, .24), inset 0 -1px 0 rgba(43, 37, 118, .13);
}
#view_home button.ghost {
  background: linear-gradient(180deg, rgba(184, 202, 241, .085), rgba(147, 168, 218, .055));
  box-shadow: inset 0 1px 0 rgba(224, 235, 255, .065), 0 2px 5px rgba(2, 7, 20, .055);
}
#view_home button:active:not(:disabled) { transform: translateY(1px); }
#view_home :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  box-shadow: inset 0 1px 3px rgba(2, 7, 20, .13), 0 1px 0 rgba(224, 235, 255, .025);
}
#view_home .workflow-fold {
  background: linear-gradient(122deg, rgba(167, 188, 235, .055), rgba(131, 145, 194, .035));
  box-shadow: inset 0 1px 0 rgba(222, 235, 255, .045);
}
#view_home th { background: rgba(161, 183, 233, .055); color: #b6c6e3; }
#view_home td { border-bottom-color: rgba(175, 196, 239, .085); }
#view_home .tag { box-shadow: inset 0 1px 0 rgba(231, 240, 255, .045); }
@media (hover: hover) and (pointer: fine) {
  #view_home .qcard:hover {
    border-color: rgba(173, 193, 255, .42);
    box-shadow: 0 17px 38px rgba(2, 7, 21, .24), inset 0 1px 0 rgba(230, 238, 255, .16);
  }
  #view_home button:hover:not(:disabled) { filter: brightness(1.06); }
  #view_home button:not(.ghost):hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(75, 98, 222, .29), inset 0 1px 0 rgba(246, 249, 255, .29);
  }
  #view_home button.ghost:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(188, 209, 255, .13), rgba(153, 179, 235, .085));
    box-shadow: inset 0 1px 0 rgba(231, 240, 255, .10), 0 3px 8px rgba(3, 8, 24, .07);
  }
}
@media (prefers-reduced-motion: reduce) {
  #view_home button:active:not(:disabled) { transform: none; }
}
@media (max-width: 800px) {
  #view_home .hero-art { opacity: .17; }
}
/* HOME POLISH END */
