:root{font:14px/1.45 Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#203748;background:#f3f6f8}*{box-sizing:border-box}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}.shell{display:flex;min-height:100vh}.sidebar{width:238px;flex:none;background:#102b3b;color:#e7f2f8;display:flex;flex-direction:column;padding:25px 13px}.brand{display:flex;gap:12px;align-items:center;margin:4px 11px 38px}.brandmark{display:grid;place-items:center;background:#31a68f;color:white;font-size:24px;font-weight:800;width:42px;height:42px;border-radius:13px}.brand strong{display:block;font-size:17px;letter-spacing:1.2px}.brand small{color:#a6bcc8;font-size:11px}.nav{border:0;width:100%;text-align:left;color:#c4d5de;background:transparent;border-radius:9px;padding:13px 15px;display:flex;gap:15px;margin:4px 0}.nav.active,.nav:hover{background:#244657;color:white}.nav b{margin-left:auto;color:#f6bf69}.sidebar-foot{margin-top:auto;color:#b7cbd5;padding:16px 12px;font-size:12px}.sidebar-foot small{color:#8fa6b3}main{min-width:0;flex:1;padding:28px 34px;max-width:100%}header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:800;color:#79909f}h1{font-size:29px;letter-spacing:-.8px;margin:5px 0 0;color:#183244}h2{margin:0;font-size:19px}h3{margin-bottom:3px}.top-actions,.toolbar,.date-controls,.seg,.stats,.legend,.settings-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.status{color:#6e8492;font-size:12px;margin-right:8px}.btn{border:1px solid #d8e2e8;background:white;color:#2c495a;padding:10px 15px;border-radius:9px;font-weight:650;white-space:nowrap}.btn:hover{background:#ecf4f6}.btn-primary{border-color:#198a76;background:#198a76;color:white}.btn-primary:hover{background:#167863}.iconbtn{font-size:22px;padding:4px 13px}.toolbar{justify-content:space-between;margin-bottom:16px}.seg{border:1px solid #dbe5ea;background:white;border-radius:10px;padding:4px;gap:2px}.seg button{border:none;background:transparent;padding:9px 15px;border-radius:7px;color:#718594}.seg button.selected{background:#dcefeb;color:#106b5c;font-weight:800}.date-controls strong{font-size:13px;min-width:165px;text-align:center}.stats{margin:0 0 15px}.stat{background:white;border:1px solid #e4eaef;border-radius:11px;padding:13px 19px;flex:1;min-width:150px}.stat strong{display:block;color:#1a3749;font-size:23px}.stat span{color:#718796;font-size:12px}.legend{font-size:12px;color:#697f8e;margin:15px 0;gap:20px}.legend span{display:flex;align-items:center;gap:6px}.dot{width:10px;height:10px;display:inline-block;border-radius:3px}.municipal{background:#8ba3b8}.habitual{background:#4c94d4}.event{background:#2cb19a}.priority{background:#d99d41}.suspended{background:#c5c5c5}.calendar-scroll{overflow:auto;border:1px solid #dfe8ed;border-radius:12px;background:white;max-height:calc(100vh - 310px);min-height:430px}.calendar-grid{min-width:950px;position:relative}.week-head{display:grid;grid-template-columns:64px repeat(7,minmax(125px,1fr));position:sticky;top:0;z-index:12;background:#f9fbfc;border-bottom:1px solid #e1e9ed}.week-head .dayhead{padding:11px 5px;text-align:center;border-left:1px solid #edf1f3;font-size:12px}.dayhead b{display:block;font-size:16px;margin-top:2px}.dayhead.today{color:#0d8b75;background:#e8f6f2}.calendar-body{display:grid;grid-template-columns:64px repeat(7,minmax(125px,1fr));position:relative}.time-col{position:relative;background:#fafcfd;border-right:1px solid #e5ecef}.time-label{position:absolute;left:10px;transform:translateY(-50%);font-size:11px;color:#8498a5}.day-col{position:relative;border-right:1px solid #e8edf1;background:repeating-linear-gradient(to bottom,#fff 0px,#fff 59px,#edf2f5 60px)}.day-col.today{background:repeating-linear-gradient(to bottom,#fbfffe 0px,#fbfffe 59px,#edf2f5 60px)}.eventblock{position:absolute;left:3px;right:3px;border-radius:5px;padding:5px 6px;font-size:10.5px;line-height:1.25;overflow:hidden;border-left:4px solid;cursor:pointer;box-shadow:0 1px 3px #0001;z-index:2}.eventblock strong{display:block;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.eventblock small{display:block;opacity:.85}.eventblock.habitual{background:#e5f1fb;color:#205f92;border-color:#4c94d4}.eventblock.municipal{background:#ecf0f4;color:#546e82;border-color:#8ba3b8}.eventblock.event{background:#e3f6f1;color:#126c5e;border-color:#2cb19a}.eventblock.priority{background:#fff2db;color:#90601a;border-color:#d99d41}.eventblock.suspended{background:#f0f0f0;color:#888;border-color:#b8b8b8;text-decoration:line-through}.eventblock:hover{filter:brightness(.95);z-index:4}.placebadge{background:#eff3f7;border-radius:4px;padding:1px 4px;font-size:9px;float:right}.hidden{display:none!important}.panel{border:1px solid #e1e8ed;background:white;border-radius:12px;padding:22px;min-height:250px}.panelhead{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:18px}.panelhead input{width:300px;max-width:100%}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}td,th{padding:13px 9px;border-bottom:1px solid #e6edf1;text-align:left;vertical-align:top}th{font-size:11px;color:#77909d;text-transform:uppercase;letter-spacing:.5px}td button{margin-right:4px}.pill{display:inline-block;padding:3px 8px;border-radius:50px;background:#e6f4f0;color:#197663;font-size:11px}.pill.gray{background:#eaf0f3;color:#607987}.pill.gold{background:#fff1d8;color:#97651d}.empty{padding:38px;text-align:center;color:#77909d}dialog{border:0;border-radius:14px;box-shadow:0 22px 90px #162f4355;max-width:min(720px,calc(100vw - 26px));width:100%;padding:0;color:#243f50}dialog::backdrop{background:#142a3999}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:22px 25px;border-bottom:1px solid #e5edf1}.close{border:0;background:none;font-size:28px;color:#718a99}.dialog-body{padding:22px 25px;max-height:65vh;overflow:auto}.dialog-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 25px;border-top:1px solid #e8eef1;flex-wrap:wrap}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-bottom:16px}label{font-size:12px;font-weight:700;color:#506a7b}input,select{margin-top:5px;width:100%;border:1px solid #d2dfe6;border-radius:8px;padding:10px;background:white;color:#243e4e;min-width:0}.hint{font-size:12px;color:#7b8e9d}.section-title{display:flex;justify-content:space-between;align-items:center;font-weight:800;margin:15px 0}.small{padding:5px 10px;font-size:12px}.day-row{display:grid;grid-template-columns:1.3fr 1fr 1fr 32px;align-items:end;gap:8px;margin-bottom:9px}.day-row button{height:40px;border:0;background:#f5e7e8;color:#a44b54;border-radius:8px}.error,.conflictbox{background:#fff4e6;border:1px solid #f2d2a5;color:#8c5c22;padding:13px;border-radius:8px;margin:10px 0;font-size:13px}.error{background:#ffebee;color:#ad3846;border-color:#f4bac3}.detail-line{padding:8px 0;border-bottom:1px solid #edf2f4}.detail-line b{display:inline-block;min-width:130px}.alert-item{padding:15px;border-bottom:1px solid #e6edf1;display:flex;justify-content:space-between;align-items:center;gap:16px}.alert-item p{margin:5px 0;color:#718493;font-size:12px}.settings-panel{max-width:850px}.settings-actions{margin:22px 0}hr{border:0;border-top:1px solid #edf1f4;margin:25px 0}#toast{position:fixed;bottom:22px;right:22px;background:#183a49;color:white;padding:13px 18px;border-radius:9px;box-shadow:0 12px 30px #0003;display:none;z-index:200;max-width:420px}@media(max-width:900px){.sidebar{width:64px;padding:12px 5px}.brand{margin:5px}.brand div:last-child,.nav span,.sidebar-foot{display:none}.nav{justify-content:center;padding:13px 0}.nav b{font-size:10px}.brandmark{width:42px;height:42px}.top-actions .status{display:none}main{padding:18px}.calendar-scroll{max-height:70vh}}@media(max-width:600px){header{align-items:flex-start;flex-direction:column}h1{font-size:23px}.formgrid{grid-template-columns:1fr}.day-row{grid-template-columns:1fr 1fr;gap:4px}.dialog-footer .btn{flex:1}.panel{padding:10px}.calendar-scroll{min-height:380px}.stats{gap:5px}.stat{min-width:125px;padding:8px}}

/* v0.2: vista mensual e categorías con cores diferenciadas */
.dot.school{background:#7b61a8}.dot.municipal{background:#3479b8}.dot.habitual{background:#7b8794}.dot.event{background:#20a285}
.eventblock.school,.month-event.school{background:#eee8f7;color:#63438b;border-color:#8d70bc}
.eventblock.municipal,.month-event.municipal{background:#e4f0fc;color:#245e98;border-color:#3479b8}
.eventblock.habitual,.month-event.habitual{background:#edf0f2;color:#586774;border-color:#7b8794}
.eventblock.event,.month-event.event{background:#e0f5ee;color:#116d58;border-color:#20a285}
.eventblock.priority,.month-event.priority{background:#fff0d8;color:#90601a;border-color:#d99d41}
.month-grid{display:grid;grid-template-columns:repeat(7,minmax(135px,1fr));min-width:980px}
.month-header{text-align:center;background:#eef4f7;padding:13px 5px;font-weight:750;font-size:12px;border-right:1px solid #e4edf1;position:sticky;top:0;z-index:8}
.month-day{min-height:150px;border:1px solid #e9eef3;padding:6px;background:#fff;overflow:hidden}
.month-day.outside{background:#f5f7f8;opacity:.55}.month-day.today{background:#f0faf7}
.month-date{font-size:13px;font-weight:800;color:#425e6d;margin:2px 0 7px}
.month-event{display:block;width:100%;padding:3px 5px;margin-bottom:4px;border:0;border-left:3px solid;border-radius:4px;font-size:10.5px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.month-event span{font-weight:800}.month-event.suspended{background:#eee;color:#888;text-decoration:line-through;border-color:#aaa}
.more-occupations{color:#708a96;font-size:10px}.calendar-grid:has(.month-grid){min-width:980px}
