:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef2f7;
  --ink: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --line-soft: #edf0f5;
  --brand: #234a91;
  --brand-strong: #19386f;
  --teal: #1f7a74;
  --green: #2f9b63;
  --coral: #d65f4a;
  --amber: #b7791f;
  --purple: #4a3b73;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(23, 32, 51, .08);
  --radius: 8px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #23314f, #1f7a74);
}

.login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  min-height: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.login-brand span {
  color: var(--muted);
}

.logout-button {
  min-height: 40px;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  background: #23314f;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0d1b2e;
  background: linear-gradient(135deg, #f0cf63, #77d4bf);
}

.brand strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: rgba(248,250,252,.72);
  font-size: 12px;
}

.nav-list {
  padding: 14px 10px;
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(248,250,252,.86);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 720;
  text-align: left;
}

.nav-item > span:nth-child(2) {
  flex: 1;
}

.nav-badge {
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  background: #f0cf63;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.nav-badge.inline {
  background: #e9eef8;
  color: var(--brand);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #f0cf63;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px;
  color: rgba(248,250,252,.88);
  display: grid;
  gap: 4px;
}

.sidebar-footer small {
  color: rgba(248,250,252,.58);
}

.sidebar-logout-button {
  display: none;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 74px;
  padding: 14px 26px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  min-width: 260px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d8e1f2;
  color: #1f3154;
  font-weight: 900;
}

.content {
  padding: 26px;
  display: grid;
  gap: 22px;
}

.section-header,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right,
.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.button-row.end {
  justify-content: flex-end;
  margin-top: 14px;
}

.button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 780;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
}

.button:hover {
  background: var(--brand-strong);
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  border-color: #b8c2d4;
  background: var(--surface-soft);
}

.ghost-button {
  background: transparent;
}

.danger-button {
  color: #fff;
  border-color: transparent;
  background: var(--danger);
}

.icon-button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.mini-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel.flat {
  box-shadow: none;
}

.metric {
  min-height: 118px;
  display: grid;
  gap: 12px;
}

.metric.compact {
  min-height: 0;
}

.metric.positive strong {
  color: var(--green);
}

.metric.negative strong {
  color: var(--danger);
}

.metric strong {
  font-size: 28px;
}

.metric span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px;
  background: var(--surface-strong);
  color: #526078;
  font-size: 13px;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.tag,
.status-pill,
.employee-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 820;
  background: #e9eef8;
  color: #234a91;
}

.tag.green,
.status-pill.done {
  background: #e8f6ee;
  color: #21734d;
}

.tag.amber,
.status-pill.planned {
  background: #fff3d6;
  color: #815200;
}

.tag.coral,
.status-pill.issue {
  background: #fde9e3;
  color: #a4402e;
}

.muted {
  color: var(--muted);
}

.material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-select {
  min-width: 150px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--surface);
}

.month-grid.week-grid {
  grid-template-columns: repeat(7, minmax(180px, 1fr));
}

.weekday {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--surface-strong);
  color: #526078;
  font-weight: 850;
  border-right: 1px solid var(--line);
}

.weekday:nth-child(7n) {
  border-right: 0;
}

.day-cell {
  min-height: 164px;
  max-height: 286px;
  padding: 9px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 7px;
  background: var(--surface);
  overflow-y: auto;
}

.day-cell:nth-child(7n) {
  border-right: 0;
}

.day-cell.outside {
  background: #f7f8fb;
  color: #99a2b2;
}

.day-cell.today {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.day-cell.holiday {
  background: #fffaf0;
}

.day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 24px;
  gap: 8px;
}

.day-number {
  font-weight: 900;
}

.day-weekday {
  display: none;
}

.holiday-pill,
.assignment-count {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.holiday-pill {
  background: #fff0bd;
  color: #785600;
}

.assignment-count {
  background: #edf2ff;
  color: #3151a3;
}

.mini-add {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--brand);
  font-weight: 900;
}

.assignment-card {
  border: 1px solid #cdd6e6;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #fbfdff;
  padding: 0;
  display: grid;
  gap: 5px;
  text-align: left;
  color: var(--ink);
  width: 100%;
  overflow: hidden;
}

.assignment-card:hover {
  border-color: var(--brand);
}

