:root{--navy:#0b1d36;--navy2:#132b4f;--orange:#f05a28;--paper:#f4f1eb;--white:#fff;--ink:#172033;--muted:#718096;--line:#dce2e9;--green:#168a62;--red:#c83e42;--shadow:0 12px 36px rgba(11,29,54,.09)}
*{box-sizing:border-box}
body{margin:0;font:14px/1.45 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#edf0f4}
button,input,select{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 70% 20%,#18345e 0,var(--navy) 54%,#071325 100%)}
.login-card{width:min(420px,calc(100vw - 32px));padding:42px;background:white;border-radius:20px;box-shadow:0 28px 80px #02091480}
.brand-logo{display:block;width:58px;height:64px;object-fit:contain}
.brand-logo.small{width:40px;height:44px;filter:drop-shadow(0 2px 6px #0004)}
.eyebrow{margin:18px 0 4px;color:var(--orange);font-size:11px;font-weight:800;letter-spacing:.14em}
.login-card h1{font-size:30px;margin:0 0 4px}
.muted,.section-head p{color:var(--muted);margin:0}
.login-card label,.filters label{display:flex;flex-direction:column;gap:6px;color:#596579;font-size:12px;font-weight:650}
.login-card label{margin:18px 0}
.login-card input,.filters input,.filters select,.user-form input,.user-form select{border:1px solid var(--line);border-radius:9px;padding:11px 12px;background:white;outline:none}
.login-card input:focus,.filters input:focus,.filters select:focus{border-color:var(--orange);box-shadow:0 0 0 3px #f05a281c}
.primary{border:0;background:var(--orange);color:white;padding:11px 16px;border-radius:9px;font-weight:750}
.wide{width:100%}
.error,.red{color:var(--red)!important}
.green{color:var(--green)!important}
.app{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:244px;padding:24px 18px;background:var(--navy);color:white;display:flex;flex-direction:column}
.sidebar-brand{display:flex;align-items:center;gap:11px;margin:0 8px 34px}
.sidebar-brand strong{display:block;font-size:13px;letter-spacing:.06em}
.sidebar-brand span{font-size:9px;letter-spacing:.16em;color:#8ca0bc}
.sidebar nav{display:grid;gap:7px}
.nav{border:0;border-radius:10px;padding:12px 14px;text-align:left;color:#aebbd0;background:transparent;font-weight:650}
.nav:hover,.nav.active{color:white;background:#ffffff12}
.nav.active{box-shadow:inset 3px 0 var(--orange)}
.sidebar-bottom{margin-top:auto}
.sync-state{display:flex;align-items:center;gap:8px;padding:12px;color:#aebbd0;font-size:12px}
.sync-state i{width:8px;height:8px;background:#8ba0bd;border-radius:50%}
.sync-state.ok i{background:#31c48d}
.sync-state.bad i{background:#ef6262}
.user-line{border-top:1px solid #ffffff16;padding:16px 10px 0;display:flex;justify-content:space-between;align-items:center}
.user-line button{border:0;color:white;background:transparent;font-size:20px}
main{margin-left:244px;padding:28px 32px 50px;max-width:1800px}
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.topbar .eyebrow{margin:0}
.topbar h1{font-size:29px;letter-spacing:-.03em;margin:3px 0}
.top-actions{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px}
.ghost,.exports button,.segmented button,.quick-periods button,.pagination button{border:1px solid var(--line);background:white;border-radius:8px;padding:8px 11px;color:#49566a}
.ghost:hover,.exports button:hover,.segmented button:hover,.quick-periods button.active{border-color:var(--orange);color:var(--orange)}
.panel,.kpis article{background:white;border:1px solid #e3e7ec;border-radius:14px;box-shadow:0 3px 16px rgba(11,29,54,.04)}
.filters{display:flex;align-items:end;gap:12px;padding:15px;overflow-x:auto}
.quick-periods{display:flex;gap:5px;align-items:center;white-space:nowrap}
.filters .search{min-width:190px;flex:1}
.warning{margin:14px 0;padding:12px 15px;border-left:4px solid #d99516;background:#fff4d8;border-radius:7px;color:#765210}
.kpis{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:14px;margin:16px 0}
.kpis article{padding:18px;position:relative;overflow:hidden}
.kpis article:after{content:"";position:absolute;right:-25px;top:-36px;width:75px;height:75px;border:16px solid #f05a2809;border-radius:50%}
.kpis span{display:block;color:var(--muted);font-size:12px}
.kpis strong{display:block;font-size:31px;margin:6px 0 3px}
.kpis small{color:#8d98a8}
.workspace{padding:20px}
.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.section-head h2{margin:0;font-size:19px}
.segmented,.exports{display:flex;gap:6px}
.calendar-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.calendar-grid.mode-week .calendar-day{min-height:220px}
.calendar-grid.mode-day{grid-template-columns:1fr}
.calendar-grid.mode-day .calendar-day{min-height:260px}
.calendar-grid.mode-day .day-total{font-size:20px}
.calendar-week.mode-day{display:none}
.sync-run{display:grid;grid-template-columns:150px 90px 1fr;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.sync-run .success{color:var(--green);font-weight:750}
.sync-run .error{color:var(--red);font-weight:750}
.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.calendar-week span{padding:8px 10px;color:var(--muted);font-size:11px;font-weight:750;text-transform:uppercase}
.calendar-grid{border-top:1px solid var(--line);border-left:1px solid var(--line)}
.calendar-day{min-height:116px;padding:9px;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:white;text-align:left;transition:.15s}
.calendar-day:hover{background:#faf7f2;box-shadow:inset 0 0 0 1px var(--orange)}
.calendar-day.outside{background:#f7f8fa;color:#b4bdca}
.calendar-day.today .day-number{background:var(--orange);color:white}
.day-number{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;font-weight:750}
.day-total{display:block;margin-top:9px;color:var(--navy);font-weight:800}
.day-statuses{display:flex;gap:4px;margin-top:8px;flex-wrap:wrap}
.dot{width:7px;height:7px;border-radius:50%;background:#8895a7}
.dot.completed{background:var(--green)}
.dot.cancelled{background:var(--red)}
.dot.no_result{background:#d99516}
.dot.rescheduled{background:#7557c6}
.table-wrap{overflow:auto;max-height:62vh}
table{width:100%;border-collapse:collapse;min-width:1100px}
th{text-align:left;color:#667085;font-size:11px;text-transform:uppercase;letter-spacing:.04em;padding:11px 10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:1}
th[data-sort]{cursor:pointer}
td{padding:12px 10px;border-bottom:1px solid #edf0f3;vertical-align:top}
tbody tr:hover{background:#fafbfc}
.object-link{color:var(--navy);font-weight:750;text-decoration:none}
.object-link:hover{color:var(--orange)}
.subtext{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.status{display:inline-flex;padding:5px 8px;border-radius:14px;background:#edf1f5;font-size:11px;font-weight:750}
.status.completed{background:#e6f7f1;color:var(--green)}
.status.cancelled{background:#fdeced;color:var(--red)}
.status.no_result{background:#fff1cf;color:#93630b}
.status.rescheduled{background:#eee9fb;color:#6547b2}
.pagination{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:15px}
.pagination button:disabled{opacity:.35;cursor:not-allowed}
dialog{border:0;border-radius:16px;padding:28px;width:min(850px,calc(100vw - 32px));max-height:85vh;box-shadow:0 20px 80px #08142666}
dialog::backdrop{background:#08142699;backdrop-filter:blur(3px)}
dialog h2{margin:0 30px 20px 0}
.modal-close{position:absolute;right:18px;top:14px;border:0;background:transparent;font-size:28px;color:#7d8999}
.modal-row{padding:14px 0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:120px 1fr;gap:14px}
.user-form{display:grid;grid-template-columns:1fr 1.2fr .7fr 1.4fr auto;gap:8px;margin-bottom:20px}
.user-card{padding:10px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between}
.toast{position:fixed;right:24px;bottom:24px;background:var(--navy);color:white;padding:13px 17px;border-radius:9px;box-shadow:var(--shadow);z-index:20}
.insight-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.insight-card{padding:16px;border-radius:10px;background:#f5f7f9}
.insight-card strong{display:block;font-size:25px}
.rank{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line)}
@media(max-width:1200px){.kpis{grid-template-columns:repeat(3,1fr)}
.filters{flex-wrap:wrap}
.filters .search{flex:unset}
.user-form{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){.sidebar{position:static;width:auto;height:auto;padding:12px}
.sidebar-brand{margin:0}
.sidebar nav{display:flex;overflow:auto;margin-top:12px}
.sidebar-bottom{display:none}
main{margin:0;padding:18px 12px}
.topbar{align-items:flex-start}
.top-actions{flex-direction:column;align-items:flex-end}
.kpis{grid-template-columns:repeat(2,1fr)}
.calendar-day{min-height:78px;padding:5px}
.day-statuses{display:none}
.calendar-week span{padding:5px;font-size:9px}
.filters{display:grid;grid-template-columns:1fr 1fr}
.quick-periods,.search{grid-column:1/-1}
.insight-grid{grid-template-columns:1fr}
}
