:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#142d23;background:#f4f7f4}*{box-sizing:border-box}body{margin:0}header{background:#123c2d;color:white;display:flex;justify-content:space-between;align-items:center;padding:18px max(20px,calc((100vw - 1120px)/2));gap:14px}.brand{font-size:24px;font-weight:850;letter-spacing:.03em}.brand span{color:#b9e3ac}small{color:#c8dacf}main{max-width:1120px;margin:24px auto;padding:0 18px}.narrow{max-width:420px;margin:60px auto}.panel,.case,.metric{background:white;border:1px solid #e1e9e1;border-radius:15px;padding:20px;box-shadow:0 2px 10px #183d2211}h1{font-size:1.8rem;margin:4px 0 9px}h2{font-size:1.15rem}p{line-height:1.45}.muted{color:#67786e}.error{color:#a12929}.tabs{display:flex;gap:7px;overflow:auto;padding-bottom:16px}.tabs button{white-space:nowrap;background:#e9f0ea;color:#214632}.tabs button.selected{background:#174f39;color:white}button,.btn{background:#166143;color:white;display:inline-flex;justify-content:center;align-items:center;border:none;border-radius:9px;padding:11px 15px;font-weight:700;cursor:pointer;font:inherit;text-decoration:none}button:disabled{opacity:.5;cursor:not-allowed}.outline{background:white;color:#166143;border:1px solid #67977d}button:hover,.btn:hover{filter:brightness(.96)}label{display:flex;flex-direction:column;gap:7px;font-weight:650;font-size:.92rem;margin:12px 0}input,select,textarea{border:1px solid #cbd8cd;border-radius:8px;padding:12px;font:inherit;max-width:100%;background:white;color:#152c23}input:focus,select:focus{outline:2px solid #6ea788}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.fields label{min-width:0}.cardgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}.case{padding:16px;display:flex;flex-direction:column;gap:10px}.case h3{margin:0 0 4px;font-size:1.08rem}.case p{margin:3px 0;font-size:.9rem}.cardhead,.between{display:flex;justify-content:space-between;gap:8px;align-items:center}.badge{display:inline-block;border-radius:20px;padding:5px 9px;background:#e9eff0;color:#335460;font-size:.77rem;font-weight:800}.badge.red{background:#ffdee0;color:#8d242e}.badge.orange{background:#fff0d1;color:#80541b}.badge.green{background:#dff5e6;color:#12633a}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metric .number{font-size:2rem;font-weight:850}.metric small{color:#53685c}.toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.toolbar input{flex:2;min-width:170px}.toolbar select{flex:1;min-width:130px}.preview{display:block;max-width:100%;max-height:260px;margin:10px 0;border-radius:9px}.notice{background:#e8f0e6;padding:12px;border-radius:8px;margin:12px 0}.casePhoto{max-width:100%;height:180px;object-fit:contain;background:#f5f5f5;border-radius:8px}.actions{display:flex;flex-wrap:wrap;gap:8px}.actions button{padding:8px;font-size:.84rem}#toast:not(:empty){position:fixed;right:15px;bottom:15px;padding:15px;background:#142f26;color:white;border-radius:10px;max-width:360px;box-shadow:0 8px 26px #0003}.line{padding:12px;border-bottom:1px solid #e0eae2}.line:last-child{border:0}.admin,.supervisor{display:none}@media(max-width:700px){header{padding:15px}main{margin:14px auto}.fields,.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:15px}.kpis{gap:7px}.metric{padding:11px}.metric .number{font-size:1.55rem}.cardgrid{grid-template-columns:1fr}}@media(max-width:380px){.fields{grid-template-columns:1fr}}

