:root {
  color-scheme: dark;
  --bg: #141619;
  --panel: #1c1f24;
  --surface: #272b30;
  --surface-2: #20242a;
  --border: #373d44;
  --text: #f5f6f8;
  --muted: #b7c0ca;
  --green: #34d399;
  --green-deep: #059669;
  --hard: #dc2626;
  --hard-dark: #7f1d1d;
  --hard-soft: #452124;
  --prefer: #fbbf24;
  --prefer-dark: #92400e;
  --prefer-soft: #382a15;
  --blue: #60a5fa;
  --shadow: 0 18px 50px rgba(0,0,0,.24);
}

:root.light {
  color-scheme: light;
  --bg: #f3f6f3;
  --panel: #ffffff;
  --surface: #eef3ef;
  --surface-2: #f7faf8;
  --border: #bdccc3;
  --text: #173d35;
  --muted: #65726b;
  --green: #27c994;
  --green-deep: #17664f;
  --hard-soft: #fee2e2;
  --prefer-soft: #fef3c7;
  --shadow: 0 16px 40px rgba(31,55,47,.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif; font-weight: 650; }
button, input, select { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--green), white 15%); outline-offset: 2px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 14px; background: radial-gradient(circle at 50% 0, rgba(52,211,153,.12), transparent 38%), var(--bg); }
.login-card { width: min(610px, 100%); padding: clamp(24px, 5vw, 50px); text-align: center; }
.login-mark { display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 25px; background: linear-gradient(145deg, var(--green), var(--green-deep)); color: #061d16; font-size: 48px; box-shadow: 0 14px 35px rgba(52,211,153,.22); }
.login-card h1 { font-size: clamp(28px, 6vw, 44px); }
.login-lead { margin: 12px 0 25px; color: var(--muted); font-size: 18px; }
.login-form { display: grid; gap: 15px; text-align: left; }
.login-form label { display: grid; gap: 7px; color: var(--muted); }
.login-form .remember-login {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
}
.remember-login input {
  width: 24px;
  height: 24px;
  accent-color: var(--green-deep);
}
.login-form input { width: 100%; min-height: 58px; padding: 10px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 22px; }
.login-form .remember-login input {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
}
.login-form .primary-button { margin-top: 4px; min-height: 64px; font-size: 25px; }
.login-error { min-height: 23px; margin: 0; color: #fca5a5; text-align: center; }
.test-account-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 20px; }
.test-account-list button { display: grid; gap: 4px; min-height: 96px; padding: 12px 8px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--text); }
.test-account-list b { font-size: 18px; }.test-account-list span { color: var(--green); font-size: 13px; }.test-account-list em { color: var(--muted); font-size: 10px; font-style: normal; }
.app-shell { width: min(1440px, 100%); margin: 0 auto; padding: 22px clamp(14px, 3vw, 42px) 56px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, var(--green), var(--green-deep)); color: #071b15; font-size: 34px; box-shadow: 0 10px 28px rgba(52,211,153,.2); }
h1 { margin: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: .02em; }
.local-badge, .readonly-badge { display: inline-flex; margin-top: 5px; padding: 4px 10px; border: 1px solid var(--green-deep); border-radius: 999px; color: var(--green); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-menu { display: grid; gap: 2px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); text-align: right; }
.user-menu span { font-size: 13px; }.user-menu button { padding: 0; border: 0; background: transparent; color: var(--green); font-size: 11px; }
.month-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
input[type="month"], select, .business-table input[type="text"] { min-height: 46px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.icon-button { width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font-size: 22px; }
.main-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.nav-button { min-height: 58px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: clamp(15px, 1.5vw, 20px); font-weight: 800; }
.nav-button span { margin-right: 8px; }
.nav-button.active { background: var(--surface); color: var(--text); box-shadow: inset 0 -3px var(--green); }
.view { display: none; padding-top: 28px; }
.view.active { display: block; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: 15px; letter-spacing: .16em; }
h2 { margin: 0; font-size: clamp(27px, 3.7vw, 48px); }
.staff-select { display: grid; gap: 6px; min-width: 220px; color: var(--muted); font-size: 14px; }
.staff-display { min-height: 46px; display: flex; align-items: center; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 18px; font-weight: 850; }
.panel { border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.mode-button { min-height: 98px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 10px; padding: 14px 20px; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); text-align: left; font-size: clamp(20px, 2.3vw, 30px); font-weight: 900; transition: .15s transform, .15s background, .15s border-color; }
.mode-button:hover { transform: translateY(-1px); }
.mode-button small { grid-column: 2; color: var(--muted); font-size: 13px; }
.mode-icon { grid-row: span 2; font-size: 38px; }
.mode-button.hard.active { background: var(--hard); border-color: #f87171; color: white; }
.mode-button.prefer.active { background: var(--prefer); border-color: #fde68a; color: #141619; }
.mode-button.view-only.active { background: var(--green-deep); border-color: var(--green); color: white; }
.mode-button.active small { color: currentColor; opacity: .85; }
.calendar-panel { padding: clamp(8px, 1.5vw, 18px); overflow: hidden; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row span { padding: 12px 4px; text-align: center; font-size: clamp(18px, 2vw, 27px); }
.sun { color: #fb5b61; } .sat { color: var(--blue); }
.calendar-grid { gap: 2px; border-radius: 14px; overflow: hidden; background: var(--border); }
.day-cell { position: relative; min-width: 0; min-height: clamp(126px, 13vw, 180px); padding: 42px 7px 8px; border: 0; background: var(--surface); color: var(--text); text-align: left; overflow: hidden; }
.day-cell.empty { background: var(--surface-2); opacity: .35; cursor: default; }
.day-number { position: absolute; top: 7px; left: 0; width: 100%; text-align: center; font-size: clamp(22px, 2.4vw, 34px); font-weight: 900; line-height: 1; }
.day-cell.sunday .day-number { color: #fb5b61; } .day-cell.saturday .day-number { color: var(--blue); }
.name-list { display: grid; gap: 4px; align-content: start; }
.name-chip { min-width: 0; padding: 3px 4px; overflow: hidden; border-radius: 6px; color: white; font-size: clamp(10px, 1.2vw, 17px); line-height: 1.1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.name-chip.hard { background: var(--hard); }
.name-chip.prefer { background: var(--prefer); color: #141619; }
.day-cell.selected-hard { box-shadow: inset 0 0 0 3px #f87171; }
.day-cell.selected-prefer { box-shadow: inset 0 0 0 3px #fde047; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 12px 4px 18px; color: var(--muted); font-size: 15px; }
.calendar-legend i { display: inline-block; width: 13px; height: 13px; margin-right: 5px; border-radius: 4px; vertical-align: -1px; }.hard-dot { background: var(--hard); }.prefer-dot { background: var(--prefer); }
.primary-button, .compact-primary { border: 0; border-radius: 16px; background: var(--green); color: #061d16; font-weight: 950; box-shadow: 0 10px 26px rgba(52,211,153,.15); }
.primary-button { width: 100%; min-height: 76px; font-size: clamp(24px, 3vw, 38px); }.plane { display: inline-block; margin-right: 12px; font-size: 1.15em; transform: rotate(-18deg); }.compact-primary { min-height: 50px; padding: 0 20px; font-size: 17px; }
.status-line { min-height: 24px; margin: 10px 0; color: var(--green); text-align: center; }
.request-locked-banner { display: grid; place-items: center; gap: 7px; margin: 0 0 20px; padding: 25px 18px; border: 2px solid #ef4444; border-radius: 18px; background: linear-gradient(145deg, rgba(220,38,38,.28), rgba(127,29,29,.16)); color: white; text-align: center; box-shadow: 0 12px 34px rgba(220,38,38,.18); }.request-locked-banner b { color: #f87171; font-size: clamp(30px, 5vw, 52px); line-height: 1.15; }.request-locked-banner span { font-size: clamp(16px, 2.4vw, 24px); }.mode-button:disabled, .day-cell:disabled, #saveRequest:disabled { opacity: .48; cursor: not-allowed; }.day-cell:disabled { color: var(--text); }
.notice-panel { padding: 18px 22px; color: var(--muted); font-size: 18px; line-height: 1.65; }.notice-panel p { margin: 0; }.notice-panel .safe-note { color: var(--green); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }.summary-card { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }.summary-card span { color: var(--muted); font-size: 14px; }.summary-card b { display: block; margin-top: 4px; font-size: 30px; }
.table-wrap { overflow: auto; max-height: 68vh; }.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; }.data-table th { position: sticky; top: 0; z-index: 2; padding: 15px 12px; background: var(--surface-2); color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }.data-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: center; }.data-table tbody tr:last-child td { border-bottom: 0; }.data-table tbody tr:hover td { background: color-mix(in srgb, var(--surface), transparent 30%); }
.business-table input[type="text"] { width: 150px; min-height: 40px; }.business-table select { min-height: 40px; }.flag { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; }.flag.holiday { background: var(--hard-soft); color: #fca5a5; }.flag.eve { background: var(--prefer-soft); color: var(--prefer); }.load-light { color: var(--blue); }.load-normal { color: var(--green); }.load-heavy { color: var(--prefer); }
.logic-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); }.logic-strip span { padding: 9px 12px; border-radius: 999px; background: var(--surface); }.logic-strip b { color: var(--green); }
.empty-state { padding: 58px 20px; text-align: center; color: var(--muted); }.empty-state > span { font-size: 54px; color: var(--green); }.empty-state h3 { color: var(--text); font-size: 25px; }.hidden { display: none !important; }
.shift-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; margin-bottom: 14px; }.shift-meta > div { display: grid; gap: 3px; }.shift-meta .status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }.shift-meta b { color: var(--green); font-size: 20px; }.shift-meta b.confirmed { color: #f87171; }.shift-meta span { color: var(--muted); font-size: 13px; }.edit-shift-button, .unconfirm-shift-button { min-height: 34px; padding: 0 13px; border: 1px solid #f87171; border-radius: 10px; background: var(--hard-soft); color: #fca5a5; font-weight: 900; }.unconfirm-shift-button { border-color: var(--border); background: var(--surface); color: var(--muted); }.outline-button { min-height: 46px; padding: 0 17px; border: 1px solid var(--green); border-radius: 12px; background: transparent; color: var(--green); }.outline-button:disabled { opacity: .5; cursor: default; }
.shortage-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 108px; margin-bottom: 14px; padding: 10px 18px 10px 22px; overflow: hidden; border: 1px solid var(--hard); border-radius: 16px; background: var(--hard-soft); color: #fca5a5; font-weight: 900; }.shortage-box span { flex: 1; }.shortage-box img { align-self: flex-end; width: 104px; max-height: 98px; object-fit: contain; object-position: right bottom; flex: 0 0 auto; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }.shift-table .slot-person { display: grid; gap: 2px; }.shift-table small { color: var(--muted); }.slot-person-button { width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }.slot-person-button:hover { border-color: var(--green); background: color-mix(in srgb, var(--green), transparent 90%); }.slot-person-button:active { transform: scale(.97); }.shortage { color: #fca5a5; font-weight: 900; }.shortage-button { padding: 7px 10px; border: 1px solid #fca5a5; border-radius: 9px; background: var(--hard-soft); cursor: pointer; font: inherit; }.shortage-button:active { transform: scale(.97); }.subheading { margin: 22px 0 12px; font-size: 22px; }.count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; }.count-card { display: flex; justify-content: space-between; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }.count-card b { color: var(--green); font-size: 23px; }
.rule-priority { padding: 22px 26px; margin-bottom: 18px; }.rule-priority h3 { margin: 0 0 12px; font-size: 23px; }.rule-priority ol { margin: 0; padding-left: 27px; color: var(--muted); line-height: 1.85; }.rule-priority li::marker { color: var(--green); font-weight: 900; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }.rule-card { padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }.rule-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }.rule-card h3 { margin: 0; font-size: 22px; }.rule-load { padding: 5px 9px; border-radius: 999px; background: var(--surface); color: var(--green); font-size: 12px; }.rule-card dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin: 16px 0 0; }.rule-card dt { color: var(--muted); }.rule-card dd { margin: 0; }.rule-note { margin-top: 18px; padding: 18px 22px; }.rule-note b { color: var(--prefer); }.rule-note p { margin: 7px 0 0; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 99; max-width: calc(100vw - 28px); padding: 13px 18px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.manual-dialog { width: min(560px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.55); }.manual-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }.manual-dialog form { padding: 24px; }.dialog-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }.dialog-heading h2 { margin: 4px 0 0; font-size: 25px; }.dialog-close { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 25px; }.manual-reason { margin: 20px 0; padding: 16px; border: 1px solid var(--hard); border-radius: 14px; background: var(--hard-soft); }.manual-reason b { color: #fca5a5; }.manual-reason p { margin: 7px 0 0; line-height: 1.55; }.manual-staff-field { display: grid; gap: 9px; color: var(--muted); }.manual-staff-field select { width: 100%; font-size: 20px; }.dialog-note { color: var(--muted); font-size: 13px; line-height: 1.55; }.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }.dialog-actions button { min-height: 52px; }

@media (max-width: 760px) {
  .login-card { border-radius: 18px; }.test-account-list { grid-template-columns: 1fr; }.test-account-list button { grid-template-columns: 90px 1fr; grid-template-rows: auto auto; min-height: 68px; text-align: left; }.test-account-list b { grid-row: span 2; align-self: center; }.test-account-list em { font-size: 11px; }
  .app-shell { padding: 12px 9px 34px; }
  .topbar { align-items: flex-start; }
  .brand-icon { width: 45px; height: 45px; border-radius: 13px; font-size: 27px; }
  h1 { font-size: 21px; }
  .top-actions { align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; }.month-field { grid-template-columns: 1fr; display: grid; font-size: 11px; }.month-field input { width: 138px; min-height: 42px; }.user-menu { order: 3; }
  .main-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 5px; border-radius: 14px; }
  .nav-button { min-height: 58px; padding: 5px 2px; font-size: 11px; }.nav-button span { display: block; margin: 0 0 2px; font-size: 19px; }
  .view { padding-top: 20px; }.section-heading { align-items: stretch; flex-direction: column; }.section-heading h2 { font-size: 28px; }.staff-select { width: 100%; }
  .mode-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.mode-button { min-height: 82px; padding: 11px; column-gap: 7px; font-size: 18px; }.mode-button.view-only { grid-column: 1 / -1; }.mode-icon { font-size: 29px; }.mode-button small { font-size: 10px; }
  .calendar-panel { padding: 5px; border-radius: 14px; }.weekday-row span { padding: 9px 2px; font-size: 18px; }.calendar-grid { gap: 1px; }.day-cell { min-height: 110px; padding: 35px 3px 5px; }.day-number { top: 6px; font-size: 21px; }.name-list { gap: 3px; }.name-chip { padding: 3px 2px; font-size: 10px; }
  .calendar-legend { font-size: 12px; gap: 9px; }.primary-button { min-height: 64px; font-size: 22px; }.notice-panel { padding: 15px; font-size: 15px; border-radius: 15px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }.summary-card { padding: 13px; }.summary-card b { font-size: 24px; }
  .compact-primary { width: 100%; }.logic-strip { font-size: 12px; }.logic-strip b { display: none; }
  .shift-meta { align-items: stretch; flex-direction: column; }.rule-priority { padding: 18px; }.rule-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .brand > div h1 { max-width: 155px; }.day-cell { min-height: 104px; }.name-chip { font-size: 9px; }.icon-button { display: none; }
}

/* Timecard-inspired visual system */
:root {
  --bg: #121417;
  --panel: #25292d;
  --surface: #1b1f23;
  --surface-2: #171a1e;
  --border: #4a5158;
  --text: #f5f7f6;
  --muted: #aeb7b3;
  --green: #20d39b;
  --green-deep: #078b65;
  --shadow: 0 10px 34px rgba(0,0,0,.18);
}

:root.light {
  --bg: #f6f8f5;
  --panel: #ffffff;
  --surface: #edf4ef;
  --surface-2: #f8faf8;
  --border: #bfd0c7;
  --text: #0e473a;
  --muted: #62736b;
  --green: #13a978;
  --green-deep: #086b4d;
  --shadow: 0 10px 28px rgba(28,72,57,.07);
}

body {
  font-weight: 700;
  letter-spacing: .01em;
}

.app-shell {
  width: min(1500px, 100%);
  padding: 26px clamp(20px, 5vw, 78px) 70px;
}

.topbar {
  margin-bottom: 28px;
  padding: 4px 2px 26px;
  border-bottom: 1px solid var(--border);
}

.brand { gap: 13px; }
.brand-icon {
  width: 54px;
  height: 54px;
  border: 4px solid var(--green);
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  box-shadow: none;
  font-size: 31px;
  line-height: 1;
}
.brand h1 {
  color: var(--text);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 950;
}
.local-badge {
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions { gap: 12px; }
.month-field {
  min-height: 62px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}
.month-field select {
  min-height: 44px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}
.user-menu {
  min-height: 62px;
  min-width: 150px;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 18px;
  text-align: left;
}
.user-menu span { color: var(--text); font-size: 16px; font-weight: 900; }
.user-menu button { color: var(--green); font-size: 12px; text-align: left; }
.icon-button.theme-switch {
  width: 62px;
  min-width: 62px;
  height: 62px;
  padding: 0;
  border-radius: 18px;
  color: var(--text);
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
}

.main-nav {
  grid-template-columns: repeat(var(--nav-count, 4), minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.nav-button {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 122px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.nav-button:hover { transform: translateY(-2px); border-color: var(--green); }
.nav-button span {
  grid-row: 1 / 3;
  margin: 0;
  color: var(--green);
  font-size: 38px;
  text-align: center;
}
.nav-button b { font-size: clamp(18px, 1.7vw, 25px); font-weight: 950; }
.nav-button small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.nav-button.active {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #fff;
  box-shadow: 0 13px 30px color-mix(in srgb, var(--green-deep), transparent 72%);
}
.nav-button.active span,
.nav-button.active small { color: #fff; }

.view { padding-top: 42px; }
.section-heading { margin-bottom: 25px; align-items: center; }
.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .12em;
}
h2 {
  color: var(--text);
  font-size: clamp(29px, 3.6vw, 48px);
  font-weight: 950;
  letter-spacing: .015em;
}
.panel { border-radius: 26px; }
.staff-display,
input[type="month"],
select,
.business-table input[type="text"] { border-radius: 16px; }
.staff-display { min-height: 58px; padding: 10px 18px; }

.mode-grid { gap: 16px; margin-bottom: 22px; }
.mode-button {
  min-height: 126px;
  padding: 21px 25px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.mode-button small { margin-top: 4px; font-size: 13px; }
.mode-icon { font-size: 43px; }

.calendar-panel { padding: clamp(12px, 2vw, 25px); }
.calendar-grid { border-radius: 17px; }
.day-cell { background: var(--panel); }
.day-cell.empty { background: var(--surface-2); }
.primary-button,
.compact-primary {
  border-radius: 20px;
  background: var(--green-deep);
  color: #fff;
  box-shadow: 0 10px 25px color-mix(in srgb, var(--green-deep), transparent 78%);
}
.primary-button { min-height: 82px; }
.compact-primary { min-height: 58px; padding: 0 25px; }
.notice-panel { margin-top: 18px; }

.summary-card,
.rule-card,
.count-card {
  border-radius: 22px;
  background: var(--panel);
}
.summary-card { padding: 23px; }
.summary-card b { color: var(--text); font-size: 34px; }
.table-wrap { border-radius: 26px; }
.data-table th { padding: 18px 14px; }
.data-table td { padding: 15px 13px; }
.empty-state { padding: 72px 22px; }
.shift-meta { padding: 21px 24px; }
.rule-priority { padding: 28px 31px; }
.rule-card { padding: 25px; }

.login-screen {
  padding: 32px 18px;
  background: var(--bg);
}
.login-card {
  width: min(660px, 100%);
  padding: clamp(30px, 5vw, 56px);
  border-radius: 30px;
  background: var(--panel);
}

.published-status {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: color-mix(in srgb, var(--green), transparent 86%);
  color: var(--green);
  font-size: 15px;
  font-weight: 950;
}
.published-status.editing {
  border-color: var(--prefer);
  background: var(--prefer-soft);
  color: var(--prefer);
}
.schedule-content { display: grid; gap: 20px; }
.schedule-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.schedule-summary article {
  min-height: 104px;
  padding: 21px 23px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.schedule-summary span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 14px;
}
.schedule-summary b { color: var(--text); font-size: clamp(22px, 2.6vw, 33px); }
.schedule-summary .published-text { color: var(--green); }
.schedule-calendar-panel { padding: clamp(12px, 2vw, 25px); overflow: hidden; }
.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border-radius: 17px;
  background: var(--border);
}
.schedule-day {
  position: relative;
  min-width: 0;
  min-height: clamp(150px, 14vw, 195px);
  padding: 43px 7px 8px;
  background: var(--panel);
  overflow: hidden;
}
.schedule-day.empty { background: var(--surface-2); opacity: .35; }
.schedule-day.own-day {
  z-index: 1;
  border: 3px solid var(--green);
  border-radius: 14px;
  background: color-mix(in srgb, var(--green), var(--panel) 91%);
  box-shadow: none;
}
.schedule-day-number {
  position: absolute;
  top: 9px;
  left: 0;
  width: 100%;
  color: var(--text);
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}
.schedule-day.sunday .schedule-day-number { color: #fb5b61; }
.schedule-day.saturday .schedule-day-number { color: var(--blue); }
.schedule-people { display: grid; gap: 5px; align-content: start; }
.schedule-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.schedule-person time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.schedule-person span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(10px, 1.1vw, 15px);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-person.own {
  border-color: var(--green);
  background: var(--green-deep);
}
.schedule-person.own time,
.schedule-person.own span { color: #fff; }
.schedule-person.staff-colored {
  background: var(--staff-color);
  border-color: var(--staff-color);
}
.schedule-person.staff-colored time,
.schedule-person.staff-colored span { color: #fff; }
.schedule-person.staff-colored.own {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.schedule-person.shortage-label {
  display: block;
  border-color: var(--hard);
  background: var(--hard-soft);
  text-align: center;
}
.schedule-person.shortage-label span { color: #fca5a5; }
.schedule-closed {
  display: block;
  padding-top: 15px;
  color: var(--muted);
  text-align: center;
}
.my-shifts-panel {
  display: grid;
  grid-template-columns: minmax(180px, .4fr) 1fr;
  gap: 24px;
  align-items: start;
  padding: 26px;
}
.my-shifts-panel h3 { margin: 0; color: var(--text); font-size: 23px; }
.my-shift-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 9px;
}
.my-shift-list article {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.my-shift-list article b { color: var(--text); font-size: 16px; }
.my-shift-list article span { color: var(--green); font-size: 14px; }
.no-own-shift { margin: 0; color: var(--muted); }
.login-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 23px;
  border: 5px solid var(--green);
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  box-shadow: none;
  font-size: 54px;
}
.login-card h1 {
  color: var(--text);
  font-size: clamp(34px, 6vw, 50px);
  font-weight: 950;
}
.login-form { gap: 18px; }
.login-form label { color: var(--text); font-size: 16px; font-weight: 900; }
.login-form input {
  min-height: 66px;
  padding: 12px 18px;
  border-radius: 17px;
  font-size: 23px;
}
.login-form .primary-button { min-height: 70px; }
.test-account-list { gap: 12px; margin-top: 25px; }
.test-account-list button {
  min-height: 108px;
  border-radius: 18px;
  background: var(--surface);
}

@media (max-width: 980px) {
  .topbar { align-items: flex-start; }
  .top-actions { max-width: 58%; flex-wrap: wrap; justify-content: flex-end; }
  .main-nav { gap: 10px; }
  .nav-button {
    grid-template-columns: 42px 1fr;
    min-height: 103px;
    padding: 16px;
  }
  .nav-button span { font-size: 31px; }
  .nav-button b { font-size: 17px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 18px 12px 44px; }
  .topbar { position: relative; display: grid; gap: 18px; margin-bottom: 21px; padding: 0 0 20px; }
  .brand { padding-right: 70px; }
  .brand-icon { width: 47px; height: 47px; font-size: 27px; }
  .brand h1 { font-size: 26px; }
  .top-actions { width: 100%; max-width: none; display: grid; grid-template-columns: 1fr; gap: 9px; }
  .user-menu { grid-column: 1; grid-row: 1; min-width: 0; min-height: 58px; }
  .month-field { grid-column: 1; grid-row: 2; min-height: 58px; grid-template-columns: auto 1fr; font-size: 12px; }
  .month-field select { width: 100%; min-width: 0; font-size: 16px; }
  .icon-button.theme-switch { position: absolute; top: 0; right: 0; display: block; width: 58px; min-width: 58px; height: 58px; border-radius: 17px; font-size: 28px; }
  .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nav-button {
    grid-template-columns: 38px 1fr;
    min-height: 96px;
    padding: 15px 12px;
    border-radius: 19px;
  }
  .nav-button span { display: block; grid-row: 1 / 3; margin: 0; font-size: 29px; }
  .nav-button b { font-size: 16px; }
  .nav-button small { font-size: 10px; }
  .view { padding-top: 30px; }
  .section-heading { gap: 17px; }
  .section-heading h2 { font-size: 30px; }
  .mode-button { min-height: 100px; padding: 14px; border-radius: 19px; }
  .calendar-panel { border-radius: 19px; }
  .primary-button { min-height: 70px; border-radius: 18px; }
  .panel,
  .table-wrap { border-radius: 20px; }
  .login-card { border-radius: 24px; }
  .login-screen { align-items: start; padding: 12px; }
  .login-card { padding: 20px 20px 18px; }
  .login-mark { width: 64px; height: 64px; margin-bottom: 9px; border-width: 4px; font-size: 38px; }
  .login-card .eyebrow { margin-bottom: 1px; font-size: 12px; }
  .login-card h1 { font-size: 34px; }
  .login-lead { margin: 7px 0 14px; font-size: 15px; }
  .login-form { gap: 10px; }
  .login-form label { gap: 4px; font-size: 14px; }
  .login-form input { min-height: 52px; padding: 8px 13px; border-radius: 13px; font-size: 19px; }
  .login-form .remember-login { min-height: 36px; font-size: 15px; }
  .login-form .remember-login input { width: 21px; height: 21px; min-height: 21px; }
  .login-form .primary-button { min-height: 56px; font-size: 22px; }
  .login-error { min-height: 18px; font-size: 13px; }
  .schedule-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .schedule-summary article { min-height: 86px; padding: 16px; border-radius: 18px; }
  .schedule-summary article:last-child { grid-column: 1 / -1; }
  .schedule-day { min-height: 146px; padding: 36px 3px 5px; }
  .schedule-day-number { top: 7px; font-size: 21px; }
  .schedule-people { gap: 3px; }
  .schedule-person { display: block; padding: 4px 2px; border-radius: 6px; text-align: center; }
  .schedule-person time { display: block; font-size: 8px; line-height: 1.1; }
  .schedule-person span { display: block; font-size: 9.5px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  .schedule-closed { padding-top: 12px; font-size: 11px; }
  .my-shifts-panel { grid-template-columns: 1fr; padding: 20px; }
  .shortage-box { min-height: 94px; padding: 9px 12px 9px 16px; gap: 8px; }
  .shortage-box img { width: 82px; max-height: 84px; }
}

@media (max-width: 410px) {
  .top-actions { grid-template-columns: 1fr; }
  .brand > div h1 { max-width: none; }
  .nav-button small { display: none; }
  .nav-button { min-height: 76px; grid-template-rows: 1fr; }
  .nav-button span { grid-row: 1; }
  .test-account-list button { min-height: 72px; }
}
