:root {
  color-scheme: light;
  --ink: #172039;
  --muted: #727991;
  --line: #e4e7ef;
  --surface: #ffffff;
  --canvas: #f4f5f9;
  --navy: #1e2856;
  --navy-soft: #2b376e;
  --primary: #5468f2;
  --primary-soft: #eef0ff;
  --mint: #2db18a;
  --mint-soft: #e9f8f3;
  --amber: #f2a33a;
  --amber-soft: #fff5e5;
  --red: #dc5b67;
  --red-soft: #fff0f1;
  --shadow: 0 10px 35px rgba(26, 34, 65, 0.07);
  --shadow-lg: 0 24px 70px rgba(19, 26, 55, 0.18);
  --radius: 18px;
  --font: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 12%, rgba(84, 104, 242, 0.05), transparent 24rem),
    var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(84, 104, 242, 0.13), transparent 24rem),
    radial-gradient(circle at 82% 78%, rgba(45, 177, 138, 0.1), transparent 22rem),
    var(--canvas);
}
.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.auth-card.with-line-qr { width: min(100%, 620px); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 28px; text-align: left; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 18px; }
.auth-brand small { color: var(--muted); font-size: 10px; letter-spacing: 0.9px; }
.auth-card h1 { margin: 14px 0 8px; font-size: 25px; line-height: 1.35; }
.auth-card > p { margin: 0 auto; color: var(--muted); max-width: 390px; }
.auth-action { min-height: 48px; display: flex; align-items: center; justify-content: center; margin: 24px 0 18px; }
.auth-footnote { display: block; color: #9298ab; }
.pending-line-friend {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #caefdd;
  border-radius: 18px;
  background: #f3fcf7;
  text-align: left;
}
.pending-line-qr { padding: 10px; border: 1px solid #dce9e2; border-radius: 14px; background: white; }
.pending-line-qr img { width: 100%; height: auto; display: block; }
.pending-line-copy strong { display: block; margin-top: 9px; font-size: 14px; }
.pending-line-copy p { margin: 5px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pending-line-copy .button.line-login { min-width: 0; }
.button.line-login { min-width: 220px; color: white; border-color: #06c755; background: #06c755; text-decoration: none; }
.button.line-login:hover { background: #05b84e; }
.auth-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dfe3ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

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

button { color: inherit; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(84, 104, 242, 0.22);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  color: #f6f7ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    var(--navy);
  overflow-y: auto;
}

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

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #7282ff, #4b60ea);
  box-shadow: 0 8px 22px rgba(5, 9, 32, 0.25);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  border-radius: 999px;
  background: white;
}

.brand-mark::before { top: 11px; height: 4px; }
.brand-mark::after { top: 21px; height: 7px; opacity: 0.72; }
.brand-copy strong { display: block; font-size: 17px; letter-spacing: 0.2px; }
.brand-copy span { display: block; color: #aeb7df; font-size: 11px; margin-top: -2px; }

.nav { padding: 20px 13px; }
.nav-label {
  margin: 0 10px 9px;
  color: #8993c0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin: 3px 0;
  border: 0;
  border-radius: 12px;
  color: #c2c9e5;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(111, 130, 255, 0.28), rgba(111, 130, 255, 0.1));
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -13px;
  width: 4px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: #8290ff;
}
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-badge {
  margin-left: auto;
  min-width: 21px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.sidebar-note {
  margin: auto 16px 18px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #aeb7dd;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
}
.sidebar-note strong { display: block; color: white; font-size: 12px; margin-bottom: 4px; }

.main { min-height: 100vh; margin-left: 248px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid rgba(218, 221, 233, 0.88);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.8px; }
.topbar-title { margin: 0; font-size: 19px; line-height: 1.25; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button.mobile-menu { display: none; }

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
}
.icon-button:hover { border-color: #cdd2e4; background: #fafbff; }
.icon-button svg { width: 19px; height: 19px; }
.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--red);
}

.actor-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.actor-switcher select {
  max-width: 190px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
  cursor: pointer;
}
.actor-switcher.signed-in { gap: 9px; }
.signed-in-copy { min-width: 0; }
.signed-in-copy strong { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.logout-button { width: 34px; height: 34px; margin-left: 4px; color: var(--muted); }
.role-note { color: var(--muted); font-size: 10px; }

.avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-size: 12px;
  font-weight: 750;
}
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 10px; }
.avatar.violet { background: linear-gradient(145deg, #8c73e8, #6550be); }
.avatar.teal { background: linear-gradient(145deg, #45baa9, #27867a); }
.avatar.blue { background: linear-gradient(145deg, #5d8ddf, #3d65ab); }
.avatar.orange { background: linear-gradient(145deg, #efa454, #c4732d); }
.avatar.pink { background: linear-gradient(145deg, #db7fa9, #b3527e); }
.avatar.green { background: linear-gradient(145deg, #62b780, #368254); }
.avatar.admin { background: linear-gradient(145deg, #5568f2, #2d3ca2); }

.content { max-width: 1520px; margin: 0 auto; padding: 30px 34px 56px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.35; letter-spacing: -0.4px; }
.page-heading p { margin: 0; color: var(--muted); }
.heading-actions { display: flex; gap: 9px; }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  font-weight: 650;
  cursor: pointer;
  transition: 150ms ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(26, 34, 65, 0.08); }
.button svg { width: 17px; height: 17px; }
.button.primary { color: white; border-color: var(--primary); background: var(--primary); }
.button.primary:hover { background: #4659dc; }
.button.soft { color: #485bd4; border-color: transparent; background: var(--primary-soft); }
.button.danger { color: var(--red); border-color: #f2cdd1; background: white; }
.button.small { min-height: 34px; padding: 6px 11px; border-radius: 9px; font-size: 12px; }
.button.full { width: 100%; }
.button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 22px; }
.stat-card {
  position: relative;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: -25px;
  right: -28px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--tint, rgba(84, 104, 242, 0.06));
}
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.stat-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--accent, var(--primary));
  background: var(--tint, var(--primary-soft));
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { margin-top: 12px; font-size: 28px; line-height: 1.15; font-weight: 750; letter-spacing: -0.6px; }
.stat-foot { margin-top: 5px; color: var(--muted); font-size: 11px; }
.trend-up { color: var(--mint); font-weight: 700; }
.trend-alert { color: var(--red); font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.8fr); gap: 18px; }
.stack { display: grid; gap: 18px; align-content: start; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.card-title { margin: 0; font-size: 15px; }
.card-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.fairness-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; margin-right: 4px; border-radius: 50%; background: var(--primary); }
.legend-line { width: 13px; display: inline-block; margin-right: 4px; border-top: 1px dashed var(--mint); vertical-align: middle; }
.fair-row { display: grid; grid-template-columns: minmax(125px, 0.9fr) minmax(160px, 1.7fr) 84px; align-items: center; gap: 14px; margin: 14px 0; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person-name { min-width: 0; }
.person-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.person-name span { color: var(--muted); font-size: 10px; }
.bar-track { position: relative; height: 8px; border-radius: 999px; background: #f0f1f6; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5368f1, #8190ff); }
.target-line { position: absolute; top: -4px; bottom: -4px; width: 1px; border-left: 1px dashed var(--mint); }
.amount { text-align: right; font-size: 12px; font-weight: 700; }

.alert-list { display: grid; gap: 9px; }
.alert-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f2dcde;
  border-radius: 13px;
  background: #fffafb;
}
.alert-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
}
.alert-symbol svg { width: 17px; height: 17px; }
.alert-copy strong { display: block; font-size: 12px; }
.alert-copy span { display: block; color: var(--muted); font-size: 10px; }

.activity-list { display: grid; }
.activity-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid #eff0f5; }
.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.activity-icon svg { width: 16px; height: 16px; }
.activity-copy strong { display: block; font-size: 11px; }
.activity-copy span { display: block; color: var(--muted); font-size: 10px; }
.official-account-share {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.official-account-share-qr { padding: 7px; border: 1px solid #dce9e2; border-radius: 13px; background: white; }
.official-account-share-qr img { width: 100%; height: auto; display: block; }
.official-account-share-copy > strong { display: block; margin-top: 7px; font-size: 12px; }
.official-account-share-copy > p { margin: 3px 0 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.official-account-share-copy > small { color: #16845b; font-size: 9px; font-weight: 750; }
.official-account-share-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.official-account-share-actions .button { flex: 1 1 auto; }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-field { position: relative; flex: 1; }
.search-field svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; color: #8a91a6; transform: translateY(-50%); }
.search-field input { width: 100%; padding-left: 40px; }
.field, input, select, textarea {
  border: 1px solid #dfe2eb;
  border-radius: 11px;
  color: var(--ink);
  background: white;
}
input, select, textarea { min-height: 42px; padding: 9px 12px; }
textarea { min-height: 90px; resize: vertical; }
textarea.compact-textarea { min-height: 68px; }
input::placeholder, textarea::placeholder { color: #a0a6b7; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 11px 16px;
  color: #7f8699;
  background: #fafbfc;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.25px;
  white-space: nowrap;
}
td { padding: 14px 16px; border-top: 1px solid #eceef3; vertical-align: middle; }
tr:hover td { background: #fcfcff; }
.job-number { display: block; color: #3f52c8; font-weight: 750; }
.cell-sub { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.people-stack { display: flex; padding-left: 8px; }
.people-stack .avatar { margin-left: -8px; border: 2px solid white; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { color: #b27016; background: var(--amber-soft); }
.badge.progress { color: #4357d2; background: var(--primary-soft); }
.badge.completed { color: #20866a; background: var(--mint-soft); }
.badge.draft { color: #707789; background: #f0f1f5; }
.badge.danger { color: #bd4652; background: var(--red-soft); }
.badge.neutral { color: #62697e; background: #f0f1f5; }
.badge.neutral::before { display: none; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr); gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.required { color: var(--red); }
.form-hint { color: var(--muted); font-size: 10px; font-weight: 400; }
.input-with-suffix { position: relative; }
.input-with-suffix input { width: 100%; padding-right: 52px; }
.input-suffix { position: absolute; right: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 126px;
  padding: 18px;
  border: 1.5px dashed #cfd4e3;
  border-radius: 14px;
  background: #fafbfe;
  text-align: center;
  cursor: pointer;
  transition: 150ms ease;
}
.upload-zone:hover { border-color: var(--primary); background: #f8f8ff; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.upload-icon svg { width: 19px; height: 19px; }
.upload-zone strong { display: block; font-size: 12px; }
.upload-zone span { display: block; color: var(--muted); font-size: 10px; }
.file-preview { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.file-preview .upload-icon { margin: 0; flex: 0 0 auto; }
.file-preview-copy { min-width: 0; }
.file-preview-copy strong, .file-preview-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rule-callout {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  margin-bottom: 15px;
  border-radius: 13px;
  color: #3e4aa1;
  background: var(--primary-soft);
  font-size: 11px;
}
.rule-callout svg { width: 18px; height: 18px; flex: 0 0 auto; }

.role-section + .role-section { margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.role-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.role-heading strong { font-size: 12px; }
.role-heading span { color: var(--muted); font-size: 10px; }
.candidate-list { display: grid; gap: 7px; }
.candidate {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
}
.candidate:hover { border-color: #b9c1ef; background: #fbfbff; }
.candidate.selected { border-color: var(--primary); background: #f8f8ff; box-shadow: 0 0 0 2px rgba(84, 104, 242, 0.08); }
.candidate-rank { color: var(--primary); font-size: 10px; font-weight: 800; }
.candidate-copy strong { display: block; font-size: 11px; }
.candidate-copy span { display: block; color: var(--muted); font-size: 9px; }
.candidate-value { text-align: right; font-size: 10px; }
.candidate-value strong { display: block; font-size: 11px; }
.best-tag { color: #1f8267; font-weight: 750; }
.empty-mini { padding: 16px; border-radius: 12px; color: var(--muted); background: #f7f8fa; font-size: 11px; text-align: center; }
.summary-split { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-size: 11px; }
.summary-split strong { color: var(--ink); }
.text-success { color: #20866a !important; }
.text-danger { color: #bd4652 !important; }
.form-submit { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }

.percent-editor { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fafbfe; }
.percent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.percent-field { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.percent-input { position: relative; display: block; }
.percent-input input { width: 100%; min-height: 38px; padding-right: 30px; background: white; }
.percent-input b { position: absolute; right: 11px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.percent-total { display: flex; justify-content: space-between; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 10px; }
.percent-total.valid strong { color: #20866a; }
.percent-total.invalid strong { color: #bd4652; }
.selected-policy { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #d9def8; border-radius: 13px; background: #f7f8ff; }
.selected-policy > div:first-child { display: flex; align-items: center; gap: 9px; }
.selected-policy svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--primary); }
.selected-policy strong, .selected-policy small { display: block; }
.selected-policy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.selected-policy-values { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.selected-policy-values span { padding: 5px 8px; border-radius: 7px; color: #62697e; background: white; font-size: 9px; }
.selected-policy-values strong { display: inline; color: var(--ink); }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.team-card { padding: 18px; }
.team-head { display: flex; align-items: center; gap: 11px; }
.team-head-copy { min-width: 0; }
.team-head-copy strong { display: block; font-size: 13px; }
.team-head-copy span { color: var(--muted); font-size: 10px; }
.team-head-status { display: grid; justify-items: end; gap: 5px; margin-left: auto; }
.line-status { color: #8a91a3; font-size: 8px; font-weight: 700; }
.line-status.ready { color: #159164; }
.availability { margin-left: auto; }
.availability-dot { width: 8px; height: 8px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--mint); }
.availability.off .availability-dot { background: var(--red); }
.team-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.team-metric { padding: 10px; border-radius: 11px; background: #f7f8fb; }
.team-metric span { display: block; color: var(--muted); font-size: 9px; }
.team-metric strong { display: block; margin-top: 2px; font-size: 13px; }
.team-metric.schedule-metric { grid-column: 1 / -1; }
.skill-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 50px; align-content: flex-start; }
.skill-chip { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 7px; color: #536078; background: #f0f2f6; font-size: 9px; font-weight: 650; }
.skill-chip.removable { gap: 5px; padding-right: 4px; }
.chip-delete { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; color: #8a91a3; background: transparent; cursor: pointer; }
.chip-delete:hover { color: var(--red); background: white; }
.chip-delete svg { width: 11px; height: 11px; }
.team-actions { display: flex; gap: 7px; margin-top: 15px; }
.type-manager { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.type-manager form { display: flex; gap: 7px; margin-left: auto; }
.type-manager input { min-height: 36px; }
.type-policy-add { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfe; }
.type-policy-add > div > strong, .type-policy-add > div > span { display: block; }
.type-policy-add > div > strong { font-size: 12px; }
.type-policy-add > div > span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.type-policy-add-form { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(430px, 1.5fr) auto; align-items: end; gap: 12px; margin-top: 12px; }
.type-policy-add-form .percent-editor { padding: 9px 11px; background: white; }
.type-policy-add-form .percent-field { gap: 3px; }
.type-policy-add-form .percent-input input { min-height: 36px; }
.type-policy-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.type-policy-heading strong { font-size: 12px; }
.type-policy-heading span { color: var(--muted); font-size: 9px; }
.type-policy-table { min-width: 760px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.type-policy-table-head, .type-policy-row { display: grid; grid-template-columns: minmax(160px, 1.25fr) repeat(3, minmax(105px, .8fr)) 80px 145px; align-items: center; gap: 10px; }
.type-policy-table-head { min-height: 38px; padding: 0 12px; color: var(--muted); background: #f6f7fa; font-size: 9px; font-weight: 700; }
.type-policy-row { padding: 10px 12px; border-top: 1px solid var(--line); background: white; }
.policy-type strong, .policy-type small { display: block; }
.policy-type strong { font-size: 11px; }
.policy-type small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.policy-cell { display: block; }
.policy-cell > span:first-child { display: none; color: var(--muted); font-size: 9px; }
.policy-percent-input { position: relative; display: block; }
.policy-percent-input input { width: 100%; min-height: 34px; padding: 7px 27px 7px 9px; background: #fafbfc; }
.policy-percent-input b { position: absolute; right: 9px; top: 50%; color: var(--muted); font-size: 10px; transform: translateY(-50%); }
.type-policy-row > .percent-total { display: block; margin: 0; padding: 0; border: 0; text-align: center; }
.type-policy-row > .percent-total span { display: none; }
.type-policy-row > .percent-total strong { font-size: 10px; }
.policy-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.assignment-percent-snapshot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.assignment-percent-snapshot span { padding: 7px; border-radius: 8px; color: var(--muted); background: white; font-size: 9px; }
.assignment-percent-snapshot strong { display: block; margin-top: 2px; color: var(--ink); font-size: 11px; }
.assignment-percent-snapshot .snapshot-total { color: #4560cf; background: var(--primary-soft); }
.line-phase-callout { display: flex; align-items: center; gap: 11px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid #caefdd; border-radius: 13px; background: #f3fcf7; }
.line-phase-callout > div { min-width: 0; flex: 1; }
.line-phase-callout strong, .line-phase-callout div > span { display: block; }
.line-phase-callout strong { font-size: 11px; }
.line-phase-callout div > span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.line-mark { min-width: 42px; height: 28px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 8px; color: white; background: #06c755; font-size: 9px; font-weight: 850; letter-spacing: -.2px; }
.line-mark.large { min-width: 58px; height: 40px; border-radius: 11px; font-size: 12px; }
.invite-list { display: grid; gap: 8px; }
.invite-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto; align-items: center; gap: 13px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; }
.invite-person { min-width: 0; display: flex; align-items: center; gap: 9px; }
.invite-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #3f55cf; background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.invite-person strong, .invite-person span { display: block; }
.invite-person strong { font-size: 11px; }
.invite-person span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.invite-meta { display: grid; justify-items: start; gap: 4px; }
.invite-meta small { color: var(--muted); font-size: 8px; }
.invite-actions { display: flex; justify-content: flex-end; gap: 6px; }
.line-button { color: white; border-color: #06b94f; background: #06c755; }
.line-button:hover { border-color: #05aa49; background: #05b84e; }
.line-ready { color: #16845b; font-size: 9px; font-weight: 750; }
.line-ready small { color: var(--muted); font-weight: 500; }
.mock-line-card { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 15px; border: 1px solid #caefdd; border-radius: 14px; background: #f3fcf7; }
.mock-line-card strong, .mock-line-card span { display: block; }
.mock-line-card strong { font-size: 12px; }
.mock-line-card span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.invite-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 15px; }
.invite-summary span { padding: 9px; border-radius: 9px; color: var(--muted); background: #f6f7fa; font-size: 8px; }
.invite-summary strong { display: block; margin-top: 3px; color: var(--ink); font-size: 10px; }
.invite-qr-modal { width: min(760px, 100%); }
.invite-qr-layout { display: grid; grid-template-columns: minmax(230px, 340px) 1fr; align-items: center; gap: 24px; }
.invite-qr-preview { padding: 15px; border: 1px solid #dfe4f1; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(31, 41, 90, .08); }
.invite-qr-preview img { width: 100%; height: auto; display: block; }
.invite-qr-guide { display: grid; gap: 14px; }
.invite-qr-guide h3 { margin: 0 0 6px; font-size: 15px; }
.invite-qr-guide p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.invite-qr-guide .rule-callout { margin: 0; }
.qr-summary { margin: 18px 0 0; }
.consent-option { display: flex; align-items: flex-start; gap: 9px; padding: 11px; margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; color: #525a70; font-size: 10px; cursor: pointer; }
.consent-option input { min-height: 0; margin-top: 2px; }

.user-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: 20px;
  color: white;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.16), transparent 15rem),
    linear-gradient(120deg, #27336c, #5265df);
  box-shadow: 0 18px 42px rgba(39, 51, 108, 0.18);
  overflow: hidden;
}
.user-hero h1 { margin: 0 0 4px; font-size: 24px; }
.user-hero p { margin: 0; color: #d8dcf6; }
.month-earning { min-width: 170px; padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.month-earning span { display: block; color: #c9cff4; font-size: 10px; }
.month-earning strong { display: block; margin-top: 2px; font-size: 25px; }

.task-list { display: grid; gap: 12px; }
.task-card { display: grid; grid-template-columns: 5px minmax(0, 1fr); overflow: hidden; }
.task-accent { background: var(--primary); }
.task-card.urgent .task-accent { background: var(--red); }
.task-card.done .task-accent { background: var(--mint); }
.task-content { padding: 17px 19px; }
.task-top { display: flex; justify-content: space-between; gap: 14px; }
.task-number { color: #4052c7; font-size: 13px; font-weight: 750; }
.task-client { color: var(--muted); font-size: 10px; }
.task-client span { display: block; margin-top: 2px; color: #9298aa; }
.task-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 14px 0 10px; }
.task-detail { padding: 9px 10px; border-radius: 10px; background: #f7f8fb; }
.task-detail span { display: block; color: var(--muted); font-size: 9px; }
.task-detail strong { display: block; margin-top: 1px; font-size: 11px; }
.assignment-reason { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 13px; padding: 9px 11px; border-radius: 10px; color: #4b5682; background: #f4f5fb; font-size: 10px; }
.assignment-reason svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--primary); }
.task-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.deadline { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.deadline svg { width: 15px; height: 15px; }
.deadline.urgent { color: var(--red); font-weight: 700; }
.task-actions { display: flex; gap: 7px; }
.task-actions { flex-wrap: wrap; justify-content: flex-end; }
.inline-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr); gap: 18px; align-items: start; }
.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav > div { min-width: 180px; text-align: center; }
.month-nav strong { display: block; font-size: 15px; }
.month-nav span { display: block; color: var(--muted); font-size: 9px; }
.schedule-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.schedule-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.schedule-count strong { color: var(--ink); font-size: 14px; }
.schedule-body { overflow-x: auto; }
.availability-calendar { min-width: 570px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.weekday-label { padding: 4px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }
.calendar-blank { min-height: 68px; }
.calendar-day { position: relative; min-height: 68px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; text-align: left; transition: 140ms ease; }
button.calendar-day:hover { transform: translateY(-1px); border-color: #b9c1ef; box-shadow: 0 5px 12px rgba(26, 34, 65, 0.07); }
.calendar-day.available { border-color: #9edbc9; background: var(--mint-soft); }
.calendar-day.readonly { cursor: default; }
.calendar-day.today { box-shadow: 0 0 0 2px var(--primary); }
.day-number { font-weight: 750; }
.day-status { color: var(--muted); font-size: 9px; }
.calendar-day.available .day-status { color: #218168; font-weight: 700; }
.schedule-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 10px; }
.availability-swatch { width: 10px; height: 10px; display: inline-block; margin-right: 5px; border: 1px solid var(--line); border-radius: 3px; vertical-align: -1px; background: white; }
.availability-swatch.available { border-color: #9edbc9; background: var(--mint-soft); }
.audit-list { display: grid; gap: 9px; }
.audit-item { display: flex; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfe; }
.audit-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.audit-icon svg { width: 16px; height: 16px; }
.audit-copy strong { display: block; font-size: 11px; }
.audit-copy span, .audit-copy small { display: block; color: var(--muted); font-size: 9px; }
.audit-copy small { margin-top: 3px; color: #545d78; }
.audit-copy details { margin-top: 6px; }
.audit-copy summary { color: #4a5dd1; font-size: 9px; font-weight: 700; cursor: pointer; }
.audit-changes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.audit-change { padding: 3px 6px; border-radius: 6px; color: #62697e; background: #f0f1f5; font-size: 8px; }
.audit-change.to-available { color: #24765f; background: var(--mint-soft); }
.audit-change.to-unavailable { color: #a44953; background: var(--red-soft); }

.empty-state { padding: 42px 20px; color: var(--muted); text-align: center; }
.empty-state-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 16px; color: var(--primary); background: var(--primary-soft); }
.empty-state-icon svg { width: 24px; height: 24px; }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 3px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 17, 40, 0.52);
  backdrop-filter: blur(4px);
}
.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 180ms ease-out;
}
.modal.large { width: min(850px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.modal-body { padding: 21px 22px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--line); background: #fafbfc; }
.close-button { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.close-button svg { width: 20px; height: 20px; }
.assignment-list { display: grid; gap: 8px; margin-top: 18px; }
.assignment-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }
.assignment-person { display: flex; align-items: center; gap: 9px; }
.assignment-person strong { display: block; font-size: 11px; }
.assignment-person span { display: block; color: var(--muted); font-size: 9px; }
.assignment-pay { text-align: right; }
.assignment-pay strong { display: block; font-size: 11px; }
.assignment-pay span { color: var(--muted); font-size: 9px; }
.worksheet-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; margin-bottom: 17px; border: 1px solid #cde9df; border-radius: 13px; background: #f5fcfa; }
.worksheet-panel.missing { border-color: var(--line); background: #fafbfc; }
.worksheet-file { min-width: 0; display: flex; align-items: center; gap: 10px; }
.worksheet-file > svg, .worksheet-panel.missing > div > svg { width: 22px; height: 22px; flex: 0 0 auto; color: #278d72; }
.worksheet-file span, .worksheet-panel.missing > div > span { min-width: 0; }
.worksheet-file strong, .worksheet-file small, .worksheet-panel.missing strong, .worksheet-panel.missing small { display: block; }
.worksheet-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.worksheet-file small, .worksheet-panel.missing small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.worksheet-panel.missing > div { display: flex; align-items: center; gap: 10px; }
.worksheet-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.preview-body { min-height: min(64vh, 620px); display: grid; }
.preview-frame { width: 100%; min-height: min(60vh, 580px); border: 1px solid var(--line); border-radius: 12px; background: white; }
.danger-callout { color: #a7424c; background: var(--red-soft); }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.check-option { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.check-option input { min-height: 0; }

.toast-root { position: fixed; z-index: 80; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 290px; max-width: 380px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #cde9df; border-radius: 13px; color: #276c59; background: white; box-shadow: var(--shadow-lg); animation: toast-in 180ms ease-out; }
.toast.error { color: #a7424c; border-color: #f0c8cc; }
.toast svg { width: 19px; height: 19px; flex: 0 0 auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-scrim { display: none; }
.desktop-only { display: table-cell; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .form-layout { grid-template-columns: 1fr; }
  .schedule-layout { grid-template-columns: 1fr; }
  .type-policy-add-form { grid-template-columns: 1fr; align-items: stretch; }
  .type-policy-add-form .button { justify-self: end; }
  .invite-row { grid-template-columns: 1fr auto; }
  .invite-actions { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-scrim { position: fixed; inset: 0; z-index: 19; display: block; border: 0; background: rgba(12, 17, 40, 0.45); }
  .main { margin-left: 0; }
  .icon-button.mobile-menu { display: grid; }
  .topbar { padding: 0 20px; }
  .topbar-left { display: flex; align-items: center; gap: 10px; }
  .content { padding: 24px 20px 48px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none; }
  .type-policy-table { min-width: 0; border: 0; overflow: visible; }
  .type-policy-table-head { display: none; }
  .type-policy-row { grid-template-columns: repeat(2, 1fr); margin-top: 9px; border: 1px solid var(--line); border-radius: 12px; }
  .policy-type { grid-column: 1 / -1; }
  .policy-cell > span:first-child { display: block; margin-bottom: 4px; }
  .type-policy-row > .percent-total { display: flex; justify-content: space-between; grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); text-align: left; }
  .type-policy-row > .percent-total span { display: block; }
  .policy-row-actions { grid-column: 1 / -1; }
  .invite-row { grid-template-columns: 1fr; }
  .invite-meta { justify-items: start; }
  .invite-actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .topbar { height: 68px; padding: 0 14px; }
  .topbar-title { font-size: 15px; }
  .eyebrow, .role-note { display: none; }
  .actor-switcher { padding-left: 6px; }
  .auth-page { padding: 14px; }
  .auth-card { padding: 25px 20px; }
  .pending-line-friend { grid-template-columns: 1fr; text-align: center; }
  .pending-line-qr { width: min(100%, 220px); margin: 0 auto; box-sizing: border-box; }
  .official-account-share { grid-template-columns: 1fr; text-align: center; }
  .official-account-share-qr { width: 118px; margin: 0 auto; box-sizing: border-box; }
  .official-account-share-actions { justify-content: center; }
  .actor-switcher select { width: 115px; font-size: 11px; }
  .signed-in-copy strong { max-width: 105px; font-size: 11px; }
  .logout-button { width: 32px; height: 32px; }
  .avatar.actor-avatar { display: none; }
  .content { padding: 20px 14px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 22px; }
  .stats-grid, .team-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 116px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .percent-grid { grid-template-columns: 1fr; }
  .selected-policy { align-items: flex-start; flex-direction: column; }
  .selected-policy-values { justify-content: flex-start; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .fair-row { grid-template-columns: minmax(110px, 1fr) 1.5fr; }
  .fair-row .amount { display: none; }
  .user-hero { align-items: flex-start; flex-direction: column; padding: 21px; }
  .month-earning { width: 100%; padding: 13px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .task-details { grid-template-columns: repeat(2, 1fr); }
  .task-footer { align-items: flex-start; flex-direction: column; }
  .task-actions { width: 100%; }
  .task-actions .button { flex: 1; }
  .type-manager { align-items: stretch; flex-direction: column; }
  .type-manager form { width: 100%; margin-left: 0; }
  .type-manager form input { min-width: 0; flex: 1; }
  .type-policy-heading { align-items: flex-start; flex-direction: column; }
  .assignment-percent-snapshot { grid-template-columns: repeat(2, 1fr); }
  .line-phase-callout { align-items: flex-start; flex-wrap: wrap; }
  .line-phase-callout .badge { margin-left: 53px; }
  .invite-summary { grid-template-columns: 1fr; }
  .invite-qr-layout { grid-template-columns: 1fr; }
  .invite-qr-preview { width: min(100%, 330px); margin: 0 auto; box-sizing: border-box; }
  .assignment-row { grid-template-columns: 1fr auto; }
  .assignment-row .button { grid-column: 1 / -1; }
  .worksheet-panel { align-items: stretch; flex-direction: column; }
  .worksheet-actions .button { flex: 1; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .check-grid { grid-template-columns: 1fr; }
  .schedule-toolbar, .schedule-footer { align-items: stretch; flex-direction: column; }
  .month-nav { justify-content: space-between; }
  .schedule-count { width: 100%; margin-left: 0; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; }
  .toast { min-width: 0; width: 100%; }
}