.assignment-card-main {
  border: 0;
  background: transparent;
  padding: 8px;
  display: grid;
  gap: 5px;
  width: 100%;
  text-align: left;
  color: inherit;
}

.assignment-title {
  font-weight: 870;
  overflow-wrap: anywhere;
}

.assignment-meta {
  color: var(--muted);
  font-size: 12px;
}

.assignment-contact,
.assignment-address {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.assignment-employees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.assignment-person {
  border-radius: 6px;
  padding: 2px 6px;
  background: #e8f6ee;
  color: #1f6d49;
  font-size: 11px;
  font-weight: 850;
}

.assignment-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 8px 8px;
}

.assignment-card-actions a,
.assignment-card-actions button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0 8px;
  background: #e8f6ee;
  color: #1f6d49;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.assignment-card-actions .danger-link {
  background: #fee2e2;
  color: #991b1b;
}

.schedule-notice {
  border: 1px solid #cdd6e6;
  border-radius: 8px;
  background: #f6f9ff;
  color: #3151a3;
  padding: 10px 12px;
  font-weight: 820;
}

.segmented-control {
  display: inline-flex;
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  min-width: 74px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segmented-control button.active {
  background: var(--brand);
  color: #fff;
}

.compact-field {
  min-width: 210px;
  margin: 0;
}

.recurrence-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.weekday-pick-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  gap: 6px;
}

.weekday-pick-list label {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.weekday-pick-list label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.weekday-pick-list input {
  accent-color: var(--brand);
}

.details-pane {
  display: grid;
  gap: 12px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: var(--surface-soft);
}

.contact-card a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.time-entry-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.span-two {
  grid-column: span 2;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field > span {
  color: #526078;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--ink);
}

.field textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

.checkbox-list {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  max-height: 180px;
  overflow: auto;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  color: var(--ink);
  font-size: 14px;
}

.employee-pick-list {
  gap: 8px;
  max-height: 240px;
}

.employee-pick {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  justify-content: space-between;
  cursor: pointer;
}

.employee-pick span {
  display: grid;
  gap: 3px;
}

.employee-pick small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.employee-pick.unavailable {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #991b1b;
  cursor: not-allowed;
}

.employee-pick.unavailable small {
  color: #be123c;
}

.employee-pick input {
  width: auto;
  min-height: auto;
  margin-left: auto;
}

.employee-pick input:disabled {
  opacity: .45;
}

.modal {
  width: min(760px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(23, 32, 51, .24);
}

.modal::backdrop {
  background: rgba(15, 23, 42, .42);
}

.modal-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  z-index: 30;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  background: #172033;
  box-shadow: var(--shadow);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.report-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.report-preview h2 {
  margin-bottom: 14px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.report-header > div:last-child {
  text-align: right;
}

.compact-report-table {
  font-size: 12px;
}

.compact-report-table th,
.compact-report-table td {
  padding: 7px;
}

.report-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.absence-card-list {
  display: grid;
  gap: 10px;
}

.absence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--surface-soft);
}

.absence-card > div:first-child {
  display: grid;
  gap: 3px;
}

.absence-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.absence-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.absence-type-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 16px;
  text-align: left;
  display: grid;
  align-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.absence-type-card:hover,
.absence-type-card:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  outline: none;
}

.absence-type-card strong {
  font-size: 16px;
}

.absence-type-card span {
  color: var(--muted);
  line-height: 1.35;
}

.signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 34px;
}

.signature-line {
  border-top: 1px solid #333;
  padding-top: 8px;
  color: var(--muted);
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #c6cedc;
  border-radius: 8px;
  background: var(--surface-soft);
}

@media (max-width: 1120px) {
  .grid.two,
  .grid.three,
  .grid.four,
  .calendar-layout,
  .absence-summary-grid,
  .absence-action-grid {
    grid-template-columns: 1fr;
  }

  .month-grid {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }
}

