:root{--bg:#1a1a2e;--bg-secondary:#16213e;--bg-surface:#1f2b47;--bg-hover:#263354;--text:#e0e0e0;--text-secondary:#a0a0b0;--text-muted:#6b7280;--border:#2d3a56;--accent:#4a9eff;--accent-hover:#3a8eef;--danger:#ef4444;--success:#22c55e;--cal-1:#4a9eff;--cal-2:#f472b6;--cal-3:#34d399;--cal-4:#fbbf24;--cal-1-bg:rgba(74,158,255,.15);--cal-2-bg:rgba(244,114,182,.15);--cal-3-bg:rgba(52,211,153,.15);--cal-4-bg:rgba(251,191,36,.15);--header-height:56px;--hour-height:60px;--time-col-width:56px}*{box-sizing:border-box;margin:0;padding:0}html{color-scheme:dark}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;min-height:100vh}button{cursor:pointer;font-family:inherit}.login-container{display:flex;align-items:center;justify-content:center;min-height:100vh}.login-form{background:var(--bg-surface);padding:2rem;border-radius:8px;border:1px solid var(--border);width:320px;display:flex;flex-direction:column;gap:1rem}.login-form h1{text-align:center;font-size:1.5rem;color:var(--accent)}.login-form input{padding:.625rem .75rem;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text);font-size:.875rem;outline:none}.login-form input:focus{border-color:var(--accent)}.login-form button{padding:.625rem;border-radius:6px;border:none;background:var(--accent);color:#fff;font-size:.875rem;font-weight:500}.login-form button:hover{background:var(--accent-hover)}.login-form button:disabled{opacity:.6;cursor:not-allowed}.login-error{color:var(--danger);font-size:.8125rem;text-align:center}.room-legend{gap:1rem;padding:.5rem 1rem;background:var(--bg-secondary);border-bottom:1px solid var(--border);flex-wrap:wrap}.room-legend,.room-legend-item{display:flex;align-items:center}.room-legend-item{gap:.375rem}.room-legend-color{width:12px;height:12px;border-radius:3px;flex-shrink:0}.room-legend-name{font-size:.75rem;color:var(--text-secondary)}.room-legend-hint{font-size:.6875rem;color:var(--accent);margin-left:auto;padding:.25rem .625rem;background:rgba(74,158,255,.15);border:1px solid var(--accent);border-radius:12px}.room-legend-hint.desktop-only{display:inline-block}.booking-mode-toggle{font-size:.6875rem;padding:.25rem .625rem;background:var(--bg-surface);color:var(--text-secondary);border:1px solid var(--border);border-radius:12px;cursor:pointer;transition:all .15s}.booking-mode-toggle:hover{background:var(--bg-hover)}.booking-mode-toggle.active{background:var(--accent);color:#fff;border-color:var(--accent)}.calendar-header{gap:.75rem;padding:0 1rem;height:var(--header-height);background:var(--bg-secondary);border-bottom:1px solid var(--border);flex-shrink:0}.calendar-header,.header-nav{display:flex;align-items:center}.header-nav{gap:.25rem}.header-nav button{padding:.375rem .625rem;border-radius:4px;border:1px solid var(--border);background:var(--bg-surface);color:var(--text);font-size:.8125rem}.header-nav button:hover{background:var(--bg-hover)}.header-date{font-size:1rem;font-weight:600;min-width:200px}.header-views{display:flex;gap:0;margin-left:.5rem}.header-views button{padding:.375rem .75rem;border:1px solid var(--border);background:var(--bg-surface);color:var(--text-secondary);font-size:.8125rem}.header-views button:first-child{border-radius:4px 0 0 4px}.header-views button:last-child{border-radius:0 4px 4px 0}.header-views button.active{background:var(--accent);color:#fff;border-color:var(--accent)}.header-spacer{flex:1 1}.btn-new-event{padding:.375rem .75rem;border-radius:6px;border:none;background:var(--accent);color:#fff;font-size:.8125rem;font-weight:500}.btn-new-event:hover{background:var(--accent-hover)}.btn-logout{padding:.375rem .625rem;border-radius:4px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:.8125rem}.btn-logout:hover{color:var(--text);border-color:var(--text-secondary)}.calendar-container{display:flex;flex-direction:column;height:calc(100vh - var(--header-height));overflow:hidden}.calendar-day-headers{display:grid;border-bottom:1px solid var(--border);background:var(--bg-secondary);flex-shrink:0}.calendar-day-headers.week-view{grid-template-columns:var(--time-col-width) repeat(7,1fr)}.calendar-day-headers.day-view{grid-template-columns:var(--time-col-width) 1fr}.day-header{padding:.5rem;text-align:center;font-size:.75rem;color:var(--text-secondary);border-left:1px solid var(--border)}.day-header .day-number{font-size:1.25rem;font-weight:600;color:var(--text)}.day-header.today .day-number{background:var(--accent);color:#fff;border-radius:50%;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center}.time-header{width:var(--time-col-width)}.calendar-grid-scroll{overflow-y:auto;flex:1 1}.calendar-grid{display:grid;position:relative;min-height:calc(var(--hour-height) * 16)}.calendar-grid.week-view{grid-template-columns:var(--time-col-width) repeat(7,1fr)}.calendar-grid.day-view{grid-template-columns:var(--time-col-width) 1fr}.time-column{grid-row:1;grid-column:1}.time-label{height:var(--hour-height);padding:0 .5rem;font-size:.6875rem;color:var(--text-muted);text-align:right;position:relative;top:-.4em}.day-column{position:relative;border-left:1px solid var(--border);grid-row:1;cursor:pointer}.hour-row{height:var(--hour-height);border-bottom:1px solid var(--border)}.hour-row-half{height:calc(var(--hour-height) / 2);border-bottom:1px dashed var(--border);opacity:.3}.event-block{position:absolute;border-radius:4px;padding:2px 4px;font-size:.6875rem;line-height:1.3;overflow:hidden;cursor:pointer;border-left:3px solid;z-index:1;box-sizing:border-box}.event-block:hover{opacity:.9;z-index:2}.event-block.cal-1{background:var(--cal-1-bg);border-color:var(--cal-1);color:var(--cal-1)}.event-block.cal-2{background:var(--cal-2-bg);border-color:var(--cal-2);color:var(--cal-2)}.event-block.cal-3{background:var(--cal-3-bg);border-color:var(--cal-3);color:var(--cal-3)}.event-block.cal-4{background:var(--cal-4-bg);border-color:var(--cal-4);color:var(--cal-4)}.event-block .event-time{font-size:.625rem;opacity:.8}.event-block .event-title{font-weight:500}.all-day-row{display:grid;border-bottom:1px solid var(--border);background:var(--bg-secondary);min-height:28px}.all-day-row.week-view{grid-template-columns:var(--time-col-width) repeat(7,1fr)}.all-day-row.day-view{grid-template-columns:var(--time-col-width) 1fr}.all-day-label{font-size:.625rem;color:var(--text-muted);padding:4px;text-align:right}.all-day-cell{border-left:1px solid var(--border);padding:2px;display:flex;flex-direction:column;gap:1px}.all-day-event{border-radius:3px;padding:1px 4px;font-size:.6875rem;font-weight:500;cursor:pointer;border-left:3px solid}.all-day-event.cal-1{background:var(--cal-1-bg);border-color:var(--cal-1);color:var(--cal-1)}.all-day-event.cal-2{background:var(--cal-2-bg);border-color:var(--cal-2);color:var(--cal-2)}.all-day-event.cal-3{background:var(--cal-3-bg);border-color:var(--cal-3);color:var(--cal-3)}.all-day-event.cal-4{background:var(--cal-4-bg);border-color:var(--cal-4);color:var(--cal-4)}.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:100}.modal{background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;padding:1.5rem;width:420px;max-width:90vw;max-height:90vh;overflow-y:auto}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.modal-header h2{font-size:1.125rem;margin:0}.modal-close{background:none;border:none;font-size:1.5rem;color:var(--text-muted);cursor:pointer;padding:0;line-height:1;flex-shrink:0}.modal-close:hover{color:var(--text)}.modal h2{font-size:1.125rem;margin-bottom:1rem}.modal-form{gap:.75rem}.form-group,.modal-form{display:flex;flex-direction:column}.form-group{gap:.25rem}.form-group label{font-size:.75rem;color:var(--text-secondary);font-weight:500}.form-group input,.form-group select,.form-group textarea{padding:.5rem .625rem;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text);font-size:.875rem;font-family:inherit;outline:none}.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--accent)}.form-group textarea{resize:vertical;min-height:60px}.room-selector{display:flex;flex-direction:column;gap:.5rem}.room-option{display:flex;align-items:flex-start;gap:.75rem;padding:.625rem;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);cursor:pointer;transition:border-color .15s,background .15s}.room-option:hover{background:var(--bg-hover)}.room-option.selected{border-color:var(--accent);background:rgba(74,158,255,.1)}.room-color{width:4px;height:100%;min-height:32px;border-radius:2px;flex-shrink:0}.room-info{display:flex;flex-direction:column;gap:.125rem}.room-name{font-size:.875rem;font-weight:500;color:var(--text)}.room-description{font-size:.75rem;color:var(--text-muted)}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}.modal-actions button{padding:.5rem 1rem;border-radius:6px;font-size:.8125rem;font-weight:500;border:none}.btn-cancel{background:var(--bg-secondary);color:var(--text-secondary);border:1px solid var(--border)!important}.btn-cancel:hover{background:var(--bg-hover)}.btn-submit{background:var(--accent);color:#fff}.btn-submit:hover{background:var(--accent-hover)}.btn-submit:disabled{opacity:.6;cursor:not-allowed}.btn-delete{background:transparent;color:var(--danger);border:1px solid var(--danger)!important}.btn-delete:hover{background:rgba(239,68,68,.1)}.event-detail{display:flex;flex-direction:column;gap:.75rem}.event-detail .detail-row{display:flex;flex-direction:column;gap:.125rem}.event-detail .detail-label{font-size:.6875rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.event-detail .detail-value{font-size:.875rem}.event-detail .calendar-badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.75rem;font-weight:500}.loading{display:flex;align-items:center;justify-content:center;height:calc(100vh - var(--header-height));color:var(--text-muted)}.error-banner{background:rgba(239,68,68,.15);border:1px solid var(--danger);color:var(--danger);padding:.5rem 1rem;font-size:.8125rem;text-align:center}.current-time-line{position:absolute;left:0;right:0;height:2px;background:var(--danger);z-index:3;pointer-events:none}.current-time-line:before{content:"";position:absolute;left:-4px;top:-3px;width:8px;height:8px;background:var(--danger);border-radius:50%}@media (max-width:768px){:root{--header-height:48px;--hour-height:50px;--time-col-width:42px}.calendar-header{gap:.5rem;flex-wrap:wrap;height:auto;min-height:var(--header-height);padding:.5rem}.header-date{font-size:.875rem;min-width:auto;order:-1;width:100%;text-align:center;margin-bottom:.25rem}.header-nav{gap:.125rem}.btn-logout,.btn-new-event,.header-nav button,.header-views button{padding:.25rem .5rem;font-size:.75rem}.room-legend{padding:.375rem .5rem;gap:.5rem}.room-legend-item{gap:.25rem}.room-legend-color{width:10px;height:10px}.room-legend-name{font-size:.6875rem}.room-legend-hint.desktop-only{display:none}.booking-mode-toggle{margin-left:auto}.day-header{padding:.25rem;font-size:.625rem}.day-header .day-number{font-size:1rem}.day-header.today .day-number{width:26px;height:26px}.time-label{font-size:.5625rem;padding:0 .25rem}.event-block{font-size:.5625rem;padding:1px 2px}.event-block .event-time{font-size:.5rem}.modal{width:95vw;padding:1rem;max-height:95vh}.modal h2{font-size:1rem}.form-group label{font-size:.6875rem}.form-group input,.form-group select,.form-group textarea{font-size:16px;padding:.5rem}.room-option{padding:.5rem}.room-name{font-size:.8125rem}.room-description{font-size:.6875rem}.login-form{width:90vw;max-width:320px;padding:1.5rem}.login-form input{font-size:16px}.calendar-container{height:calc(100vh - var(--header-height) - 60px)}}@media (max-width:480px){.header-views{margin-left:0}.header-spacer{display:none}.calendar-header{justify-content:center}.day-header .day-number{font-size:.875rem}.day-header.today .day-number{width:22px;height:22px}}