*{box-sizing:border-box}body{font:16px system-ui;color:#102747;background:#eef1f6;margin:0}main{max-width:620px;margin:0 auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:20px;border-bottom:1px solid #d5deea}header a{color:inherit;text-decoration:none;font-weight:800;letter-spacing:.04em}header small{display:block;font-size:10px;letter-spacing:.12em}button{background:#102747;color:white;border:0;border-radius:8px;padding:12px 18px;font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #779fc8;outline-offset:3px}li{margin:12px 0;overflow-wrap:anywhere}li button{margin-left:8px}[hidden]{display:none!important}footer{margin-top:32px;font-size:12px;color:#586b83}#birthday{position:relative;overflow:hidden;isolation:isolate;text-align:center;background:#102747;color:#fff;padding:56px 24px 24px;border-radius:18px;margin:20px 0 28px;box-shadow:0 12px 28px #10274720}#birthday h2{font-size:clamp(24px,6cqw,34px);line-height:1.15;margin:12px 0}#birthday p{line-height:1.5}#birthday button{background:#fff;color:#102747;font-weight:650;margin-top:8px}.birthday-kicker{font-size:11px;font-weight:700;letter-spacing:.18em;color:#d4b477}.confetti{position:absolute;inset:0 0 auto;height:50px;overflow:hidden;pointer-events:none;z-index:-1;display:grid;grid-template-columns:repeat(14,1fr);justify-items:center;align-items:start}.confetti-piece{display:block;width:4px;height:7px;border-radius:1px;animation:confetti-in 1.8s ease-out both;transform:rotate(22deg)}.c0{background:#d4b477}.c1{background:#fff}.c2{background:#c41230}.c3{background:#819bbb}.p0{margin-top:6px;animation-delay:.1s}.p1{margin-top:18px;animation-delay:.2s}.p2{margin-top:12px;animation-delay:.3s}.p3{margin-top:26px;animation-delay:.15s}.p4{margin-top:3px;animation-delay:.25s}.p5{margin-top:16px;animation-delay:.4s}.p6{margin-top:8px;animation-delay:.05s}@keyframes confetti-in{from{opacity:0;transform:translateY(-28px) rotate(-35deg)}to{opacity:.85;transform:translateY(0) rotate(22deg)}}@media(prefers-reduced-motion:reduce){.confetti-piece{animation:none}}@container leitstand (max-width:420px){main{padding:16px}header button{font-size:13px;padding:10px}}

:root{--navy:#102747;--muted:#60748b;--line:#dce4ee}body{background:#f1f4f8}main{max-width:980px;padding:20px 24px 96px}header{position:sticky;top:0;background:#f1f4f8;z-index:5;padding:12px 0;gap:12px}header a{flex:1;font-size:clamp(16px,3cqw,23px)}header small{font-size:clamp(8px,1.5cqw,10px)}svg{width:24px;height:24px;flex-shrink:0}.icon-button,.avatar{background:#e5ebf3;color:var(--navy);display:grid;place-items:center;min-width:42px;height:42px;padding:8px;font-size:22px;border-radius:12px}.avatar{border-radius:50%;font-weight:700;font-size:16px}.welcome{background:linear-gradient(125deg,#102747,#24466a);color:white;border-radius:18px;padding:26px;margin:18px 0 26px;box-shadow:0 12px 28px #10274716}.welcome h1{font-size:clamp(25px,5cqw,35px);margin:8px 0}.welcome p{margin:8px 0;color:#e0e9f4}.welcome .eyebrow{font-size:11px;letter-spacing:.1em;text-transform:uppercase}.panel,.tile,.nav-row{background:white;border:1px solid var(--line);border-radius:14px;color:var(--navy)}.panel{padding:18px;margin:12px 0}.stack{display:grid;gap:12px}.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:9px;padding:17px;min-height:110px}.tile svg,.nav-row svg{color:#527395}.tile small,.nav-row small,.detail small,.panel small{color:var(--muted);font-size:12px}.nav-row{display:flex;align-items:center;width:100%;text-align:left;gap:14px;margin:0 0 10px;padding:16px}.row-label{display:grid;gap:4px;flex:1}.chevron{color:var(--muted);font-size:24px}.menu{box-shadow:0 12px 24px #10274716}.menu .nav-row:last-child{margin-bottom:0}.page-heading{display:flex;align-items:center;gap:12px;margin:20px 0}.page-heading h1{font-size:clamp(22px,5cqw,30px);margin:0}.empty{display:grid;justify-items:center;text-align:center;gap:10px;padding:30px 18px}.empty svg{width:34px;height:34px;color:#7890ad}.empty p{color:var(--muted);margin:0;font-size:14px}h2{font-size:18px;margin:26px 0 12px}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:6;background:#ffffffed;border-top:1px solid var(--line);padding:8px 12px max(8px,env(safe-area-inset-bottom));justify-content:center;backdrop-filter:blur(16px)}.bottom-item{display:grid;justify-items:center;gap:4px;background:transparent;color:var(--muted);flex:1;max-width:180px;padding:8px 4px;font-size:11px}.bottom-item.active{color:var(--navy);background:#e9eff6}.detail{display:grid;gap:4px;border-bottom:1px solid var(--line);padding:10px 0}.panel form{display:grid;gap:10px}.panel input{font:inherit;border:1px solid #b9c9dc;border-radius:8px;padding:11px;color:var(--navy);width:100%}.outline{background:white;color:var(--navy);border:1px solid var(--line)}.danger{color:#a4142a;border-color:#e4b7c0}button:disabled{opacity:.5;cursor:default}#status:empty{display:none}footer{text-align:center}.symbol{display:grid;place-items:center}#account{min-height:50vh}@container leitstand (min-width:740px){.tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}@container leitstand (max-width:420px){main{padding:10px 14px 96px}header{gap:7px}.icon-button,.avatar{min-width:38px;height:38px}.tile{padding:13px}}
.panel select{font:inherit;border:1px solid #b9c9dc;border-radius:8px;padding:11px;color:var(--navy);background:white;width:100%}.availability-actions{display:flex;gap:8px;flex-wrap:wrap}.availability-actions button{flex:1}.panel input[type=datetime-local]{min-width:0;max-width:100%}

@container leitstand (min-width: 1024px) {
  main:has(#account:not([hidden])) {
    max-width: none;
    padding: 20px clamp(32px, 4cqw, 64px) 40px;
  }

  #account {
    display: grid;
    grid-template-columns: clamp(168px, 16cqw, 220px) minmax(0, 1fr);
    gap: 0 28px;
    align-items: start;
    margin-top: 24px;
  }

  #account > [data-page], #main-menu {
    grid-column: 2;
    min-width: 0;
  }

  #account .bottom-nav {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 92px;
    display: grid;
    justify-content: stretch;
    gap: 6px;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  #account .bottom-item {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: none;
    padding: 12px;
    font-size: 14px;
    text-align: left;
  }

  #account .bottom-item:hover, #account .nav-row:hover, #account .tile:hover {
    background: #eef3fa;
  }

  #account .welcome, #account .page-heading {
    margin-top: 0;
  }

  #account .welcome {
    padding: 32px;
  }

  #main-menu {
    margin-top: 0;
  }
}

