:root {
  --green: #174f3f;
  --green-deep: #102b24;
  --green-soft: #e8f2ed;
  --line: #dfe5e1;
  --muted: #6f7d78;
  --bg: #f7f8f5;
  --danger: #b54848;
  --danger-soft: #fff0f0;
  --gold: #9b6d20;
  --gold-soft: #fff4d8;
  --rsa: #1f7a4d;
  --rsa-soft: #e3f4ea;
  --vsa: #c2631a;
  --vsa-soft: #fdeddb;
  --st-lawnside: #1f7a4d;
  --st-lawnside-soft: #e3f4ea;
  --st-deptford: #8a6d00;
  --st-deptford-soft: #fbf1c4;
  --st-mickleton: #1f5fa8;
  --st-mickleton-soft: #e4eefa;
  color: #15231f;
  font-family: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: #15231f; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.entry-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.entry-card { width: min(480px, 100%); background: white; border: 1px solid var(--line); border-radius: 28px; padding: 34px; box-shadow: 0 24px 60px rgba(15, 36, 30, .08); }
.brand-mark { width: 42px; height: 42px; border-radius: 15px; background: var(--green); color: white; display: inline-grid; place-items: center; font: 800 22px "Manrope"; }
.eyebrow { margin: 0 0 8px; color: #81918b; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Manrope", sans-serif; margin: 0; }
.entry-card h1 { font-size: 38px; margin: 14px 0 8px; }
.entry-card p { color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 7px; margin-top: 14px; font-weight: 800; }
.field span { font-size: 13px; }
.field input, .field select, .field textarea, .admin-select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: white; color: #15231f; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .admin-select:focus { border-color: #9ab8ad; box-shadow: 0 0 0 4px #dcebe5; }
.primary-button, .secondary-button, .danger-button, .text-button, .icon-button {
  border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--green); font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
}
.primary-button { background: var(--green); color: white; border-color: var(--green); }
.secondary-button { background: white; }
.danger-button { background: white; color: var(--danger); border-color: #efcccc; }
.text-button { border: 0; background: transparent; padding: 0; min-height: auto; }
.icon-button { width: 42px; padding: 0; }
[data-icon], .nav-icon, svg { width: 20px; height: 20px; }
.form-error { color: var(--danger); background: var(--danger-soft); padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: white; border-right: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 12px; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand small { color: var(--muted); margin-top: 4px; letter-spacing: .18em; font-size: 10px; }
.main-nav { display: grid; gap: 8px; }
.nav-item { border: 0; border-radius: 18px; padding: 13px 14px; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 12px; font-weight: 900; text-align: left; }
.nav-item.active, .nav-item:hover { background: var(--green-soft); color: var(--green); }
.sync-card, .associate { border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.sync-card { margin-top: auto; }
.sync-pulse { width: 10px; height: 10px; border-radius: 999px; background: #3bc783; box-shadow: 0 0 0 7px #dff7ea; }
.avatar { width: 44px; height: 44px; border-radius: 16px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 900; }
.avatar-dark { background: var(--green); color: white; }
.associate div { min-width: 0; flex: 1; }
.associate strong, .associate small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.associate small { color: var(--muted); font-size: 12px; }
.main-content { padding: 30px; min-width: 0; }
.topbar, .schedule-head, .section-heading, .modal-header, .modal-actions, .week-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar { margin-bottom: 22px; }
.topbar h1 { font-size: clamp(36px, 5vw, 60px); }
.topbar-actions, .inventory-head-actions { display: flex; gap: 10px; align-items: center; }
.live-status { display: flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 700; }
.live-status span:first-child { width: 10px; height: 10px; border-radius: 50%; background: #3bc783; }
.dashboard-view { display: grid; gap: 20px; }
.schedule-head { background: white; border: 1px solid var(--line); border-radius: 28px; padding: 24px; }
.schedule-head h2 { font-size: 30px; }
.schedule-head p { color: var(--muted); margin: 6px 0 0; }
.schedule-grid, .associate-grid, .request-list { display: grid; gap: 12px; }
.schedule-card, .shift-card, .request-card, .associate-card {
  background: white; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 10px 30px rgba(15, 36, 30, .04);
}
.shift-card, .request-card, .associate-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.shift-date { text-align: center; min-width: 74px; border-radius: 18px; padding: 10px; background: var(--green-soft); color: var(--green); font-weight: 900; }
.shift-date small, .shift-main small, .request-main small, .associate-main small { display: block; color: var(--muted); font-weight: 700; margin-top: 4px; }
.shift-main strong, .request-main strong, .associate-main strong { display: block; font: 900 18px "Manrope"; }
.store-pill, .status-pill { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 900; background: var(--green-soft); color: var(--green); margin-top: 7px; }
.status-pending { background: var(--gold-soft); color: var(--gold); }
.status-approved { background: var(--green-soft); color: var(--green); }
.status-denied, .status-cancelled { background: var(--danger-soft); color: var(--danger); }
.shift-actions, .request-actions, .associate-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.master-board { display: grid; gap: 20px; }
.store-section { background: white; border: 1px solid var(--line); border-radius: 28px; padding: 20px; }
.store-section h3 { margin-bottom: 14px; font-size: 24px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 10px; }
.day-card { border: 1px solid var(--line); border-radius: 18px; padding: 12px; min-height: 180px; background: #fbfcfa; }
.day-card.today { border-color: #9ab8ad; box-shadow: inset 0 0 0 2px #dcebe5; }
.day-card > strong { display: block; font-size: 13px; margin-bottom: 10px; }
.coverage-shift { border-radius: 14px; padding: 9px; background: white; border: 1px solid #e8eeea; margin-bottom: 8px; }
.coverage-shift button { all: unset; cursor: pointer; display: block; width: 100%; }
.coverage-shift strong { display: block; font-size: 13px; }
.coverage-shift small { color: var(--muted); font-weight: 700; }
.empty-note { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 14px; text-align: center; }
/* Associate type color coding (RSA / VSA) */
.type-pill { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 900; margin-top: 7px; margin-right: 6px; }
.type-pill.type-rsa { background: var(--rsa-soft); color: var(--rsa); }
.type-pill.type-vsa { background: var(--vsa-soft); color: var(--vsa); }
.shift-card.type-rsa { border-left: 5px solid var(--rsa); }
.shift-card.type-vsa { border-left: 5px solid var(--vsa); }
.coverage-shift.type-rsa { border-left: 4px solid var(--rsa); background: var(--rsa-soft); }
.coverage-shift.type-vsa { border-left: 4px solid var(--vsa); background: var(--vsa-soft); }
.type-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 10px; }
.type-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.type-dot.type-rsa { background: var(--rsa); }
.type-dot.type-vsa { background: var(--vsa); margin-left: 8px; }
/* Store color coding (Lawnside green / Deptford yellow / Mickleton blue) */
.store-pill.store-lawnside { background: var(--st-lawnside-soft); color: var(--st-lawnside); }
.store-pill.store-deptford { background: var(--st-deptford-soft); color: var(--st-deptford); }
.store-pill.store-mickleton { background: var(--st-mickleton-soft); color: var(--st-mickleton); }
.store-section.store-lawnside { border-top: 4px solid var(--st-lawnside); }
.store-section.store-deptford { border-top: 4px solid var(--st-deptford); }
.store-section.store-mickleton { border-top: 4px solid var(--st-mickleton); }
.store-section.store-lawnside h3 { color: var(--st-lawnside); }
.store-section.store-deptford h3 { color: var(--st-deptford); }
.store-section.store-mickleton h3 { color: var(--st-mickleton); }
/* Coverage alerts */
.coverage-banner { margin-bottom: 4px; }
.coverage-alert { background: var(--danger-soft); border: 1px solid #efcccc; border-left: 5px solid var(--danger); border-radius: 18px; padding: 14px 18px; color: var(--danger); }
.coverage-alert strong { display: block; font: 900 15px "Manrope"; margin-bottom: 6px; }
.coverage-alert ul { margin: 0; padding-left: 18px; }
.coverage-alert li { font-weight: 700; margin: 2px 0; }
.day-card.gap { border-color: #efcccc; background: var(--danger-soft); box-shadow: inset 0 0 0 2px #f3d4d4; }
.empty-note.gap-note { color: var(--danger); border-color: #e6b9b9; font-weight: 900; }
.coverage-shift.conflict { border: 1px solid var(--danger); background: var(--danger-soft); }
.conflict-tag { display: block; margin-top: 4px; color: var(--danger); font-size: 11px; font-weight: 900; }
.copy-warn { margin: 16px 0 0; background: var(--gold-soft); color: var(--gold); padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 13px; }
.modal { position: fixed; inset: 0; background: rgba(15, 29, 25, .52); z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(760px, 100%); max-height: 92vh; overflow: auto; background: white; border-radius: 28px; border: 1px solid var(--line); padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check-row { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--green-deep); color: white; border-radius: 18px; padding: 14px 18px; display: flex; gap: 10px; align-items: center; z-index: 30; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.mobile-nav { display: none; }
@media (max-width: 980px) {
  .app-shell { display: block; padding-bottom: 82px; }
  .sidebar { display: none; }
  .main-content { padding: 22px 16px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .week-grid { grid-template-columns: 1fr; }
  .shift-card, .request-card, .associate-card { grid-template-columns: 1fr; }
  .shift-date { width: fit-content; }
  .form-grid { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; background: white; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 15; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; gap: 2px; font-weight: 900; }
  .mobile-nav button.active { color: var(--green); }
}
