:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #172935;
  background: #eff3f5;
  --ink: #172935;
  --muted: #536773;
  --line: #d6e0e4;
  --nav: #132738;
  --teal: #0d6159;
  --teal-soft: #e3f2ee;
  --red: #892d2b;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 3px solid #117b71; }
button, .button { border: 1px solid var(--line); border-radius: 7px; padding: .58rem .85rem; font-weight: 650; background: white; color: var(--ink); }
button:hover { background: #e8eff1; }
button.primary { background: var(--teal); border-color: var(--teal); color: white; }
button.primary:hover { background: #084b44; }
button.danger { color: var(--red); border-color: #dda8a1; }
a { color: var(--teal); font-weight: 650; }
button:focus:not(:focus-visible) { outline: none; }
.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 1.6rem; color: #fff; background: var(--nav); padding: 1.5rem 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 760; font-size: 1.13rem; letter-spacing: -.025em; }
.brand-logo { flex: none; display: block; width: 27px; height: 42px; object-fit: contain; border-radius: 2px; }
.brand-name { line-height: 1.13; }
.sidebar small { color: #bbced8; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar button, .sidebar nav a { text-align: left; color: #eef5f7; background: transparent; border-color: transparent; }
.sidebar nav a { display: flex; align-items: center; border: 1px solid transparent; border-radius: 7px; padding: .58rem .85rem; text-decoration: none; }
.sidebar button:hover, .sidebar button[aria-current="page"], .sidebar nav a:hover { background: #274559; border-color: #36596e; }
.account { margin-top: auto; padding: .85rem .5rem 0; border-top: 1px solid #365063; }
.account strong, .account small { display: block; }
.account button { display: block; padding: .42rem 0; }
.topline { background: #fff; border-bottom: 1px solid var(--line); padding: .8rem clamp(1rem, 3vw, 2.75rem); display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; }
.topline label { font-weight: 680; display: flex; gap: .65rem; align-items: center; }
.workspace { min-width: 0; }
main { max-width: 1250px; margin: auto; padding: 1.75rem clamp(1rem, 3vw, 2.75rem) 3rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); line-height: 1.12; letter-spacing: -.04em; }
h2 { font-size: 1.18rem; letter-spacing: -.016em; }
h3 { font-size: 1.05rem; }
.heading, .row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.heading { margin-bottom: 1.3rem; }
.section { margin-top: 1.5rem; }
.section > h2 { margin-bottom: .75rem; }
.card { padding: 1.08rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.card.accent { border-left: 4px solid var(--teal); }
.card.fire { border-left: 4px solid #a9433b; }
.cards { display: grid; gap: .7rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .75rem; align-items: start; }
.muted, small { color: var(--muted); font-size: .875rem; }
.pill { background: #e9eef2; color: #365162; display: inline-block; padding: .26rem .55rem; border-radius: 5px; font-size: .87rem; font-weight: 680; }
.pill.good { color: #15584c; background: var(--teal-soft); }
.pill.bad { color: var(--red); background: #fbe8e4; }
.pill.warn { color: #694b14; background: #fff0d1; }
.text { line-height: 1.55; white-space: pre-wrap; }
.flow { display: grid; gap: .65rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.notes { border-left: 2px solid #abc5c6; padding-left: .7rem; }
.notes p { margin: .22rem 0; }
details summary { cursor: pointer; font-weight: 650; color: var(--teal); }
details[open] > summary { margin-bottom: .65rem; }
.media { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 230px)); gap: .6rem; }
.media figure { margin: 0; padding: .55rem; border: 1px solid var(--line); border-radius: 8px; }
.media img, .media video { display: block; max-width: 100%; width: 100%; height: 120px; object-fit: contain; background: #edf2f3; border-radius: 5px; }
.field { display: grid; gap: .3rem; font-weight: 630; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; background: #fff; border: 1px solid #aebfc8; border-radius: 6px; padding: .55rem .6rem; color: var(--ink); }
select { appearance: none; padding-right: 1.8rem; background: linear-gradient(45deg, transparent 50%, #526c76 50%) calc(100% - 13px) 52% / 5px 5px no-repeat, linear-gradient(135deg, #526c76 50%, transparent 50%) calc(100% - 8px) 52% / 5px 5px no-repeat, white; }
textarea { resize: vertical; min-height: 6rem; }
.dictation { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.dictation button[aria-pressed="true"] { color: var(--red); border-color: #dda8a1; background: #fbe8e4; }
.dictation button[hidden] { display: none; }
.schedule-controls label { max-width: 18rem; }
.schedule-scroll { overflow-x: auto; margin-top: .75rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
.schedule-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; font-size: .875rem; text-align: center; }
.schedule-table th, .schedule-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 2.45rem; }
.schedule-table th { padding: .36rem .2rem; background: #e3eef0; }
.schedule-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 11rem; padding: .4rem .6rem; text-align: left; }
.schedule-table tbody th { background: #fff; }
.schedule-table tr:last-child td, .schedule-table tbody tr:last-child th { border-bottom: 0; }
.schedule-table tr > :last-child { border-right: 0; }
.schedule-table th small { display: block; }
.schedule-table .saturday { background: #e3f2ee; }
.schedule-table .sunday { background: #fbe8e4; }
.schedule-table .day { background: #dcefe9; }
.schedule-table .night { background: #ced9e1; }
.schedule-table .hours { font-weight: 700; padding: 0 .35rem; }
.schedule-table select { appearance: none; border: 0; border-radius: 0; padding: .35rem .2rem; background: transparent; text-align: center; font-weight: 650; }
.schedule-table select:focus-visible { outline-offset: -3px; }
.mail-recipients { margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: .6rem; max-height: 36vh; overflow: auto; }
.mail-recipient + .mail-recipient { padding-top: .55rem; border-top: 1px solid var(--line); }
.mail-recipient .field[hidden] { display: none; }
.reset-code { font-size: 1.15rem; padding: .3rem .45rem; background: #e9eef2; border-radius: 5px; user-select: all; }
.print-shift { display: none; }
.check { display: flex; align-items: flex-start; gap: .55rem; }
.check input { width: 1.1rem; height: 1.1rem; flex: none; }
.filters { margin-bottom: .75rem; }
.login { max-width: none; min-height: 100vh; display: grid; place-items: center; background: var(--nav); }
.login .card { width: min(100%, 27rem); padding: clamp(1rem, 4vw, 2rem); }
.login .brand { margin-bottom: .45rem; }
.login .brand-logo { width: 37px; height: 57px; }
.login h1:not(.brand) { font-size: 1.8rem; }
.login form { margin-top: .6rem; }
.point-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .55rem; }
.point-list button { min-height: 44px; }
.error { color: var(--red); }
.loading { text-align: center; padding-top: 3rem; }
dialog { border: 1px solid var(--line); border-radius: 10px; max-width: min(95vw, 40rem); width: 100%; max-height: 90vh; padding: 1.2rem; color: var(--ink); }
dialog::backdrop { background: #132738a8; }
#toast { position: fixed; bottom: 1rem; right: 1rem; max-width: min(90vw, 35rem); background: #163340; color: white; padding: .75rem 1rem; border-radius: 8px; z-index: 2; }
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { padding: .85rem 1rem; gap: .65rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .account { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .35rem 0 0; }
  .account button { padding: .3rem .45rem; }
}
@media (pointer: coarse) {
  button, select, .sidebar nav a { min-height: 44px; }
}
@media print {
  @page { size: A4 landscape; margin: 9mm; }
  body:has(#schedule-editor) { background: white; }
  body:has(#schedule-editor) .layout { display: block; }
  body:has(#schedule-editor) .sidebar, body:has(#schedule-editor) .topline, #schedule-editor button,
  #schedule-editor .schedule-controls, #schedule-editor select, body:has(#schedule-editor) #toast { display: none; }
  body:has(#schedule-editor) main { max-width: none; padding: 0; }
  #schedule-editor h1 { font-size: 15pt; }
  #schedule-editor .section, #schedule-editor .heading { margin: 0 0 4mm; }
  #schedule-editor .schedule-scroll { overflow: visible; border: 0; }
  .schedule-table { min-width: 0; font-size: 7pt; print-color-adjust: exact; }
  .schedule-table th, .schedule-table td { min-width: 0; padding: 1mm .3mm; border: 1px solid #acb4ba; }
  .schedule-table th:first-child { position: static; min-width: 28mm; padding: 1mm; }
  .schedule-table th small { font-size: 6pt; }
  .schedule-table .print-shift { display: inline; font-weight: 650; }
  .schedule-table td > [aria-hidden] { display: none; }
  .schedule-table tr { break-inside: avoid; }
}