@container leitstand (min-width: 1024px) {
  #dashboard {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(238px, 2fr);
    gap: 18px;
    align-items: start;
  }

  #dashboard > #birthday,
  #dashboard > .welcome,
  .desktop-metrics,
  #customer-section {
    grid-column: 1 / -1;
  }

  #dashboard > .welcome {
    margin: 0;
    display: grid;
    align-content: center;
    min-height: 156px;
  }

  #operational:not([hidden]) {
    display: contents;
  }

  .desktop-metrics h2,
  .desktop-services h2,
  #areas-section h2,
  #admin-section h2,
  #customer-section h2 {
    margin-top: 0;
  }

  .desktop-services, #areas-section, #admin-section, #customer-section {
    min-width: 0;
    padding: 20px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .desktop-services > .panel,
  #customer-section > .panel,
  #admin-section > .nav-row {
    margin-bottom: 0;
  }

  #areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #areas .tile {
    min-height: 96px;
    overflow-wrap: anywhere;
  }

  #metrics .tile {
    min-height: 104px;
    overflow-wrap: anywhere;
  }

}

#area-tabs { display: none; }
[data-area="first_aid"] { --area-color: #176043; --area-soft: #e9f6ef; }
[data-area="medical"] { --area-color: #a04408; --area-soft: #fff2e5; }
[data-area="fire_watch"] { --area-color: #a72333; --area-soft: #fcecef; }
[data-area="fire_training"] { --area-color: #b8dfff; --area-soft: #edf7ff; --area-ink: #123654; }
.area-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--area-color);
  color: var(--area-ink, white);
  border-radius: 16px;
  padding: 24px;
}
.area-banner h2, .area-topic h3 { margin: 0; }
.area-topic p { margin-bottom: 0; color: var(--muted); }
.area-topics { display: grid; gap: 12px; margin-top: 16px; }
.area-topic { margin: 0; }
@container leitstand (min-width: 1024px) {
  #account { gap: 16px 28px; grid-template-rows: auto 1fr; }
  #main-menu[hidden] { display: block !important; }
  #main-menu { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 92px; }
  #account .bottom-nav, #menu-toggle, #notification-link, #settings-link,
  #areas-section, #admin-section { display: none; }
  #area-tabs { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 2; }
  .area-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--area-soft, white);
    color: var(--navy);
    border: 1px solid var(--line);
  }
  .area-tab[aria-current="page"] {
    background: var(--area-color, var(--navy));
    color: var(--area-ink, white);
    border-color: transparent;
  }
  [data-area="first_aid"] svg {
    background: #176043;
    color: white;
    border-radius: 5px;
    padding: 2px;
  }
  .area-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #subpage:has(.area-dashboard) .page-heading { display: none; }
}

