:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#1e293b;background:#f6f8fb;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a{transition:background .15s,color .15s,border .15s}button{cursor:pointer}a{text-decoration:none;color:inherit}[hidden]{display:none!important}.topbar{background:#fff;border-bottom:1px solid #e5eaf0}.top-inner{max-width:1260px;margin:auto;padding:17px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{font-size:17px;font-weight:750;display:flex;align-items:center;gap:11px}.brand small{font-size:10px;color:#94a3b8;margin-left:6px}.brand-icon{background:#ecfdf3;color:#059669;width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:26px;margin:0 auto 15px}.brand-icon.small{margin:0;width:34px;height:34px;font-size:19px;border-radius:10px}.top-right{display:flex;align-items:center;gap:12px}.hello{color:#64748b;font-size:12px}.container{max-width:1260px;padding:35px 24px;margin:auto}.hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.hero h1{font-size:32px;letter-spacing:-.8px;margin:6px 0 8px}.hero p{color:#64748b;max-width:650px;line-height:1.55;margin:0}.eyebrow{font-size:10px;color:#059669;letter-spacing:2px;font-weight:800}.panel{background:#fff;border:1px solid #e5eaf0;border-radius:14px;box-shadow:0 2px 13px #172d4310}.controls{display:flex;align-items:center;justify-content:space-between;padding:13px 17px;gap:15px;flex-wrap:wrap}.year,.exports,.tabs,.actions{display:flex;align-items:center;gap:9px}.year strong{min-width:62px;text-align:center;font-size:18px}.primary,.outline,.ghost,.square,.tab,.tiny,.danger{border-radius:9px;border:1px solid transparent;padding:10px 15px;font-weight:650;background:transparent;color:#334155}.primary{background:#0c9276;color:white}.primary:hover{background:#06755e}.outline,.square,.tiny{border-color:#dce4ea;background:white}.outline:hover,.square:hover,.tiny:hover,.ghost:hover{background:#f1f5f9}.ghost{padding:7px 9px}.square{padding:7px 13px;font-size:19px}.tabs{background:#f1f5f9;padding:4px;border-radius:10px}.tab{padding:8px 14px;color:#64748b}.tab.active{background:#fff;color:#0e8269;box-shadow:0 1px 5px #0001}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:19px 0}.stat{background:white;border:1px solid #e5eaf0;border-radius:12px;padding:19px 22px;display:flex;flex-direction:column;gap:5px}.stat span{color:#64748b;font-size:12px}.stat strong{font-size:30px;color:#0f172a}.stat strong.stat-next{font-size:20px;margin:6px 0}.stat small{color:#94a3b8}.calendar-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.month{padding:19px;min-width:0}.month h3{margin:0 0 19px;font-size:16px;text-transform:capitalize;display:flex;justify-content:space-between}.month h3 span{font-weight:400;color:#94a3b8}.weekheads,.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}.weekheads{margin-bottom:7px;color:#94a3b8;font-size:11px;font-weight:750}.day{min-height:48px;min-width:0;border:1px solid transparent;background:transparent;border-radius:8px;padding:4px 1px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;font-size:12px}.day:hover{border-color:#b4e6d6;background:#f0fdf6}.day.occupied{background:#e6f7ee;color:#047857}.day.today{border-color:#0c9276}.day small{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;background:#f8fafc;color:#64748b;font-size:12px;font-weight:700}td,th{padding:13px 17px;border-bottom:1px solid #eef2f6}tbody tr:last-child td{border-bottom:0}.person-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#20ac88;margin-right:8px}.empty{text-align:center;padding:42px;color:#94a3b8}.admin{margin-top:25px;padding:23px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px}.section-head h2{font-size:19px;margin:0 0 5px}.muted{color:#64748b;line-height:1.5}.section-head p{margin:0}.status{font-size:11px;padding:4px 9px;border-radius:20px}.status.on{background:#dcfce7;color:#166534}.status.off{background:#fee2e2;color:#991b1b}.tiny{padding:6px 9px;font-size:11px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:25px}.login{width:100%;max-width:420px;padding:40px}.login h1{text-align:center;margin:0 0 8px}.login p{text-align:center;margin:0 0 26px}label{display:block;font-weight:650;margin:14px 0;font-size:13px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d9e1e8;border-radius:9px;margin-top:7px;background:white;color:#1e293b}input:focus,select:focus,textarea:focus{outline:2px solid #7bd6bc;border-color:#0c9276}.full{width:100%;margin-top:12px}.alert{background:#fef2f2;padding:12px;border-radius:8px;color:#991b1b}.modal-overlay{position:fixed;inset:0;background:#0f172a88;display:grid;place-items:center;padding:20px;z-index:10}.modal{width:min(100%,510px);max-height:92vh;overflow:auto;padding:25px}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h2{margin:0;font-size:20px}.actions{justify-content:flex-end;margin-top:22px;flex-wrap:wrap}.danger{background:#fff1f2;color:#be123c;margin-right:auto}.danger:hover{background:#ffe4e6}footer{color:#94a3b8;text-align:center;padding:40px 0 10px;font-size:12px}@media(max-width:1000px){.calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:630px){.calendar-grid{grid-template-columns:1fr}.stats{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.hero h1{font-size:27px}.top-inner{align-items:flex-start;flex-direction:column}.top-right{flex-wrap:wrap}.controls{align-items:stretch}.section-head{flex-direction:column;align-items:flex-start}.container{padding:23px 14px}.login{padding:26px}.month{padding:16px}}

