/* QC global theme v1 — inspired by approved First Aid UI, readability preserved */
:root{
  --qc-bg:#f3f7fb;--qc-surface:#ffffff;--qc-surface-2:#f7fafc;--qc-ink:#142b40;--qc-muted-theme:#667b8f;
  --qc-line:#dbe6ef;--qc-primary-theme:#0877dc;--qc-primary-2:#0b5da8;--qc-teal:#0f8b82;
  --qc-good:#14745c;--qc-warn:#a7650b;--qc-bad:#ad2c22;--qc-shadow:0 8px 24px rgba(18,59,104,.07);
  color-scheme:light;
}
html[data-theme="dark"]{
  --qc-bg:#07182a;--qc-surface:#09213a;--qc-surface-2:#0b2945;--qc-ink:#f2f8fd;--qc-muted-theme:#a7bacb;
  --qc-line:#284c68;--qc-primary-theme:#168ce9;--qc-primary-2:#55b3ff;--qc-teal:#32c5b9;
  --qc-good:#4bd09e;--qc-warn:#ffc858;--qc-bad:#ff8b82;--qc-shadow:none;color-scheme:dark;
}
body{background:var(--qc-bg)!important;color:var(--qc-ink)!important;transition:background .18s ease,color .18s ease}
.main{max-width:none!important;width:auto!important;background:var(--qc-bg)!important;transition:background .18s ease}
#view{width:100%;max-width:none}
.card,.section,.task,.floor,.setting,.note-item,.panel,.login,.modalbox,.qc-office-card,.qc-office-toolbar,.qc-office-note,.qc-more-card{background:var(--qc-surface)!important;color:var(--qc-ink)!important;border-color:var(--qc-line)!important;box-shadow:var(--qc-shadow)!important}
.muted,.micro,.qc-office-card-meta,.qc-office-card-foot,.qc-office-savebar>span{color:var(--qc-muted-theme)!important}
.inp,input,select,textarea{background:var(--qc-surface)!important;color:var(--qc-ink)!important;border-color:var(--qc-line)!important}
.inp::placeholder,input::placeholder,textarea::placeholder{color:var(--qc-muted-theme)!important;opacity:.8}
.btn.soft{background:var(--qc-surface-2)!important;color:var(--qc-primary-2)!important}.btn.primary{background:var(--qc-primary-theme)!important;color:#fff!important}.btn.danger{background:color-mix(in srgb,var(--qc-bad) 12%,var(--qc-surface))!important;color:var(--qc-bad)!important}

/* First Aid inspired navigation */
.side{width:228px!important;padding:18px 12px 16px!important;background:linear-gradient(180deg,#07518f 0%,#063a70 40%,#08233f 100%)!important;border-left:1px solid rgba(112,178,232,.20);box-shadow:0 0 30px rgba(7,24,42,.10)}
.main{margin-right:228px!important}
.side h2{font-size:17px!important;margin:7px 8px 16px!important;color:#fff}.side #who{font-size:12.5px!important;color:#bfd3e5!important;margin-inline:8px}
.nav{gap:5px!important}.nav button{min-height:42px!important;padding:9px 11px!important;border:1px solid transparent!important;border-radius:10px!important;font-size:14px!important;font-weight:750!important;color:#dceaf5!important;transition:.16s ease}
.nav button:hover{background:rgba(17,115,202,.35)!important;color:#fff!important}.nav button.on{background:linear-gradient(90deg,rgba(15,126,224,.78),rgba(14,82,148,.82))!important;border-color:rgba(104,192,255,.38)!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)!important}

.top{min-height:64px;padding:7px 0 10px;border-bottom:1px solid color-mix(in srgb,var(--qc-line) 80%,transparent);margin-bottom:18px!important}.top h1{font-size:24px!important;color:var(--qc-ink)!important}.tools{align-items:center!important}.tools .btn{min-height:40px!important;padding:8px 12px!important;font-size:13.5px!important}
.qc-theme-toggle{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--qc-line);background:var(--qc-surface);color:var(--qc-ink);border-radius:10px;padding:8px 11px;min-height:40px;font-weight:800;cursor:pointer}.qc-theme-toggle .qc-theme-icon{font-size:17px;line-height:1}.qc-theme-toggle:hover{border-color:#8bb7db}

/* Dashboard fills the available desktop viewport */
@media(min-width:901px){
  .main{min-height:100vh!important;padding:22px 22px 34px!important}
  #view>.grid{width:100%}.section{width:100%}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .floors{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(min-width:1500px){.grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}.floors{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* Dark mode across legacy + new surfaces */
html[data-theme="dark"] .auth,html[data-theme="dark"] .mobile{background:var(--qc-bg)!important}
html[data-theme="dark"] .tabs,html[data-theme="dark"] .filterbar,html[data-theme="dark"] .filter,html[data-theme="dark"] .uploadbox,html[data-theme="dark"] .empty,html[data-theme="dark"] .old-status{background:var(--qc-surface-2)!important;border-color:var(--qc-line)!important;color:var(--qc-ink)!important}
html[data-theme="dark"] .tabs .on{background:#123b63!important;color:#fff!important;box-shadow:none!important}
html[data-theme="dark"] .kpi{background:var(--qc-surface)!important;border-color:var(--qc-line)!important;box-shadow:none!important}html[data-theme="dark"] .kpi>span:first-child{color:#c4d4e2!important}
html[data-theme="dark"] .floor{background:var(--qc-surface)!important}html[data-theme="dark"] .bar,html[data-theme="dark"] .qc-office-progress{background:#29445c!important}
html[data-theme="dark"] .status button,html[data-theme="dark"] .qc-office-choice button{background:var(--qc-surface-2)!important;color:#d5e2ec!important;border-color:var(--qc-line)!important}
html[data-theme="dark"] .status button.sel,html[data-theme="dark"] .qc-office-choice button.sel{color:inherit}
html[data-theme="dark"] .qc-office-kpis>div{background:var(--qc-surface)!important;border-color:var(--qc-line)!important;box-shadow:none!important}html[data-theme="dark"] .qc-office-kpis span{color:var(--qc-muted-theme)!important}html[data-theme="dark"] .qc-office-kpis b{color:#fff!important}
html[data-theme="dark"] .qc-office-item{background:var(--qc-surface)!important;border-color:var(--qc-line)!important;box-shadow:none!important}html[data-theme="dark"] .qc-office-item-label>span{background:#0e3f68!important;color:#77c5ff!important}
html[data-theme="dark"] .qc-office-code{background:#103b61!important;border-color:#285e85!important;color:#83c9ff!important}html[data-theme="dark"] .qc-office-edit{background:#12334f!important;color:#c6d8e7!important}
html[data-theme="dark"] .qc-office-savebar{background:rgba(9,33,58,.96)!important;border-color:var(--qc-line)!important;box-shadow:none!important}
html[data-theme="dark"] .qc-office-modal-box{background:var(--qc-surface)!important;color:var(--qc-ink)!important}html[data-theme="dark"] .qc-office-modal-close{background:var(--qc-surface-2)!important;color:var(--qc-ink)!important}
html[data-theme="dark"] .qc-office-status.notstarted{background:#263d52;color:#c5d5e2}html[data-theme="dark"] .qc-office-status.partial{background:#594512;color:#ffd875}html[data-theme="dark"] .qc-office-status.excellent{background:#0b4b39;color:#60d9ac}html[data-theme="dark"] .qc-office-status.good{background:#0d3e66;color:#83c9ff}html[data-theme="dark"] .qc-office-status.action{background:#522724;color:#ff9f97}

/* Completed work page */
.qc-done-shell{display:grid;gap:14px}.qc-done-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:19px 21px;border-radius:16px;background:linear-gradient(135deg,#07182a,#0a3154 58%,#07518f);color:#fff;border:1px solid #234d70}.qc-done-hero h2{margin:2px 0 4px;font-size:23px}.qc-done-hero p{margin:0;color:#c4d7e7;font-size:13.5px}.qc-done-date-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.qc-done-date-tools .inp{width:155px!important;background:#fff!important;color:#18334b!important}.qc-done-date-tools button{min-height:42px}
.qc-done-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.qc-done-kpis>div{background:var(--qc-surface);border:1px solid var(--qc-line);border-radius:13px;padding:13px 15px;box-shadow:var(--qc-shadow)}.qc-done-kpis span{display:block;color:var(--qc-muted-theme);font-size:12.5px;font-weight:750}.qc-done-kpis b{display:block;margin-top:3px;font-size:23px;color:var(--qc-ink)}.qc-done-kpis .bad{color:var(--qc-bad)}
.qc-done-list{display:grid;gap:9px}.qc-done-row{display:grid;grid-template-columns:110px minmax(180px,.9fr) minmax(240px,1.5fr) auto;align-items:center;gap:12px;padding:13px 15px;background:var(--qc-surface);border:1px solid var(--qc-line);border-radius:13px;box-shadow:var(--qc-shadow)}.qc-done-type{font-size:11.5px;font-weight:900;border-radius:999px;padding:5px 9px;text-align:center;background:var(--qc-surface-2);color:var(--qc-primary-2)}.qc-done-row h3{margin:0;font-size:15px;color:var(--qc-ink)}.qc-done-row p{margin:3px 0 0;font-size:12.5px;color:var(--qc-muted-theme)}.qc-done-state{font-size:12px;font-weight:900;border-radius:999px;padding:6px 9px;white-space:nowrap}.qc-done-state.excellent,.qc-done-state.completed{background:color-mix(in srgb,var(--qc-good) 13%,var(--qc-surface));color:var(--qc-good)}.qc-done-state.good{background:color-mix(in srgb,var(--qc-primary-theme) 13%,var(--qc-surface));color:var(--qc-primary-2)}.qc-done-state.action{background:color-mix(in srgb,var(--qc-bad) 13%,var(--qc-surface));color:var(--qc-bad)}.qc-done-state.progress,.qc-done-state.partial{background:color-mix(in srgb,var(--qc-warn) 14%,var(--qc-surface));color:var(--qc-warn)}.qc-done-empty{padding:38px 16px;text-align:center;border:1px dashed var(--qc-line);border-radius:14px;background:var(--qc-surface-2);color:var(--qc-muted-theme)}

@media(max-width:900px){
  .main{margin-right:0!important;max-width:none!important}.top{min-height:auto}.qc-theme-toggle{min-height:42px}
  .mobile{grid-template-columns:repeat(5,minmax(0,1fr))!important;background:var(--qc-surface)!important;border-color:var(--qc-line)!important}.mobile button{font-size:13px!important;color:var(--qc-muted-theme)!important}.mobile button.on{background:color-mix(in srgb,var(--qc-primary-theme) 12%,var(--qc-surface))!important;color:var(--qc-primary-theme)!important}
  .qc-done-hero{align-items:flex-start;flex-direction:column}.qc-done-date-tools{width:100%}.qc-done-date-tools .inp{flex:1;width:auto!important}.qc-done-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.qc-done-row{grid-template-columns:1fr auto;gap:7px}.qc-done-type{justify-self:start}.qc-done-row>div:nth-child(3){grid-column:1/-1}.qc-done-state{grid-column:2;grid-row:1}
}
@media(max-width:560px){.qc-theme-toggle .qc-theme-label{display:none}.qc-theme-toggle{width:42px;justify-content:center;padding:8px}.tools{width:100%}.qc-done-kpis{gap:8px}.qc-done-kpis>div{padding:11px 12px}.qc-done-kpis b{font-size:20px}.qc-done-date-tools button{flex:0 0 auto}.qc-done-row{padding:12px}.qc-done-hero h2{font-size:20px}}