@container leitstand (max-width: 1023px) { .desktop-menu-item { display: none; } }
@container leitstand (min-width: 1024px) { .mobile-menu-item { display: none; } }

@container leitstand (min-width: 1024px) {
  main:has(#account:not([hidden])) > header {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  #home-link { flex: 0 0 auto; }
  main:has(#account[hidden]) #area-tabs { display: none; }
  #area-tabs { flex: 1 1 auto; gap: 10px; }

  .area-tab {
    padding: 12px 15px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
  }

  .area-tab[data-area="first_aid"],
  .area-tab[data-area="fire_watch"] {
    background: var(--area-color);
    color: white;
    border-color: transparent;
  }

  .area-tab[data-area="fire_watch"] { --area-color: #c21831; }
  .area-tab[data-area="first_aid"] svg {
    background: transparent;
    padding: 0;
    stroke-width: 3;
  }

  .area-tab[aria-current="page"] {
    box-shadow: 0 2px 0 1px var(--navy);
  }
}

body { container: leitstand / inline-size; }
body[data-layout="desktop"] main:has(#account:not([hidden])) { max-width: none; }
body[data-layout="tablet"], body[data-layout="iphone"] {
  width: var(--preview-width);
  margin-inline: auto;
}
body[data-layout="tablet"] { --preview-width: 820px; }
body[data-layout="iphone"] { --preview-width: 390px; width: min(100%, var(--preview-width)); }
.bottom-nav { max-width: var(--preview-width, 100%); margin-inline: auto; }
#layout-switch {
  display: flex;
  flex: none;
  gap: 4px;
}

.layout-tile {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 38px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--navy);
}

.layout-tile svg { width: 20px; height: 20px; }
.layout-tile:hover { background: #e9eff6; }
.layout-tile[aria-pressed="true"] { background: var(--navy); color: white; border-color: var(--navy); }
@container leitstand (min-width: 1024px) {
  #notification-link.icon-button { display: grid; }
  #main-menu [data-go="notifications"] { display: none; }
  #layout-switch { margin-inline-start: auto; }
}
@container leitstand (max-width: 420px) {
  header:has(#layout-switch:not([hidden])) { flex-wrap: wrap; }
  #home-link { min-width: 150px; }
  #layout-switch { margin-inline-start: auto; }
}

#page-content:has(.first-aid-area) { container: first-aid-page / inline-size; }
.first-aid-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.first-aid-content { container: course-content / inline-size; }
.first-aid-menu, .first-aid-content > .panel, .course-preview { margin: 0; }
.first-aid-menu { padding: 8px; }
.first-aid-menu .nav-row { margin: 0; border: 0; box-shadow: none; }
.first-aid-menu .nav-row[aria-current="page"] { background: var(--area-soft); color: var(--area-color); }
.course-list { list-style: none; padding: 0; margin: 0; }
.course-list li { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.course-list span { color: var(--muted); }
.course-form, .course-details, .course-schedule, .course-logistics { display: grid; gap: 14px; }
.course-form label { display: grid; gap: 6px; font-weight: 600; min-width: 0; }
.course-form input:not([type="radio"]), .course-form select {
 width: 100%; min-width: 0; border: 1px solid #aebccc; border-radius: 8px;
 background: white; padding: 10px; font: inherit; color: var(--navy);
}
.course-staffing { min-width: 0; margin: 0; }
.course-staffing legend { font-weight: 700; }
.course-pay { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.course-pay legend { padding: 0; font-size: .9rem; }
.course-pay-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px 12px; }
.course-pay-modes label {
 display: flex; align-items: center; padding: 6px 10px; border-radius: 8px;
 border: 1px solid var(--line); font-size: .9rem; cursor: pointer;
}
.course-pay-modes label:has(:checked) { color: var(--area-color); background: var(--area-soft); }
.course-pay-modes input { accent-color: var(--area-color); }
.course-preview img { width: 100%; height: auto; border-radius: 8px; display: block; }
.course-preview h2, .first-aid-content > .panel h2 { margin: 0 0 14px; font-size: 1.2rem; }
.course-preview dl { margin-bottom: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: .9rem; }
.course-preview dt { color: var(--muted); }
.course-preview dd { margin: 0; overflow-wrap: anywhere; }
.course-feedback { margin: 0; }
.course-feedback:empty { display: none; }
.course-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.course-primary { background: var(--area-color); }
.course-actions .outline { color: var(--area-color); border-color: var(--area-color); }
.course-form button:disabled { opacity: .55; cursor: wait; }

@container leitstand (max-width: 1023px) {
 body[data-layout="desktop"] main:has(#account:not([hidden])) > header { flex-wrap: wrap; }
 body[data-layout="desktop"] #area-tabs {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 6px;
  order: 1;
 }
 body[data-layout="desktop"] .area-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--area-soft, white);
  color: var(--navy);
  font-size: .875rem;
 }
 body[data-layout="desktop"] .area-tab[aria-current="page"] {
  background: var(--area-color, var(--navy));
  color: var(--area-ink, white);
 }
 body[data-layout="desktop"] .area-tab svg { width: 18px; height: 18px; }
}

@container first-aid-page (min-width: 650px) {
 .first-aid-area { grid-template-columns: clamp(156px, 20cqw, 190px) minmax(0, 1fr); }
}

@container course-content (min-width: 440px) {
 .course-schedule { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); }
 .course-logistics { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
}

@container course-content (min-width: 710px) {
 .course-form { grid-template-columns: minmax(0, 1fr) minmax(210px, .52fr); align-items: start; }
 .course-actions, .course-feedback { grid-column: 1 / -1; }
}


.user-filters, .user-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.user-filters > * { flex: 1 1 140px; min-width: 0; }
.user-filters > [type="search"] { flex-grow: 2; }
.user-table-scroll { overflow-x: auto; }
.user-table { border-collapse: collapse; width: 100%; text-align: left; }
.user-table th, .user-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; }
.user-table th { background: #eef3fa; }
.user-table th button { background: transparent; color: var(--navy); font-weight: 700; padding: 4px; }
.user-table td button { white-space: nowrap; }
.user-dialog { color: var(--navy); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(540px, 94vw); }
.user-dialog::backdrop { background: #10274788; }
.user-dialog h2 { margin-top: 0; }
.user-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-bottom: 12px; }
.user-fields label { display: grid; gap: 6px; }
.user-fields input { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.user-actions { justify-content: flex-end; }


/* Keep the application canvas and footer at viewport height on short pages. */
body > main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main > footer { margin-top: auto; padding-top: 32px; }


:root { --shell: #0e1d34; --shell-active: #2b405c; --workspace: #f1f4f8; }
body { background: var(--workspace); }
body > main > header {
 background: var(--shell);
 color: #fff;
 border-bottom: 1px solid #263b55;
 padding: 10px 14px;
}
#home-link { display: inline-flex; align-items: center; gap: 10px; }
#home-link img { width: auto; height: 38px; object-fit: contain; }
#home-link span { line-height: 1.2; }
header .icon-button, header .avatar, .layout-tile {
 background: #20354f;
 color: #fff;
 border-color: #3b506b;
}
.layout-tile:hover, header .icon-button:hover { background: #324c6c; }
.layout-tile[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }

#main-menu { background: var(--shell); border: 0; padding: 10px; box-shadow: none; }
#account #main-menu .nav-row {
 background: transparent;
 color: #f5f8fc;
 border: 0;
 border-radius: 8px;
 margin: 0 0 4px;
 padding: 12px;
 gap: 10px;
}
#main-menu .nav-row .chevron { display: none; }
#main-menu .nav-row small { color: #becbdd; }
#account #main-menu .nav-row:hover,
#account #main-menu .nav-row[aria-current] { background: var(--shell-active); }

@container leitstand (min-width: 1024px) {
 body > main:has(#account:not([hidden])) { padding: 0; }
 main:has(#account:not([hidden])) > header { padding-inline: clamp(18px, 2cqw, 36px); }
 #account:not([hidden]) { margin-top: 0; flex: 1; gap: 0; grid-template-rows: auto 1fr; }
 #main-menu { align-self: stretch; position: static; border-radius: 0; margin: 0; padding: 20px 10px; }
 #account > [data-page], #push-inbox-notice { margin-inline: clamp(16px, 2cqw, 36px); }
 #account > [data-page] { margin-block: 22px; }
 #push-inbox-notice { grid-column: 2; width: auto; margin-top: 16px; }
 #account > [data-page]:last-of-type { min-width: 0; }
 main:has(#account:not([hidden])) > footer { padding: 12px 18px; border-top: 1px solid var(--line); }
}


.planning-menu-links {
 list-style:none;
 margin:0 0 8px 14px;
 padding:0 0 0 8px;
 border-left:1px solid #526983;
}
.planning-menu-links li { margin:0; }
#account #main-menu .planning-menu-links .nav-row { padding:9px 7px; margin:0; gap:7px; }
.planning-menu-links svg { width:16px; height:16px; }
.planning-menu-links strong { font-weight:600; }
.planning-tabs, .calendar-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.planning-tabs { margin-bottom:16px; }
.planning-tabs [aria-current] { background: var(--shell); color:white; }
.calendar-toolbar h2 { margin:0 auto 0 0; }
.calendar-toolbar select { width:auto; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.calendar-weekday { text-align:center; padding-block:5px; color:var(--muted); }
.calendar-cell { min-width:0; min-height:76px; padding:5px; border:1px solid var(--line); border-radius:6px; overflow-wrap:anywhere; }
.calendar-pad { background:#f5f7fa; border-radius:6px; }
.calendar-current { border-color:#4d769f; background:#eef5fc; }
.calendar-service { margin-top:4px; border-left:3px solid var(--area-color); background:var(--area-soft); padding:4px; border-radius:4px; font-size:.8rem; }
.calendar-service small { display:block; font-size:.72rem; }
.calendar-year { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:10px; }
.calendar-month { min-width:0; padding:8px; border:1px solid var(--line); border-radius:8px; }
.calendar-month > button { width:100%; font-weight:650; }
.compact .calendar-cell { text-align:center; min-height:40px; padding:2px; font-size:.8rem; }
.compact .calendar-cell small { display:block; background:#dce8f4; border-radius:3px; }
.role-rights { border:1px solid var(--line); border-radius:8px; }
.role-rights label { display:flex; align-items:center; gap:8px; padding:5px; }
.role-rights input[type=checkbox] { width:auto; }
.user-fields select { width:100%; font:inherit; padding:8px; }
@container leitstand (min-width: 1024px) { .planning-tabs { display:none; } }
@container leitstand (max-width: 640px) {
 .planning-calendar { padding:8px; }
 .calendar-grid:not(.compact) { min-width:520px; }
 .planning-calendar > div:last-child { overflow-x:auto; }
}


.absence-week { --hour:36px; }
.absence-week .calendar-toolbar { margin-bottom: 8px; }
.absence-scroll { overflow:auto; max-height: min(65vh,760px); border:1px solid var(--line); border-radius:8px; }
.absence-grid { display:grid; grid-template-columns:54px repeat(7,minmax(106px,1fr)); min-width:796px; }
.absence-day,.absence-hours { min-width:0; border-inline-end:1px solid var(--line); }
.absence-day:last-child { border:0; }
.absence-day-title { display:block; height:36px; padding:8px 5px; text-align:center; background:#eaf0f8; position:sticky; top:0; z-index:2; }
.absence-hours > small { height:var(--hour); text-align:center; display:block; padding-top:3px; }
.absence-slots { height:calc(24 * var(--hour)); position:relative;
 background:repeating-linear-gradient(to bottom,white 0,white calc(var(--hour) - 1px),var(--line) calc(var(--hour) - 1px),var(--line) var(--hour));
}
.absence-block {
 position:absolute; top:var(--start); height:max(18px,var(--duration)); left:var(--column);
 width:calc(var(--block-width) - 2px); overflow:hidden; padding:2px 4px; display:block; text-align:left;
 font-size:.8rem; line-height:1; background:#e9e8f3; color:#2c254e; border:1px solid #655584; border-radius:4px;
}
.absence-block[data-kind="fire_service"] { background:#fce1e4; color:#781b28; border-color:#b74556; }
.absence-block[data-kind="other_work"] { background:#f9e9cf; color:#6b4511; border-color:#a77936; }
.absence-block[data-kind="vacation"] { background:#dceafa; color:#203d63; border-color:#6084ad; }
.absence-block small { display:block; color:inherit; margin-top:2px; font-size:.72rem; }
.calendar-source-list .panel { padding:12px; }

.absence-selectable .absence-slots { cursor: crosshair; user-select: none; }
.absence-selectable .absence-block { cursor: pointer; }
.absence-touch-selection .absence-slots { touch-action: none; }
.absence-selection { position: absolute; pointer-events: none; inset-inline: 0;
 top: var(--start); height: var(--duration); background: #3d7cb336;
 border: 1px solid #3d7cb3; border-radius: 3px; z-index: 1; }
.absence-selection-toggle { display: none; }
.absence-selection-toggle[aria-pressed="true"] { color: white; background: var(--navy); }
@media (any-pointer: coarse) { .absence-selection-toggle { display: inline-block; } }

.absence-view-switch { display:flex; gap:5px; }
.absence-view-switch button { display:grid; place-items:center; min-width:42px; min-height:42px; padding:7px; }
.absence-view-switch [aria-pressed="true"] { background:var(--navy); color:white; border-color:var(--navy); }
.absence-management > .panel h2:first-child { margin-top:0; }
.calendar-import-form { align-items:end; }
.calendar-source-list .panel:last-child { margin-bottom:0; }

.absence-week-tiles {
 display:flex; gap:8px; overflow-x:auto; padding:4px 2px 9px; margin:8px 0 14px;
}
.absence-week-tile { flex:none; padding:8px 11px; text-align:left; }
.absence-week-tile strong,.absence-week-tile small { display:block; }
.absence-week-tile[aria-current] { background:#e5effa; border-color:#527aa4; }
.absence-month .calendar-cell,.absence-year .calendar-month { text-align:left; }
.absence-month .calendar-cell small,.absence-year .calendar-month small { display:block; margin-top:5px; }
.absence-period-overview { overflow:auto; }

.absence-check { display:flex; align-items:center; gap:8px; margin-block:8px; }
.absence-check input[type="checkbox"] { width:auto; }
.absence-note-field { grid-column:1 / -1; }
.absence-note-field textarea { font:inherit; padding:8px; border:1px solid var(--line); border-radius:8px; resize:vertical; width:100%; }
.absence-table td { overflow-wrap:anywhere; }
.absence-row-actions { display:flex; flex-wrap:wrap; gap:6px; }
.absence-row-actions button { padding:7px 10px; }

.absence-week { container: absence / inline-size; }
.absence-list { margin:16px 0; padding:14px; border:1px solid var(--line); background:#f8fafc; border-radius:10px; }
.absence-list h2 { margin:0 0 10px; }
.absence-list p:empty { display:none; }
.absence-list-scroll { max-height:340px; }
.absence-table { background:white; border-radius:8px; }
.absence-table th { position:sticky; top:0; z-index:1; }
.absence-table tbody tr:nth-child(even) { background:#f7f9fc; }
.absence-kind-badge { display:inline-block; border-radius:6px; font-weight:650; padding:4px 9px; background:#efebf8; color:#503d6e; }
.absence-kind-badge[data-kind="fire_service"] { background:#fce1e4; color:#781b28; }
.absence-kind-badge[data-kind="other_work"] { background:#f9e9cf; color:#6b4511; }
.absence-kind-badge[data-kind="vacation"] { background:#dceafa; color:#203d63; }
.absence-row-actions .absence-action { display:grid; place-items:center; min-width:42px; min-height:42px; padding:6px; }
.absence-action svg { width:19px; height:19px; }
.absence-action:hover { background:#edf3fa; }
.absence-row-actions small:empty { display:none; }

@container absence (max-width: 800px) {
 .absence-grid { grid-template-columns:48px repeat(7,minmax(90px,1fr)); min-width:678px; }
 .absence-hours { position:sticky; inset-inline-start:0; z-index:3; background:white; }
 .absence-week-tiles { scroll-snap-type:x proximity; }
 .absence-week-tile { scroll-snap-align:start; }
}

@container absence (max-width: 650px) {
 .absence-list { padding:10px; }
 .absence-list-scroll { max-height:460px; }
 .absence-table,.absence-table tbody { display:block; background:transparent; }
 .absence-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .absence-table tbody tr,.absence-table tbody tr:nth-child(even) {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px;
  background:white; border:1px solid var(--line); border-radius:8px; margin-bottom:8px; padding:8px;
 }
 .absence-table td { grid-column:1 / -1; border:0; padding:3px; display:flex; gap:8px; align-items:baseline; }
 .absence-table td:not(:first-child):not(.absence-actions-cell)::before { content:attr(data-label); flex:0 0 86px; color:var(--muted); font-size:.8rem; }
 .absence-table td:first-child { grid-column:1; grid-row:1; }
 .absence-table .absence-actions-cell { grid-column:2; grid-row:1; }
 .absence-month { min-width:0 !important; }
 .absence-month .calendar-cell { padding:4px; min-height:64px; }
 .absence-month .calendar-cell small { font-size:.65rem; }
}

.absence-list { container: absence / inline-size; }
.absence-list-controls { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }

.service-table-scroll { max-height:65vh; border:1px solid var(--line); border-radius:8px; }
.service-table { min-width:570px; }
.service-table thead th { position:sticky; top:0; }
.service-table tbody tr:nth-child(even) { background:#f8fafc; }
.service-area-badge { display:inline-block; padding:4px 8px; border-radius:6px; background:var(--area-soft,#eff3f8); color:var(--navy); }