@media (max-width: 780px) {
  html,
  body {
    font-size: 16px;
    line-height: 1.45;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(15, 23, 42, .48);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: min(86vw, 340px);
    min-height: 100dvh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 24px 0 60px rgba(15, 23, 42, .28);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    min-height: 72px;
    padding: 14px 16px;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand span {
    font-size: 13px;
  }

  .nav-list {
    display: grid;
    gap: 8px;
    overflow: visible;
    padding: 14px;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    min-width: 0;
    min-height: 54px;
    padding: 0 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .nav-badge {
    min-width: 26px;
    min-height: 26px;
    font-size: 13px;
  }

  .sidebar-footer {
    display: grid;
    gap: 10px;
    padding: 14px;
  }

  .sidebar-logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topbar {
    position: sticky;
    top: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
    gap: 9px;
    z-index: 30;
  }

  .topbar > div:first-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
  }

  .mobile-menu-button {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
  }

  .topbar .eyebrow,
  .topbar h1 {
    grid-column: 2;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 21px;
  }

  h3 {
    font-size: 18px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .content {
    padding: 12px;
    gap: 16px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
  }

  .search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  #quickExportBtn {
    display: none;
  }

  .logout-button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  .topbar-actions .secondary-button,
  .topbar-actions .icon-button {
    width: auto;
    min-height: 42px;
  }

  .toolbar,
  .toolbar-left,
  .toolbar-right {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .segmented-control,
  .compact-field {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
    min-height: 50px;
    justify-content: center;
    font-size: 16px;
  }

  .icon-button {
    min-width: 48px;
    min-height: 48px;
  }

  .topbar-actions .secondary-button,
  .topbar-actions .icon-button {
    width: auto;
  }

  .topbar-actions .avatar {
    align-self: center;
    width: 44px;
    height: 44px;
  }

  .form-grid.two,
  .form-grid.time-entry-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .metric {
    min-height: 108px;
    gap: 10px;
  }

  .metric strong {
    font-size: 32px;
  }

  .metric span,
  .muted {
    font-size: 15px;
  }

  .field {
    gap: 8px;
  }

  .field label,
  .field > span {
    font-size: 13px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 50px;
    font-size: 16px;
    padding-inline: 13px;
  }

  .field textarea {
    min-height: 116px;
    padding-top: 12px;
  }

  th,
  td {
    padding: 13px 12px;
    font-size: 15px;
  }

  th {
    font-size: 13px;
  }

  .span-two {
    grid-column: auto;
  }

  .month-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
    border: 0;
    background: transparent;
    overflow: hidden;
  }

  .month-grid.week-grid {
    grid-template-columns: 1fr;
  }

  .app-shell,
  .workspace,
  .content,
  .calendar-layout,
  .month-grid {
    max-width: 100%;
    min-width: 0;
  }

  .weekday {
    display: none;
  }

  .day-cell {
    width: 100%;
    min-width: 0;
    min-height: auto;
    max-height: none;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
    padding: 10px;
    gap: 8px;
  }

  .day-cell.outside:not(.has-assignments) {
    display: none;
  }

  .day-head {
    min-height: 30px;
  }

  .day-date {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .day-weekday {
    display: inline;
    color: var(--muted);
    font-weight: 850;
    font-size: 15px;
  }

  .day-number {
    font-size: 21px;
  }

  .assignment-card {
    min-height: 0;
    border-left-width: 5px;
  }

  .assignment-card-main {
    padding: 10px;
    gap: 7px;
  }

  .assignment-title {
    font-size: 17px;
  }

  .assignment-meta,
  .assignment-contact,
  .assignment-address {
    font-size: 15px;
    line-height: 1.32;
  }

  .assignment-person,
  .holiday-pill,
  .assignment-count,
  .tag,
  .status-pill,
  .employee-chip {
    min-height: 28px;
    font-size: 13px;
  }

  .assignment-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 10px 10px;
  }

  .assignment-card-actions a,
  .assignment-card-actions button {
    min-height: 42px;
    font-size: 14px;
    justify-content: center;
  }

  .details-pane {
    display: none;
  }

  .button-row.compact-actions {
    flex-wrap: wrap;
  }

  .table-wrap {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .summary-strip,
  .report-mini-grid,
  .signature-row {
    grid-template-columns: 1fr;
  }

  .modal {
    width: calc(100% - 16px);
    max-height: 92dvh;
  }

  .modal-panel {
    padding: 16px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .logout-button {
    width: 100%;
    justify-content: center;
  }

  .topbar-actions .avatar {
    display: none;
  }

  .assignment-card-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .toolbar,
  .button-row,
  .toast-stack {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .content {
    padding: 0;
  }

  .panel,
  .report-preview {
    box-shadow: none;
    border-color: #999;
  }
}
