/* V6.0 · Admin workspace redesign — presentation only, no Worker/API changes. */
.ksnb-admin-mode .hero{display:none!important}
.ksnb-admin-mode .main{min-width:0}
.ksnb-admin-mode .topbar{margin-bottom:15px}
.ksnb-admin-mode .breadcrumb #breadcrumbSection{color:#155fae}
#adminPanel{--adm-ink:#16314f;--adm-muted:#607794;--adm-line:#dbe6f3;--adm-white:#fff;--adm-bg:#f5f9fe;--adm-strong:#1557a3;--adm-pale:#ebf4ff;--adm-shade:#f2f7fd;max-width:1560px;margin:0 auto 36px;color:var(--adm-ink)}
#adminPanel *,#adminPanel *::before,#adminPanel *::after{box-sizing:border-box}
#adminPanel .adm60-banner{background:linear-gradient(109deg,#103565 0%,#15579f 58%,#169ac0 100%);color:white;border-radius:18px;padding:23px 27px;position:relative;overflow:hidden;box-shadow:0 10px 28px #153e7419}
#adminPanel .adm60-banner::after{content:'';pointer-events:none;position:absolute;width:270px;height:270px;right:19%;top:-195px;border:1px solid #ffffff2d;border-radius:50%}
#adminPanel .adm60-banner-inner{display:flex;justify-content:space-between;align-items:center;gap:18px;position:relative;z-index:1}
#adminPanel .adm60-kicker{font-size:10px;letter-spacing:.13em;font-weight:850;display:flex;align-items:center;gap:8px;color:#bfe9ff}
#adminPanel .adm60-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#75dcba;box-shadow:0 0 0 4px #ffffff15}
#adminPanel .adm60-banner h1{font-size:27px;line-height:1.15;color:white;font-weight:840;letter-spacing:-.025em;margin:8px 0 6px}
#adminPanel .adm60-banner p{font-size:13px;color:#e2f2ff;line-height:1.5;margin:0;max-width:650px}
#adminPanel .adm60-head-actions{display:flex;align-items:center;gap:9px;flex-shrink:0}
#adminPanel .adm60-permission{border:1px solid #ffffff56;border-radius:9px;background:#ffffff1a;color:white;white-space:nowrap;padding:10px 12px;font-size:12px;font-weight:740}
#adminPanel .adm60-permission span{color:#8febc6;padding-right:5px}
#adminPanel .adm60-refresh{appearance:none;border:1px solid #ffffff69;background:#ffffffee;color:#184b86;padding:10px 13px;border-radius:9px;min-height:41px;font-weight:780;font-size:12px;cursor:pointer;white-space:nowrap}
#adminPanel .adm60-refresh:hover{background:#fff}
#adminPanel .adm60-refresh:disabled{opacity:.6;cursor:wait}
#adminPanel .adm60-refresh:focus-visible{outline:3px solid #84d3ff;outline-offset:2px}
#adminPanel .adm60-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 15px}
#adminPanel .adm60-stat{display:flex;align-items:center;gap:14px;min-width:0;padding:15px 17px;background:var(--adm-white);border:1px solid var(--adm-line);border-radius:13px;box-shadow:0 3px 13px #173f6810;min-height:90px}
#adminPanel .adm60-stat-icon{display:grid;place-items:center;width:43px;height:43px;flex-shrink:0;border-radius:11px;background:#e8f3ff;color:#1765a8;font-size:23px;font-weight:850}
#adminPanel .adm60-stat-icon.ico-debt{background:#fff4e5;color:#ae701e}
#adminPanel .adm60-stat-icon.ico-publish{background:#e7f7f2;color:#18785b}
#adminPanel .adm60-stat>div:last-child{display:flex;flex-direction:column;min-width:0;gap:4px}
#adminPanel .adm60-stat span{font-size:12px;color:var(--adm-muted);font-weight:700}
#adminPanel .adm60-stat strong{color:var(--adm-ink);font-size:19px;line-height:1.2;font-weight:860;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#adminPanel .adm60-stat small{font-size:11px;color:var(--adm-muted);line-height:1.35;overflow-wrap:anywhere}
#adminPanel .adm60-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;border:0;background:transparent;margin:0 0 15px}
#adminPanel .adm60-tab{appearance:none;cursor:pointer;text-align:left;background:var(--adm-white);border:1px solid var(--adm-line);display:flex;align-items:center;gap:11px;min-width:0;min-height:69px;padding:12px 13px;border-radius:12px;color:var(--adm-ink);position:relative;transition:background .15s,border-color .15s,box-shadow .15s}
#adminPanel .adm60-tab:hover{border-color:#9dc2e9;background:var(--adm-pale)}
#adminPanel .adm60-tab:focus-visible{outline:3px solid #399fe7;outline-offset:2px}
#adminPanel .adm60-tab[aria-selected="true"]{border-color:#1764b3;background:var(--adm-pale);box-shadow:inset 0 -3px 0 #1764b3,0 4px 15px #135aa315}
#adminPanel .adm60-tab-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;color:#2464a5;background:#eaf3fc;flex-shrink:0;font-size:19px}
#adminPanel .adm60-tab[aria-selected="true"] .adm60-tab-icon{background:#1c68b5;color:white}
#adminPanel .adm60-tab-text{display:flex;flex-direction:column;gap:4px;min-width:0}
#adminPanel .adm60-tab-text strong{font-size:13px;line-height:1.25;font-weight:810;white-space:normal}
#adminPanel .adm60-tab-text small{font-size:11px;line-height:1.35;color:var(--adm-muted);white-space:normal}
#adminPanel .adm60-panel{border:1px solid var(--adm-line);border-radius:16px;background:var(--adm-white);padding:23px 25px;box-shadow:0 8px 25px #1d4e7612;min-width:0}
#adminPanel .adm60-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
#adminPanel .adm60-eyebrow{font-size:10px;letter-spacing:.1em;color:#1c6aad;font-weight:850}
#adminPanel .adm60-panel-heading h2{font-size:22px;line-height:1.25;letter-spacing:-.025em;color:var(--adm-ink);font-weight:850;margin:5px 0 5px}
#adminPanel .adm60-panel-heading p{color:var(--adm-muted);font-size:13px;line-height:1.55;margin:0;max-width:660px}
#adminPanel .adm60-export{font-size:12px;font-weight:770;flex-shrink:0;min-height:41px;padding:10px 15px;background:var(--adm-bg);border:1px solid #c4d8ed;color:#1d558d;box-shadow:none}
#adminPanel .adm60-export:disabled{opacity:.55;cursor:not-allowed}
#adminPanel .adm60-panel-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(295px,.8fr);gap:16px}
#adminPanel .adm60-form-card{background:var(--adm-bg);border:1px solid var(--adm-line);border-radius:12px;padding:20px;min-width:0}
#adminPanel .adm60-step{display:flex;align-items:center;gap:10px;margin-bottom:12px}
#adminPanel .adm60-step>span{display:grid;place-items:center;flex:none;width:29px;height:29px;border-radius:9px;background:#e3effb;color:#1e67a9;font-weight:900;font-size:12px}
#adminPanel .adm60-step div{display:flex;flex-direction:column;gap:3px}
#adminPanel .adm60-step strong{font-size:14px;font-weight:830;color:var(--adm-ink)}
#adminPanel .adm60-step small{font-size:11.5px;line-height:1.4;color:var(--adm-muted)}
#adminPanel .adm60-step-second{margin-top:18px;margin-bottom:12px}
#adminPanel .adm60-file-zone{position:relative;display:flex;align-items:center;gap:15px;min-height:82px;cursor:pointer;background:var(--adm-white);border:1.5px dashed #a8c4df;border-radius:11px;padding:13px 16px;overflow:hidden;color:var(--adm-ink);font-weight:normal}
#adminPanel .adm60-file-zone:focus-within{outline:3px solid #67b6ed;outline-offset:2px}
#adminPanel .adm60-file-zone:hover{border-color:#348bd0;background:var(--adm-pale)}
#adminPanel .adm60-file-zone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}
#adminPanel .adm60-file-ico{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;background:#e5f1ff;color:#2369b0;font-size:23px;border-radius:11px}
#adminPanel .adm60-file-zone>span:last-child{display:flex;flex-direction:column;gap:5px;min-width:0}
#adminPanel .adm60-file-zone strong{font-size:13px;color:var(--adm-ink);font-weight:800}
#adminPanel .adm60-file-zone small{font-size:12px;color:var(--adm-muted);overflow-wrap:anywhere;line-height:1.35}
#adminPanel .adm60-primary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:43px;padding:11px 18px;border-radius:10px;font-weight:830;font-size:13px;color:#fff;background:linear-gradient(105deg,#144b92,#1675bc);border:1px solid #1760a0;box-shadow:0 4px 10px #12508c21;white-space:normal}
#adminPanel .adm60-primary span:last-child{font-size:16px;line-height:1}
#adminPanel .adm60-primary:hover{filter:brightness(1.07)}
#adminPanel #staffProgress{display:block;width:100%;max-width:100%;height:7px;margin-top:14px;accent-color:#1869b8}
#adminPanel .adm60-context-card{min-width:0;background:var(--adm-white);border:1px solid var(--adm-line);border-radius:12px;padding:19px 20px}
#adminPanel .adm60-context-kicker{display:block;color:#1970a5;font-size:10px;letter-spacing:.09em;font-weight:850;margin-bottom:7px}
#adminPanel .adm60-context-status{display:block;line-height:1.5;font-size:14px;font-weight:780;overflow-wrap:anywhere;color:var(--adm-ink)}
#adminPanel .adm60-context-divider{height:1px;background:var(--adm-line);margin:14px 0}
#adminPanel .adm60-context-card>p{display:flex;align-items:flex-start;gap:9px;color:var(--adm-muted);font-size:12px;line-height:1.55;margin:0 0 12px}
#adminPanel .adm60-context-card>p span{color:#16806b;font-size:13px;font-weight:850}
#adminPanel .adm60-context-card>p b{color:var(--adm-ink)}
#adminPanel .adm60-feedback{margin-top:15px;padding:12px 14px;border:1px solid #d3e4f4;border-left:3px solid #4c94c5;border-radius:8px;background:var(--adm-bg);color:var(--adm-muted);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
#adminPanel .adm60-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:17px 0}
#adminPanel .adm60-fields label,#adminPanel .adm60-report-date{display:flex;flex-direction:column;gap:8px;color:var(--adm-ink);font-size:12px;font-weight:790;min-width:0}
#adminPanel .adm60-fields select,#adminPanel .adm60-fields input[type=date],#adminPanel .adm60-report-date input{appearance:auto;background:var(--adm-white);color:var(--adm-ink);border:1px solid #bfd3e5;border-radius:8px;min-height:41px;padding:7px 10px;width:100%;font-size:12px;max-width:100%;font-weight:550}
#adminPanel .adm60-rule-details{margin-top:16px;border-top:1px solid var(--adm-line);padding-top:13px;font-size:12px;line-height:1.55;color:var(--adm-muted)}
#adminPanel .adm60-rule-details summary{font-size:12px;font-weight:800;color:#28659e;cursor:pointer}
#adminPanel .adm60-rule-details p{margin:9px 0 0}
#adminPanel .adm60-caution{display:flex;align-items:flex-start;gap:11px;border:1px solid #f0d4a4;background:#fffaee;color:#876018;padding:12px 14px;border-radius:10px;margin-bottom:16px;font-size:12px;line-height:1.55}
#adminPanel .adm60-caution>span:first-child{background:#e4a638;color:#fff;width:20px;height:20px;border-radius:50%;text-align:center;line-height:20px;flex:none;font-size:13px;font-weight:900}
#adminPanel .adm60-report-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:15px}
#adminPanel .adm60-report-form h3{color:var(--adm-ink);font-size:15px;margin:0 0 17px;font-weight:830}
#adminPanel .adm60-report-date{margin:16px 0}
#adminPanel #progressBar{display:block;width:100%;height:7px;accent-color:#1c65ac;margin-top:16px}
#adminPanel .adm60-note{display:block;font-size:12px;color:var(--adm-muted);line-height:1.6;margin-top:10px;overflow-wrap:anywhere}
#adminPanel .adm60-report-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#adminPanel .adm60-report-facts>div{background:var(--adm-white);border:1px solid var(--adm-line);padding:13px;border-radius:10px;min-width:0}
#adminPanel .adm60-report-facts small{display:block;letter-spacing:.04em;color:var(--adm-muted);font-size:10px;font-weight:800;margin-bottom:7px}
#adminPanel .adm60-report-facts strong{font-size:13px;line-height:1.45;color:var(--adm-ink);overflow-wrap:anywhere;display:block}
#adminPanel .adm60-report-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
#adminPanel .adm60-report-actions button{font-weight:780;min-height:41px;font-size:12px}
#adminPanel .adm60-report-checks{margin-top:14px;color:var(--adm-muted);font-size:12px;line-height:1.5}
#adminPanel .adm60-history{margin-top:15px;padding:12px 14px;background:var(--adm-white);border:1px solid var(--adm-line);border-radius:9px;color:var(--adm-ink)}
#adminPanel .adm60-history summary{cursor:pointer;font-size:12px;font-weight:820}
#adminPanel .adm60-history ul{max-height:260px;overflow:auto;padding-left:18px;margin:12px 0 0;font-size:12px;line-height:1.6}
#adminPanel .adm60-footnote{font-size:11px;line-height:1.5;color:var(--adm-muted);text-align:left;padding:12px 2px 2px}
/* Existing accounting component — reorganized only visually. */
#adminPanel .admin-account-panel{margin:0;box-shadow:0 8px 25px #1d4e7612;max-width:100%}
#adminPanel .admin-account-head h2{font-size:21px}
#adminPanel .admin-account-filters{gap:12px}
#adminPanel .admin-account-table{overflow:auto;max-height:65vh}
/* Existing global button defaults have smaller type; the admin workspace gets legible controls. */
#adminPanel button,#adminPanel input,#adminPanel select{font-family:inherit}
#adminPanel input:focus-visible,#adminPanel select:focus-visible,#adminPanel button:focus-visible{outline:3px solid #79bef1;outline-offset:2px}
/* Application dark mode is attached to #app, not body. */
.dark #adminPanel{--adm-ink:#e6f0ff;--adm-muted:#bacbe0;--adm-line:#355371;--adm-white:#142b44;--adm-bg:#1a344f;--adm-strong:#a7d4ff;--adm-pale:#254866;--adm-shade:#1d3b58}
.dark #adminPanel .adm60-banner{background:linear-gradient(110deg,#0d2746,#144575 65%,#146c89)}
.dark #adminPanel .adm60-stat-icon.ico-staff,.dark #adminPanel .adm60-tab-icon{background:#315a7e;color:#c2e6ff}
.dark #adminPanel .adm60-stat-icon.ico-debt{background:#544127;color:#ffd592}
.dark #adminPanel .adm60-stat-icon.ico-publish{background:#1a5146;color:#b0eedb}
.dark #adminPanel .adm60-tab[aria-selected=true] .adm60-tab-icon{background:#2274af;color:white}
.dark #adminPanel .adm60-export{background:#213d5b;color:#d1e9ff;border-color:#416384}
.dark #adminPanel .adm60-file-ico{background:#2e5377;color:#b4dcff}
.dark #adminPanel .adm60-step>span{background:#2d5678;color:#cae6ff}
.dark #adminPanel .adm60-context-kicker,.dark #adminPanel .adm60-eyebrow{color:#98d2fa}
.dark #adminPanel .adm60-caution{background:#43351e;border-color:#735b36;color:#ffdfaa}
.dark #adminPanel .adm60-caution>span:first-child{background:#c18c31}
.dark #adminPanel .adm60-rule-details summary{color:#a7d4ff}
.dark #adminPanel .adm60-fields select,.dark #adminPanel .adm60-fields input[type=date],.dark #adminPanel .adm60-report-date input{border-color:#446786}
@media (max-width:1200px){#adminPanel .adm60-banner{padding:21px 22px}#adminPanel .adm60-tab{padding:10px}#adminPanel .adm60-tab-icon{width:31px;height:31px}#adminPanel .adm60-tab-text small{font-size:10.5px}#adminPanel .adm60-panel-grid{grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)}}
@media (max-width:950px){#adminPanel .adm60-banner-inner{align-items:flex-start}#adminPanel .adm60-head-actions{align-items:flex-end;flex-direction:column}#adminPanel .adm60-stats{gap:8px}#adminPanel .adm60-stat{padding:13px 12px;gap:10px}#adminPanel .adm60-tab-icon{display:none}#adminPanel .adm60-panel-grid{grid-template-columns:1fr}#adminPanel .adm60-context-card{padding:15px}#adminPanel .adm60-report-grid{grid-template-columns:1fr}}
@media (max-width:740px){#adminPanel .adm60-banner{padding:19px}#adminPanel .adm60-banner-inner{display:block}#adminPanel .adm60-banner h1{font-size:24px}#adminPanel .adm60-head-actions{margin-top:14px;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap}#adminPanel .adm60-stats{grid-template-columns:1fr}#adminPanel .adm60-stat{min-height:73px}#adminPanel .adm60-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#adminPanel .adm60-tab{min-height:68px}#adminPanel .adm60-panel{padding:17px 15px}#adminPanel .adm60-panel-heading{align-items:flex-start;flex-direction:column}#adminPanel .adm60-export{width:100%}#adminPanel .adm60-fields{grid-template-columns:1fr}#adminPanel .adm60-report-facts{grid-template-columns:1fr}#adminPanel .adm60-primary{width:100%}#adminPanel .adm60-report-actions button{flex:1}}
@media (max-width:440px){#adminPanel .adm60-banner p{font-size:12px}#adminPanel .adm60-tab-text strong{font-size:12px}#adminPanel .adm60-tab-text small{font-size:10px}#adminPanel .adm60-stat strong{font-size:17px}#adminPanel .adm60-form-card{padding:14px}#adminPanel .adm60-file-zone{padding:12px;gap:10px}#adminPanel .adm60-file-ico{width:35px;height:35px}#adminPanel .adm60-head-actions{gap:7px}#adminPanel .adm60-permission,#adminPanel .adm60-refresh{font-size:11px}}
/* A return link replaces nonfunctional sidebar navigation in narrow admin layouts. */
.adm60-back{display:none}
.ksnb-admin-mode .adm60-back{display:inline-flex;text-decoration:none;font-size:12px;font-weight:750;color:#1767aa;align-items:center;min-height:30px;margin-left:12px}
.ksnb-admin-mode .adm60-back:hover{text-decoration:underline}
@media(max-width:850px){
 .ksnb-admin-mode .sidebar{display:none!important}
 .ksnb-admin-mode #app{display:block!important;min-width:0!important;width:100%!important}
 .ksnb-admin-mode .main{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
 .ksnb-admin-mode .topbar{gap:10px;flex-wrap:wrap}
 .ksnb-admin-mode #adminPanel{max-width:100%;min-width:0}
}
@media(max-width:560px){
 .ksnb-admin-mode .topbar{padding:12px 14px!important}
 .ksnb-admin-mode .topbar .breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:6px;line-height:1.4}
 .ksnb-admin-mode .adm60-back{margin-left:0}
 .ksnb-admin-mode #adminPanel{padding:0!important}
}
/* Don't show an empty native progress bar until an import actually advances. */
#adminPanel #staffProgress[value="0"],#adminPanel #progressBar[value="0"]{display:none}
