:root{color-scheme:dark;--bg:#0d1424;--bg2:#101a2e;--sidebar:#0b1120;--surface:#17243a;--surface2:#1b2a43;--surface3:#24344f;--line:#2a3954;--line2:#344560;--text:#eef2fc;--muted:#9eafcc;--soft:#7689a9;--accent:#8a81ff;--accent-bg:#302c61;--accent-br:#5c53bb;--teal:#45d1b4;--orange:#f3bb66;--danger:#ff8e9e;--input:#111d31;--shadow:0 22px 60px rgba(1,6,18,.18)}
:root[data-theme=light]{color-scheme:light;--bg:#f3f6fb;--bg2:#f8faff;--sidebar:#0e172a;--surface:#fff;--surface2:#f4f6fc;--surface3:#eaf0fa;--line:#e1e6f0;--line2:#d1d9e7;--text:#18243c;--muted:#687a95;--soft:#8493ad;--accent:#5949df;--accent-bg:#ebe8ff;--accent-br:#b7aaff;--teal:#079c88;--orange:#ae7d16;--danger:#d94c67;--input:#fff;--shadow:0 20px 50px rgba(40,56,90,.08)}
*{box-sizing:border-box}html{min-height:100%;scroll-behavior:smooth}body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--accent);outline-offset:2px}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;letter-spacing:-.035em}h1{font-size:30px;line-height:1.22}h2{font-size:18px}h3{font-size:15px}.muted{color:var(--muted)}.icon{width:18px;height:18px}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;top:0;bottom:0;left:0;width:250px;z-index:60;background:var(--sidebar);padding:23px 13px 16px;display:flex;flex-direction:column;border-right:1px solid #1d2c46;overflow-y:auto}.brand{display:flex;align-items:center;gap:11px;padding:4px 7px 33px;min-width:0}.brand-icon{width:39px;height:39px;background:linear-gradient(135deg,#7773ef,#5146ce);color:#fff;border-radius:11px;display:grid;place-items:center;flex-shrink:0;box-shadow:0 8px 22px #4d45dd33}.brand-icon svg{width:23px;height:23px}.brand-copy{min-width:0;display:grid;gap:5px}.brand-copy strong{font-size:12.2px;letter-spacing:-.03em;color:white;white-space:nowrap}.brand-copy small,.auth-brand small{font-size:9px;font-weight:800;letter-spacing:.22em;color:#a6b7f1}.sidebar-section-label{color:#89a0c2;font-size:10px;font-weight:800;letter-spacing:.16em;margin:10px 10px 10px}.sidebar-label-second{margin-top:32px}.sidebar-nav{display:grid;gap:5px}.nav-link{width:100%;background:transparent;border:1px solid transparent;border-radius:9px;color:#c7d3e8;display:flex;align-items:center;gap:12px;text-align:left;padding:12px 11px;font-size:12.8px;transition:.17s ease}.nav-link:hover,.sidebar-project:hover{background:#1a2943;color:#fff}.nav-link.active{background:#2a3a60;border-color:#4d639c;box-shadow:inset 3px 0 #9487ff;color:#fff}.nav-link svg{width:18px;height:18px;color:#aebddd}.nav-count{font-size:11px;color:#ced7eb;background:#243557;border-radius:7px;padding:2px 7px;margin-left:auto}.sidebar-projects{display:grid;gap:4px}.sidebar-project{border:0;background:transparent;color:#cbd6e8;text-align:left;display:flex;align-items:center;gap:11px;border-radius:8px;padding:11px 10px;min-width:0;font-size:12px}.sidebar-project.chosen{background:#19263e}.sidebar-project>span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-placeholder{font-size:12px;color:#6f85aa;margin:8px 10px}.color-dot{width:9px;height:9px;border-radius:50%;background:#9087ff;display:inline-block;flex-shrink:0}.color-dot.violet{background:#9087ff}.color-dot.teal{background:#3bc9b2}.color-dot.blue{background:#6f95ff}.color-dot.amber{background:#efa854}.color-dot.rose{background:#ed779c}.color-dot.green{background:#70ca84}.color-dot.sky{background:#59c0e7}.color-dot.slate{background:#97a8c0}.sidebar-bottom{margin-top:auto;border-top:1px solid #263550;padding-top:16px}.sidebar-note{display:flex;gap:9px;color:#91a5c5;border-bottom:1px solid #263550;padding:9px 8px 16px;margin-bottom:12px;font-size:11px;line-height:1.55}.sidebar-note svg{width:16px;height:16px;color:#9185ff}.main-col{margin-left:250px;flex:1;min-width:0}.topbar{height:73px;border-bottom:1px solid var(--line);background:var(--bg2);display:flex;justify-content:space-between;align-items:center;padding:0 clamp(20px,3.5vw,57px);position:sticky;top:0;z-index:20}.crumb{display:flex;align-items:center;gap:11px;font-size:12px;color:var(--muted)}.crumb strong{color:var(--text);font-weight:700}.crumb-sep{color:var(--soft)}.top-actions{display:flex;align-items:center;gap:13px}.top-date{font-size:12px;color:var(--muted);margin-right:8px}.icon-btn{display:grid;place-items:center;border:1px solid transparent;background:transparent;border-radius:9px;color:var(--muted);width:36px;height:36px;padding:6px;transition:.15s}.icon-btn:hover{background:var(--surface3);color:var(--text)}.icon-btn svg{width:18px;height:18px}.btn{border-radius:9px;display:inline-flex;justify-content:center;align-items:center;gap:9px;padding:10px 14px;min-height:39px;font-weight:750;white-space:nowrap;font-size:12px;border:1px solid transparent;transition:.15s ease}.btn svg{width:16px;height:16px}.btn:hover{transform:translateY(-1px)}.btn:disabled{opacity:.45;transform:none;cursor:not-allowed}.btn.primary{background:linear-gradient(135deg,#7770ec,#5d52d7);color:white;border-color:#7770e8;box-shadow:0 5px 15px #5449d53a}.btn.primary:hover{filter:brightness(1.12)}.btn.outlined{border-color:var(--line2);color:var(--text);background:var(--surface)}.btn.subtle{border-color:var(--line);color:var(--muted);background:transparent}.btn.danger{background:#a52e4a;color:white}.btn.danger-outline{border-color:#a747604d;color:var(--danger);background:transparent}.btn.full{width:100%}.main-content{max-width:1640px;margin:0 auto;padding:35px clamp(20px,3.5vw,57px) 70px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:29px}.eyebrow{color:var(--accent);font-size:10px;letter-spacing:.15em;font-weight:800;display:inline-flex;align-items:center;gap:9px;margin-bottom:12px}.eyebrow i{width:7px;height:7px;background:#4ed5b8;border-radius:50%;box-shadow:0 0 0 4px #3fdab31a}.page-head h1{margin:0 0 9px}.title-accent{color:var(--accent)}.page-head p{font-size:13px;color:var(--muted);line-height:1.65}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:22px}.stat{border:1px solid var(--line);background:var(--surface);border-radius:13px;padding:21px 23px;display:flex;gap:17px;align-items:center}.stat-icon{width:47px;height:47px;display:grid;place-items:center;border-radius:12px;flex-shrink:0}.stat-icon.purple{background:#5348b13b;color:#b0a9ff}.stat-icon.teal-bg{background:#1bb69a26;color:#4ed5b5}.stat-icon.blue-bg{background:#5185ed30;color:#80abff}.stat-icon svg{width:22px;height:22px}.stat>div:last-child{display:grid;gap:4px}.stat span{font-size:12px;color:var(--muted)}.stat strong{font-size:27px;font-weight:800;line-height:1.18;letter-spacing:-.055em}.stat small{font-size:10.7px;color:var(--soft)}.workspace-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(250px,.8fr);gap:20px;align-items:start}.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.calendar-panel{padding:24px 23px 22px;min-width:0}.calendar-toolbar{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:24px}.calendar-toolbar h2{margin:0 0 6px;font-size:17px}.calendar-toolbar span{color:var(--muted);font-size:11px}.month-nav{display:flex;align-items:center;gap:5px}.month-nav strong{font-size:12.4px;min-width:127px;text-align:center;white-space:nowrap}.month-nav .icon-btn{border:1px solid var(--line);width:31px;height:31px}.month-nav .today{min-height:31px;padding:6px 9px;font-size:11px;margin-right:4px}.weekday-grid,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}.weekday-grid{margin-bottom:8px}.weekday-grid span{text-align:center;font-size:11px;font-weight:800;color:var(--soft);padding-bottom:7px}.calendar-day{min-width:0;height:88px;border-radius:9px;border:1px solid var(--line);background:var(--bg2);color:var(--text);position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:12px;transition:.15s ease;text-align:left}.calendar-day:hover{border-color:var(--accent);background:var(--surface2)}.calendar-day.outside{opacity:.32}.calendar-day.is-today .day-number{color:#fff;background:#6f65e6;width:25px;height:25px;border-radius:7px;display:grid;place-items:center;margin:-4px 0 -4px -5px}.calendar-day.is-selected{border-color:#a89aff;background:var(--accent-bg);box-shadow:inset 0 0 0 1px var(--accent)}.calendar-day .day-number{font-size:13px;font-weight:750;line-height:25px}.day-dots{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.day-dots .color-dot{width:7px;height:7px}.more-dot{font-size:9px;color:var(--muted)}.selected-check{position:absolute;right:6px;top:7px;background:#7a70ed;color:#fff;border-radius:50%;width:15px;height:15px;display:grid;place-items:center}.selected-check svg{width:11px;height:11px;stroke-width:3}.calendar-legend{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin:15px 0 24px;color:var(--soft);font-size:10.5px}.calendar-legend span{display:inline-flex;align-items:center;gap:6px}.calendar-legend svg{width:13px;height:13px}.calendar-legend .mini-mark{width:10px;height:10px;border:1.5px solid var(--accent);border-radius:3px;background:var(--accent-bg)}.select-area{border-top:1px solid var(--line);padding-top:22px}.selection-head{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:17px}.selection-head .eyebrow{margin-bottom:8px}.selection-head h3{font-size:15px;margin-bottom:7px}.selection-head p{font-size:11.5px;color:var(--muted);line-height:1.5}.selection-head .btn{min-height:31px}.day-form{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(105px,.7fr)) auto;gap:10px;align-items:end}.form-field{display:grid;gap:7px;min-width:0}.form-field label,label:not(.color-choice){font-size:11.5px;font-weight:700;color:var(--muted)}.form-field input,.form-field select,.form-field textarea,.settings-form input,.search-box input,.history-filters select,.history-filters>input,.auth-card input{width:100%;min-width:0;border:1px solid var(--line2);border-radius:8px;background:var(--input);color:var(--text);height:40px;padding:9px 11px;outline:none;font-size:12px}.form-field input:focus,.form-field select:focus,.form-field textarea:focus,.settings-form input:focus,.history-filters input:focus,.history-filters select:focus,.auth-card input:focus{border-color:var(--accent)}select{cursor:pointer}.form-field textarea{resize:vertical;min-height:91px}.optional{font-size:10px;color:var(--soft);font-weight:500}.required{color:var(--danger)}.save-days{height:40px}.selection-hint{margin-top:13px;color:var(--orange);font-size:11px;display:flex;align-items:center;gap:6px}.selection-hint svg{width:14px;height:14px}.current-p{display:flex;align-items:center;flex-wrap:wrap;gap:7px;color:var(--muted);font-size:11px;margin-top:17px}.current-p strong{color:var(--text)}.inline-action{background:none;border:0;padding:0;color:var(--accent);font-weight:700;text-decoration:underline;text-underline-offset:3px}.right-rail{display:grid;gap:19px;min-width:0}.rail-panel{padding:20px}.rail-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.rail-heading .eyebrow{font-size:9px;margin-bottom:7px}.rail-heading h3{font-size:15px}.rail-heading .icon-btn{border:1px solid var(--line);width:30px;height:30px}.rail-project{display:flex;width:100%;align-items:center;gap:10px;text-align:left;padding:12px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text);min-width:0}.rail-project:hover,.rail-project.selected{border-color:var(--line2);background:var(--surface2)}.project-avatar{height:36px;width:36px;border-radius:10px;background:#ddd8ff;color:#5447c7;font-size:12px;font-weight:800;display:grid;place-items:center;flex-shrink:0}.project-avatar.teal{background:#c5faf0;color:#047c69}.project-avatar.blue{background:#d3e1ff;color:#3261ba}.project-avatar.amber{background:#ffecd0;color:#966216}.project-avatar.rose{background:#ffdbeb;color:#a23a6f}.project-avatar.green{background:#d7f8dc;color:#328747}.project-avatar.sky{background:#d4f4ff;color:#257ba4}.project-avatar.slate{background:#e1e6f0;color:#536682}.rail-project>span{display:grid;min-width:0;flex:1;gap:4px}.rail-project strong,.recent-entry strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.4px}.rail-project small,.recent-entry small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rail-project>svg{width:15px;height:15px;color:var(--soft)}.plain-link{display:flex;align-items:center;gap:6px;margin-top:14px;color:var(--accent);font-weight:700;font-size:11px;border:0;background:transparent;padding:6px 4px}.plain-link svg{width:14px;height:14px}.rail-empty{display:grid;gap:10px;justify-items:start;color:var(--muted);padding:14px 6px}.rail-empty>svg{color:var(--accent);width:25px;height:25px}.rail-empty strong{color:var(--text)}.rail-empty p{font-size:11px;line-height:1.6}.recent-entry{display:flex;width:100%;align-items:center;gap:10px;background:none;border:0;border-bottom:1px solid var(--line);text-align:left;padding:11px 0;color:var(--text);min-width:0}.recent-entry:hover{color:var(--accent)}.recent-entry>span:nth-child(2){display:grid;gap:3px;flex:1;min-width:0}.recent-entry>svg{width:14px;height:14px;color:var(--soft)}.recent-date{width:34px;display:grid;place-items:center;gap:2px;border-radius:7px;border:1px solid var(--line2);padding:5px 0}.recent-date strong{font-size:13px}.recent-date small{font-size:9px}.empty-small{color:var(--soft);padding:20px 5px;font-size:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.section-heading h2{font-size:17px}.count-pill{font-size:11px;padding:4px 8px;background:var(--accent-bg);color:var(--accent);border-radius:7px;vertical-align:middle;margin-left:4px}.closing-heading{margin-top:31px}.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.project-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:22px;min-width:0}.project-card-top{display:flex;align-items:start;justify-content:space-between;margin-bottom:19px}.project-card-top .project-avatar{width:44px;height:44px;font-size:14px}.project-status{display:flex;align-items:center;gap:7px;color:var(--teal);background:#20b89b19;border:1px solid #40c7a134;border-radius:99px;padding:5px 9px;font-size:10px;font-weight:750}.project-status span{width:6px;height:6px;border-radius:50%;background:currentColor}.project-status.closed{color:var(--soft);background:var(--surface2);border-color:var(--line)}.project-card h3{font-size:17px;margin-bottom:9px;line-height:1.4}.project-card .company{font-size:11.5px;color:var(--muted);display:flex;gap:7px;align-items:center;flex-wrap:wrap}.project-card .company svg{width:14px;height:14px}.project-numbers{display:flex;gap:44px;margin-top:24px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.project-numbers>div{display:grid;gap:4px}.project-numbers strong{font-size:23px;letter-spacing:-.05em}.project-numbers small{color:var(--soft);font-size:10.5px}.project-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px}.project-card-bottom>span{font-size:10px;color:var(--soft)}.project-actions{display:flex;align-items:center;gap:4px}.project-actions .btn{min-height:33px;padding:7px 10px;font-size:11px}.project-actions .icon-btn{width:31px;height:33px}.empty-card{padding:25px;color:var(--muted);border:1px dashed var(--line2);border-radius:13px}.empty-page{border:1px dashed var(--line2);background:var(--surface);border-radius:14px;padding:65px 15px;display:grid;justify-items:center;gap:15px;text-align:center}.empty-page>svg{width:35px;height:35px;color:var(--accent)}.empty-page p{color:var(--muted)}.history-panel{overflow:hidden}.history-filters{display:grid;grid-template-columns:minmax(210px,1.3fr) minmax(140px,.75fr) 145px auto;gap:12px;padding:22px 22px 17px}.search-box{position:relative;display:flex;align-items:center}.search-box svg{position:absolute;left:12px;width:16px;height:16px;color:var(--soft)}.search-box input{padding-left:37px}.history-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 22px;color:var(--soft);font-size:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.history-meta strong{font-size:11px;color:var(--text)}.table-scroller{overflow-x:auto}.history-table{width:100%;border-collapse:collapse;text-align:left;min-width:690px}.history-table th{padding:15px 19px;font-size:10px;letter-spacing:.05em;color:var(--soft);font-weight:750}.history-table td{padding:15px 19px;border-top:1px solid var(--line);vertical-align:middle}.history-table tbody tr:hover{background:var(--surface2)}.table-date,.table-project span{display:grid;gap:4px}.table-date strong,.table-project strong{font-size:11.5px;white-space:nowrap}.table-date span,.table-project small{font-size:10.5px;color:var(--soft)}.table-project{display:flex;align-items:center;gap:10px}.table-project span{min-width:0}.time-chip{display:inline-flex;align-items:center;gap:6px;border-radius:6px;background:var(--surface2);padding:6px 8px;color:var(--muted);font-size:10px;white-space:nowrap}.time-chip svg{width:13px;height:13px}.notes-cell{font-size:11px;color:var(--muted);display:block;max-width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.row-buttons{display:flex;gap:5px}.row-buttons .icon-btn{width:30px;height:30px;border:1px solid var(--line)}.danger-hover:hover{color:var(--danger)}.history-empty{padding:60px 20px;display:grid;justify-items:center;gap:9px;color:var(--soft);font-size:12px}.history-empty svg{width:32px;height:32px;color:var(--accent)}.history-empty strong{color:var(--text);font-size:14px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}.settings-card{padding:24px;align-self:start}.settings-head{display:flex;align-items:start;gap:15px;margin-bottom:21px}.settings-head>svg{width:22px;height:22px;color:var(--accent);padding:12px;box-sizing:content-box;background:var(--accent-bg);border-radius:11px}.settings-head h2{font-size:16px;margin-bottom:7px}.settings-head p{font-size:12px;color:var(--muted);line-height:1.6}.settings-actions{display:flex;flex-wrap:wrap;gap:10px}.settings-form{display:grid;gap:15px}.settings-form label{display:grid;gap:8px}.settings-form .btn{justify-self:start}.settings-foot{color:var(--muted);font-size:12px;line-height:1.7}.sidebar-overlay,.mobile-bottom-nav,.mobile-menu{display:none}.modal{border:1px solid var(--line2);border-radius:15px;max-width:min(550px,calc(100vw - 30px));width:100%;max-height:min(88vh,850px);overflow:auto;background:var(--surface);color:var(--text);padding:0;box-shadow:0 40px 110px rgba(0,0,0,.55);margin:auto}.modal::backdrop{background:#030712ba;backdrop-filter:blur(5px)}.modal-head{padding:23px 26px 17px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:start;gap:20px}.modal-head .eyebrow{font-size:9px;margin-bottom:6px}.modal-head h2{font-size:19px}.modal-body{padding:22px 26px 25px}.modal-form{display:grid;gap:19px}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.color-picker{display:flex;align-items:center;gap:11px;flex-wrap:wrap}.color-choice{display:inline-flex;cursor:pointer;position:relative}.color-choice input{position:absolute;width:1px;height:1px;opacity:0}.color-choice span{height:25px;width:25px;display:block;border-radius:50%;border:3px solid var(--surface);background:#9087ff;box-shadow:0 0 0 1px transparent}.color-choice.teal span{background:#3bc9b2}.color-choice.blue span{background:#6f95ff}.color-choice.amber span{background:#efa854}.color-choice.rose span{background:#ed779c}.color-choice.green span{background:#70ca84}.color-choice.sky span{background:#59c0e7}.color-choice.slate span{background:#97a8c0}.color-choice input:checked+span{box-shadow:0 0 0 2px var(--text)}.color-choice input:focus-visible+span{outline:3px solid var(--accent)}.modal-footer{border-top:1px solid var(--line);padding-top:19px;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px;margin-top:5px}.modal-footer .fill{flex:1}.confirm-copy{font-size:13px;line-height:1.8;color:var(--muted);margin-bottom:23px}.days-modal-intro{display:flex;align-items:center;gap:8px;color:var(--muted);padding-bottom:13px;border-bottom:1px solid var(--line);font-size:11px}.days-modal-intro strong{color:var(--text)}.days-list{max-height:50vh;overflow:auto}.days-list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;background:transparent;border:0;border-bottom:1px solid var(--line);color:var(--text);text-align:left;padding:14px 7px}.days-list-row:hover{background:var(--surface2)}.days-list-row>span{display:grid;gap:5px;min-width:0}.days-list-row strong{font-size:12px}.days-list-row small{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.days-list-row svg{width:16px;height:16px;color:var(--soft)}.modal-empty{padding:25px 5px;color:var(--muted);font-size:12px}.toast{position:fixed;bottom:24px;right:25px;max-width:min(430px,calc(100vw - 36px));border-radius:10px;background:#263e55;border:1px solid #47716d;box-shadow:0 12px 36px #0006;padding:15px 20px;font-size:12px;font-weight:700;color:#e9fff5;opacity:0;transform:translateY(15px);transition:.2s;z-index:300;pointer-events:none}.toast.visible{opacity:1;transform:translateY(0)}.toast.error{background:#533043;border-color:#a64f68;color:#fff1f4}.loading-state,.error-load{padding:90px 20px;text-align:center;color:var(--muted)}.auth-wrap{min-height:100vh;background:radial-gradient(ellipse at 75% 20%,#283a6b66,transparent 40%),radial-gradient(ellipse at 20% 90%,#3b2d6d55,transparent 35%),#0e172b;display:flex;align-items:center;justify-content:center;padding:24px}.auth-card{position:relative;z-index:2;width:min(100%,440px);padding:37px;background:#17243a;border:1px solid #354563;border-radius:19px;box-shadow:0 30px 80px #0005;color:#f6f7ff}.auth-brand{display:flex;align-items:center;gap:13px}.auth-brand>div:last-child{display:grid;gap:4px}.auth-brand strong{font-size:15px;letter-spacing:-.02em}.auth-rule{border-top:1px solid #2f4161;margin:27px 0}.auth-card h1{font-size:25px;margin:3px 0 13px}.auth-card .muted{font-size:12.8px;line-height:1.75;color:#aab9d3;margin-bottom:25px}.auth-card .stack-gap{display:grid;gap:17px}.auth-card label{color:#c0cce1;font-size:12px;display:grid;gap:8px}.auth-card input{background:#111c2e;color:#fff;height:44px;border-color:#425270}.auth-card .btn{min-height:45px;margin-top:5px}.auth-footer{border-top:1px solid #30415e;margin-top:30px;padding-top:20px;display:flex;align-items:center;gap:8px;color:#9cacc6;font-size:11px}.auth-footer svg{width:15px;height:15px}.form-error{border:1px solid #be6276;background:#4f2839;color:#ffd7df;padding:12px;margin-top:15px;border-radius:7px;font-size:12px}
@media(max-width:1340px){.workspace-grid{grid-template-columns:minmax(0,1fr) 280px}.day-form{grid-template-columns:repeat(2,minmax(0,1fr))}.day-form .form-field.wide{grid-column:span 2}.day-form .save-days{grid-column:span 2}.calendar-day{height:76px}.top-date{display:none}} 
@media(max-width:1120px){.sidebar{width:215px}.main-col{margin-left:215px}.main-content{padding:27px 24px 65px}.topbar{padding:0 24px}.workspace-grid{grid-template-columns:1fr}.right-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid{gap:10px}.stat{padding:16px;gap:12px}.project-grid{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.sidebar{transform:translateX(-105%);width:268px;transition:transform .23s;box-shadow:20px 0 50px #0006}.sidebar.open{transform:translateX(0)}.sidebar-overlay.open{display:block;position:fixed;inset:0;background:#0009;z-index:55}.main-col{margin:0}.topbar{height:62px}.mobile-menu{display:grid}.crumb-root,.crumb-sep{display:none}.crumb{gap:6px}.mobile-bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;bottom:0;left:0;right:0;z-index:45;background:var(--bg2);border-top:1px solid var(--line);padding:7px 8px max(7px,env(safe-area-inset-bottom));box-shadow:0 -10px 28px #0003}.mobile-bottom-nav button{border:0;background:transparent;color:var(--soft);display:grid;justify-items:center;gap:4px;font-size:10px;padding:6px 0}.mobile-bottom-nav button svg{width:19px;height:19px}.mobile-bottom-nav button.active{color:var(--accent)}.main-content{padding-bottom:108px}.toast{bottom:78px}.top-new{min-height:34px;padding:8px 11px}.top-new span{display:none}}
@media(max-width:620px){h1{font-size:25px}.topbar{padding:0 16px}.main-content{padding:23px 13px 110px}.page-head{gap:9px;align-items:start;margin-bottom:20px}.page-head .btn{padding:9px;font-size:11px}.head-add{font-size:0!important;min-width:37px}.head-add svg{width:17px;height:17px}.page-head p{font-size:11.8px}.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:12px}.stat{padding:12px 8px;border-radius:10px;display:grid;gap:9px;justify-items:center;text-align:center}.stat-icon{width:32px;height:32px;border-radius:9px}.stat-icon svg{width:17px;height:17px}.stat strong{font-size:23px}.stat span{font-size:9px}.stat small{font-size:8px;line-height:1.3}.workspace-grid{gap:12px}.calendar-panel{padding:16px 10px 18px;border-radius:12px}.calendar-toolbar{flex-wrap:wrap;align-items:center;margin-bottom:20px}.calendar-toolbar h2{font-size:16px}.calendar-toolbar span{font-size:10px}.month-nav{margin-left:auto}.month-nav strong{min-width:110px;font-size:11px}.month-nav .today{font-size:10px}.weekday-grid,.calendar-grid{gap:4px}.weekday-grid span{font-size:9px}.calendar-day{height:57px;border-radius:7px;padding:4px 5px;gap:4px}.calendar-day .day-number{font-size:11px;line-height:20px}.calendar-day.is-today .day-number{width:21px;height:21px;margin:-2px 0 -2px -3px}.day-dots{gap:2px}.day-dots .color-dot{width:5px;height:5px}.selected-check{right:2px;top:3px;width:12px;height:12px}.selected-check svg{width:9px;height:9px}.calendar-legend{font-size:9px;gap:11px;margin:12px 0 20px}.selection-head h3{font-size:14px}.day-form{grid-template-columns:1fr 1fr}.day-form .form-field.wide{grid-column:span 2}.day-form .save-days{grid-column:span 2}.right-rail{grid-template-columns:1fr;gap:12px}.rail-panel{padding:16px}.project-grid,.settings-grid{grid-template-columns:1fr}.project-card{padding:18px}.history-filters{grid-template-columns:1fr 1fr;padding:14px;gap:8px}.history-filters .search-box{grid-column:span 2}.history-meta{padding:12px}.history-meta span{display:none}.modal-head{padding:20px 17px 15px}.modal-body{padding:20px 17px 22px}.modal-footer{gap:8px}.modal-footer .btn{padding:9px 10px}.auth-card{padding:25px;border-radius:15px}}
@media(max-width:390px){.month-nav{width:100%;justify-content:flex-end}.calendar-toolbar{gap:11px}.stats-grid{gap:5px}.stat{padding:11px 5px}.stat-icon{width:29px;height:29px}.calendar-day{height:49px}.form-row{grid-template-columns:1fr}.modal-footer .btn{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}}

/* Avisos de guardado visibles dentro del modal (top layer) */
.inline-save-error:not([hidden]){display:block;margin:0;padding:11px 13px;border-radius:9px;border:1px solid #be6276;background:rgba(180,51,77,.19);color:var(--text);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.storage-status{margin-top:12px;font-size:12px;line-height:1.55;color:var(--muted)}
.storage-status.is-error{color:var(--danger)}
.project-parties{display:grid;gap:5px;color:var(--muted);font-size:11.5px;line-height:1.4;margin:12px 0 16px}
.project-parties>div{display:flex;align-items:flex-start;gap:8px}
.project-parties svg{width:14px;height:14px;flex-shrink:0;margin-top:1px}
.project-parties strong{font-weight:700;color:var(--text)}

.form-help{color:var(--soft);font-size:10.5px;line-height:1.5}
/* Identificación de proyectos y control de importes · ampliación de Bitácora */
.sidebar-project{min-height:49px;align-items:center}
.sidebar-project>span:not(.color-dot){display:grid;gap:3px;min-width:0;text-align:left}
.sidebar-project strong{font-size:11px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-project small{font-size:10px;font-weight:400;color:var(--soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rail-project>span:not(.project-avatar){min-width:0;display:grid;gap:4px}
.rail-project small{white-space:normal;line-height:1.45;max-height:2.9em;overflow:hidden}
.current-p{display:flex;align-items:center;flex-wrap:wrap;gap:7px;line-height:1.5}
.current-p .selected-context{color:var(--muted);font-size:11px;width:100%;padding-left:0}
.current-p .selected-rate{font-size:11px;font-weight:750;color:var(--teal)}
.project-numbers{gap:22px;justify-content:space-between;flex-wrap:wrap}
.project-numbers>div{min-width:100px;max-width:100%}
.project-numbers .money-figure{font-size:19px;letter-spacing:-.03em;color:var(--teal);white-space:nowrap}
.project-numbers small{line-height:1.4}
.rate-setting{display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,.62fr);gap:13px}
.rate-setting .form-field{min-width:0}
.rate-help{display:block;font-size:11px;line-height:1.55;color:var(--muted);margin-top:-10px}
.money-preview{border:1px solid var(--line);background:var(--surface2);padding:10px 12px;border-radius:9px}
.money-preview strong{color:var(--teal)}
.export-intro{font-size:12px;color:var(--muted);line-height:1.65}
.export-picks{max-height:180px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:8px;background:var(--surface2)}
.export-pick-actions{display:flex;justify-content:flex-end;gap:13px;padding:3px 6px 8px}
.export-pick-actions button{background:none;border:0;color:var(--accent);font-size:11px;font-weight:700;padding:4px;cursor:pointer}
.export-check{display:flex!important;align-items:flex-start;gap:9px;font-size:11.5px;color:var(--text);padding:8px;cursor:pointer;line-height:1.45}
.export-check:hover{background:var(--surface);border-radius:6px}
.export-check input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:16px;accent-color:var(--accent);margin:1px 0 0;cursor:pointer}
.export-check>span{min-width:0}
.export-check strong{display:block;font-size:11.5px}
.export-check small{display:block;color:var(--muted);font-size:10px;line-height:1.5}
.export-columns-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:6px}
.export-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:10px;background:var(--surface2);padding:6px}
.export-columns label{padding:7px 8px}
#export-form .modal-footer{position:sticky;bottom:-25px;background:var(--surface);padding:15px 0 4px;z-index:1}
@media(max-width:600px){.rate-setting{grid-template-columns:minmax(0,1fr) minmax(115px,.7fr)}.export-columns{grid-template-columns:1fr}.project-numbers .money-figure{font-size:17px}}
.calendar-day.project-has-day:not(.is-selected){box-shadow:inset 0 0 0 1px var(--accent);border-color:var(--accent)}
.calendar-day .day-dots>span:not(.more-dot){display:inline-flex;align-items:center;justify-content:center}
.history-money{color:var(--teal);font-weight:750;white-space:nowrap;font-size:11.5px}
.history-table{min-width:800px}
#export-form{gap:14px}
#export-form .export-picks{max-height:155px}
#export-form .export-check{padding:6px 8px}
#export-form .modal-footer{position:static}

/* Bitácora Executive Tech · detalles de calendario y pagos */
.calendar-day{padding:0!important;gap:0!important;overflow:hidden;min-height:88px;position:relative}
.calendar-day-pick{display:flex;flex-direction:column;gap:7px;align-items:flex-start;width:100%;height:100%;border:0;background:transparent;color:inherit;padding:11px 10px;cursor:pointer;text-align:left;font:inherit;min-height:0}
.calendar-day-pick:focus-visible,.day-inspect:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:7px}
.day-project-tags{display:flex;gap:3px;flex-wrap:wrap;align-content:flex-start;min-width:0;max-width:100%;max-height:52px;overflow:hidden;padding-right:15px}
.day-project-tag{color:#fff!important;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;padding:3px 5px;min-height:17px;line-height:1.15;font-size:9px;font-weight:800;letter-spacing:.01em;white-space:nowrap}
.day-project-tag.violet{background:#645bd4}.day-project-tag.teal{background:#078a80}.day-project-tag.blue{background:#3c70ca}.day-project-tag.amber{background:#aa6a14}.day-project-tag.rose{background:#b64372}.day-project-tag.green{background:#18804b}.day-project-tag.sky{background:#1980a8}.day-project-tag.slate{background:#64748b}
.day-project-tag.is-current{box-shadow:0 0 0 1px #e0dcff,0 0 0 3px rgba(137,129,255,.35)}
.extra-events{font-size:9px;font-weight:800;color:var(--text);padding:2px}
.day-inspect{position:absolute;bottom:5px;right:5px;border:1px solid var(--line);width:21px;height:21px;border-radius:6px;background:var(--surface);color:var(--muted);display:grid;place-items:center;cursor:pointer;z-index:2}
.day-inspect svg{width:13px;height:13px}.day-inspect:hover{color:var(--accent);border-color:var(--accent)}
.project-card-code,.modal-project-code{display:inline-flex;align-items:center;color:var(--accent);font-weight:800;letter-spacing:.04em;font-size:11px;margin:0 0 7px}
.modal-project-code{background:var(--surface2);padding:8px 10px;border-radius:7px;gap:6px}
.project-finance-strip{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:11px 0;border-top:1px solid var(--line);color:var(--muted);font-size:11px}
.project-finance-strip strong{color:var(--text);font-size:12px}
.project-finance-strip>span:last-child{font-weight:800;color:var(--text)}
.rate-setting{grid-template-columns:1fr!important}.rate-setting .form-field{max-width:340px}
.project-detail{display:grid;gap:15px}
.detail-heading{display:flex;align-items:center;gap:10px;color:var(--text);font-size:12px}
.detail-heading>span:nth-child(2){flex:1;min-width:0;line-height:1.7}
.detail-heading small{font-size:11px;color:var(--soft)}
.detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.detail-stats>div{min-width:0;padding:12px;background:var(--surface2);border-radius:9px;border:1px solid var(--line);display:grid;gap:5px}
.detail-stats small{font-size:11px;color:var(--soft)}
.detail-stats strong{font-size:17px;font-weight:800;overflow-wrap:anywhere}
.detail-actions{display:flex;gap:7px;flex-wrap:wrap}.detail-actions .btn{flex:1 1 auto}
.detail-subtitle{display:flex;align-items:center;justify-content:space-between;margin:6px 0 0;font-size:13px}
.detail-subtitle span{color:var(--muted)}
.payment-list,.audit-list{display:grid;gap:4px;max-height:255px;overflow:auto}
.payment-row{display:flex;align-items:center;justify-content:space-between;padding:10px;background:var(--surface2);border:1px solid var(--line);border-radius:8px;gap:8px}
.payment-row>span{min-width:0;display:grid;gap:3px}.payment-row strong{font-size:13px}.payment-row small{color:var(--soft);font-size:11px;overflow-wrap:anywhere}
.audit-list>div{display:grid;gap:4px;padding:9px 0;border-bottom:1px solid var(--line);font-size:11px}.audit-list small{color:var(--soft)}
.close-info,.inline-warning{background:var(--surface2);padding:12px;border-radius:9px;font-size:12px;line-height:1.55}
.inline-warning{border:1px solid var(--orange);color:var(--text)}
.export-advanced{border:1px solid var(--line);border-radius:9px;padding:10px}
.export-advanced summary{cursor:pointer;color:var(--muted);font-size:12px;font-weight:700}
.export-advanced[open] summary{padding-bottom:15px;color:var(--text)}
.export-advanced .form-field{margin-bottom:4px}
@media(max-width:620px){.calendar-day{min-height:74px!important;height:74px!important}.calendar-day-pick{padding:6px 3px;gap:4px}.day-project-tags{padding-right:0;gap:2px;max-height:45px}.day-project-tag{font-size:7px;min-height:13px;padding:2px 3px}.day-inspect{width:16px;height:16px;right:2px;bottom:2px;border-radius:4px}.day-inspect svg{width:10px;height:10px}.calendar-day .day-number{font-size:10px!important}.detail-actions{flex-direction:column}.detail-actions .btn{width:100%}}
@media(max-width:390px){.calendar-day{min-height:69px!important;height:69px!important}.day-project-tag{font-size:6.5px;letter-spacing:-.02em}.detail-stats strong{font-size:14px}}

/* Centro de Operaciones / Executive Tech: colores automáticos y estados accesibles */
.automatic-dot{background:var(--project-color)!important;border-color:var(--project-color)!important}
.automatic-avatar{background:var(--project-color)!important;color:#fff!important;border-color:var(--project-color)!important}
.day-project-tag.automatic-tag{background:var(--project-color)!important;color:#fff!important}
.auto-color-preview{display:flex;gap:12px;align-items:center;background:var(--surface2);border:1px solid var(--line);padding:12px;border-radius:9px}
.auto-color-preview .automatic-dot{min-width:15px;width:15px;height:15px}
.auto-color-preview span:last-child{display:grid;gap:4px}.auto-color-preview strong{font-size:12px}.auto-color-preview small{font-size:11px;color:var(--muted)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

.auth-passkey{display:grid;gap:12px;margin-top:18px;text-align:center}.auth-passkey>span{font-size:11px;color:#8b9cba}.auth-passkey .btn{margin:0;border-color:#4d6287;background:#20304b;color:#eaf1ff}.auth-passkey small{font-size:10.5px;line-height:1.6;color:#aab9d3}
.passkey-devices{display:grid;gap:8px;margin-bottom:15px}.passkey-none,.settings-security-note{font-size:11px;color:var(--muted);line-height:1.5}.settings-security-note{margin-top:15px}
.passkey-item{display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--surface2);border:1px solid var(--line);border-radius:9px;padding:12px}
.passkey-item span{display:grid;gap:4px;min-width:0}.passkey-item strong{font-size:12px;overflow-wrap:anywhere}.passkey-item small{font-size:10px;color:var(--muted)}
.passkey-item .btn{flex-shrink:0}

/* Opciones de vinculación simples, sin exponer claves internas */
.centro-simple .sso-simple-state{padding:14px 16px;border:1px solid var(--border,#32435f);background:rgba(120,116,219,.08);border-radius:11px;margin:15px 0;font-size:13px;line-height:1.55}
.centro-simple .sso-advanced{margin-top:20px;border-top:1px solid var(--border,#34435a);padding-top:16px;font-size:13px}
.centro-simple .sso-advanced summary{cursor:pointer;font-weight:650;margin-bottom:15px}
.centro-simple .settings-security-note{line-height:1.5}
