:root {
  --forest: #173f35;
  --forest-2: #245849;
  --mint: #dff1e8;
  --mint-2: #edf7f1;
  --cream: #f7f6f1;
  --ink: #1e2925;
  --muted: #68756f;
  --line: #e2e7e3;
  --white: #fff;
  --amber: #a85e16;
  --amber-bg: #fff1d9;
  --red: #ad3f42;
  --red-bg: #fff0ef;
  --shadow: 0 10px 30px rgba(25, 52, 43, .08);
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,p { margin-top: 0; }
h1 { letter-spacing: -.035em; }
h2,h3 { letter-spacing: -.02em; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; letter-spacing: -.05em; }
.brand-mark { width: 33px; height: 33px; border-radius: 11px; display: grid; place-items: center; color: var(--forest); background: #b9e4ce; font-size: 17px; font-weight: 900; }
.btn { border: 1px solid transparent; border-radius: 10px; min-height: 40px; padding: 9px 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--white); color: var(--ink); }
.btn:hover { filter: brightness(.98); }
.btn-primary { color: #fff; background: var(--forest); }
.btn-secondary { border-color: var(--line); }
.btn-soft { background: var(--mint-2); color: var(--forest); }
.btn-danger { color: var(--red); background: var(--red-bg); }
.btn-small { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.btn-icon { width: 36px; padding: 7px; border: 1px solid var(--line); background: white; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: wait; }
.landing { background: #fbfcf9; min-height: 100vh; }
.landing-nav { height: 82px; max-width: 1160px; padding: 0 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.landing-links { display: flex; align-items: center; gap: 28px; color: var(--muted); }
.hero { max-width: 1160px; margin: auto; padding: 82px 28px 100px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; }
.eyebrow { display: inline-flex; padding: 6px 11px; background: var(--mint); color: var(--forest); border-radius: 99px; font-size: 12px; font-weight: 800; margin-bottom: 20px; }
.hero h1 { font-size: clamp(44px, 5vw, 68px); line-height: 1.02; margin-bottom: 24px; }
.hero h1 span { color: #39735e; }
.hero-copy { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.hero-note { color: var(--muted); font-size: 12px; margin-top: 15px; }
.roster-preview { background: white; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(34, 66, 54, .13); border-radius: 22px; padding: 22px; transform: rotate(2deg); }
.preview-top { display: flex; justify-content: space-between; margin-bottom: 20px; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview-day { background: var(--cream); border-radius: 12px; padding: 12px; min-height: 230px; }
.preview-day strong { font-size: 12px; }
.preview-shift { margin-top: 12px; background: white; border-left: 3px solid #7ab69c; border-radius: 7px; padding: 10px 8px; font-size: 11px; line-height: 1.7; box-shadow: 0 3px 8px rgba(0,0,0,.04); }
.feature-strip { background: var(--forest); color: white; }
.features { max-width: 1100px; margin: auto; padding: 42px 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; }
.features h3 { margin-bottom: 8px; }
.features p { color: #c3d8d0; line-height: 1.6; margin: 0; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: white; }
.auth-art { padding: 55px; background: var(--forest); color: white; display: flex; flex-direction: column; justify-content: space-between; }
.auth-quote { max-width: 440px; font-size: 30px; line-height: 1.35; letter-spacing: -.03em; }
.auth-quote small { display: block; color: #bad0c8; font-size: 14px; margin-top: 22px; letter-spacing: 0; }
.auth-panel { display: grid; place-items: center; padding: 35px; }
.auth-box { width: min(400px, 100%); }
.auth-box h1 { font-size: 36px; margin: 35px 0 10px; }
.auth-box > p { color: var(--muted); margin-bottom: 30px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; background: var(--forest); color: white; padding: 28px 18px; display: flex; flex-direction: column; z-index: 20; }
.sidebar .brand { padding: 0 10px 30px; }
.sidebar .brand-mark { background: #b9e4ce; }
.nav-section { color: #8faea2; padding: 14px 12px 8px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.side-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; color: #c9dad4; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.1); }
.nav-icon { width: 18px; text-align: center; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 20px; background: #e6b96d; color: #273d34; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; }
.user-block { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #d9eee4; color: var(--forest); display: grid; place-items: center; font-weight: 800; flex: none; }
.user-meta { min-width: 0; }
.user-meta strong, .user-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: #a9c2b8; margin-top: 3px; font-size: 11px; }
.logout { color: #bcd0c8; border: 0; background: none; padding: 8px; margin-left: auto; }
.main { margin-left: 238px; padding: 36px 38px 60px; max-width: 1600px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-header h1 { font-size: 30px; margin-bottom: 7px; }
.page-header p { color: var(--muted); margin: 0; }
.header-user { display: none; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; }
.roster-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-range { font-weight: 750; min-width: 190px; text-align: center; }
.roster-buttons { display: flex; gap: 9px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { padding: 17px 19px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; }
.roster-grid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.day-column { background: #eef1ed; border-radius: 12px; min-height: 390px; padding: 10px; }
.day-heading { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 3px 12px; }
.day-heading strong { font-size: 12px; }
.day-heading span { color: var(--muted); font-size: 11px; }
.day-heading.today strong { color: var(--forest); }
.shift-card { background: white; border-radius: 10px; padding: 11px; margin-bottom: 9px; border: 1px solid #e1e6e2; box-shadow: 0 2px 4px rgba(30,50,40,.025); }
.shift-card.unpublished { border-left: 3px solid #d7a859; }
.shift-card.published { border-left: 3px solid #69a58d; }
.shift-person { display: flex; align-items: center; gap: 7px; font-weight: 750; margin-bottom: 7px; }
.shift-person .avatar { width: 25px; height: 25px; font-size: 10px; }
.shift-time { font-size: 12px; color: #405049; line-height: 1.55; }
.shift-meta { color: var(--muted); font-size: 11px; margin-top: 5px; }
.shift-status { display: inline-flex; border-radius: 20px; padding: 3px 7px; margin-top: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--amber-bg); color: var(--amber); }
.shift-status.published { background: var(--mint); color: var(--forest); }
.shift-actions { display: flex; gap: 4px; border-top: 1px solid #edf0ed; padding-top: 8px; margin-top: 9px; }
.shift-actions button { border: 0; background: none; color: var(--muted); font-size: 11px; padding: 3px 5px; }
.shift-actions button:hover { color: var(--forest); }
.empty-day { color: #8b9690; font-size: 11px; text-align: center; padding: 25px 3px; }
.table-card { overflow: hidden; }
.table-tools { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.search { max-width: 320px; width: 100%; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: #fafbf9; }
th, td { padding: 14px 17px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell strong, .person-cell small { display: block; }
.person-cell small { color: var(--muted); margin-top: 3px; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 9px; background: #f0f2ef; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: capitalize; }
.badge.approved, .badge.active { background: var(--mint); color: var(--forest); }
.badge.pending { background: var(--amber-bg); color: var(--amber); }
.badge.denied, .badge.rejected, .badge.inactive { background: var(--red-bg); color: var(--red); }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; }
.empty-state { padding: 55px 25px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); display: block; font-size: 16px; margin-bottom: 7px; }
.form-grid { display: grid; gap: 17px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 7px; }
.field label, .field-label { font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea, .search { width: 100%; border: 1px solid #dce3de; border-radius: 9px; background: white; min-height: 42px; padding: 10px 12px; color: var(--ink); outline: none; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { border-color: #6fa28e; box-shadow: 0 0 0 3px #e9f3ed; }
.field-hint { color: var(--muted); font-size: 11px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.checkbox input { width: 17px; height: 17px; }
.form-error { color: var(--red); background: var(--red-bg); padding: 10px 12px; border-radius: 8px; display: none; }
.form-error.visible { display: block; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,32,26,.52); display: grid; place-items: center; padding: 20px; z-index: 100; overflow-y: auto; }
.modal { background: white; border-radius: 17px; box-shadow: var(--shadow); padding: 25px; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.modal-header h2 { margin: 0; font-size: 22px; }
.modal-close { border: 0; background: #f2f4f1; border-radius: 50%; width: 32px; height: 32px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #173f35; color: white; border-radius: 10px; padding: 12px 18px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; z-index: 150; max-width: calc(100vw - 30px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.availability-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.availability-form { padding: 21px; }
.availability-form h2 { font-size: 17px; margin-bottom: 20px; }
.availability-list { padding: 6px 20px; }
.availability-row { display: flex; align-items: center; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.availability-row:last-child { border: 0; }
.day-name { width: 100px; font-weight: 750; }
.availability-time { color: var(--muted); }
.availability-row .btn { margin-left: auto; }
.section-title { font-size: 16px; margin: 26px 0 12px; }
.request-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.request-card { padding: 19px; }
.request-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-card h3 { font-size: 15px; margin-bottom: 6px; }
.request-dates { color: var(--forest); font-weight: 700; margin: 13px 0 7px; }
.request-note { color: var(--muted); line-height: 1.5; margin-bottom: 15px; }
.request-card .row-actions { justify-content: flex-start; border-top: 1px solid var(--line); padding-top: 13px; }
.mobile-nav { display: none; }
.agenda-list { display: grid; gap: 12px; }
.agenda-day { padding: 18px; }
.agenda-day h3 { font-size: 13px; margin-bottom: 13px; }
.agenda-shift { display: flex; align-items: center; gap: 15px; border-top: 1px solid var(--line); padding: 13px 0; }
.agenda-shift:first-of-type { border-top: 0; }
.agenda-time { min-width: 130px; font-weight: 750; }
.agenda-details { flex: 1; }
.agenda-details small { display: block; color: var(--muted); margin-top: 4px; }
.loading { padding: 80px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
@media (max-width: 1100px) {
  .main { padding: 28px 24px 55px; }
  .roster-grid { grid-template-columns: repeat(7, 155px); }
  .request-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .landing-nav { height: 70px; padding: 0 20px; }
  .landing-links > a { display: none; }
  .hero { grid-template-columns: 1fr; padding: 50px 22px 65px; gap: 45px; }
  .hero h1 { font-size: 45px; }
  .hero-copy { font-size: 16px; }
  .roster-preview { transform: none; }
  .features { grid-template-columns: 1fr; gap: 25px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: 25px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 24px 16px 100px; }
  .header-user { display: flex; align-items: center; gap: 8px; }
  .page-header { margin-bottom: 22px; }
  .page-header h1 { font-size: 26px; }
  .page-header p { font-size: 12px; }
  .mobile-nav { position: fixed; display: flex; z-index: 40; inset: auto 0 0; min-height: 70px; padding: 8px 7px max(8px, env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); justify-content: space-around; box-shadow: 0 -5px 20px rgba(20,40,30,.05); }
  .mobile-link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
  .mobile-link .nav-icon { font-size: 18px; }
  .mobile-link.active { color: var(--forest); }
  .stats { gap: 8px; }
  .stat { padding: 13px 11px; }
  .stat-value { font-size: 20px; }
  .roster-grid { display: block; overflow: visible; }
  .day-column { min-height: 0; margin-bottom: 10px; padding: 12px; }
  .empty-day { padding: 8px; }
  .shift-card { padding: 14px; }
  .shift-actions button { font-size: 12px; padding: 6px 9px; }
  .availability-layout { grid-template-columns: 1fr; }
  .table-card { overflow-x: auto; }
  table { min-width: 650px; }
  .agenda-shift { align-items: flex-start; flex-wrap: wrap; }
  .agenda-time { min-width: 115px; }
}
@media (max-width: 430px) {
  .hero-actions { flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(2,1fr); }
  .preview-day:last-child { display: none; }
  .page-header .btn { padding: 8px 11px; font-size: 12px; }
  .roster-toolbar { gap: 5px; }
  .week-nav { gap: 3px; }
  .week-range { min-width: 128px; font-size: 11px; }
  .roster-buttons { gap: 4px; }
  .roster-buttons .btn { padding: 8px 10px; font-size: 11px; }
  .roster-buttons .publish-week { position: relative; left: -140px; z-index: 3; }
  .roster-buttons .new-shift { position: relative; left: -58px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 17px; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .availability-row { gap: 8px; }
  .day-name { width: 76px; }
  .availability-time { font-size: 12px; }
}
