/* ─────────────────────────────────────────────────────────────────
   Screen styles: landing, login, dashboard
   ───────────────────────────────────────────────────────────────── */

/* ═══════════ LANDING ═══════════ */
.landing { max-width: 1320px; margin: 0 auto; padding: 28px 40px 0; }

.lnd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.lnd-nav-links { display: flex; gap: 28px; }
.lnd-nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}
.lnd-nav-links a:hover { color: var(--ink); }

.lnd-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  padding: 80px 0 110px;
  align-items: start;
}
.lnd-h1 {
  font-size: clamp(56px, 8vw, 104px);
  margin: 22px 0 26px;
  font-weight: 400;
}
.lnd-h1 em {
  font-style: italic;
  color: var(--accent);
}
.lnd-lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 480px;
  margin: 0;
}
.lnd-trust {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.lnd-trust-n { font-size: 26px; font-weight: 400; margin-bottom: 4px; }

.lnd-hero-right {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.oncall-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.oncall-name {
  font-size: 36px;
  margin: 18px 0 6px;
}
.oncall-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.oncall-meta .ext {
  color: var(--primary);
  font-weight: 500;
}
.dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--mute);
  display: inline-block;
  flex: 0 0 auto;
}
.oncall-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}
.oncall-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.oncall-bar {
  height: 6px;
  background: var(--bg-tint);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.oncall-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 999px;
}
.oncall-foot { display: block; }
.lnd-anchor {
  align-self: flex-end;
  margin-right: 8px;
}

