/* ============================================================
   Bar Calendar — design system
   Layers on top of vendored Bootstrap 5. No external assets.
   ============================================================ */

:root {
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --accent: #f59e0b;
  --ink: #1a1a2e;
  --ink-soft: #5b5b76;
  --line: #e7e8f1;
  --surface: #ffffff;
  --canvas: #f5f6fb;
  --sidebar-from: #191434;
  --sidebar-to: #0f0c22;
  --sidebar-ink: #a9a6c9;
  --sidebar-ink-dim: #6f6b93;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 20px 50px rgba(16, 12, 42, .35);
}

html { font-size: 15px; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.01em; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

/* ---------- Buttons ---------- */
/* background-clip stops the fill painting underneath the border — without it,
   rounded corners on high-DPI/mobile screens render a second inner arc. */
.btn, .form-control, .form-select, .stat-pill, .hours-chip, .week-day, .card,
.shift-row, .settings-card, .seg-btn, .segmented, .dropdown-menu, .alert {
  background-clip: padding-box;
}

.btn {
  border-radius: 0;
  font-weight: 600;
  padding: .45rem 1rem;
  box-shadow: none;
  /* One clean focus ring; avoids the doubled-corner look from stacked rings on touch */
  --bs-btn-focus-box-shadow: 0 0 0 3px rgba(99, 102, 241, .25);
}
.btn:focus:not(:focus-visible) { box-shadow: none; }
.btn-sm { border-radius: 0; padding: .25rem .65rem; }
.btn-lg { border-radius: 0; padding: .65rem 1.25rem; }

/* Native date/time inputs draw their own inner chrome on mobile — flatten it */
input[type="date"].form-control, input[type="time"].form-control {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--surface);
}

.btn-primary {
  --bs-btn-bg: var(--brand-600);
  --bs-btn-border-color: var(--brand-600);
  --bs-btn-hover-bg: var(--brand-700);
  --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-700);
  --bs-btn-active-border-color: var(--brand-700);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-600);
  --bs-btn-border-color: #cdd2f4;
  --bs-btn-hover-bg: var(--brand-50);
  --bs-btn-hover-color: var(--brand-700);
  --bs-btn-hover-border-color: var(--brand-500);
  --bs-btn-active-bg: var(--brand-100);
  --bs-btn-active-color: var(--brand-700);
  --bs-btn-active-border-color: var(--brand-500);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 9px;
  border-color: #d9dbe8;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15);
}

/* ============================================================
   App shell (signed-in): sidebar + topbar
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-from), var(--sidebar-to));
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  border: 0;
}

/* Desktop: pin the sidebar to the viewport so the bottom Settings link is always
   visible without scrolling the page; the nav scrolls internally if it overflows. */
@media (min-width: 992px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
  }
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.35rem 1.4rem 1.1rem;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.sidebar-brand:hover { color: #fff; }
.sidebar-brand .brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  box-shadow: 0 4px 12px rgba(124, 92, 246, .45);
  color: #fff;
}

.sidebar-section {
  margin: 1.15rem 1.4rem .35rem;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--sidebar-ink-dim);
}

.sidebar-nav { list-style: none; margin: 0; padding: 0 .8rem; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .7rem;
  margin-bottom: 2px;
  border-radius: 9px;
  color: var(--sidebar-ink);
  font-weight: 500;
  font-size: .95rem;
  transition: background .12s ease, color .12s ease;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: .8; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .06); color: #e9e8f6; }
.sidebar-nav a.active {
  background: rgba(124, 92, 246, .18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand-500);
}
.sidebar-nav a.active svg { opacity: 1; }

.sidebar-bottom {
  margin: auto .8rem 0;
  padding: .6rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-foot {
  padding: 1rem 1.4rem 1.2rem;
  font-size: .78rem;
  color: var(--sidebar-ink-dim);
}

/* ---------- Topbar ---------- */
.app-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.6rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-company {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  color: var(--ink);
}
.topbar-company svg { color: var(--brand-600); }
.topbar-company .form-select {
  font-weight: 600;
  border: 1px solid var(--line);
  background-color: var(--canvas);
  min-width: 190px;
}

.user-menu .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: none;
  border: 0;
  color: var(--ink);
  font-weight: 600;
}
.user-menu .dropdown-toggle::after { color: var(--ink-soft); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: .4rem;
}
.dropdown-item { border-radius: 8px; padding: .45rem .75rem; font-weight: 500; }
.dropdown-item:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Main content ---------- */
.app-main { padding: 1.8rem 1.9rem 2.5rem; max-width: 1280px; width: 100%; }

.app-main h1 {
  font-size: 1.45rem;
  margin-bottom: .25rem;
}
.app-main h1 small { font-size: .95rem; font-weight: 500; color: var(--ink-soft) !important; }

