:root {
  color-scheme: light;
  --ink: #29211e;
  --muted: #695950;
  --charcoal: #211c1a;
  --terracotta: #974c37;
  --terracotta-wash: #f5e5dc;
  --paper: #fffaf1;
  --gold: #d7ad66;
  --background: #f6efe3;
  --border: #e4d7c6;
  --amber: #794624;
  --amber-wash: #f8eddd;
  --danger: #8b382c;
  --shadow: 0 2px 5px #35211110;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: var(--background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input[type="checkbox"], select { touch-action: manipulation; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .6; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid #997024;
  outline-offset: 3px;
}
button svg, .button svg, .icon-button svg { flex: none; }
button[hidden], [hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; }
a { color: inherit; }
.muted, .helper, small { color: var(--muted); }
.helper { display: block; font-size: .875rem; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.work-area { min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 1.5rem .95rem 1.2rem;
  background: var(--charcoal);
  color: #fff8e9;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; padding: 0 .4rem; }
.brand strong { display: block; white-space: nowrap; font-size: 1.17rem; letter-spacing: -.035em; }
.brand small { display: block; color: var(--gold); font-size: .82rem; margin-top: .12rem; }
.brand-mark { display: grid; place-items: center; background: #392a23; border-radius: 12px; width: 45px; height: 45px; flex: none; }
.brand-mark img { border-radius: inherit; display: block; }
.navigation { display: grid; gap: .4rem; margin-top: 2.25rem; }
.nav-button {
  display: flex; align-items: center; text-align: left; gap: .65rem; min-height: 46px;
  border: 1px solid transparent; border-radius: .65rem; padding: .55rem .72rem; background: transparent;
  color: #f1e4ce; font-size: .94rem; font-weight: 600;
}
.nav-button:hover { background: #3b2c26; }
.nav-button.selected { background: #553329; color: #fff; border-color: #9d684e; }
.nav-count { margin-left: auto; min-width: 1.5rem; padding: .12rem .36rem; text-align: center; border-radius: 3rem; background: #f6dcaa; color: #4b351e; font-size: .8rem; }
.sidebar-foot { display: grid; gap: .7rem; margin-top: auto; padding-top: 1rem; }
.sidebar-foot .nav-button { font-size: .84rem; }
.connection { color: #e9d8bd; font-size: .8rem; padding: .75rem .75rem 0; border-top: 1px solid #5b4536; }
.connection::before { content: ""; display: inline-block; width: .47rem; height: .47rem; margin-right: .48rem; vertical-align: .07rem; border-radius: 50%; background: #edbc77; }
.connection.online::before { background: #e3bc77; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: 65px; padding: .55rem clamp(1rem, 3vw, 2.5rem); background: var(--paper); border-bottom: 1px solid var(--border);
}
.breadcrumb { color: var(--muted); display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 700; }
.top-actions, .admin-name { display: flex; align-items: center; gap: .65rem; }
.admin-name { font-weight: 700; }
main { max-width: 1540px; margin-inline: auto; padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; outline: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 1.25rem; flex-wrap: wrap; margin-bottom: 1.65rem; }
.page-heading h1 { font-size: clamp(1.85rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.055em; }
.page-heading p { color: var(--muted); margin-top: .4rem; }
.button-group { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.button, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 43px; border: 1px solid var(--border); border-radius: .62rem; padding: .55rem .8rem;
  background: var(--paper); color: var(--charcoal); font-weight: 700; font-size: .88rem; line-height: 1.2; text-align: center;
}
.button.secondary:hover, .icon-button:hover { background: #faf1e6; border-color: #d9b396; }
.button.primary { border-color: var(--terracotta); color: #fff; background: var(--terracotta); }
.button.primary:hover { background: #773a2a; }
.button.quiet { border-color: transparent; background: transparent; }
.button.quiet:hover { background: var(--terracotta-wash); }
.button.danger { color: var(--danger); }
.button.danger:hover { background: #f9e7e3; }
.icon-button { min-width: 43px; width: 43px; padding: .35rem; }
.text-button { border: 0; background: transparent; color: var(--charcoal); padding: .35rem .05rem; font-weight: 700; text-align: left; border-radius: .25rem; }
.text-button:hover { text-decoration: underline; text-underline-offset: .18em; }
.calendar-toolbar, .notice, .admin-tools { margin-bottom: 1rem; }
.calendar-toolbar { background: var(--paper); border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; box-shadow: var(--shadow); }
.toolbar-row, .admin-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.toolbar-row { padding: .72rem .9rem; }
.week-nav, .toolbar-actions { display: flex; align-items: center; gap: .45rem; }
.week-range { display: flex; gap: .55rem; align-items: center; padding: 0 .33rem; font-weight: 700; font-size: .96rem; }
.week-range svg { color: var(--terracotta); flex: none; }
.today-button { color: var(--terracotta); }
.segments { display: inline-flex; gap: .18rem; padding: .22rem; background: #f4eadd; border: 1px solid #e9ddcc; border-radius: .72rem; }
.segments button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .36rem .72rem; border: 1px solid transparent;
  border-radius: .5rem; color: var(--muted); background: transparent; font-size: .88rem; font-weight: 700;
}
.segments button:hover { color: var(--charcoal); background: #ead9c5; }
.segments button[aria-pressed="true"] { background: var(--paper); color: var(--charcoal); border-color: #e8d8c6; box-shadow: var(--shadow); }
.day-strip { --day-gap: .25rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--day-gap); padding: .45rem .65rem; }
.day-column { min-width: 0; }
.day-column > button { width: 100%; }
.day-rest-names { list-style: none; padding: .28rem 0 .12rem; text-align: center; color: var(--charcoal); font-size: .875rem; }
.day-rest-names:empty { display: none; }
.day-rest-row { position: relative; height: 1.55rem; line-height: 1.55rem; }
.day-rest-row .rest-name { position: relative; display: block; padding-inline: .12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-rest-row.rest-band::before { content: ""; position: absolute; inset: .08rem 0; border-radius: .35rem; background: #fae1dc; }
.day-rest-row.band-soir::before { background: #e2ebfb; }
.day-rest-row.band-midi::before { background: #f9edbd; }
.day-rest-row.joins-left::before { left: calc(var(--day-gap) * -.5 - .5px); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.day-rest-row.joins-right::before { right: calc(var(--day-gap) * -.5 - .5px); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rest-name { font-weight: 700; }
.rest-name.rest-midi { color: #806000; }
.rest-name.rest-soir { color: #173969; }
.rest-name.rest-full { color: #a12c28; }
.day-strip button {
  background: transparent; border: 1px solid transparent; border-radius: .65rem; padding: .43rem .15rem .55rem;
  display: grid; place-items: center; min-height: 65px; gap: .02rem; position: relative; color: var(--muted); font-size: .85rem; font-weight: 700;
}
.day-strip button strong { font-size: 1.1rem; color: var(--ink); }
.day-strip button:hover { background: #faf1e6; }
.day-strip button[aria-pressed="true"] { background: #f3dfd4; border-color: #d4a08b; color: var(--charcoal); }
.day-strip button[aria-pressed="true"] strong { color: var(--terracotta); }
.today-dot { position: absolute; width: 4px; height: 4px; bottom: 4px; background: var(--terracotta); border-radius: 50%; }
.short-day { display: none; }
.admin-tools { padding: .55rem .62rem; border: 1px dashed #c6ab90; border-radius: .82rem; }
.notice { display: flex; align-items: center; gap: .65rem; border: 1px solid #eadcc6; border-radius: .83rem; background: #faf2e1; padding: .7rem .85rem; }
.notice-icon, .area-icon, .neutral-icon {
  display: inline-grid; place-items: center; border-radius: .62rem; flex: none; width: 39px; height: 39px; background: #f2e3c7; color: var(--terracotta);
}
.notice strong { font-size: .93rem; }
.notice p { color: var(--muted); font-size: .88rem; margin-top: .08rem; }
.notice .button { margin-left: auto; }
.notice.amber { background: #fbf4e9; border-color: #ead7b8; }
.notice.amber .notice-icon { background: #f1e1c7; color: #74441f; }
.notice.green { background: #f8eed8; }
.day-heading, .roles-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.day-heading { margin: 1.4rem 0 .8rem; }
.day-heading h2, .weekly-content h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -.034em; }
.day-heading p, .section-heading p, .area-card header p { color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.service-switch button { min-width: 5rem; }
.area-grid, .settings-grid, .role-settings-grid { display: grid; grid-template-columns: .91fr 1.09fr; gap: 1rem; align-items: start; }
.area-card, .absence-card, .settings-card, .request-card, .empty-card, .team-card {
  background: var(--paper); border: 1px solid var(--border); border-radius: .95rem; box-shadow: var(--shadow);
}
.area-card { overflow: hidden; }
.cuisine { --area-color: #853f2e; --area-wash: #f5e4d9; --area-icon: #ebc9b9; }
.salle { --area-color: #694815; --area-wash: #f6ebd0; --area-icon: #eddbab; }
.area-card header { display: flex; align-items: center; gap: .65rem; padding: .82rem .95rem; background: var(--area-wash); color: var(--area-color); }
.area-icon { background: var(--area-icon); color: var(--area-color); }
.area-card header h3 { font-size: 1.16rem; }
.area-card header .pill { margin-left: auto; color: var(--area-color); background: var(--area-icon); }
.stations { padding: 0 .92rem; list-style: none; }
.stations li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 50px; padding: .16rem .1rem; border-top: 1px solid #f0e8de; }
.stations li:first-child { border-top: 0; }
.stations li > span { font-weight: 600; }
.stations li > div { display: flex; align-items: center; gap: .12rem; text-align: right; flex-shrink: 0; }
.assignee { color: var(--terracotta); }
.dash { color: #776456; }
.vacant { display: inline-flex; gap: .3rem; align-items: center; color: var(--danger); font-size: .825rem; font-weight: 700; }
.vacant > span { width: .36rem; height: .36rem; border-radius: 50%; background: currentColor; }
.edit-slot { border-color: transparent; background: transparent; }
.absence-card { margin-top: 1rem; padding: .92rem 1rem; }
.section-heading { display: flex; align-items: center; gap: .62rem; }
.section-heading h3 { font-size: 1.12rem; }
.absence-card .section-heading { flex-wrap: wrap; }
.absence-card .manage-rests { margin-left: auto; }
.absence-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); list-style: none; gap: .55rem .8rem; padding: .65rem 0 0; }
.absence-list li { display: flex; justify-content: space-between; align-items: center; gap: .55rem; border-radius: .55rem; background: #faf4e9; padding: .2rem .55rem; }
.absence-detail { display: flex; align-items: center; gap: .25rem; }
.rest-edit-control { border-color: transparent; background: transparent; }
.absence-empty { margin-top: .72rem; }
.pill { display: inline-block; border-radius: 3rem; padding: .22rem .56rem; color: var(--ink); font-size: .81rem; font-weight: 700; line-height: 1.2; }
.pill.green, .pill.accepted, .pill.cuisine { background: var(--terracotta-wash); color: #704817; }
.pill.salle, .pill.pending { background: var(--amber-wash); color: #77411c; }
.pill.refused { background: #f8e5e2; color: var(--danger); }
.pill.neutral { background: #f2e9dc; color: #665448; }
.weekly-content { margin-top: 1.25rem; }
.week-scroll-hint { display: none; }
.table-scroll { overflow: auto; margin-top: .7rem; border: 1px solid var(--border); border-radius: .8rem; box-shadow: var(--shadow); background: white; }
.week-table { border-collapse: separate; border-spacing: 0; min-width: 940px; width: 100%; font-size: .9rem; }
.week-table th, .week-table td { border-bottom: 1px solid #ece2d4; border-right: 1px solid #ece2d4; padding: .45rem .58rem; text-align: left; vertical-align: top; }
.week-table td:last-child, .week-table th:last-child { border-right: 0; }
.week-table tbody:last-child tr:last-child > * { border-bottom: 0; }
.week-table thead th { min-width: 6.25rem; background: #faf3e6; }
.week-table thead th.current-day { background: #f2dfd3; }
.week-table thead .text-button { width: 100%; }
.week-table thead .text-button strong { display: block; }
.week-table tr > th:first-child { position: sticky; left: 0; z-index: 1; background: #fcf7ed; min-width: 8.5rem; }
.week-table .table-area > th:first-child { position: static; color: var(--area-color); background: var(--area-wash); }
.table-area svg, .role-settings-area h3 svg { vertical-align: middle; margin-right: .38rem; }
.week-slot { min-height: 28px; display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.week-slot + .week-slot { border-top: 1px dotted #eee3d7; }
.week-slot .text-button { padding-block: .19rem; }
.week-service { min-width: 1rem; font-size: .75rem; color: var(--muted); font-weight: 800; }
.week-slot .edit-slot { margin-left: auto; min-width: 30px; width: 30px; min-height: 30px; }
.week-slot .vacant { font-size: .8rem; white-space: normal; }
.week-absences ul { padding: 0; list-style: none; }
.week-table .week-rests td, .week-table .week-rests tr > th:first-child { background: var(--terracotta-wash); }
.week-absences li { display: flex; align-items: center; justify-content: space-between; gap: .16rem; }
.week-absences small { display: block; font-size: .75rem; }
.request-toolbar { display: flex; align-items: center; gap: .7rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: .85rem; }
.requests-list { display: grid; gap: .65rem; }
.request-card { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) auto; align-items: center; gap: .7rem 1rem; padding: .64rem .9rem; }
.request-person, .request-status, .request-dates { display: flex; align-items: center; gap: .62rem; }
.request-person p, .request-dates { color: var(--muted); font-size: .875rem; }
.request-person .text-button { padding-block: .16rem; }
.request-status { justify-content: end; flex-wrap: wrap; }
.request-status .button { min-height: 38px; }
.avatar { display: grid; flex: none; width: 43px; height: 43px; place-items: center; border-radius: 50%; background: var(--terracotta-wash); color: var(--terracotta); font-size: 1rem; font-weight: 800; }
.avatar.small { width: 32px; height: 32px; font-size: .85rem; }
.page-count { align-self: center; color: var(--muted); font-size: .9rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .7rem; }
.team-card { display: flex; align-items: center; gap: .62rem; text-align: left; padding: .7rem .75rem; }
.team-card:hover { border-color: #cba58a; background: #fdf6ed; }
.team-card-text { display: grid; flex: 1; }
.team-card-text small { font-size: .83rem; }
.settings-grid, .role-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid { align-items: stretch; }
.settings-card { padding: 1rem; }
.settings-card h2 { font-size: 1.16rem; }
.settings-card > p { margin: .72rem 0; }
.roles-settings { margin-top: 1rem; }
.role-settings-grid { margin-top: .8rem; }
.role-settings-area { border-radius: .6rem; overflow: hidden; border: 1px solid var(--border); }
.role-settings-area h3 { background: var(--area-wash); color: var(--area-color); padding: .58rem .65rem; font-size: 1rem; }
.role-settings-area ul { padding: 0 .65rem; list-style: none; }
.role-settings-area li { display: flex; align-items: center; justify-content: space-between; gap: .32rem; min-height: 55px; padding-block: .24rem; border-bottom: 1px solid #f0e8de; }
.role-settings-area li:last-child { border-bottom: 0; }
.role-settings-area small { display: block; font-size: .8rem; }
.role-settings-area .icon-button { border-color: transparent; }
.empty-card { padding: 1.6rem 1rem; display: grid; justify-items: center; gap: .6rem; text-align: center; }
.empty-card h2 { font-size: 1.18rem; }
.empty-card p { color: var(--muted); }
.startup { margin: 3rem auto 0; max-width: 32rem; }
.startup h1 { font-size: 1.6rem; }
.startup .neutral-icon { width: 52px; height: 52px; }
dialog {
  width: min(calc(100vw - 1.25rem), 32rem); max-height: calc(100dvh - 1.25rem); color: var(--ink);
  border: 1px solid #decbb9; padding: 0; border-radius: 1rem; background: white; box-shadow: 0 22px 55px #32221c50;
}
dialog.wide { width: min(calc(100vw - 1.25rem), 44rem); }
dialog::backdrop { background: #241a1680; }
.dialog-header { position: sticky; z-index: 1; top: 0; background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem 1rem; }
.dialog-header h2 { font-size: 1.22rem; }
.dialog-header .icon-button { border-color: transparent; }
.dialog-body { display: grid; gap: .84rem; padding: .95rem 1rem 1.15rem; }
.dialog-footer { position: sticky; bottom: 0; background: white; border-top: 1px solid var(--border); display: flex; justify-content: end; gap: .6rem; padding: .7rem 1rem; }
dialog input:not([type="checkbox"]), dialog select {
  width: 100%; min-width: 0; height: 43px; padding: .42rem .58rem; border: 1px solid #cbb29c; border-radius: .53rem;
  background: #fff; color: var(--ink); font-size: 1rem;
}
dialog select {
  appearance: none; padding-right: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23974c37' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .5rem center;
}
dialog input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--terracotta); }
dialog label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 700; min-width: 0; }
.form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.form-row, .exception-row { display: grid; align-items: end; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; margin-bottom: .45rem; }
.exception-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.dialog-body > .button, fieldset > .button { justify-self: start; }
.form-error { color: var(--danger); background: #fbedea; border-radius: .55rem; padding: .55rem .65rem; font-size: .9rem; font-weight: 700; }
fieldset { border: 1px solid var(--border); border-radius: .66rem; margin: 0; padding: .65rem; min-width: 0; }
legend { color: var(--charcoal); font-weight: 800; padding: 0 .3rem; }
fieldset h4 { margin-bottom: .3rem; }
.check-grid { display: grid; gap: .12rem; }
dialog label.check-row { display: flex; align-items: center; gap: .35rem; min-height: 33px; font-weight: 500; }
.form-table { width: 100%; border-collapse: collapse; margin-top: .4rem; font-size: .875rem; }
.form-table th { text-align: left; }
.form-table th, .form-table td { border-bottom: 1px solid #eee5d9; padding: .2rem .4rem; }
.form-table td, .form-table th:not(:first-child) { text-align: center; }
.form-table input[type="number"] { width: min(100%, 7rem); }
.profile-identity { display: flex; align-items: center; gap: .6rem; }
.profile-group { display: grid; gap: .45rem; border-top: 1px solid #eee3d5; padding-top: .7rem; }
.profile-group h3 { font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.preferences { padding-left: 1.5rem; }
.preference-order { padding-left: 1.5rem; }
.preference-order li { padding: .25rem 0; border-bottom: 1px solid var(--border); }
.preference-order li > .button-group { display: inline-flex; float: right; }
.preference-order li { display: list-item; min-height: 3.2rem; }
.preference-order .icon-button[aria-disabled="true"] { opacity: .4; cursor: default; }
.rest-list { list-style: none; padding: 0; }
.rest-list li { border-bottom: 1px solid #eee3d5; }
.rest-list li:last-child { border-bottom: 0; }
.rest-list-button {
  display: flex; align-items: center; justify-content: space-between; gap: .65rem;
  width: 100%; padding: .55rem; border: 0; border-radius: .45rem; background: transparent; text-align: left;
}
.rest-list-button:hover { background: var(--terracotta-wash); }
.rest-list li small { display: block; }
.toast {
  position: fixed; z-index: 5; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); max-width: calc(100vw - 2rem);
  display: flex; align-items: center; gap: .55rem; color: white; background: var(--charcoal); padding: .7rem .95rem; border-radius: .8rem;
  box-shadow: 0 7px 18px #39261e38; font-size: .91rem;
}
.toast span { display: flex; }
.toast.error { background: #793226; }

@media (max-width: 1140px) {
  .layout { grid-template-columns: 12.3rem minmax(0, 1fr); }
  .sidebar { padding-inline: .65rem; }
}
@media (max-width: 780px) {
  .layout { display: block; }
  .sidebar { position: relative; height: auto; padding: .62rem .8rem 0; display: grid; grid-template-columns: 1fr auto; gap: .35rem .5rem; }
  .brand { padding: 0; }
  .brand-mark, .brand-mark img { width: 38px; height: 38px; }
  .brand strong { font-size: 1.04rem; }
  .brand small { font-size: .78rem; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: flex; gap: .2rem; overflow-x: auto; margin-top: .05rem; }
  .navigation:empty { display: none; }
  .navigation .nav-button { flex: 1; justify-content: center; gap: .32rem; white-space: nowrap; min-height: 44px; padding: .4rem .38rem; font-size: .8625rem; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .navigation .nav-button svg { width: 17px; }
  .sidebar-foot { grid-column: 2; grid-row: 1; margin: 0; padding: 0; justify-items: end; align-self: center; gap: 0; }
  .sidebar-foot .nav-button { min-height: 32px; padding: .15rem .18rem; font-size: .79rem; }
  .sidebar-foot .nav-button svg { width: 16px; }
  .connection { border: none; padding: 0 .12rem; font-size: .76rem; }
  .connection::before { margin-right: .28rem; }
  .topbar { min-height: 50px; padding: .18rem .8rem; }
  main { padding: 1.25rem .82rem 2rem; }
  .page-heading { margin-bottom: 1rem; }
  .week-scroll-hint { display: block; }
  .table-scroll { overscroll-behavior-inline: contain; }
  .week-table tr > th:first-child { min-width: 6rem; }
}
@media (max-width: 575px) {
  .nav-count { margin-left: 0; min-width: 1.08rem; padding: .08rem .18rem; }
  .top-actions { gap: .2rem; }
  .logout span { display: none; }
  .logout { min-width: 43px; }
  .page-heading h1 { font-size: 1.75rem; }
  .page-heading p { font-size: .9rem; }
  .page-heading .button-group { width: 100%; gap: .35rem; }
  .page-heading .button-group > button { flex: 1 1 45%; min-height: 47px; padding: .38rem .3rem; }
  .toolbar-row { padding: .55rem; }
  .week-nav { width: 100%; gap: .25rem; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .week-range { flex: 1; justify-content: center; text-align: center; gap: .25rem; font-size: .86rem; }
  .week-range svg { width: 16px; }
  .week-nav .icon-button { width: 44px; min-width: 44px; min-height: 44px; }
  .today-button { padding-inline: .4rem; }
  .day-strip { --day-gap: .1rem; padding: .25rem; }
  .day-strip button { min-height: 50px; font-size: .8rem; }
  .day-rest-names { font-size: clamp(.72rem, 3.1vw, .875rem); }
  .day-rest-row { height: 1.85rem; display: grid; align-items: center; }
  .day-rest-row .rest-name { line-height: .9rem; white-space: normal; overflow-wrap: anywhere; max-height: 1.8rem; padding-inline: .04rem; }
  .full-day { display: none; }
  .short-day { display: inline; }
  .area-grid, .settings-grid, .role-settings-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .notice { padding: .56rem; flex-wrap: wrap; }
  .notice > div { flex: 1; min-width: 12rem; }
  .notice p { font-size: .84rem; }
  .day-heading { margin-top: 1rem; flex-wrap: wrap; }
  .day-heading > div:first-child { flex-basis: 100%; }
  .day-heading > .button-group { width: 100%; justify-content: space-between; }
  .day-heading h2 { font-size: 1.14rem; }
  .service-switch button { min-width: 3.7rem; min-height: 44px; padding-inline: .4rem; }
  .service-switch svg { width: 15px; }
  .stations li { min-height: 47px; }
  .request-card { grid-template-columns: minmax(0, 1fr); gap: .45rem; padding: .7rem; }
  .request-status { grid-column: 1 / -1; justify-content: space-between; }
  .request-dates { font-size: .875rem; align-self: start; }
  .request-toolbar .segments { flex-wrap: wrap; max-width: 100%; }
  .roles-heading { align-items: start; flex-wrap: wrap; }
  .roles-heading .button { flex: none; }
  .exception-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .exception-row .icon-button { justify-self: end; }
  .admin-tools > .button-group { width: 100%; }
  .admin-tools > .button-group > .button { flex: 1 1 max-content; }
  .notice > div { min-width: min(12rem, 70%); }
}
@media (max-width: 375px) {
  .navigation .nav-button svg { display: none; }
  .week-range svg { display: none; }
  .today-button { min-height: 36px; }
  .day-strip button { font-size: .75rem; }
  .service-switch svg { display: none; }
  .button-group { gap: .28rem; }
}