/* services strip */
.lnd-strip {
  border-top: 1px solid var(--line);
  padding: 80px 0;
}
.lnd-strip-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.svc-card {
  padding: 28px 4px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.svc-card h3 {
  font-size: 30px;
  margin: 18px 0 14px;
  font-weight: 400;
}
.svc-card p {
  margin: 0;
  color: var(--ink-2);
  max-width: 360px;
  font-size: 14.5px;
}

/* approach */
.lnd-approach {
  border-top: 1px solid var(--line);
  padding: 80px 0;
}
.lnd-h2 {
  font-size: clamp(40px, 5vw, 64px);
  margin: 18px 0 48px;
  font-weight: 400;
}
.lnd-h2 em { color: var(--accent); font-style: italic; }
.lnd-approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 960px;
}
.lnd-approach-grid p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}
.lnd-approach-grid em {
  color: var(--primary);
  font-style: italic;
  font-family: var(--f-display);
  font-size: 1.08em;
}
.lnd-figures {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.lnd-fig-k {
  font-size: 56px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* foot */
.lnd-foot {
  background: var(--ink);
  color: var(--bg);
  margin: 0 -40px;
  padding: 64px 40px 32px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.lnd-foot .logo { color: var(--bg); }
.lnd-foot .logo-mark { background: var(--accent); }
.lnd-foot .logo-mark::before, .lnd-foot .logo-mark::after { background: var(--ink); }
.lnd-foot .eyebrow { color: rgba(247, 243, 236, 0.5); }
.lnd-foot .muted   { color: rgba(247, 243, 236, 0.6); }
.lnd-foot p { font-size: 14.5px; line-height: 1.55; }
.lnd-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(247, 243, 236, 0.15);
}
.lnd-foot-bar {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  color: rgba(247, 243, 236, 0.5);
}

/* ═══════════ LOGIN ═══════════ */
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-left {
  padding: 32px 56px;
  display: flex;
  flex-direction: column;
}
.login-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-form-wrap {
  margin: auto 0;
  max-width: 420px;
  width: 100%;
}
.login-h1 {
  font-size: 56px;
  font-weight: 400;
  margin: 14px 0 18px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 36px;
}
.login-submit { justify-content: center; height: 48px; }
.login-sso {
  justify-content: center;
  width: 100%;
}
.login-err {
  background: var(--accent-soft);
  color: #8C3A1F;
  padding: 10px 14px;
  border-radius: var(--r-md);
}
.login-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
}

/* right column */
.login-right {
  background: var(--primary);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  position: relative;
  overflow: hidden;
}
.login-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 90% 10%, rgba(216,106,78,0.18), transparent 60%),
    radial-gradient(60% 60% at 10% 90%, rgba(247,243,236,0.08), transparent 60%);
  pointer-events: none;
}
.login-art {
  position: relative;
  max-width: 460px;
  width: 100%;
}
.login-art-eyebrow { color: rgba(247,243,236,0.6); }
.login-art-name {
  font-size: 56px;
  margin: 14px 0 6px;
  line-height: 1.05;
}
.login-art-sub {
  color: rgba(247,243,236,0.7);
  margin-bottom: 36px;
}
.login-art-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 40px;
}
.login-cell {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  color: rgba(247,243,236,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-cell.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.login-cell.on .dot { background: #fff; width: 6px; height: 6px; }

.login-quote {
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1.35;
  color: var(--bg);
}
.login-quote span { color: var(--accent); font-size: 48px; line-height: 0.5; vertical-align: -6px; margin-right: 4px; }
.login-quote footer { margin-top: 18px; color: rgba(247,243,236,0.55); font-family: var(--f-sans); font-size: 12.5px; }

/* ═══════════ DASHBOARD ═══════════ */
.dash {
  --wg-head-h: 64px;
  --wg-row-h:  46px;
  --wg-col-h-w: 64px;
  --wg-col-w: calc((100% - var(--wg-col-h-w)) / 7);
  min-height: 100vh;
  background: var(--bg);
}

[data-density="compact"] .dash { --wg-row-h: 36px; }
[data-density="comfy"]   .dash { --wg-row-h: 56px; }

.dash-top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 8px;
}
.dash-tabs {
  display: flex;
  background: var(--bg-tint);
  border-radius: 999px;
  padding: 3px;
}
.dash-tab {
  background: transparent;
  border: 0;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.dash-tab.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }

.dash-clock {
  padding: 7px 12px;
  background: var(--bg-tint);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(216,106,78,.55);
  animation: livepulse 1.8s infinite;
}
.dash-user {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* live banner */
.dash-live {
  margin: 22px 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.dash-live .eyebrow { color: rgba(247,243,236,0.5); }
.dash-live-name { font-size: 40px; margin: 10px 0 12px; line-height: 1.05; }
.dash-live-meta {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  color: rgba(247,243,236,0.7); font-size: 14px;
}
.dash-live-ext { border-left: 1px solid rgba(255,255,255,.12); padding-left: 32px; }
.dash-live-extnum {
  font-size: 64px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 8px 0 4px;
}
.dash-live-next {
  border-left: 1px solid rgba(255,255,255,.12);
  padding-left: 32px;
}
.dash-next-row {
  display: flex; align-items: center; gap: 14px;
  margin-top: 10px;
}

.dash-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  flex: 0 0 auto;
  letter-spacing: 0.04em;
}

/* body layout */
.dash-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  padding: 0 28px 28px;
  align-items: start;
}
.dash-rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: sticky;
  top: 22px;
}
.dash-roster {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-roster-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  align-items: center;
}
.dash-roster-item.on {
  background: var(--accent-soft);
}
.dash-roster-name { font-weight: 500; font-size: 14px; }
.dash-roster-ext { text-align: right; font-size: 14px; color: var(--ink-2); }
.dash-roster-ext .mono { color: var(--primary); font-weight: 500; }
.dash-add-md { width: 100%; justify-content: center; margin-top: 12px; }

.dist { display: flex; flex-direction: column; gap: 6px; }
.dist-row {
  display: grid;
  grid-template-columns: 28px 1fr 38px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
}
.dist-name { font-weight: 500; }
.dist-bar { height: 6px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; }
.dist-bar span { display: block; height: 100%; border-radius: 999px; }
.dist-h { text-align: right; color: var(--mute); }

/* week grid */
.dash-main { min-width: 0; }
.wg-h2 { font-size: 32px; margin: 6px 0 0; font-weight: 400; }
.wg-wrap { padding: 22px; }
.wg {
  display: grid;
  grid-template-columns: var(--wg-col-h-w) repeat(7, 1fr);
  grid-template-rows: var(--wg-head-h) repeat(24, var(--wg-row-h));
  grid-auto-rows: var(--wg-row-h);
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.wg-corner { background: var(--bg-tint); border-bottom: 1px solid var(--line); }
.wg-day {
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.wg-day.today { background: var(--primary-soft); }
.wg-day-short { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.wg-day-num   { font-size: 22px; color: var(--ink); }
.wg-hour {
  font-size: 11px;
  color: var(--mute);
  padding: 2px 8px 0;
  border-right: 1px solid var(--line);
  text-align: right;
  background: var(--surface);
  transform: translateY(-7px);
}
.wg-cell {
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  cursor: cell;
  transition: background .12s ease;
}
.wg-cell:hover { background: var(--bg); }
.wg-cell.today { background: rgba(31, 74, 71, 0.025); }
.wg-cell.now   { background: var(--accent-soft); }

.wg-shift {
  border: 0;
  margin: 2px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
  font: inherit;
}
.wg-shift.hovered { transform: translateY(-1px); box-shadow: var(--shadow-md); z-index: 2; }
.wg-shift.active { color: var(--primary-2); }
.wg-shift-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.wg-shift-name { font-weight: 500; font-size: 13px; }
.wg-shift-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-2);
}
.wg-shift-meta .mono:first-child { color: var(--primary-2); font-weight: 500; }
.wg-shift-spec { color: var(--ink-2); font-size: 11.5px; opacity: 0.8; }

.wg-now {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  width: var(--wg-col-w);
  height: 2px;
}
.wg-now-line {
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 2px;
  background: var(--accent);
}
.wg-now-dot {
  position: absolute;
  left: -5px; top: -5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(216,106,78,.5);
  animation: livepulse 1.8s infinite;
}

.wg-legend {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.legend-sw {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* day view */
.dv-wrap { padding: 22px; }
.dv-timeline {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.dv-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.dv-row:last-child { border-bottom: 0; }
.dv-row.now { background: var(--accent-soft); }
.dv-hour {
  border-right: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--mute);
}
.dv-track {
  position: relative;
  padding: 4px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dv-block {
  border: 0;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1 0 auto;
}
.dv-block-name { font-weight: 500; font-size: 13px; }
.dv-block-ext { font-size: 11.5px; color: var(--primary-2); }

/* roster editor */
.rt { width: 100%; border-collapse: collapse; }
.rt th, .rt td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.rt th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.rt-input { height: 34px; padding: 0 10px; font-size: 13.5px; }

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 25, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fadein .15s ease;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: pop .2s cubic-bezier(.2,.7,.4,1.1);
  overflow: hidden;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }

.modal-head {
  padding: 24px 28px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-h3 { font-size: 32px; margin: 4px 0 0; font-weight: 400; }
.modal-x {
  background: var(--bg-tint);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  color: var(--ink-2);
}
.modal-body {
  padding: 8px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-routing {
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--primary-soft);
  border-radius: var(--r-md);
  border-left: 3px solid var(--primary);
}
.modal-routing p { color: var(--ink-2); }
.modal-routing strong { color: var(--primary); }
.modal-foot {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.modal-del { color: #8C3A1F; }

/* responsive guards */
@media (max-width: 1100px) {
  .login { grid-template-columns: 1fr; }
  .login-right { display: none; }
  .lnd-hero { grid-template-columns: 1fr; gap: 60px; }
  .lnd-strip-grid, .lnd-approach-grid, .lnd-figures, .lnd-foot-grid { grid-template-columns: 1fr; }
  .dash-body { grid-template-columns: 1fr; }
  .dash-live { grid-template-columns: 1fr; gap: 18px; }
  .dash-live-ext, .dash-live-next { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
}
