:root {
  --ink: #102a3a;
  --muted: #647783;
  --line: #dce5e9;
  --paper: #ffffff;
  --canvas: #f3f6f7;
  --navy: #0b2a3b;
  --teal: #0d7c78;
  --teal-soft: #e5f4f2;
  --warning: #d97706;
  --danger: #dc4c45;
  --shadow: 0 18px 50px rgba(19, 52, 67, 0.09);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.auth-gate { position: fixed; z-index: 1000; inset: 0; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at top, #164c61 0, #0b2a3b 42%, #071c28 100%); }
.auth-card { width: min(430px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.auth-mark { margin-bottom: 22px; }
.auth-card h1 { font-size: 30px; }
.auth-copy { margin: 9px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 14px; }
.auth-form input { width: 100%; text-transform: none; letter-spacing: normal; }
.auth-submit { width: 100%; margin-top: 2px; }
.auth-mode-button { width: 100%; margin-top: 16px; padding: 5px; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; }
.auth-reset-button { margin-top: 3px; color: #607580; font-size: 10px; }
.auth-domain-note { display: block; margin-top: 12px; color: #8b9aa1; text-align: center; font-size: 9px; }
.auth-error { padding: 10px 11px; border-radius: 9px; color: #943b35; background: #faeae8; font-size: 11px; line-height: 1.45; }
.access-badge { padding: 7px 10px; border-radius: 999px; color: #17664e; background: #e7f5ef; font-size: 10px; font-weight: 800; white-space: nowrap; }
.access-badge.viewer { color: #805b18; background: #fff3d8; }
body.read-only .segment-card:hover { transform: none; box-shadow: none; }
body.read-only .quick-assignees { display: none; }
body.read-only .segment-open { cursor: default; }

.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 20px 20px; color: #d8e3e7;
  background: linear-gradient(170deg, #0c2e40 0%, #0a2433 68%, #081d29 100%);
  display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; gap: 12px; align-items: center; color: white; text-decoration: none; padding: 0 8px 28px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #f4b942; color: #102a3a; box-shadow: 0 8px 24px rgba(244,185,66,.18); }
.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { font-family: Manrope, sans-serif; display: block; font-size: 17px; letter-spacing: -.02em; }
.brand small { color: #91a8b3; font-size: 12px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { border: 0; border-radius: 10px; padding: 11px 13px; color: #a9bbc3; background: transparent; text-align: left; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.10); box-shadow: inset 3px 0 #f4b942; }
.nav-icon { width: 20px; font-size: 18px; text-align: center; }
.sidebar-section { margin-top: 34px; padding: 0 8px; }
.eyebrow { margin: 0 0 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: #7e939d; }
.team-mini-list { display: grid; gap: 12px; margin-top: 14px; }
.team-mini { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: #c1d0d6; }
.avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.team-mini small { display: block; color: #728d98; font-weight: 500; margin-top: 1px; }
.sidebar-footer { margin-top: auto; padding: 15px 8px 2px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connection-state { display: flex; align-items: center; gap: 9px; min-width: 0; }
.connection-state strong, .connection-state small { display: block; white-space: nowrap; }
.connection-state strong { color: #dbe6ea; font-size: 11px; }
.connection-state small { color: #718b96; font-size: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #667f89; box-shadow: 0 0 0 4px rgba(102,127,137,.12); }
.status-dot.online { background: #3bbf98; box-shadow: 0 0 0 4px rgba(59,191,152,.14); }
.icon-button { border: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #8fa5ae; background: transparent; font-size: 17px; }
.icon-button:hover { background: rgba(255,255,255,.08); color: white; }

.main-content { min-width: 0; padding: 0 38px 56px; }
.topbar { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
h1, h2, h3 { font-family: Manrope, sans-serif; margin: 0; letter-spacing: -.035em; }
h1 { font-size: 27px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.topbar-actions, .range-controls { display: flex; align-items: center; gap: 10px; }
.week-step { width: 40px; padding: 0; font-size: 17px; }
.button { min-height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.primary { color: white; background: var(--teal); box-shadow: 0 8px 20px rgba(13,124,120,.18); }
.button.primary span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: white; color: #4285f4; font-size: 11px; }
.button.ghost { color: #36515e; border-color: var(--line); background: white; }
.button.subtle { color: #48616c; background: #edf2f3; }
.button.dark { color: white; background: var(--navy); box-shadow: 0 8px 22px rgba(11,42,59,.15); }
.button.danger { color: #a43d37; border-color: #efc5c1; background: #fff5f4; }
.plan-actions { display: flex; align-items: center; gap: 8px; }
.control-card { margin: 24px 0 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); display: flex; justify-content: space-between; align-items: end; gap: 18px; box-shadow: 0 4px 18px rgba(19,52,67,.04); }
.control-card label, .field { display: grid; gap: 5px; color: #607580; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
input, select { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; color: var(--ink); padding: 0 10px; outline: 0; }
input:focus, select:focus { border-color: #65aaa6; box-shadow: 0 0 0 3px rgba(13,124,120,.1); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 30px; }
.stat-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); display: flex; align-items: center; gap: 13px; }
.stat-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.ocean { background: #e4f2f4; color: #14778a; }.stat-icon.green { background: #e6f5ee; color: #14855b; }.stat-icon.amber { background: #fdf1d9; color: #bb7107; }.stat-icon.purple { background: #eee9fa; color: #7044bc; }
.stat-card strong, .stat-card small { display: block; }
.stat-card strong { font-family: Manrope, sans-serif; font-size: 20px; }
.stat-card small { margin-top: 1px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.hour-counter-section { margin-bottom: 30px; }
.hour-counter-heading { margin-bottom: 12px; }
.load-balance-card { margin-bottom: 12px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 4px 18px rgba(19,52,67,.04); }
.load-balance-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.load-balance-head strong, .load-balance-head small { display: block; }.load-balance-head strong { font-size: 12px; }.load-balance-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.average-key { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }.average-key i { width: 2px; height: 13px; background: #243f4d; }
.load-legend { margin: 11px 0 9px 150px; display: flex; gap: 12px; color: var(--muted); font-size: 8px; }.load-legend span { display: flex; align-items: center; gap: 4px; }.load-legend i { width: 8px; height: 8px; border-radius: 3px; }
.load-evening { background: #7c3aed; }.load-night { background: #244d6a; }.load-saturday { background: #e56b19; }.load-sunday { background: #16875b; }.load-holiday { background: #c43d59; }
.load-balance-body { display: grid; gap: 8px; }.load-row { display: grid; grid-template-columns: 135px minmax(160px, 1fr) 82px; align-items: center; gap: 10px; }.load-row.inactive { opacity: .45; }
.load-employee { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; }.load-employee .avatar { width: 23px; height: 23px; border-radius: 7px; }.load-employee span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-track { position: relative; height: 18px; border-radius: 6px; background: #edf2f3; }.load-average-marker { position: absolute; z-index: 2; left: var(--average-position); top: -3px; bottom: -3px; width: 2px; background: #243f4d; transform: translateX(-1px); }.load-segments { height: 100%; min-width: 0; border-radius: 6px; display: flex; overflow: hidden; }.load-segments span { min-width: 0; }
.load-score { text-align: right; }.load-score strong, .load-score small { display: block; }.load-score strong { font-family: Manrope, sans-serif; font-size: 14px; }.load-score small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.hour-counter-card { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 4px 18px rgba(19,52,67,.04); }
.counter-legend { min-width: 940px; padding: 9px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; color: #526a75; font-size: 9px; font-weight: 700; }.counter-legend span { display: flex; align-items: center; gap: 5px; }.counter-legend i, .counter-value-detail i { width: 7px; height: 7px; border-radius: 50%; }.counter-legend i.worked, .counter-value-detail .worked i { background: #178462; }.counter-legend i.planned, .counter-value-detail .planned i { background: #2d75ad; }.counter-legend small { margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 500; }
.hour-counter-table { width: 100%; min-width: 940px; border-collapse: collapse; }
.hour-counter-table th, .hour-counter-table td { padding: 13px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.hour-counter-table th:last-child, .hour-counter-table td:last-child { border-right: 0; }.hour-counter-table tbody tr:last-child th, .hour-counter-table tbody tr:last-child td { border-bottom: 0; }
.hour-counter-table thead th { color: #526a75; background: #f7fafb; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.hour-counter-table thead th:first-child { min-width: 185px; text-align: left; }.hour-counter-table thead small { display: block; margin-top: 2px; color: #8798a0; font-size: 8px; letter-spacing: 0; text-transform: none; }
.hour-counter-table tbody th { position: relative; min-width: 185px; text-align: left; vertical-align: middle; font-size: 11px; }.hour-counter-table tbody th::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--counter-color); }.hour-counter-table tbody tr:hover { background: #fbfdfd; }
.counter-employee { display: flex; align-items: center; gap: 10px; }.counter-employee .avatar { width: 31px; height: 31px; border-radius: 9px; }.counter-employee > span:last-child strong, .counter-employee > span:last-child small { display: block; }.counter-employee > span:last-child strong { font-size: 11px; }.counter-employee > span:last-child small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.counter-value { min-width: 118px; }.counter-value-total { margin-bottom: 7px; white-space: nowrap; }.counter-value-total strong { font-family: Manrope, sans-serif; font-size: 19px; }.counter-value-total small { margin-left: 2px; color: var(--muted); font-size: 9px; }.counter-value-detail { display: grid; justify-content: center; gap: 3px; }.counter-value-detail span { min-width: 84px; display: grid; grid-template-columns: 7px 22px auto; align-items: center; gap: 3px; color: var(--muted); text-align: left; font-size: 7px; }.counter-value-detail b { color: #36515e; text-align: right; font-size: 8px; }.counter-value.is-zero { color: #91a2aa; }.counter-value.is-zero .counter-value-detail { opacity: .45; }.counter-value-empty { color: #9aa9b0; font-size: 8px; }.counter-value.is-zero .counter-value-total { margin-bottom: 4px; }.counter-value.is-zero .counter-value-total strong { color: #a5b2b8; font-size: 18px; }
.hour-counter-table .counter-total { color: var(--counter-color); background: color-mix(in srgb, var(--counter-color) 7%, white); }.hour-counter-table .counter-total .counter-value-total strong { font-size: 22px; }.hour-counter-table .counter-total .counter-value-detail b { color: var(--counter-color); }
.holiday-assistant-section { margin-bottom: 30px; }
.holiday-assistant-badge { padding: 7px 10px; border-radius: 999px; color: #9f2941; background: #fff0f2; font-size: 9px; font-weight: 800; }
.holiday-recommendations { margin-bottom: 10px; display: grid; gap: 8px; }
.holiday-recommendation { min-height: 66px; padding: 12px 14px; border: 1px solid #efc6cf; border-radius: 13px; background: linear-gradient(110deg, #fff5f6, white); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.holiday-date strong, .holiday-date small, .holiday-choice small, .holiday-choice strong, .holiday-choice em { display: block; }.holiday-date strong { font-size: 12px; }.holiday-date small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.holiday-choice { display: flex; align-items: center; gap: 9px; }.holiday-choice small { color: #a52d45; font-size: 8px; font-weight: 800; text-transform: uppercase; }.holiday-choice strong { font-size: 11px; }.holiday-choice em { margin-top: 1px; color: var(--muted); font-size: 8px; font-style: normal; }
.holiday-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 10px; }
.holiday-summary { margin-bottom: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.holiday-summary-person { padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: white; display: flex; align-items: center; gap: 8px; }.holiday-summary-person .avatar { width: 24px; height: 24px; border-radius: 7px; }.holiday-summary-person strong, .holiday-summary-person small { display: block; }.holiday-summary-person strong { font-family: Manrope, sans-serif; font-size: 14px; }.holiday-summary-person small { color: var(--muted); font-size: 8px; }
.holiday-history-card { border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; box-shadow: 0 4px 18px rgba(19,52,67,.04); }.holiday-history-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }.holiday-history-head strong, .holiday-history-head small { display: block; }.holiday-history-head strong { font-size: 12px; }.holiday-history-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }.holiday-history-scroll { overflow-x: auto; }
.holiday-history-table { width: 100%; min-width: 620px; border-collapse: collapse; }.holiday-history-table th, .holiday-history-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }.holiday-history-table tbody tr:last-child td { border-bottom: 0; }.holiday-history-table th { color: #526a75; background: #f7fafb; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }.holiday-history-table td > strong, .holiday-history-table td > small { display: block; }.holiday-history-table td > strong { font-size: 11px; }.holiday-history-table td > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.holiday-status { padding: 4px 7px; border-radius: 999px; color: #276398; background: #eaf3fb; font-size: 8px; font-weight: 800; }.holiday-status.done { color: #147157; background: #e6f5ee; }.holiday-duty-list { display: flex; flex-wrap: wrap; gap: 5px; }.holiday-duty-chip { padding: 4px 7px 4px 4px; border: 1px solid color-mix(in srgb, var(--holiday-employee) 35%, white); border-radius: 8px; background: color-mix(in srgb, var(--holiday-employee) 8%, white); display: flex; align-items: center; gap: 5px; }.holiday-duty-chip .avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 7px; }.holiday-duty-chip strong { font-size: 9px; }.holiday-duty-chip small { color: var(--muted); font-size: 8px; }.holiday-unassigned { color: var(--danger); font-size: 9px; font-weight: 800; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.legend-dot.ideal { background: #38a979; }.legend-dot.recommended { background: #d62f29; }.legend-dot.notice { background: #e1a124; }.legend-dot.conflict { background: #db554d; }
.empty-state { min-height: 350px; border: 1px dashed #c9d7dc; border-radius: 16px; background: rgba(255,255,255,.48); display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px; }
.empty-state p { max-width: 400px; margin: 8px 0 20px; color: var(--muted); font-size: 13px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty-illustration { width: 54px; height: 54px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 18px; background: var(--teal-soft); color: var(--teal); font-size: 24px; }

.schedule-board { display: grid; gap: 14px; }
.week-card { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 6px 20px rgba(20,51,66,.04); }
.week-head { padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafcfc; display: flex; align-items: center; justify-content: space-between; }
.week-head strong { font-size: 12px; }.week-head span { color: var(--muted); font-size: 10px; }
.shift-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.shift-card { min-width: 0; min-height: 155px; padding: 13px; border: 0; border-right: 1px solid var(--line); background: white; text-align: left; color: inherit; transition: .15s ease; position: relative; }
.shift-card:last-child { border-right: 0; }.shift-card:hover { background: #f9fbfb; }.shift-card:focus-visible { outline: 3px solid rgba(13,124,120,.25); outline-offset: -3px; }
.shift-card.weekend { background: #fbfaf6; }
.shift-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.shift-day { font-size: 11px; font-weight: 800; }.shift-date { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.slot-pill { padding: 3px 6px; border-radius: 6px; color: #627983; background: #eef3f4; font-size: 9px; font-weight: 700; white-space: nowrap; }
.assignee { margin-top: 18px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.assignee .avatar { width: 34px; height: 34px; border-radius: 10px; }
.avatar-stack { display: flex; min-width: 48px; }.avatar-stack .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px white; }
.assignee strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.assignee small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.unassigned { margin-top: 22px; color: var(--danger); font-size: 11px; font-weight: 700; }
.shift-flags { min-height: 21px; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px; }
.flag { max-width: 100%; padding: 3px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 800; }
.flag.error { color: #a93833; background: #fae8e6; }.flag.warning, .flag.notice { color: #9b620f; background: #fbf0d9; }.flag.ideal { color: #13714e; background: #e5f4ec; }
.manual-mark { position: absolute; right: 12px; bottom: 10px; color: #91a3aa; font-size: 9px; }

.calendar-week { border: 1px solid var(--line); border-radius: 15px; background: white; overflow: hidden; box-shadow: 0 6px 20px rgba(20,51,66,.04); }
.calendar-week-head { min-height: 42px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafcfc; display: flex; align-items: center; justify-content: space-between; }
.calendar-week-head strong { font-size: 12px; }.calendar-week-head span { color: var(--muted); font-size: 10px; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { min-width: 920px; display: grid; grid-template-columns: 70px repeat(7, minmax(118px, 1fr)); }
.calendar-corner, .calendar-day-head, .calendar-time, .calendar-slot { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day-head:nth-child(8), .calendar-slot:nth-child(8n) { border-right: 0; }
.calendar-corner { min-height: 50px; padding: 10px; background: #f7fafb; display: grid; place-items: center; color: #8a9aa2; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.calendar-day-head { min-height: 50px; padding: 9px 10px; background: #f7fafb; text-align: center; }
.calendar-day-head.weekend { background: #fbf8f0; }
.calendar-day-head.holiday { background: #fff0f2; box-shadow: inset 0 3px #c43d59; }.calendar-day-head.holiday small { display: block; margin-top: 2px; color: #a52d45; font-size: 7px; font-weight: 800; }
.calendar-day-head strong { display: block; font-size: 10px; text-transform: uppercase; }.calendar-day-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.calendar-time { min-height: 96px; padding: 11px 7px; background: #fafcfc; color: #6b7f89; text-align: right; font-size: 9px; font-weight: 800; }
.calendar-slot { min-height: 96px; padding: 5px; background: white; }
.calendar-slot.weekend { background: #fdfbf6; }
.segment-card { width: 100%; min-height: 142px; padding: 7px; border: 1px solid color-mix(in srgb, var(--employee-color, #9db0b8) 55%, white); border-left: 5px solid var(--employee-color, #9db0b8); border-radius: 8px; color: var(--ink); background: color-mix(in srgb, var(--employee-color, #9db0b8) 20%, white); text-align: left; position: relative; transition: .16s ease; overflow: hidden; }
.segment-open { width: 100%; padding: 2px; border: 0; color: inherit; background: transparent; text-align: left; }
.segment-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(16,42,58,.09); }
.segment-card.has-error { background: #fff0ee; border-color: #e7a39e; border-left-color: var(--danger); }
.segment-card.unassigned { border: 3px solid #c92d26; background: repeating-linear-gradient(135deg, #fff0ee 0, #fff0ee 9px, #ffd9d5 9px, #ffd9d5 18px); box-shadow: 0 0 0 3px rgba(201,45,38,.2), 0 8px 22px rgba(201,45,38,.18); }
.segment-compact-head { padding: 1px 2px 6px; display: flex; align-items: center; justify-content: space-between; gap: 5px; }.segment-compact-head strong { font-size: 10px; text-transform: uppercase; }.segment-compact-head span { color: #526a75; font-size: 9px; font-weight: 800; }
.segment-person { min-height: 42px; display: grid; place-items: center; }.segment-person .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 11px; }.segment-person.empty { opacity: .55; }.empty-assignee { width: 38px; height: 38px; border: 2px dashed #bc7771; border-radius: 11px; display: grid; place-items: center; color: #a94a43; background: rgba(255,255,255,.55); font-size: 16px; font-weight: 900; }
.segment-person strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.segment-person small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; }
.segment-warning { position: absolute; right: 6px; top: 6px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--danger); font-size: 9px; font-weight: 800; }
.quick-assignees { margin-top: 5px; padding: 7px 0 1px; border-top: 1px solid rgba(100,119,131,.16); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.quick-assignee { position: relative; width: 100%; min-width: 0; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 8px; color: white; background: var(--quick-color); font-size: 9px; font-weight: 900; line-height: 1; }
.quick-assignee.ideal::before { content: ""; position: absolute; left: 50%; bottom: -7px; width: 5px; height: 5px; border-radius: 50%; background: #d62f29; box-shadow: 0 0 0 1px white; transform: translateX(-50%); }
.quick-assignee.holiday-recommended { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c43d59; }.quick-assignee.holiday-recommended::after { content: "✦"; position: absolute; right: -5px; top: -8px; color: #c43d59; font-size: 8px; text-shadow: 0 1px white; }
.quick-unassign { color: #a51f19; background: #ffe1de; border-color: #e6aaa5; font-size: 11px; }
.quick-unassign.selected { color: white; background: #c92d26; border-color: #7f1712; }
.quick-assignee:hover { transform: translateY(-1px); }
.quick-assignee.selected { border-color: var(--ink); box-shadow: 0 0 0 1px white; }
.quick-assignee.unavailable { position: relative; opacity: .5; filter: grayscale(.35); cursor: not-allowed; }
.quick-assignee.unavailable::after { content: ""; position: absolute; left: 1px; right: 1px; top: 7px; height: 2px; background: #c9352d; transform: rotate(-35deg); }
.empty-slot { height: 84px; display: grid; place-items: center; color: #bac6cb; font-size: 9px; }

.dialog { width: min(540px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 25px 80px rgba(8,31,43,.28); }
.dialog::backdrop { background: rgba(6,24,33,.46); backdrop-filter: blur(3px); }
.dialog form { padding: 25px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.dialog-head .icon-button { margin: -4px -4px 0 0; color: #647984; font-size: 24px; }.dialog-head .icon-button:hover { color: var(--ink); background: #edf2f3; }
.shift-time { margin: 20px 0; padding: 12px 14px; border-radius: 10px; background: #f1f5f5; color: #455f6b; font-size: 12px; }
fieldset { margin: 0; padding: 0; border: 0; } legend { margin-bottom: 9px; color: #607580; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.employee-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.employee-option { cursor: pointer; position: relative; }.employee-option input { position: absolute; opacity: 0; pointer-events: none; }
.employee-option > span { min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; }
.employee-option-text { min-width: 0; display: block; }.employee-option-text strong, .employee-option-text small { display: block; }.employee-option-text small { margin-top: 2px; color: var(--danger); font-size: 8px; font-weight: 700; }
.employee-option.calendar-absent .employee-option-text strong { color: var(--danger); text-decoration: line-through; }
.employee-option input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(13,124,120,.08); }
.employee-option input:disabled + span { opacity: .4; cursor: not-allowed; }
.nobody-option > span { border-color: #e2b0ac; background: #fff5f4; }.nobody-option input:checked + span { border-color: #c92d26; background: #ffe4e1; box-shadow: 0 0 0 2px rgba(201,45,38,.1); }
.nobody-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: white; background: #c92d26; font-weight: 900; }
.nobody-option .employee-option-text strong, .nobody-option .employee-option-text small { color: #a51f19; }
.rule-hint { min-height: 36px; margin-top: 13px; padding: 9px 11px; border-radius: 9px; color: #526a74; background: #eef3f4; font-size: 10px; line-height: 1.45; }
.rule-hint.has-rule-warning { color: #8d3d22; background: #fce9df; box-shadow: inset 3px 0 #dc4c45; font-weight: 700; }
.dialog-actions { margin-top: 22px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }.dialog-spacer { flex: 1; }
.dialog-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }.settings-dialog .field { margin-top: 18px; }.settings-dialog input { width: 100%; text-transform: none; letter-spacing: normal; }
.setup-note { margin-top: 13px; padding: 12px; display: grid; gap: 5px; border-radius: 10px; background: #f1f5f5; color: #536a74; font-size: 10px; }.setup-note strong { color: var(--ink); }.setup-note code { font-size: 10px; }
.cloud-status-card { margin: 18px 0; padding: 13px; border-radius: 11px; color: #526a74; background: #eef3f4; font-size: 11px; line-height: 1.5; }.cloud-status-card strong, .cloud-status-card small { display: block; }.cloud-status-card strong { color: var(--ink); }.cloud-status-card small { margin-top: 3px; }.cloud-status-card.connected { color: #17664e; background: #e7f5ef; }.cloud-status-card.error { color: #913c37; background: #faeae8; }
.import-content { margin-top: 18px; display: grid; gap: 12px; }
.import-group { display: grid; gap: 7px; }
.import-group h3 { font-size: 12px; }
.import-change, .import-warning { padding: 10px 11px; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.import-change { border: 1px solid #c9e1dc; background: #edf7f5; }
.import-change strong, .import-warning strong { display: block; margin-bottom: 2px; color: var(--ink); }
.import-warning { border: 1px solid #efd7a6; background: #fff7e7; color: #76571b; }
.import-empty { padding: 15px; border-radius: 10px; background: #f1f5f5; color: var(--muted); text-align: center; font-size: 11px; }
.info-list { display: grid; gap: 8px; margin-top: 20px; }.info-row { padding: 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 11px; }.info-row strong { display: block; font-size: 12px; }.info-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }.info-rule { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }.info-rule:last-child { border-bottom: 0; }
.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 8px; z-index: 100; }
.toast { width: min(360px, calc(100vw - 44px)); padding: 12px 14px; border-radius: 11px; color: white; background: #173848; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease both; }.toast.error { background: #9d3934; }.toast.success { background: #087160; }.toast.warning { background: #b65d16; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 78px 1fr; }.sidebar { padding-inline: 12px; }.brand { padding-inline: 6px; justify-content: center; }.brand > span:last-child, .nav-item:not(.active) { font-size: 0; }.nav-item { justify-content: center; padding-inline: 6px; }.nav-item.active { font-size: 0; }.nav-icon { font-size: 18px; }.sidebar-section { display: none; }.connection-state div { display: none; }.sidebar-footer { padding-inline: 5px; }.main-content { padding-inline: 24px; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }.sidebar { position: static; width: 100%; height: 64px; padding: 10px 16px; flex-direction: row; align-items: center; }.brand { padding: 0; }.brand-mark { width: 38px; height: 38px; }.nav-list { margin-left: auto; display: flex; }.nav-item { width: 42px; }.sidebar-footer { margin: 0 0 0 4px; border: 0; padding: 0; }.connection-state { display: none; }.main-content { padding: 0 16px 38px; }.topbar { min-height: 88px; }.topbar-actions .button span + * { display: none; }.control-card { align-items: stretch; flex-direction: column; }.range-controls { flex-wrap: wrap; }.plan-actions { justify-content: flex-end; }.stat-grid { grid-template-columns: 1fr 1fr; }.holiday-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.holiday-recommendation { align-items: flex-start; flex-direction: column; }.shift-grid { grid-template-columns: 1fr; }.shift-card { min-height: 100px; border-right: 0; border-bottom: 1px solid var(--line); }.shift-card:last-child { border-bottom: 0; }.assignee { margin-top: 10px; }.shift-flags { margin-top: 8px; }.section-heading { align-items: start; flex-direction: column; }.legend { display: none; }
}
@media (max-width: 500px) {
  h1 { font-size: 22px; }.auth-card { padding: 28px 22px; }.auth-card h1 { font-size: 27px; }.topbar-actions { gap: 5px; }.topbar-actions .button { width: 41px; padding: 0; font-size: 0; }.topbar-actions .button > span { font-size: 12px; }.access-badge { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }.stat-grid { gap: 8px; }.stat-card { padding: 12px; }.stat-card small { white-space: normal; }.employee-options { grid-template-columns: 1fr; }.range-controls label { flex: 1; }.range-controls input, .range-controls select { width: 100%; }.load-balance-head { align-items: start; flex-direction: column; }.load-legend { margin-left: 0; flex-wrap: wrap; }.load-row { grid-template-columns: 100px minmax(100px, 1fr) 62px; gap: 6px; }.load-employee .avatar { display: none; }.load-score strong { font-size: 12px; }
}
