/* Metro-inspired: flat colour, generous typography and predictable touch targets. */
:root {
  --bg: #f5f6f3; --card: #fff; --ink: #193537; --muted: #546967; --line: #d8e1dc;
  --navy: #006d77; --navy2: #07545e; --bluebg: #e6f0ed; --radius: 0; --shadow: none;
  --tile-teal: #006d77; --tile-blue: #245a81; --tile-purple: #695080; --tile-ink: #294440;
}
body { font-family: "Segoe UI", system-ui, sans-serif; font-size: 16px; }
body.management-mode, body.planning-mode, body.viewer-mode { background: var(--bg); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
summary:focus-visible { outline: 3px solid #cf8a19; outline-offset: 4px; }
[hidden] { display: none !important; }
.app-shell { max-width: 480px; background: var(--bg); box-shadow: none; }
.app-shell--wide { max-width: 1500px; }
.topbar { position: relative; padding: 24px 24px 18px; background: var(--bg); backdrop-filter: none; border: 0; }
.brand-title { font-size: 25px; font-weight: 400; letter-spacing: -.025em; }
.brand .eyebrow { font-size: 10px; letter-spacing: .14em; margin-bottom: 5px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; font-weight: 600; }
.role-label { display: none; }
.account { color: var(--ink); font-size: 13px; }
.account .quiet { min-height: 44px; padding: 8px; }
.avatar { border-radius: 0; font-weight: 500; background: var(--tile-teal); }
.preview-banner { display: flex; justify-content: space-between; gap: 10px; padding: 8px 28px; background: #e5eee8; color: #34584b; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.preview-banner span { font-weight: 400; }
.desktop-nav { gap: 2px; padding: 0 28px; border-bottom: 1px solid var(--line); background: transparent; align-items: stretch; position: relative; z-index: 31; }
.desktop-nav > a, .nav-menu > summary { display: flex; align-items: center; min-height: 52px; padding: 12px 16px; border-radius: 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.desktop-nav a[aria-current=page], .nav-menu.current > summary { color: var(--navy); border-bottom-color: var(--navy); }
.desktop-nav > a:hover, .nav-menu > summary:hover { background: #e6ede7; }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; gap: 10px; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: '⌄'; }
.nav-menu-panel { position: absolute; top: 100%; right: 0; min-width: 230px; padding: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 24px #19353714; }
.nav-menu-panel a { display: block; padding: 13px 16px; border-radius: 0; font-size: 14px; }
.content { padding: 24px 18px 0; }
.app-shell--wide .content { padding: 32px 28px 56px; }
h1, .app-shell--wide h1 { font-size: clamp(30px, 3vw, 44px); font-weight: 300; letter-spacing: -.035em; line-height: 1.12; }
h2 { font-size: 21px; font-weight: 500; }
h3 { font-size: 15px; font-weight: 600; }
.pagehead, .app-shell--wide .pagehead { margin: 0 0 26px; align-items: center; }
.pagehead p:not(.eyebrow) { font-size: 14px; margin-top: 10px; }
.card, .duty-card, .detail-sheet, .admin-box, .editor-day, .plan-version, .list { box-shadow: none; border-radius: 0; }
.card { padding: 20px; }
.hero { border-radius: 0; background: var(--tile-teal); box-shadow: none; padding: 24px; }
.hero h2 { font-size: 29px; font-weight: 300; }
.hero p { color: #e4f0ef; }
.hero-duty strong { font-weight: 500; }
.pill, .badge, .chip, .tag { border-radius: 0; font-weight: 600; }
.pill, .badge, .tag { font-size: 11px; line-height: 1.35; }
.chip { min-height: 40px; font-size: 12px; }
.button, .btn { border-radius: 0; min-height: 46px; padding: 12px 18px; font-size: 14px; font-weight: 600; }
.button.secondary { background: #e8eeea; color: #214b46; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.quiet { font-size: 13px; font-weight: 500; }
.text-link, .back-link { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.back-link { display: inline-block; padding: 4px 0 20px; }
.message, .notice, .info-strip, .errorlist, fieldset, .entry-section,
.standard-plan-form .standard-day, .standard-plan-form .standard-halfday,
.school-days fieldset, .flexible-person { border-radius: 0; }
.message, .info-strip { font-size: 14px; padding: 14px 18px; }
.form label, .form-card label { color: var(--ink); font-size: 14px; font-weight: 500; }
.form input:not([type=checkbox]):not([type=hidden]), .form select, .form textarea,
.form-card input, .form-card select, .form-card textarea, input[type=date], select { border-radius: 0; font-size: 15px; min-height: 46px; }
.form .helptext, .helptext { font-size: 13px; line-height: 1.5; }
.form input[type=checkbox] { width: 18px; height: 18px; min-height: 0; vertical-align: middle; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.form p { margin-bottom: 20px; }
.form h2 { margin-bottom: 18px; }
.errorlist { font-size: 13px; }
.section-title { margin: 28px 0 12px; }
.section-title h3 { font-size: 22px; font-weight: 400; }
.listrow { padding: 17px 18px; min-height: 64px; }
a.listrow:hover { background: #f0f5f1; }
.listrow strong { font-size: 14px; font-weight: 600; }
.listrow small { font-size: 12px; }
.launch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.launch-tile { display: flex; position: relative; min-height: 200px; flex-direction: column; justify-content: flex-end; padding: 24px; color: #fff; transition: filter .15s, transform .15s; }
.launch-tile:hover { filter: brightness(1.08); }
.launch-tile:active { transform: scale(.985); }
.tile-wide { grid-column: span 2; }
.tile-teal { background: var(--tile-teal); }
.tile-blue { background: var(--tile-blue); }
.tile-purple { background: var(--tile-purple); }
.tile-ink { background: var(--tile-ink); }
.tile-title { font-size: 24px; font-weight: 300; line-height: 1.15; }
.tile-caption { margin-top: 8px; font-size: 12px; color: #fff; opacity: .9; line-height: 1.4; }
.tile-number { display: block; margin-bottom: auto; font-size: 48px; font-weight: 300; line-height: 1; }
.tile-symbol { display: block; width: 40px; height: 40px; margin-bottom: auto; }
.tile-symbol svg { width: 100%; height: 100%; }
.tile-wide .tile-symbol { position: absolute; top: 24px; right: 24px; }
.admin-home { max-width: none; }
.admin-home .pagehead { display: flex; }
.admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 22px; }
.admin-box { min-height: auto; padding: 16px 20px; }
.admin-box .big { font-size: 22px; font-weight: 400; }
.calendar-maintenance { margin-top: 28px; }
.calendar-maintenance > summary { font-size: 15px; min-height: 30px; }
#freigaben { scroll-margin-top: 24px; }
.team-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0; }
.team-filter > div { flex: 1 1 150px; }
.team-filter .team-search { flex: 2 1 260px; }
.team-filter label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.team-filter input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0; }
.team-filter select { font-size: 14px; }
.team-filter-options { flex: 0 0 100%; }
.team-filter-options > summary { display: inline-block; min-height: 36px; padding: 8px 0; font-size: 13px; color: var(--navy); }
.team-filter-options > summary::before { content: '＋ '; }
.team-filter-options[open] > summary::before { content: '− '; }
.team-filter-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 12px; padding: 14px 0; align-items: end; }
.team-result-line { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 12px; font-size: 12px; color: var(--muted); }
.team-grid.name-tiles, .app-shell--wide .team-grid.name-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.employee-tile { background: var(--tile-teal); min-width: 0; }
.employee-tile:nth-child(4n+2) { background: #236477; }
.employee-tile:nth-child(4n+3) { background: #3c6661; }
.employee-tile:nth-child(4n) { background: #36546b; }
.employee-tile > summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 128px; padding: 22px; list-style: none; color: #fff; font-size: 23px; font-weight: 300; line-height: 1.18; overflow-wrap: anywhere; }
.employee-tile > summary::-webkit-details-marker { display: none; }
.employee-tile > summary:hover { background: #ffffff0f; }
.tile-chevron { font-size: 22px; font-weight: 300; flex-shrink: 0; transition: transform .15s; }
.employee-tile[open] { grid-column: 1 / -1; }
.employee-tile[open] > summary { min-height: 70px; align-items: center; }
.employee-tile[open] .tile-chevron { transform: rotate(45deg); }
.employee-tile-content { padding: 26px; background: white; border: 1px solid var(--line); border-top: 0; }
.employee-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.employee-overview h2 { margin-top: 5px; }
.team-grid .employee-overview h2 { font-size: 23px; font-weight: 400; }
.employee-tile-content > p { font-size: 14px; }
.employee-worktime { margin: 14px 0; padding: 16px; background: #edf3ef; }
.employee-worktime-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 24px; margin: 0; }
.employee-worktime-values dt { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.employee-worktime-values dd { margin: 6px 0 0; font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.employee-worktime-values small { font-size: 13px; font-weight: 400; }
.employee-worktime > p { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
.employee-functions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 26px; }
.employee-functions h3 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.employee-functions a { display: flex; justify-content: space-between; gap: 10px; min-height: 48px; padding: 13px 14px; margin-bottom: 6px; background: #edf3ef; color: #184f51; font-size: 14px; }
.employee-functions a:hover { background: #dcebe3; }
.employee-functions .invite-action { background: var(--tile-teal); color: #fff; }
.employee-functions .invite-action:hover { background: #085763; }
.working-hours-person { max-width: 760px; background: var(--tile-teal); color: #fff; padding: 22px 26px; margin: 22px 0 18px; }
.working-hours-person .eyebrow { color: #fff; margin: 0 0 8px; }
.working-hours-person h2 { color: #fff; font-size: clamp(30px, 3.5vw, 44px); font-weight: 600; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.employee-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 12px; }
.employee-footer a, .employee-footer button { min-height: 44px; padding: 10px 0; }
.archive-link { color: #805142; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.name-tiles > .empty { grid-column: 1 / -1; }
.steps { display: flex; gap: 30px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 28px; font-size: 14px; color: var(--muted); }
.steps b { display: inline-grid; place-items: center; height: 30px; width: 30px; margin-right: 8px; background: #e0ebe4; color: var(--navy); font-weight: 600; }
.invitation-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; max-width: 1040px; align-items: start; }
.invitation-status .pill { margin: 18px 0 8px; }
.invitation-status p { font-size: 14px; }
.invitation-status dt, .invitation-status dd { font-size: 13px; }
.preview-invitation { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.welcome-tile { background: var(--tile-teal); padding: 28px; color: white; margin-bottom: 14px; }
.welcome-tile h1 { color: white; font-size: 46px; }
.welcome-tile p { color: white; }
.welcome-tile .eyebrow { margin-bottom: 22px; font-size: 10px; }
.activation-form .button { width: 100%; }
.cards2 { gap: 10px; }
.stat { min-height: 150px; }
.stat .label, .stat .sub { font-size: 12px; }
.stat .value { font-size: 34px; font-weight: 300; }
.mobile-home .stat:first-child { background: var(--tile-purple); color: white; }
.mobile-home .stat:first-child :is(.label,.value,.sub,p) { color: white; }
.quick a { display: flex; flex-direction: column; justify-content: flex-end; min-height: 108px; border: 0; border-radius: 0; box-shadow: none; background: var(--tile-blue); color: #fff; text-align: left; padding: 14px; font-size: 13px; font-weight: 400; }
.quick a:nth-child(2) { background: var(--tile-teal); }
.quick a:nth-child(3) { background: var(--tile-ink); }
.quick .ico { font-size: 30px; font-weight: 300; margin-bottom: 10px; }
.bottomnav { max-width: 480px; background: #fff; backdrop-filter: none; }
.bottomnav a { color: #556965; font-weight: 500; font-size: 10px; min-height: 48px; }
.bottomnav a.active { background: var(--navy); color: #fff; }
.login-layout { gap: 28px; }
.login-layout h1 { font-weight: 300; font-size: 42px; }
.login-form { border-top: 5px solid var(--tile-teal); }
.login-form > a { display: inline-block; margin-top: 20px; font-size: 14px; text-decoration: underline; }
.board-date-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.board-date-form label { font-size: 13px; }
.board-date-form input { width: auto; max-width: 100%; }
.board-week { margin: 0 0 22px; gap: 8px; }
.board-week .card { padding: 10px 12px; font-size: 13px; border: 1px solid var(--line); }
.board-week .card[aria-current=date] { border-color: var(--tile-teal); box-shadow: inset 0 3px var(--tile-teal); }
.board-week .badge { font-size: 10px; }
.board-periods { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 24px; margin-bottom: 24px; }
.board-period { min-width: 0; --period-color: var(--tile-teal); }
.board-period.period-pm { --period-color: var(--tile-blue); }
.board-period-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; color: white; background: var(--period-color); position: sticky; top: 0; z-index: 2; }
.board-period-heading h2 { color: white; font-size: 27px; font-weight: 400; margin: 0; scroll-margin-top: 18px; }
.board-period-heading > span { font-size: 13px; white-space: nowrap; }
.board-period-jumps { display: none; }
.board-status { padding: 18px 20px; }
.board-status-heading, .calendar-period-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.board-status-heading h3 { margin: 0; font-size: 15px; }
.board-status-heading .badge { background: #ffffffa6; }
.board-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13px; }
.board-counts b { font-size: 18px; font-weight: 600; }
.board-status details { margin-top: 12px; font-size: 13px; }
.board-status summary { cursor: pointer; min-height: 28px; }
.board-status details p { margin: 6px 0; }
.board-activity-group { margin-top: 24px; }
.board-group-heading { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--period-color); padding: 0 0 8px; margin-bottom: 8px; }
.board-group-heading h3 { font-size: 20px; font-weight: 500; margin: 0; color: var(--period-color); }
.board-group-heading > span { color: var(--muted); font-size: 13px; }
.board-tile-list { display: grid; gap: 6px; }
.board-person-tile { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--period-color); background: white; }
.board-person-tile > h4 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.board-person-tile .slot-details { min-width: 0; flex-direction: row; flex-wrap: wrap; gap: 3px 10px; }
.board-person-tile .slot-time, .board-person-tile .slot-role { flex-basis: 100%; }
.slot-details { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.slot-role { font-size: 15px; font-weight: 600; }
.slot-time { font-size: 16px; font-variant-numeric: tabular-nums; }
.slot-provider { color: var(--navy); }
.slot-details small { display: block; color: var(--muted); }
.slot-details .badge { margin: 3px 0 0; }
.slot-absent, .slot-empty { color: var(--muted); }
.slot-empty { margin: 0; font-size: 14px; }
.board-duties { margin: 0 0 24px; }
.board-duties h2 { margin-bottom: 14px; }
.board-duty-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.board-duty-tile { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; background: #e6efec; overflow-wrap: anywhere; }
.board-duty-tile > strong { font-size: 18px; font-weight: 500; }
.board-duty-tile > span:not(.eyebrow) { font-size: 13px; }
/* Department colours match the timeline; staffing status colours stay independent. */
.board-activity-group[data-board-group="Behandler"], .planner-area[data-planner-group="Behandler"] { --department-color: #245d8c; --department-bg: #c8def2; }
.board-activity-group[data-board-group="Zimmerassistenz/Auszubildende/r 2.+3. Lehrjahr"], .planner-area[data-planner-group="Zimmerassistenz/Auszubildende/r 2.+3. Lehrjahr"],
.board-activity-group[data-board-group="Steri / Springer / Technische Assistenz"], .planner-area[data-planner-group="Steri / Springer / Technische Assistenz"],
.board-activity-group[data-board-group="Auszubildende/r 1. Lehrjahr"], .planner-area[data-planner-group="Auszubildende/r 1. Lehrjahr"] { --department-color: #256b47; --department-bg: #cce6d5; }
.board-activity-group[data-board-group="Rezeption"], .planner-area[data-planner-group="Rezeption"] { --department-color: #654589; --department-bg: #e0d3ef; }
.board-activity-group[data-board-group="Verwaltung"], .planner-area[data-planner-group="Verwaltung"] { --department-color: #78521f; --department-bg: #efddbc; }
.board-activity-group[data-board-group="Prophylaxe"], .planner-area[data-planner-group="Prophylaxe"] { --department-color: #1a6570; --department-bg: #c5e3e6; }
.board-activity-group[data-board-group="Labortechniker"], .planner-area[data-planner-group="Labortechniker"] { --department-color: #79458c; --department-bg: #e4d2ee; }
.board-activity-group[data-board-group="Nicht eingeteilt"], .planner-area[data-planner-group="Nicht eingeteilt"] { --department-color: #475f70; --department-bg: #d6e2e9; }
.board-activity-group[data-board-group] .board-group-heading { border-bottom-color: var(--department-color, var(--period-color)); background: var(--department-bg, transparent); }
.board-activity-group[data-board-group] .board-group-heading h3 { color: var(--department-color, var(--period-color)); }
.board-activity-group[data-board-group] .board-group-heading > span,
.board-activity-group[data-board-group] .board-person-tile .slot-details small,
.board-activity-group[data-board-group] .board-person-tile .slot-provider { color: #36505e; }
.board-activity-group[data-board-group] .board-person-tile { border-left-color: var(--department-color, var(--period-color)); background: var(--department-bg, white); }
.planner-area[data-planner-group] { border-color: var(--department-color, rgba(199, 209, 220, .78)); background: var(--department-bg, rgba(255, 255, 255, .82)); }
.planner-area[data-planner-group] .planner-person { background: var(--department-bg, rgba(255, 255, 255, .8)); }
.planner-area[data-planner-group] .planner-person:not(.has-assistance-gap) { border-color: var(--department-color, rgba(199, 209, 220, .72)); }
.planner-area[data-planner-group] .planner-person:hover { background: white; }
.planner-area[data-planner-group] .planner-person small:not(.planner-assistance-gap),
.planner-area[data-planner-group] .planner-person .person-time { color: #36505e; }
/* Keep short edge coverage adjacent to the main shift without hiding its details. */
.planner-area .planner-activity-section, .planner-area .planner-activity-people { display: grid; min-width: 0; gap: 2px; }
.planner-area .planner-activity-section h4 { display: flex; flex-wrap: wrap; gap: 2px 5px; margin: 0; color: #52616b; font-size: 9px; line-height: 1.35; }
.planner-area .planner-activity-section h4 span { font-weight: 400; }
.planner-area .planner-activity-section--main h4 { color: var(--department-color, #36505e); font-weight: 800; }
.planner-area .planner-activity-section--before .planner-person,
.planner-area .planner-activity-section--after .planner-person { padding: 3px 7px; border-radius: 5px; }
.calendar-period-list { display: grid; gap: 10px; margin-top: 16px; }
.calendar-period-tile { padding: 18px 20px; background: white; border-left: 4px solid var(--tile-teal); }
.calendar-period-tile.period-pm { border-color: var(--tile-blue); }
.calendar-period-heading h3 { font-size: 19px; margin: 0; }
.calendar-counts { font-size: 12px; color: var(--muted); margin: 10px 0 16px; }
.calendar-period-tile .eyebrow { margin-bottom: 6px; }
@media (max-width: 1100px) {
  .launch-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .tile-wide { grid-column: auto; }
  .launch-tile { padding: 20px; min-height: 190px; }
  .tile-wide .tile-symbol { display: none; }
  .tile-title { font-size: 23px; }
  .team-grid.name-tiles, .app-shell--wide .team-grid.name-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .board-periods { grid-template-columns: 1fr; gap: 32px; }
  .board-period-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
}
@media (max-width: 760px) {
  .app-shell--wide .content { padding: 26px 18px 40px; }
  .topbar, .app-shell--wide .topbar { padding: 20px 18px 12px; }
  .desktop-nav, .app-shell--wide .desktop-nav { padding: 0 8px; gap: 0; }
  .desktop-nav > a, .nav-menu > summary { font-size: 13px; padding: 12px 10px; }
  .nav-menu-panel { right: auto; left: 0; }
  .pagehead { align-items: flex-start; flex-wrap: wrap; gap: 18px; }
  .launch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .launch-tile { min-height: 170px; }
  .tile-number { font-size: 42px; }
  .team-grid.name-tiles, .app-shell--wide .team-grid.name-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .employee-tile > summary { padding: 18px; min-height: 120px; font-size: 22px; }
  .employee-tile-content { padding: 20px; }
  .employee-functions { grid-template-columns: 1fr; gap: 18px; }
  .employee-overview { align-items: flex-start; flex-direction: column; }
  .invitation-layout { grid-template-columns: 1fr; }
  .steps { gap: 12px; flex-direction: column; }
  .team-filter > div { flex-basis: 130px; }
  .team-filter .team-search { flex-basis: 180px; }
  .team-filter-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .preview-banner { padding: 8px 18px; font-size: 10px; }
  .board-week { gap: 4px; }
  .board-week .card { padding: 10px 3px; font-size: 11px; text-align: center; }
  .board-week .badge { font-size: 8px; }
  .board-person-tile { padding: 13px 14px; }
  .board-person-tile > h4 { font-size: 16px; }
  .board-period-heading { padding: 16px; }
  .board-duty-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .launch-tile, .tile-chevron { transition: none; } }

/* Explicit admin choice when removing a history entry. */
.form #id_retain_details label { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.form #id_retain_details input[type=radio] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--navy); }
/* Reviewable planning proposals use the same long tiles on desktop and mobile. */
.proposal-list { display: grid; gap: 1rem; margin: 1rem 0; }
.proposal-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; }
.proposal-row > div { min-width: 0; overflow-wrap: anywhere; }
.proposal-row h2 { margin: .4rem 0; }
.proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1rem 0; }
.proposal-actions form { margin: 0; max-width: 100%; }
.proposal-actions .button { white-space: normal; }
@media (max-width: 640px) { .proposal-row { grid-template-columns: minmax(0, 1fr); } }

/* Planned activities without a staffing quota remain visible in neutral grey. */
.planner-area[data-neutral-staffing="true"],
.planner-area .planner-person[data-neutral-staffing="true"],
.board-activity-group[data-neutral-staffing="true"] { --department-color: #687780; --department-bg: #edf0f2; }

.plan-basis{margin:7px 0 10px;color:#61787b;font-size:12px;line-height:1.45}.plan-basis small{font-size:inherit}