/* Version 1.1 */
.day.occupied{background:color-mix(in srgb,var(--person-color) 14%,white);color:#243244;border-bottom:3px solid var(--person-color)}
.day.occupied small{color:var(--person-color);font-weight:750}
.distribution{padding:22px;margin:0 0 17px}.distribution .section-head{margin-bottom:16px}
.distribution-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 30px}
.distribution-row{display:flex;align-items:center;gap:9px;min-width:0}
.distribution-name{width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.distribution-track{height:9px;flex:1;background:#edf2f7;border-radius:20px;overflow:hidden}
.distribution-fill{height:100%;border-radius:20px;min-width:0}
.distribution-row strong{font-variant-numeric:tabular-nums;min-width:23px;text-align:right}
.legend{display:flex;flex-wrap:wrap;gap:9px 17px;margin:0 0 18px;padding:0 3px}
.legend-item{display:inline-flex;align-items:center;font-size:12px;color:#64748b;gap:2px}
@media(max-width:630px){.distribution-list{grid-template-columns:1fr}.distribution-name{width:105px}}

.hero-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.history-list{max-height:55vh;overflow:auto;margin:1rem 0}.history-entry{border-bottom:1px solid #d8dce4;padding:.8rem 0}.history-entry p{margin:.35rem 0}.history-entry small{opacity:.7}

/* v1.4 — theme override; preserve existing layout and participant colors */
html[data-theme="dark"]{color-scheme:dark;background:#0b1220;color:#e2e8f0}
html[data-theme="dark"] body{background:#0b1220;color:#e2e8f0}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .stat,html[data-theme="dark"] .tab.active,html[data-theme="dark"] .month{background:#151f30;border-color:#334155;color:#e2e8f0}
html[data-theme="dark"] .hero h1,html[data-theme="dark"] .stat strong,html[data-theme="dark"] .month h3{color:#f1f5f9}
html[data-theme="dark"] .hero p,html[data-theme="dark"] .muted,html[data-theme="dark"] .hello,html[data-theme="dark"] .stat span,html[data-theme="dark"] .legend-item,html[data-theme="dark"] .distribution-name{color:#a7b7ca}
html[data-theme="dark"] th{background:#1e293b;color:#cbd5e1}
html[data-theme="dark"] td,html[data-theme="dark"] th,html[data-theme="dark"] .history-entry{border-color:#334155}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0e1727;color:#e2e8f0;border-color:#475569}
html[data-theme="dark"] .outline,html[data-theme="dark"] .square,html[data-theme="dark"] .tiny,html[data-theme="dark"] .ghost{background:#1e293b;color:#e2e8f0;border-color:#475569}
html[data-theme="dark"] .outline:hover,html[data-theme="dark"] .square:hover,html[data-theme="dark"] .tiny:hover,html[data-theme="dark"] .ghost:hover{background:#334155}
html[data-theme="dark"] .tabs{background:#0e1727}
html[data-theme="dark"] .tab{color:#a7b7ca}
html[data-theme="dark"] .tab.active{color:#5eead4}
html[data-theme="dark"] .day{color:#cbd5e1}
html[data-theme="dark"] .day:hover{background:#243649;border-color:#3f7f75}
html[data-theme="dark"] .day.occupied{background:color-mix(in srgb,var(--person-color) 24%,#151f30);color:#f1f5f9}
html[data-theme="dark"] .day.occupied small{color:#f1f5f9}
html[data-theme="dark"] .distribution-track{background:#334155}
html[data-theme="dark"] .danger{background:#4c1d2b;color:#fecdd3}
html[data-theme="dark"] .status.on{background:#14532d;color:#bbf7d0}
html[data-theme="dark"] .status.off{background:#7f1d1d;color:#fecaca}
html[data-theme="dark"] .alert{background:#4c1d2b;color:#fecdd3}
html[data-theme="dark"] .empty,html[data-theme="dark"] footer{color:#94a3b8}
.theme-toggle{white-space:nowrap}

/* v1.5 — dedicated user management dashboard */
.admin-nav{display:flex;gap:8px;margin:-8px 0 25px;padding-bottom:12px;border-bottom:1px solid #dce4ea;flex-wrap:wrap}
.nav-item{border:0;border-radius:9px;background:transparent;color:#64748b;font-weight:750;padding:12px 17px}
.nav-item.current{background:#e2f4ed;color:#08765d}.nav-item:hover{background:#edf2f7}
.user-management{min-height:65vh}.user-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.user-hero h1{font-size:32px;letter-spacing:-.7px;margin:8px 0}.user-hero p{max-width:630px;margin:0}
.user-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px}
.user-metric{display:flex;flex-direction:column;gap:7px;padding:22px;background:white;border:1px solid #e5eaf0;border-radius:14px}.user-metric>span{color:#64748b;font-size:12px}.user-metric strong{font-size:29px}.user-metric small{color:#64748b}
.user-panel{padding:25px}.search-label{margin:0;width:min(100%,280px);font-weight:500;font-size:12px;color:#64748b}.search-label input{margin-top:5px}
.user-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:23px}
.user-card{border:1px solid #e4eaf0;border-radius:13px;padding:20px;min-width:0}.user-card-head{display:flex;align-items:center;gap:13px}.user-avatar{width:47px;height:47px;border-radius:13px;background:var(--avatar-color);display:grid;place-items:center;color:white;font-size:21px;font-weight:800;flex-shrink:0}.user-identity{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.user-identity strong,.user-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-identity span{color:#64748b;font-size:12px}.user-card-info{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0;padding:15px;background:#f8fafc;border-radius:9px}.user-card-info span{font-size:12px;color:#64748b}.user-card-info strong{font-size:12px;text-align:right}.user-card-actions{border-top:1px solid #e5eaf0;padding-top:15px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.user-card-actions .outline{font-size:12px;padding:8px 10px}
html[data-theme="dark"] .admin-nav{border-color:#334155}html[data-theme="dark"] .nav-item{color:#bac9d9}html[data-theme="dark"] .nav-item.current{background:#123b35;color:#5eead4}html[data-theme="dark"] .nav-item:hover{background:#26384a}
html[data-theme="dark"] .user-metric{background:#151f30;border-color:#334155}html[data-theme="dark"] .user-metric>span,html[data-theme="dark"] .user-metric small,html[data-theme="dark"] .user-identity span,html[data-theme="dark"] .user-card-info span{color:#a7b7ca}
html[data-theme="dark"] .user-card{border-color:#334155}html[data-theme="dark"] .user-card-info{background:#1e293b}html[data-theme="dark"] .user-card-actions{border-color:#334155}
@media(max-width:760px){.user-grid{grid-template-columns:1fr}.user-summary{grid-template-columns:1fr}.user-hero{flex-direction:column;align-items:flex-start}.user-panel{padding:15px}.user-panel>.section-head{align-items:stretch}.search-label{width:100%}}