.header-tools{display:flex;align-items:center;gap:14px}.bell{background:#286b4c;padding:9px}.unread{background:#f0f8ed}.modal:not([hidden]){position:fixed;inset:0;background:#001a1099;z-index:10;display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}.action-dialog{width:min(650px,100%);max-height:95vh;overflow:auto}.close{float:right}#actionForm label{margin-bottom:10px}.tabs .supervisor{display:none}button:focus-visible{outline:3px solid #f3c65e}

/* VIKMARKET V2.2 official visual identity — progressive enhancement. */
:root{--vik-green:#108d47;--vik-deep:#00483e;--vik-teal:#006d67;--vik-line:#dce8e2;--vik-bg:#f5f8fa;color:#1b2933;background:var(--vik-bg)}
html{scroll-behavior:smooth}
body{background:var(--vik-bg)}
[hidden]{display:none!important}
.topbar{position:sticky;top:0;z-index:8;background:linear-gradient(110deg,#fff 60%,#edf9f2 100%);border-bottom:1px solid #ddebe5;color:#122d29;box-shadow:0 3px 18px #0a514810;padding:10px clamp(16px,3vw,42px);min-height:92px}
.topbrand{display:flex;align-items:center;gap:18px}
.header-logo{width:74px;height:74px;object-fit:contain;border-radius:50%}
.brand-text{display:flex;flex-direction:column;gap:2px}
.brand{font-size:clamp(21px,2.2vw,32px);letter-spacing:.015em;font-weight:900;color:#007a43}
.brand span{display:inline-block;background:linear-gradient(120deg,#18a65c,#056963);padding:2px 10px;border-radius:9px;color:white;font-size:.84em}
.brand-text small{font-size:14px;color:#687a75}
.header-tools{gap:16px}
.topdate{font-size:.88rem;font-weight:750;color:#556c68;white-space:nowrap}
.bell{background:#fff;color:#006546;border:1px solid #d3e4da;border-radius:12px}
#identity{color:#174335;font-weight:750;font-size:14px}
#identity .outline{margin-left:8px;padding:8px 10px}
main{max-width:none;width:100%;margin:0;padding:0}
#appPage{width:100%}
.app-layout{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:calc(100vh - 92px)}
.sidebar{display:flex;flex-direction:column;gap:5px;overflow:visible;position:sticky;top:92px;align-self:start;height:calc(100vh - 92px);min-height:490px;padding:22px 11px;background:linear-gradient(155deg,#003c3a 0%,#00665b 75%,#07744b 100%);box-shadow:6px 0 20px #174d4420}
.sidebar-brand{color:white;display:flex;align-items:center;gap:9px;padding:1px 6px 20px;font-size:16px;letter-spacing:.025em}
.sidebar-logo{width:43px;height:43px;border-radius:50%;background:#fff}
.sidebar button,.tabs.sidebar .supervisor{font-size:.95rem;text-align:left;display:flex;align-items:center;justify-content:flex-start;gap:13px;width:100%;min-height:45px;border-radius:11px;color:#eafcf5;background:transparent;padding:10px 12px;font-weight:700;white-space:normal}
.sidebar button:hover{background:#ffffff18;filter:none}
.sidebar button.selected{background:linear-gradient(110deg,#20ae4a,#087a75);color:white;box-shadow:0 5px 15px #003e3b33}
.sidebar .navicon{display:inline-flex;align-items:center;justify-content:center;font-size:23px;line-height:1;width:24px;min-width:24px;font-weight:600}
.workspace{padding:25px clamp(16px,2.2vw,36px) 46px;min-width:0}
.page{min-width:0}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}
.page-heading h1{font-size:clamp(24px,2.25vw,31px);font-weight:850;margin:0 0 5px}
.page-heading p{margin:0}
.date-pill{white-space:nowrap;padding:12px 16px;border-radius:12px;border:1px solid #d8e4df;background:white;color:#425b52;box-shadow:0 2px 9px #12422911;font-size:.85rem;font-weight:600}
.workspace .panel,.workspace .case,.workspace .metric{border:1px solid #e0e8e5;box-shadow:0 3px 16px #234b4310;border-radius:16px}
.kpis{gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin:17px 0 25px}
.metric{display:flex;align-items:center;gap:14px;padding:20px 14px;border-left:4px solid #0fa258!important;min-height:116px;background:linear-gradient(130deg,#fff,#f0fbf4)}
.metric .metric-icon{width:47px;height:47px;min-width:47px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:26px;background:#ddf6e1;color:#09834d}
.metric .number{font-size:2rem;line-height:1.2;margin-top:3px;color:#123830}
.metric small{display:block;color:#344b43;font-weight:750;font-size:.8rem;line-height:1.4}
.metric-orange{border-left-color:#e9a112!important;background:linear-gradient(130deg,#fff,#fff8ed)}
.metric-orange .metric-icon{background:#fff2d9;color:#c87c00}
.metric-blue{border-left-color:#2584cd!important;background:linear-gradient(130deg,#fff,#f0f8ff)}
.metric-blue .metric-icon{background:#e2f2ff;color:#1372bd}
.metric-teal{border-left-color:#039c85!important}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(275px,330px);gap:18px;align-items:start}
.dashboard-columns .panel{padding:20px}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-title h2,.status-panel h2{font-size:1.18rem;margin:0 0 15px}
.section-title button{white-space:nowrap}
.next-expiries{min-width:0}
.table-scroll{overflow-x:auto}
.expiry-table{border-collapse:collapse;width:100%;font-size:.89rem;min-width:585px}
.expiry-table th{background:#eff3f5;text-align:left;font-size:.78rem;color:#374d56;padding:13px 11px}
.expiry-table td{border-bottom:1px solid #e8eff0;padding:13px 11px;vertical-align:middle}
.expiry-table tr:hover td{background:#f7fcf9}
.dash-aside{display:grid;gap:16px}
.drive-status{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--vik-line);padding:15px 0}
.detail-note{font-size:.78rem}
.status-panel .outline{margin-top:6px;width:100%}
.registered-section{margin-top:27px}
.registered-section .section-title h2{margin:0}
.workspace .toolbar{margin-top:15px}
.workspace .case{padding:18px}
.workspace h1{color:#193c34}
#loginPage{max-width:430px;margin:55px auto;padding:28px;text-align:center}
.login-logo{width:114px;height:114px;margin:0 auto 15px;border-radius:50%;display:block}
#loginPage h1{font-size:1.5rem;margin-bottom:4px;color:#006946}
#loginPage h2{font-size:1.12rem;font-weight:650;color:#53625b;margin-top:4px}
#loginPage label{text-align:left}
#loginPage form button{width:100%;margin-top:12px}
a:focus-visible,button:focus-visible{outline:3px solid #ffca62;outline-offset:2px}
@media(max-width:1120px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-columns{grid-template-columns:1fr}.dash-aside{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.topbar{min-height:77px;padding:10px 15px}.header-logo{width:51px;height:51px}.topbrand{gap:10px}.brand{font-size:19px}.brand-text small{font-size:11px}.topdate{display:none}.app-layout{display:block}.sidebar{position:sticky;top:77px;z-index:6;height:auto;min-height:0;padding:9px 12px;display:flex;flex-direction:row;overflow-x:auto;gap:8px;box-shadow:0 6px 12px #0002}.sidebar-brand{display:none}.sidebar button,.tabs.sidebar .supervisor{flex:0 0 auto;width:auto;white-space:nowrap;padding:9px 12px;font-size:.78rem;min-height:38px}.sidebar .navicon{font-size:17px;min-width:17px;width:17px}.workspace{padding:19px 13px 36px}.page-heading{align-items:start;flex-direction:column}.date-pill{font-size:.77rem;padding:8px 10px}.dash-aside{grid-template-columns:1fr}.kpis{gap:9px}.metric{padding:14px 10px;gap:8px;min-height:94px}.metric .metric-icon{min-width:37px;width:37px;height:37px;font-size:20px}.metric small{font-size:.73rem}.metric .number{font-size:1.65rem}.header-tools{gap:8px}#identity{font-size:12px}}
@media(max-width:450px){.topbar{gap:5px}.header-logo{width:44px;height:44px}.brand{font-size:16px}.brand-text small{font-size:10px}.bell{padding:6px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.metric .number{font-size:1.45rem}.dashboard-columns .panel{padding:14px}.section-title h2{font-size:1rem}.section-title button{padding:8px;font-size:.82rem}#identity small{display:none}}


/* V2.2 visual refinement 2026-11-17 — appearance only */
.topbar{min-height:99px;padding-block:8px}
.header-logo{width:86px;height:86px;object-fit:contain;filter:drop-shadow(0 3px 4px #004b3220)}
.topbrand{gap:17px}
.brand{font-weight:900;letter-spacing:.006em}
.brand-text small{color:#58716b;font-size:14px;font-weight:500}
.app-layout{grid-template-columns:232px minmax(0,1fr);min-height:calc(100vh - 99px)}
.sidebar{top:99px;height:calc(100vh - 99px);padding:20px 10px 14px;gap:3px}
.sidebar-brand{padding:0 8px 15px}
.sidebar-logo{width:49px;height:49px}
.sidebar button,.tabs.sidebar .supervisor{gap:11px;min-height:43px;font-size:.92rem;font-weight:670}
.sidebar .navicon{width:23px;height:23px;min-width:23px;display:inline-flex;align-items:center;justify-content:center}
.sidebar .navicon svg{width:21px;height:21px;display:block;flex:none}
.workspace{padding:21px clamp(14px,1.8vw,30px) 32px}
.page-heading{margin-bottom:12px}
.page-heading h1{font-size:clamp(25px,2.2vw,30px);letter-spacing:-.02em;display:flex;align-items:center;gap:9px}
.heading-icon,.section-icon{color:#078b59}
.page-heading p{font-size:.94rem}
.kpis{margin:14px 0 17px;gap:12px}
.metric{min-height:100px;padding:14px 14px;gap:10px}
.metric .metric-icon{width:43px;height:43px;min-width:43px;font-size:23px}
.metric .number{font-size:1.9rem}
.metric small{font-size:.83rem}
.dashboard-columns{gap:14px;grid-template-columns:minmax(0,1fr) minmax(280px,320px)}
.dashboard-columns .panel{padding:17px}
.section-title h2,.status-panel h2{font-size:1.15rem;letter-spacing:-.01em;margin-bottom:11px}
.expiry-table{font-size:.88rem}
.expiry-table th{padding:11px 10px;font-weight:750}
.expiry-table td{padding:12px 10px}
.registered-section{margin-top:15px}
.registered-section .section-title{align-items:center}
.registered-section .section-title h2{font-size:1.1rem}
.registered-section .section-title p{margin:0;font-size:.8rem}
.dash-aside{gap:12px}
.status-panel:first-child{background:linear-gradient(155deg,#fff 54%,#f0fbf5 100%);border-color:#bee5cf;box-shadow:0 4px 18px #087a4520}
.drive-status{border-top:1px solid #d5ebde;padding:12px 0 9px}
.drive-name{display:inline-flex;align-items:center;gap:9px;font-size:1rem;color:#123e30}
.drive-mark{width:29px;height:29px;border-radius:8px;background:linear-gradient(140deg,#16ae51,#006c62);color:#fff;display:inline-grid;place-items:center;font-size:18px;font-weight:900}
.status-panel #backupStatusBadge{font-size:.78rem;padding:7px 11px}
.status-panel #backupStatusBadge.green{background:#d3f2dc;color:#086436}
.status-panel #backupStatusBadge.orange{background:#fff0d1;color:#80541b}
.backup-summary{color:#285548;font-size:.91rem;line-height:1.4;font-weight:690;margin:8px 0}
.backup-when{border-top:1px solid #deeee5;padding-top:10px;margin:7px 0 2px;font-size:.79rem;color:#527267}
.status-panel p{line-height:1.43}
#identity .outline{border-radius:10px}
.workspace input,.workspace select,.workspace textarea{font-size:.95rem}
.workspace button,.workspace .btn{font-weight:670}
#loginPage .login-logo{width:128px;height:128px}
@media(max-width:1120px){.dashboard-columns{grid-template-columns:minmax(0,1fr) minmax(255px,305px)}}
@media(max-width:940px){.dashboard-columns{grid-template-columns:1fr}.dash-aside{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.topbar{min-height:80px;padding:8px 12px}.header-logo{width:58px;height:58px}.app-layout{display:block}.sidebar{top:80px;min-height:0;height:auto;padding:7px 10px;gap:7px}.sidebar button,.tabs.sidebar .supervisor{min-height:39px;gap:7px;font-size:.78rem}.sidebar .navicon,.sidebar .navicon svg{width:19px;height:19px;min-width:19px}.workspace{padding:15px 12px 25px}.page-heading{margin-bottom:11px}.kpis{margin:12px 0 15px;gap:9px}.metric{min-height:93px;padding:11px;gap:8px}.dashboard-columns .panel{padding:14px}.registered-section{margin-top:15px}}
@media(max-width:560px){.dash-aside{grid-template-columns:1fr}.section-title{flex-wrap:wrap}.topbrand{gap:9px}.topdate{display:none}.header-logo{width:49px;height:49px}.metric small{font-size:.74rem}.metric .number{font-size:1.6rem}.metric .metric-icon{width:36px;height:36px;min-width:36px;font-size:19px}.expiry-table th,.expiry-table td{padding:9px 8px}.brand{font-size:17px}}

/* Administración segura de usuarios V2.2 */
.user-management{margin-top:17px}
.user-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.user-row p{margin:5px 0;font-size:.88rem}
.user-row .actions{justify-content:flex-end}
.user-row .actions button{padding:9px 11px;font-size:.84rem}
.user-row .actions button:disabled{opacity:.5}
.user-dialog{width:min(480px,100%);max-height:90vh;overflow-y:auto}
.user-dialog h2{padding-right:85px}
.user-dialog form{clear:both}
.user-dialog form button[type=submit]{width:100%;margin-top:8px}
.user-dialog .error{min-height:1.2em}
@media(max-width:720px){.user-row{align-items:stretch;flex-direction:column}.user-row .actions{justify-content:flex-start}.user-row .actions button{flex:1}}