/* Cards + tables read as panels */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; }

.app-main .table {
  --bs-table-bg: var(--surface);
  --bs-table-striped-bg: #fafbfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.app-main .table thead th {
  background: #f8f9fd;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--line);
  padding: .65rem .85rem;
}
.app-main .table td { padding: .7rem .85rem; border-bottom: 1px solid #f0f1f7; }
.app-main .table tbody tr:last-child td { border-bottom: 0; }

.badge { font-weight: 600; border-radius: 6px; padding: .34em .6em; }

.alert { border-radius: 12px; border: 0; box-shadow: var(--shadow-sm); }

/* ============================================================
   Auth pages (login / register / password)
   ============================================================ */
.auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(124, 92, 246, .35), transparent 60%),
    radial-gradient(800px 500px at 110% 15%, rgba(245, 158, 11, .16), transparent 55%),
    linear-gradient(160deg, #171232 0%, #0e0b20 70%);
}

.auth-wrap { width: 100%; max-width: 480px; }
.auth-wrap.auth-wide { max-width: 620px; }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.auth-brand:hover { color: #fff; }
.auth-brand .brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  box-shadow: 0 6px 18px rgba(124, 92, 246, .5);
  color: #fff;
}

.auth-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 2.1rem 2.2rem 2.2rem;
}
.auth-card h1 { font-size: 1.35rem; margin-bottom: .3rem; }
.auth-card .auth-sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.5rem; }

.auth-card .form-floating > .form-control,
.auth-card .form-floating > .form-select { border-radius: 10px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink-soft);
  font-size: .8rem;
  margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-foot { text-align: center; color: rgba(255, 255, 255, .45); font-size: .8rem; margin-top: 1.4rem; }

.auth-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-600);
  margin: 1.1rem 0 .6rem;
}

/* ============================================================
   Public (anonymous) pages — landing
   ============================================================ */
.public-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: .8rem 0;
}
.public-nav .navbar-brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; color: var(--ink); font-size: 1.1rem;
}
.public-nav .brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: #fff;
}

.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.6rem;
  letter-spacing: -.03em;
  max-width: 640px;
  margin: 0 auto .9rem;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--brand-500), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--ink-soft); font-size: 1.1rem; max-width: 540px; margin: 0 auto 1.8rem; }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  height: 100%;
}
.feature-card .icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: .9rem;
}
.feature-card h5 { font-size: 1rem; margin-bottom: .35rem; }
.feature-card p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

/* ============================================================
   Schedule page — modern facelift
   ============================================================ */

