:root {
  --ink: #202d35;
  --muted: #75818a;
  --line: #e2e7e9;
  --paper: #fff;
  --bg: #f6f7f8;
  --accent: #982e3a;
  --accent-soft: #f7eaec;
  --green: #227058;
  --radius: 16px;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d59ca3;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.app-shell {
  max-width: 1680px;
  padding: 0 42px;
  margin: auto;
}
.topbar {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  height: 40px;
  width: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
}
.brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.header-powered-by {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}
.header-powered-by a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.header-powered-by a:hover,
.header-powered-by a:focus-visible {
  text-decoration: underline;
}
.header-actions,
.heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.connection {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.connection.offline::before {
  background: #c0772c;
}
.button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.4;
}
.button.outline {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.button.dark {
  background: var(--ink);
  color: #fff;
}
.button.primary {
  background: var(--accent);
  color: #fff;
}
.button.quiet {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.button.danger {
  background: #fcebec;
  color: #a32031;
}
.button:hover {
  filter: brightness(0.96);
}
.icon-button {
  height: 33px;
  width: 33px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 23px;
  color: var(--ink);
  flex-shrink: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 25px;
  gap: 15px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 9px;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.2px;
  font-weight: 650;
  margin: 0 0 9px;
}
h1 span {
  color: var(--accent);
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
  font-weight: 650;
}
h3 {
  margin: 0;
  font-size: 15px;
}
.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.small {
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 13px 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.count {
  font-size: 10px;
  padding: 3px 6px;
  background: #eceef0;
  border-radius: 5px;
  margin-left: 4px;
}
.tab.active .count {
  background: var(--accent-soft);
  color: var(--accent);
}
.calendar-toolbar {
  padding: 24px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.period-navigation {
  display: flex;
  align-items: center;
  gap: 16px;
}
.period-navigation h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.period-navigation .small {
  margin-top: 4px;
}
.period-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.period-tools input {
  width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}
.segments {
  display: inline-flex;
  background: #eaeef0;
  padding: 4px;
  border-radius: 9px;
  gap: 2px;
}
.segments button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.segments button.selected {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px #22313b12;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 21px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 17px 20px;
  position: relative;
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.stat-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.8px;
  display: inline-block;
  margin-top: 9px;
}
.stat-note {
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
}
.stat-symbol {
  position: absolute;
  right: 18px;
  top: 20px;
  height: 30px;
  width: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #edf2f5;
  color: #597182;
}
.stat:nth-child(2) .stat-symbol {
  background: #fff3e5;
  color: #c78f42;
}
.stat:nth-child(3) .stat-symbol {
  background: #eaf0fb;
  color: #6685bf;
}
.stat:nth-child(4) .stat-symbol {
  background: var(--accent-soft);
  color: var(--accent);
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 21px 23px;
}
.panel-head .small {
  margin-top: 5px;
}
.roster-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 23px 18px;
  flex-wrap: wrap;
}
.search-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-field span {
  font-size: 20px;
  color: var(--muted);
  line-height: 1;
}
.search-field input {
  border: 0;
  outline: none !important;
  font-size: 12px;
  min-width: 205px;
  max-width: 270px;
  width: 100%;
  color: var(--ink);
}
.my-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.my-filter select {
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 7px;
  max-width: 210px;
  background: #fff;
  color: var(--ink);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.checkbox-label input {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 0 23px 18px;
  font-size: 11px;
  color: var(--muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}
.roster-scroll {
  overflow: auto;
  max-height: 65vh;
  scrollbar-width: thin;
  border-top: 1px solid var(--line);
}
.roster-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 900px;
}
.roster-table th,
.roster-table td {
  border-right: 1px solid #eef1f3;
  border-bottom: 1px solid #eef1f3;
  text-align: center;
  height: 65px;
  padding: 6px;
}
.roster-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f9fafb;
  height: 58px;
  font-size: 12px;
  font-weight: 600;
}
.roster-table th .weekday {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.roster-table .staff-col {
  width: 180px;
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  padding: 12px 18px;
  box-shadow: 3px 0 7px #202d3505;
}
.roster-table thead .staff-col {
  background: #f9fafb;
  z-index: 5;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.staff-name {
  font-size: 12px;
  font-weight: 600;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.staff-role {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster-table td.weekend,
.roster-table th.weekend {
  background: #f6f7f8;
}
.roster-table th.today {
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}
.roster-table td.today {
  background: #fffafb;
}
.shift {
  display: flex;
  width: 100%;
  border-radius: 6px;
  border: 1px solid transparent;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 10px;
  font-weight: 650;
  padding: 5px 3px;
  line-height: 1.3;
  transition: transform 0.12s;
}
.shift small {
  font-size: 8px;
  display: block;
  font-weight: 500;
  margin-top: 3px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shift.empty {
  background: transparent;
  color: #bdc4c9;
  font-size: 16px;
  font-weight: 400;
}
.shift.readonly {
  cursor: default;
}
.shift:not(.readonly):hover {
  transform: translateY(-1px);
  border-color: #87939c55;
  box-shadow: 0 2px 5px #18222b15;
}
.shift.am-t,
.legend-dot.am-t {
  background: #fff0da;
  color: #9b6522;
}
.shift.am-c,
.legend-dot.am-c {
  background: #edf2d6;
  color: #69772c;
}
.shift.am,
.legend-dot.am {
  background: #fae8d4;
  color: #a16b38;
}
.shift.pm,
.legend-dot.pm {
  background: #e6edfc;
  color: #456eaa;
}
.shift.mbd,
.legend-dot.mbd {
  background: #f0e7f8;
  color: #79549b;
}
.shift.off,
.legend-dot.off {
  background: #edf0f2;
  color: #84909a;
}
.shift.leave,
.legend-dot.leave {
  background: #fbe2e5;
  color: #a24958;
}
.shift.office,
.legend-dot.office {
  background: #e2f0ec;
  color: #4c8675;
}
.shift.training,
.legend-dot.training {
  background: #e4f1f8;
  color: #4c879c;
}
.shift.cancelled {
  opacity: 0.65;
  text-decoration: line-through;
}
.roster-table tfoot td {
  height: 57px;
  background: #fcfcfd;
  font-size: 9px;
  color: var(--muted);
}
.coverage span {
  display: block;
  white-space: nowrap;
  line-height: 1.6;
}
.roster-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 23px;
  color: var(--muted);
  font-size: 10px;
}
.mode-banner,
.error-banner,
.updates-banner {
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
}
.mode-banner {
  background: #fff5e7;
  color: #896728;
}
.error-banner {
  background: #ffedef;
  color: #a62436;
  border: 1px solid #f4c6ce;
}
.updates-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #f6eaed;
  color: var(--accent);
  margin: 0 0 20px;
}
.updates-banner > div {
  display: flex;
  gap: 5px;
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
  padding: 0 23px 23px;
}
.event-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
}
.event-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  margin-bottom: 15px;
}
.event-date {
  font-size: 10px;
  color: var(--accent);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 7px;
}
.event-card h3 {
  line-height: 1.5;
}
.status-pill {
  font-size: 9px;
  padding: 4px 6px;
  border-radius: 5px;
  background: #edf4f1;
  color: #42806b;
}
.status-pill.planned {
  background: #fff3df;
  color: #a77c36;
}
.status-pill.cancelled {
  background: #fbe8eb;
  color: #ab5261;
}
.event-card .location {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 16px;
  color: #657580;
}
.event-facts {
  display: flex;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 16px;
}
.event-facts span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.event-facts strong {
  font-size: 14px;
  display: block;
  margin-top: 5px;
  font-weight: 600;
}
.crew-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.crew-chips span {
  font-size: 10px;
  background: #f4f5f7;
  color: #65717b;
  padding: 5px 8px;
  border-radius: 5px;
}
.event-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.event-actions .button {
  padding: 8px 11px;
  font-size: 11px;
}
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  grid-column: 1/-1;
}
.change-list {
  padding: 0 23px 23px;
}
.change-item {
  padding: 17px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 33px 1fr auto;
  gap: 13px;
  align-items: start;
}
.change-marker {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f6eaed;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.change-item h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.change-item .reason {
  font-size: 12px;
  margin: 6px 0;
  color: #586771;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.change-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.change-item details {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.change-item summary {
  cursor: pointer;
}
.diff-line {
  display: grid;
  grid-template-columns: 110px 1fr;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.diff-line span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.table-scroll {
  overflow: auto;
  padding: 0 23px 23px;
}
.balance-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.balance-table th {
  font-size: 10px;
  color: var(--muted);
  text-align: left;
  padding: 12px 10px;
  background: #f9fafb;
}
.balance-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.balance-table td:first-child {
  font-weight: 600;
}
.personnel-list {
  padding: 0 23px 23px;
}
.personnel-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.personnel-item small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.personnel-item.archived {
  opacity: 0.6;
}
.site-footer {
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 10px;
  color: #8b969d;
}
.site-footer .powered-by {
  white-space: nowrap;
}
.site-footer .powered-by a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.site-footer .powered-by a:hover,
.site-footer .powered-by a:focus-visible {
  text-decoration: underline;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(650px, calc(100vw - 30px));
  color: var(--ink);
  box-shadow: 0 30px 90px #17202940;
  max-height: 92vh;
}
dialog::backdrop {
  background: #1d273950;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
}
.dialog-heading h2 {
  font-size: 19px;
}
.dialog-heading .icon-button {
  border: 0;
}
.dialog-body-content {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-field.full {
  grid-column: 1/-1;
}
.form-field label {
  font-size: 11px;
  font-weight: 650;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.form-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.form-field .muted {
  font-size: 11px;
}
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.form-error {
  background: #ffedef;
  color: #a62436;
  font-size: 12px;
  padding: 11px;
  border-radius: 8px;
  margin-bottom: 16px;
  white-space: pre-wrap;
  line-height: 1.5;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  max-height: 190px;
  overflow: auto;
}
.checkbox-grid label {
  display: flex;
  gap: 8px;
  font-size: 12px;
  align-items: center;
  font-weight: 400;
}
.checkbox-grid input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}
.detail-hero {
  background: #f8f2fa;
  border-radius: 10px;
  padding: 17px;
  margin-bottom: 20px;
}
.detail-hero h3 {
  font-size: 21px;
  line-height: 1.5;
  margin: 6px 0;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.details-grid dt {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.details-grid dd {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.details-grid .full {
  grid-column: 1/-1;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  border-radius: 10px;
  background: #202d35;
  color: white;
  padding: 13px 20px;
  font-size: 12px;
  box-shadow: 0 4px 25px #202d3533;
  max-width: 90vw;
  text-align: center;
  line-height: 1.5;
}
.print-heading {
  display: none;
}
a {
  color: var(--accent);
}
@media (max-width: 1000px) {
  .app-shell {
    padding: 0 22px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .tabs {
    gap: 22px;
  }
  .calendar-toolbar {
    align-items: start;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat-note {
    display: block;
    margin: 3px 0 0;
  }
  .stat-symbol {
    right: 12px;
    top: 14px;
  }
  .roster-table .staff-col {
    width: 155px;
  }
}
@media (max-width: 820px) {
  .topbar {
    height: auto;
    min-height: 90px;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  .app-shell {
    padding: 0 14px;
  }
  .topbar {
    min-height: 76px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand small {
    font-size: 9px;
  }
  .connection {
    font-size: 10px;
  }
  .header-actions {
    gap: 7px;
  }
  .header-actions .button {
    padding: 8px 10px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    padding-top: 25px;
    gap: 15px;
  }
  .heading-actions {
    justify-content: start;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .calendar-toolbar {
    padding: 19px 0 15px;
  }
  .period-tools {
    width: 100%;
    gap: 7px;
  }
  .segments {
    flex: 1;
    justify-content: space-between;
  }
  .segments button {
    padding: 7px 9px;
  }
  .period-navigation h2 {
    font-size: 19px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat {
    padding: 13px 15px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-symbol {
    display: none;
  }
  .panel-head {
    padding: 18px 15px;
    align-items: start;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head .button {
    padding: 8px 10px;
    font-size: 10px;
  }
  .roster-controls {
    padding: 0 15px 15px;
    gap: 12px;
  }
  .search-field {
    width: 100%;
  }
  .search-field input {
    width: 100%;
    max-width: none;
  }
  .legend {
    padding: 0 15px 14px;
    gap: 10px;
  }
  .roster-scroll {
    max-height: 60vh;
  }
  .roster-table .staff-col {
    width: 140px;
    padding: 10px 12px;
  }
  .staff-name {
    font-size: 11px;
  }
  .roster-footer {
    flex-direction: column;
    padding: 12px 15px;
    gap: 5px;
  }
  .event-grid {
    padding: 0 15px 15px;
    grid-template-columns: 1fr;
  }
  .change-list,
  .personnel-list {
    padding: 0 15px 15px;
  }
  .change-item {
    grid-template-columns: 28px 1fr;
    gap: 10px;
  }
  .change-time {
    grid-column: 2;
    margin-top: -7px;
  }
  .updates-banner {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }
  .site-footer {
    gap: 10px;
    flex-direction: column;
    padding: 20px 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-field.full {
    grid-column: auto;
  }
  .dialog-heading {
    padding: 18px;
  }
  .dialog-body-content {
    padding: 18px;
  }
  .details-grid {
    gap: 15px;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
  body {
    background: #fff;
    font-size: 10px;
  }
  .app-shell {
    max-width: none;
    padding: 0;
  }
  .topbar,
  .page-heading,
  .tabs,
  .calendar-toolbar,
  .stats,
  .mode-banner,
  .error-banner,
  .updates-banner,
  .site-footer,
  .roster-controls,
  .panel-head,
  .roster-footer,
  .admin-only,
  dialog,
  .toast {
    display: none !important;
  }
  main > section:not(#rosterPanel) {
    display: none !important;
  }
  #rosterPanel {
    display: block !important;
    border: 0;
    border-radius: 0;
  }
  .print-heading {
    display: block;
    text-align: center;
    margin-bottom: 10px;
  }
  .print-heading h2 {
    font-size: 14px;
  }
  .print-heading p {
    margin: 5px 0;
    font-size: 11px;
  }
  .print-heading small {
    font-size: 8px;
    color: #555;
  }
  .legend {
    padding: 0 0 8px;
    gap: 12px;
    font-size: 8px;
  }
  .roster-scroll {
    overflow: visible;
    max-height: none;
    border: 0;
  }
  .roster-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
    border: 1px solid #aaa;
  }
  .roster-table th,
  .roster-table td {
    position: static !important;
    height: auto;
    padding: 3px 2px;
    border-color: #ccc;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .roster-table .staff-col {
    width: 28mm;
    padding: 4px;
    box-shadow: none;
  }
  .roster-table thead {
    display: table-header-group;
  }
  .roster-table thead th {
    height: 10mm;
    font-size: 9px;
  }
  .roster-table th .weekday {
    font-size: 6px;
  }
  .roster-table tr {
    break-inside: avoid;
  }
  .staff-name {
    font-size: 8px;
    white-space: normal;
  }
  .staff-role {
    font-size: 6px;
    white-space: normal;
  }
  .shift {
    font-size: 7px;
    min-height: 7mm;
    padding: 3px 1px;
    box-shadow: none !important;
  }
  .shift small {
    font-size: 5px;
    white-space: normal;
  }
  .roster-table tfoot td {
    height: auto;
    font-size: 6px;
  }
  .legend-dot {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .roster-table .today {
    box-shadow: none !important;
  }
}
/* App components */
.stat p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.stat > strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 4px;
  font-weight: 650;
}
.stat > small {
  font-size: 11px;
  color: var(--muted);
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  display: inline-block;
  flex-shrink: 0;
}
.legend small {
  font-size: 10px;
}
.roster-table .person-col {
  width: 180px;
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  padding: 12px 18px;
  box-shadow: 3px 0 7px #202d3505;
}
.roster-table thead .person-col {
  background: #f9fafb;
  z-index: 5;
}
.person-col > strong {
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.person-col > small {
  font-size: 10px;
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.roster-table thead th > strong {
  display: block;
}
.roster-table thead th > small {
  font-size: 9px;
  font-weight: 400;
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.shift.readonly:disabled {
  opacity: 1;
}
.status {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf4f1;
  color: #42806b;
  text-transform: capitalize;
}
.status.planned {
  background: #fff3df;
  color: #a77c36;
}
.status.cancelled {
  background: #fbe8eb;
  color: #ab5261;
}
.event-location {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 38px;
}
.event-facts small {
  font-size: 10px;
}
.crew-line {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  min-height: 42px;
}
.crew-line strong {
  display: block;
  font-size: 10px;
}
.change-item {
  grid-template-columns: 16px 1fr;
}
.change-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}
.change-item p {
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 6px 0;
  color: #586771;
}
.change-item small {
  font-size: 10px;
  color: var(--muted);
}
.diff-list {
  margin: 10px 0;
}
.diff-list > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.diff-list dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.personnel-item p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.balance-table tbody th {
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
#dialogBody {
  padding: 24px;
}
.form-grid > label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}
.form-grid input:not([type="checkbox"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.form-grid textarea {
  resize: vertical;
  line-height: 1.5;
}
.form-full {
  grid-column: 1/-1;
}
.form-grid .checkbox-label {
  flex-direction: row;
  align-items: center;
}
.public-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.form-grid label small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.form-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  min-width: 0;
}
.form-grid legend {
  font-size: 12px;
  font-weight: 600;
}
.crew-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  max-height: 180px;
  overflow: auto;
}
.form-actions.form-full {
  margin-top: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-grid dt {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.detail-grid dd {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-notes p {
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.detail-hero p {
  font-size: 13px;
}
.detail-hero a {
  font-size: 12px;
}
.coverage {
  font-size: 9px;
}
.roster-table tfoot .person-col {
  background: #fcfcfd;
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 650px) {
  .roster-table .person-col {
    width: 140px;
    padding: 10px 12px;
  }
  .person-col > strong {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  #dialogBody {
    padding: 18px;
  }
  .crew-picker {
    grid-template-columns: 1fr;
  }
  .legend small {
    display: none;
  }
  .connection {
    max-width: 95px;
  }
  .header-actions {
    align-items: center;
  }
}
@media print {
  .roster-table .person-col {
    width: 28mm;
    position: static !important;
    padding: 4px;
    box-shadow: none;
  }
  .person-col > strong {
    font-size: 8px;
  }
  .person-col > small {
    font-size: 6px;
  }
  .roster-table thead th > small {
    font-size: 6px;
  }
  .shift.readonly:disabled {
    opacity: 1;
  }
  .legend small {
    display: none;
  }
}

@media print {
  html,
  body {
    background: #fff !important;
  }
}