/* ---- Stat pills (summary bar + per-day) ---- */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.stat-pill.stat-danger { background: #fdecec; border-color: #f7c5c5; color: #a32d2d; }
.stat-pill.stat-success { background: #e5f6ef; border-color: #b6e6d2; color: #0f6e56; }
.stat-pill.stat-brand { background: var(--brand-50); border-color: #d5d9fb; color: var(--brand-700); }
.stat-pill.stat-event { background: #fbf3ff; border-color: #eddcf9; color: #7b3aa5; }

.hours-chip {
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.hours-chip strong { color: var(--ink); font-weight: 700; margin-left: .15rem; }

/* ---- Segmented filter control ---- */
.segmented {
  display: inline-flex;
  background: #e9eaf3;
  border-radius: 0;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: .3rem 1rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all .15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--surface);
  color: var(--brand-700);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

/* ---- Week strip (mini calendar) ---- */
.week-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 8px;
  margin: .75rem 0 1.25rem;
}
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: .55rem .25rem .5rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.week-day:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-500); color: var(--ink); }
.week-day .wd-name { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.week-day .wd-num { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.week-day .wd-dots { display: flex; gap: 3px; height: 6px; margin-top: 2px; }
.week-day .dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-open { background: #e24b4a; }
.dot-mine { background: var(--brand-500); }
.dot-event { background: #b06fd8; }
.week-day.is-past { opacity: .5; }
.week-day.is-today {
  background: linear-gradient(135deg, var(--brand-600), #7c5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}
.week-day.is-today .wd-name { color: rgba(255, 255, 255, .75); }
.week-day.is-today:hover { color: #fff; }

/* ---- Day cards ---- */
.day-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.day-card.is-today { border-color: #c7cbf7; box-shadow: 0 6px 22px rgba(79, 70, 229, .12); }
.day-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.1rem;
  background: linear-gradient(180deg, #fbfbfe, #f6f7fc);
  border-bottom: 1px solid var(--line);
}
.day-card.is-today .day-head { background: linear-gradient(180deg, #f2f3ff, #ecedfd); }
.day-date { display: flex; align-items: center; gap: .6rem; }
.day-num {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.02em;
  min-width: 2.1rem;
  text-align: center;
}
.day-card.is-today .day-num { color: var(--brand-600); }
.day-meta { display: flex; flex-direction: column; line-height: 1.15; }
.day-name { font-weight: 700; font-size: .95rem; }
.day-sub { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.off-chip {
  font-size: .75rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: #fdf1e3;
  border: 1px solid #f5ddbb;
  color: #854f0b;
}

/* ---- Shift tiles ---- */
.day-card .card-body { padding: .8rem .9rem; display: flex; flex-direction: column; gap: 8px; }
.shift-row {
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 12px;
  padding: .55rem .8rem .55rem .7rem;
  background: var(--surface);
  transition: transform .12s ease, box-shadow .12s ease;
}
.shift-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.sr-open { border-left-color: #e24b4a; background: #fffafa; }
.sr-filled { border-left-color: #1d9e75; }
.sr-mine { border-left-color: var(--brand-500); background: #f8f8ff; }
.sr-offered { border-left-color: var(--accent); background: #fffaf0; }
.sr-cancelled { border-left-color: #b4b2a9; background: #fafafa; }
.event-tile { border-left: 4px solid #b06fd8; background: #fdf9ff; }

.shift-label { font-weight: 700; font-size: .95rem; }
.shift-time {
  color: var(--ink-soft);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
/* Desktop: fixed columns so rows line up; released on mobile (see media query below). */
@media (min-width: 768px) {
  .day-card .shift-label { min-width: 11rem; }
  .day-card .shift-time { min-width: 10rem; }
}

/* Job badges — soft category colors */
.job-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.jb-1 { background: var(--brand-50); color: var(--brand-700); }          /* Bartender */
.jb-2 { background: #e1f5ee; color: #0f6e56; }                            /* Kitchen */
.jb-3 { background: #fbeaf0; color: #993556; }                            /* Events */
.jb-4 { background: #f1efe8; color: #5f5e5a; }                            /* Other */
.jb-event { background: #f3e6fb; color: #7b3aa5; }

/* Manager controls appear on hover (always visible on touch devices) */
@media (hover: hover) {
  .shift-actions { opacity: 0; transition: opacity .15s ease; }
  .shift-row:hover .shift-actions, .shift-actions:focus-within { opacity: 1; }
}

.avatar-sm {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), #a855f7);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(124, 92, 246, .3);
}
.avatar-empty {
  background: transparent;
  border: 1.5px dashed #c9cad8;
  color: #9a99ad;
  box-shadow: none;
}

.empty-day {
  text-align: center;
  color: #a3a2b8;
  font-size: .85rem;
  padding: 1rem 0;
}

.day-past { opacity: .55; transition: opacity .15s ease; }
.day-past:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .app-main { padding: 1.2rem 1rem 2rem; }
  .app-topbar { padding: 0 1rem; }
  .topbar-company .form-select { min-width: 0; max-width: 46vw; }
}

/* Phone layout for the schedule + My Schedule pages */
@media (max-width: 767.98px) {
  .app-main h1 { font-size: 1.2rem; }
  .app-main h1 small { display: block; font-size: .8rem; margin-top: .1rem; }

  /* Week strip becomes a swipeable row instead of wrapping */
  .week-strip {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .week-strip::-webkit-scrollbar { display: none; }
  .week-day { flex: 1 0 60px; }

  /* Shift tiles: label/badge line, then time on its own line, actions last */
  .shift-row { padding: .6rem .75rem .6rem .65rem; row-gap: 6px; }
  .shift-row .avatar-sm { width: 26px; height: 26px; }
  .day-card .shift-time { flex-basis: 100%; order: 5; margin-top: -4px; }
  .shift-row .badge, .shift-row .job-badge { font-size: .64rem; }

  /* Manager + signup controls: always visible, full-width, comfy tap targets */
  .shift-actions {
    opacity: 1 !important;
    flex-basis: 100%;
    order: 10;
    margin-left: 0 !important;
    margin-top: 2px;
  }
  .shift-actions form:first-child { flex: 1; display: flex; gap: .35rem; }
  .shift-actions select { width: 100% !important; flex: 1; }
  .shift-actions .btn, .shift-row form .btn-sm { padding: .35rem .7rem; }

  /* Day header: slightly smaller numeral, pills wrap under */
  .day-num { font-size: 1.35rem; min-width: 1.7rem; }
  .day-head { padding: .65rem .8rem; flex-wrap: wrap; }

  /* Tighter vertical rhythm between the control rows */
  .app-main .mt-3 { margin-top: .5rem !important; }
  .app-main .mb-2 { margin-bottom: .4rem !important; }

  /* My Schedule hero stacks */
  .next-hero { flex-direction: column; align-items: stretch; gap: .5rem; padding: 1rem 1.1rem; }
  .next-hero-label {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    padding: 0 0 .45rem;
  }
  .next-hero-what { font-size: 1.05rem; }

  /* Timeline: date becomes a small heading above the tiles */
  .tl-day { flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
  .tl-date { flex-direction: row; align-items: baseline; gap: .45rem; width: auto; padding-top: 0; }

  /* Settings hub cards and tabs stay comfortable */
  .settings-nav a { padding: .45rem .6rem; font-size: .84rem; }

  /* Add-shift form fields stretch */
  .card form.row .col-auto { flex: 1 1 46%; }
  .card form.row .col-auto:last-child { flex: 0 0 100%; }
  .card form.row .col-auto .form-select, .card form.row .col-auto .form-control { width: 100%; }
}

/* ---------- My Schedule ---------- */
.next-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--brand-600), #7c5cf6 60%, #a855f7);
  color: #fff;
  box-shadow: 0 10px 30px rgba(79, 70, 229, .3);
}
.next-hero-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .75);
  writing-mode: initial;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, .25);
  padding-right: 1.25rem;
}
.next-hero-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.next-hero-when { font-size: .85rem; color: rgba(255, 255, 255, .8); font-weight: 600; }
.next-hero-what { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.next-hero-where { font-size: .85rem; color: rgba(255, 255, 255, .8); }

.tl-day { display: flex; gap: 1rem; margin-bottom: 1rem; }
.tl-date {
  flex-shrink: 0;
  width: 90px;
  display: flex;
  flex-direction: column;
  padding-top: .45rem;
  line-height: 1.25;
}
.tl-dayword { font-weight: 700; font-size: .92rem; }
.tl-sub { font-size: .75rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.tl-items { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* ---------- Metric cards (reports) ---------- */
.metric-card {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  height: 100%;
  padding: 1.15rem 1.3rem;
  background: var(--surface);
  background-clip: padding-box;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.metric-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: .5rem;
}
.metric-value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.metric-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.metric-sub { font-size: .82rem; color: var(--ink-soft); }
.metric-good .metric-icon { background: #e1f5ee; color: #0f6e56; }
.metric-good .metric-value { color: #0f6e56; }
.metric-warn .metric-icon { background: #faeeda; color: #854f0b; }
.metric-warn .metric-value { color: #854f0b; }
.metric-bad .metric-icon { background: #fcebeb; color: #a32d2d; }
.metric-bad .metric-value { color: #a32d2d; }

.stat-pill.stat-warn { background: #faeeda; border-color: #f5ddbb; color: #854f0b; }

/* ---------- Color key legend ---------- */
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  color: var(--ink-soft);
}
.legend-swatch {
  width: 6px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- Person chips (multi-person shifts) ---------- */
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .6rem .2rem .25rem;
  border: 1px solid var(--line);
  background: var(--surface);
  background-clip: padding-box;
  font-size: .85rem;
}
.person-chip .avatar-sm { width: 24px; height: 24px; font-size: .6rem; }
.person-chip.chip-mine { border-color: var(--brand-500); background: var(--brand-50); font-weight: 600; }
.person-chip .btn-sm { padding: .1rem .45rem; font-size: .74rem; }
.person-chip .chip-x { width: 26px; height: 26px; color: #a32d2d; }

/* ---------- Icon buttons: borderless ghosts, site-wide ---------- */
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.icon-btn:hover {
  background: #e9eaf3 !important;
  /* keep the variant's own color instead of Bootstrap's filled-hover white */
  color: var(--bs-btn-color, var(--ink)) !important;
}
.icon-btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }

@media (max-width: 767.98px) {
  .desktop-only { display: none !important; }
}
.shifts-table thead th {
  background: #f8f9fd;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.app-main .card .shifts-table {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

/* ---------- Settings hub ---------- */
.settings-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  height: 100%;
  padding: 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.settings-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-500);
  color: var(--ink);
}
.settings-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: .35rem;
}
.settings-title { font-weight: 700; font-size: 1.02rem; }
.settings-desc { font-size: .85rem; color: var(--ink-soft); }

.settings-nav {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.settings-nav a {
  padding: .5rem .9rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.settings-nav a:hover { color: var(--ink); }
.settings-nav a.active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

/* ---------- Print (post-behind-the-bar schedule) ---------- */
@media print {
  .app-sidebar, .app-topbar, .no-print, form, .btn, .alert, .btn-close { display: none !important; }
  body { background: #fff; }
  .app-main { padding: 0; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .card-header.bg-primary { background: #eee !important; color: #000 !important; }
}
