/* ============================================================
   RotaSound Portal — Shared Stylesheet
   Brand: #0084C1 (blue), #F7FAFC (page bg), #FFFFFF (cards)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #0084C1;
  --blue-dark:  #006EA3;
  --blue-light: #DFF1FB;
  --blue-muted: #EAF3F9;
  --text:       #1A202C;
  --text-sec:   #4A5568;
  --border:     #E2E8F0;
  --bg:         #F7FAFC;
  --card:       #FFFFFF;
  --red:        #C0392B;
  --red-light:  #FDEDEC;
  --green:      #1A8B4F;
  --amber:      #E07B00;
  --shadow:     0 1px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --radius:     12px;
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- Navbar ---- */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  flex-shrink: 0;
}

.brand-dot {
  width: 10px; height: 10px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-block;
}

.navbar-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  text-decoration: none;
  color: var(--text-sec);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-link:hover   { background: var(--bg); color: var(--text); }
.nav-link.active  { background: var(--blue-muted); color: var(--blue); }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-name { font-size: 13px; color: var(--text-sec); font-weight: 500; }
.logout-link { font-size: 13px; color: var(--text-sec); }

/* ---- Page Layout ---- */
.page-main  { padding: 32px 24px; max-width: 1280px; margin: 0 auto; }
.page-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 20px; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
}
.alert-error   { background: var(--red-light);   color: var(--red);   border: 1px solid rgba(192,57,43,.2); }
.alert-success { background: #EDFAF3;             color: var(--green); border: 1px solid rgba(26,139,79,.2); }
.alert-info    { background: var(--blue-light);   color: var(--blue-dark); border: 1px solid rgba(0,132,193,.2); }

/* ---- Forms ---- */
.form-group   { margin-bottom: 16px; }
.form-label   { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,132,193,.12);
}
.form-hint { font-size: 12px; color: var(--text-sec); margin-top: 5px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 9px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: filter .15s, transform .1s;
}
.btn:active   { transform: scale(.98); }
.btn-primary  { background: var(--blue);  color: #fff; }
.btn-primary:hover  { filter: brightness(1.08); }
.btn-secondary { background: var(--blue-muted); color: var(--blue-dark); }
.btn-secondary:hover { background: var(--blue-light); }
.btn-danger   { background: var(--red-light); color: var(--red); }
.btn-danger:hover   { background: #f5c6c1; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Login Page ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo-dot {
  width: 48px; height: 48px;
  background: var(--blue);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.login-logo-dot svg { fill: #fff; }
.login-title   { font-size: 22px; font-weight: 700; color: var(--text); text-align: center; }
.login-subtitle{ font-size: 14px; color: var(--text-sec); text-align: center; margin-top: 4px; margin-bottom: 28px; }
.login-footer-link {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}
.login-footer-link a { color: var(--text-sec); text-decoration: none; }
.login-footer-link a:hover { color: var(--blue); text-decoration: underline; }

/* ---- Week Navigation ---- */
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.week-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding: 0 12px;
  min-width: 240px;
  text-align: center;
}
.week-nav .btn { min-width: 90px; }

.week-jump-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  height: 32px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.week-jump-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,132,193,.12);
}
.week-jump-wrap:hover { border-color: #b0c4d8; }

.week-jump-label {
  padding: 0 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--blue-muted);
  border-right: 1.5px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  user-select: none;
}

.week-jump-input {
  padding: 0 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: none;
  outline: none;
  cursor: pointer;
  height: 100%;
}

/* ---- View Options bar ---- */
.view-options {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.view-options-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--blue-muted);
  border: 1.5px solid rgba(0,132,193,.25);
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.view-toggle:hover { background: var(--blue-light); border-color: rgba(0,132,193,.4); }

.view-toggle-off {
  color: var(--text-sec);
  background: var(--card);
  border-color: var(--border);
}
.view-toggle-off:hover { background: var(--bg); border-color: #b0c4d8; }

.view-toggle-icon {
  font-size: 15px;
  line-height: 1;
}

.view-options-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.show-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  height: 32px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.show-filter-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,132,193,.12);
}
.show-filter-wrap:hover { border-color: #b0c4d8; }

.show-filter-label {
  padding: 0 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--blue-muted);
  border-right: 1.5px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  user-select: none;
}

.show-filter-select {
  padding: 0 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--card);
  border: none;
  outline: none;
  cursor: pointer;
  height: 100%;
  min-width: 120px;
  max-width: 200px;
}

.show-filter-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-dark);
  background: var(--blue-light);
  border: 1.5px solid rgba(0,132,193,.3);
  border-radius: 7px;
}

.show-filter-clear {
  color: var(--blue-dark);
  text-decoration: none;
  font-size: 11px;
  opacity: .7;
  transition: opacity .15s;
}
.show-filter-clear:hover { opacity: 1; }

/* ---- Planner Grid ---- */
.planner-wrap { overflow-x: auto; border-radius: var(--radius); }

.planner-grid {
  display: grid;
  grid-template-columns: 180px repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 900px;
  background: var(--card);
}

.planner-header-name,
.planner-header-day {
  background: #F0F5F9;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.planner-header-day {
  text-align: center;
}
.planner-header-day .day-name { display: block; }
.planner-header-day .day-date { font-weight: 400; color: var(--text-sec); font-size: 12px; }
.planner-header-day.today     { background: var(--blue-muted); color: var(--blue-dark); }
.planner-header-day.today .day-name { color: var(--blue); }

.planner-name-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
}
.planner-name-cell.me { background: var(--blue-muted); }
.planner-name-cell .member-name { font-weight: 700; }
.planner-name-cell .me-badge {
  font-size: 11px;
  color: var(--blue);
  font-weight: 600;
  margin-top: 2px;
}

.planner-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px;
  vertical-align: top;
  background: var(--card);
  min-height: 60px;
}
.planner-cell.me-row { background: #FAFCFF; }
.planner-cell.today  { background: #FBFCFF; }

.planner-grid > *:last-child,
.planner-grid > *:nth-last-child(-n+8) {
  /* remove bottom border from last row — handled by grid container */
}

.shift-card {
  border-radius: 7px;
  padding: 5px 7px;
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  word-break: break-word;
}
.shift-card.pencilled { opacity: .75; }
.shift-card .shift-show  { font-weight: 700; display: block; }
.shift-card .shift-role  { opacity: .9; display: block; }
.shift-card .shift-venue { opacity: .8; display: block; font-size: 10px; }
.shift-card .shift-time  { opacity: .85; display: block; font-size: 10px; }
.shift-card .pencil-tag  {
  display: inline-block;
  font-size: 10px;
  background: rgba(255,255,255,.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 2px;
}
.shift-card .shift-colleagues,
.shift-card .shift-lead-pse {
  display: block;
  font-size: 10px;
  opacity: .88;
  margin-top: 1px;
}

/* ---- Schedule sections (Your Schedule / Full Team Schedule) ---- */
.sched-section       { margin-bottom: 36px; }

.sched-section-head  {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.sched-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.sched-name {
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 400;
}

/* "Your Schedule" grid — give the single row a slightly stronger tint */
.sched-mine .planner-cell.me-row {
  background: #EEF6FF;
}

/* ---- Mobile planner (< 768 px) ---- */
.planner-mobile { display: none; }

@media (max-width: 767px) {
  .planner-wrap   { display: none; }
  .planner-mobile { display: block; }
  .sched-team     { display: none; }

  .mobile-day {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
  }
  .mobile-day.today {
    border-color: var(--blue);
  }

  .mobile-day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F0F5F9;
    border-bottom: 1px solid var(--border);
  }
  .mobile-day-header.today {
    background: var(--blue-muted);
    border-bottom-color: rgba(0,132,193,.2);
  }
  /* Full date — e.g. "Monday 7 April" */
  .mobile-day-fulldate {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
  }
  .mobile-day-header.today .mobile-day-fulldate { color: var(--blue); }

  .mobile-today-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    background: rgba(0,132,193,.12);
    border-radius: 5px;
    padding: 2px 7px;
  }

  .mobile-day-body { padding: 8px 10px; }

  .mobile-empty {
    font-size: 13px;
    color: var(--text-sec);
    padding: 6px 4px;
  }

  .mobile-member-row {
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-member-row:last-child { border-bottom: none; }
  .mobile-me-row { background: rgba(0,132,193,.03); border-radius: 6px; padding: 8px 8px; }

  .mobile-member-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .mobile-me-row .mobile-member-label { color: var(--blue); }
  .mobile-unassigned-label { color: var(--text-sec); }

  .mobile-unavailable {
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
  }

  .mobile-shifts { display: flex; flex-direction: column; gap: 4px; }

  /* Shift cards are a bit wider / easier to tap on mobile */
  .mobile-shifts .shift-card { font-size: 12px; padding: 7px 10px; }
}

/* ---- Unavailability marker (schedule planner) ---- */
.unavailable-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* ---- Availability ---- */
.avail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 680px) { .avail-grid { grid-template-columns: 1fr; } }

.avail-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  margin-bottom: 8px;
  gap: 12px;
}
.avail-dates  { font-weight: 600; font-size: 14px; }
.avail-notes  { font-size: 13px; color: var(--text-sec); margin-top: 2px; }
.avail-meta   { font-size: 12px; color: var(--text-sec); }
.avail-empty  { color: var(--text-sec); font-size: 14px; padding: 16px 0; }

/* Delete / inline confirmation */
.avail-delete-wrap { display: flex; align-items: center; gap: 6px; }

.avail-delete-btn {
  color: var(--text-sec);
  background: none;
  border: 1px solid var(--border);
}
.avail-delete-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-light); }

.avail-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: avail-confirm-in 0.15s ease;
}
@keyframes avail-confirm-in {
  from { opacity: 0; transform: translateX(4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.avail-confirm-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}
.avail-cancel-btn {
  color: var(--text-sec);
  background: none;
  border: 1px solid var(--border);
}
.avail-cancel-btn:hover { background: var(--bg); }

@media (max-width: 540px) {
  .avail-list-item    { flex-direction: column; align-items: flex-start; gap: 10px; }
  .avail-delete-wrap  { align-self: flex-end; }
}

/* ---- Misc ---- */
.divider      { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.text-sec      { color: var(--text-sec); }
.text-sm       { font-size: 13px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.flex-row      { display: flex; align-items: center; gap: 10px; }
.ml-auto       { margin-left: auto; }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .page-main   { padding: 20px 16px; }
  .login-card  { padding: 28px 20px; }
  .week-label  { min-width: 0; font-size: 14px; }
  .navbar      { padding: 0 16px; gap: 12px; }
  .navbar-user .user-name { display: none; }
}

/* ================================================================
   BURGER MENU & SLIDE-IN DRAWER
   ================================================================ */

/*
 * The burger button sits at the end of the flex navbar.
 * `margin-left: auto` on it (in the mobile breakpoint) pushes it to the
 * far right after the brand.  On desktop it is hidden entirely.
 */
.navbar-burger {
  display: none;          /* hidden by default; shown in mobile breakpoint */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  flex-shrink: 0;
  padding: 0;
}
.navbar-burger:hover { background: var(--bg); }

/* Dark overlay — behind the drawer, above everything else */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 900;
}
.nav-overlay.open { display: block; }

/* Slide-in drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--card);
  box-shadow: 6px 0 32px rgba(0, 0, 0, .18);
  z-index: 910;
  display: flex;
  flex-direction: column;
  transition: left 0.28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { left: 0; }

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-drawer-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
}
.drawer-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-sec);
  border-radius: 6px;
  padding: 0;
}
.drawer-close-btn:hover { background: var(--bg); color: var(--text); }

.nav-drawer-links {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}
.drawer-link {
  display: block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.drawer-link:hover                   { background: var(--bg); }
.drawer-link.active                  { color: var(--blue); font-weight: 700; background: var(--blue-light); }
.drawer-link-logout                  { color: var(--red); }

.nav-drawer-footer {
  flex-shrink: 0;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-user {
  font-size: 13px;
  color: var(--text-sec);
  font-weight: 600;
  padding: 4px 0;
}

/* ---- Mobile breakpoint: swap desktop nav for burger ---- */
@media (max-width: 768px) {
  /* Show burger, push it to the right */
  .navbar-burger {
    display: flex;
    margin-left: auto;   /* pushes burger to far right of the flex navbar */
  }

  /* Hide desktop-only elements */
  .navbar-links  { display: none !important; }
  .navbar-user   { display: none !important; }
}

/* ================================================================
   SHIFT DETAIL MODAL
   ================================================================ */

.shift-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 800;
  opacity: 0;
  transition: opacity 0.2s;
}
.shift-modal-overlay.open { display: block; opacity: 1; }

.shift-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(480px, calc(100vw - 32px));
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,.2);
  z-index: 810;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.shift-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.shift-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.shift-modal-show-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.shift-modal-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.shift-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-sec);
  padding: 4px 8px;
  border-radius: 6px;
}
.shift-modal-close:hover { background: var(--border); color: var(--text); }

.shift-modal-body {
  padding: 16px 20px;
}
.shift-modal-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.shift-modal-row:last-child { border-bottom: none; }
.shift-modal-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-sec);
  width: 72px;
  flex-shrink: 0;
}
.shift-modal-value {
  font-size: 14px;
  color: var(--text);
}
.shift-modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.pencilled-badge { background: #FFF3CD; color: #7A4F00; }
.lead-badge      { background: #DFF1FB; color: var(--blue-dark); }

/* shift-card is now clickable */
.shift-card { cursor: pointer; }

/* ================================================================
   PWA "ADD TO HOME SCREEN" TIP
   ================================================================ */
.pwa-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border: 1px solid rgba(0,132,193,.2);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  margin-bottom: 14px;
}
.pwa-tip-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--blue-dark);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.pwa-tip-close:hover { background: rgba(0,0,0,.07); }

/* ================================================================
   VIEW OPTIONS — export button
   ================================================================ */
.view-export-btn {
  margin-left: auto;
}
@media (max-width: 640px) {
  .view-export-btn { margin-left: 0; }
}

/* ================================================================
   PAGE CONTENT (profile etc.)
   ================================================================ */
.page-content { padding: 0; }

/* ================================================================
   SHIFT CONFIRMATION — Accept/Reject buttons and badges
   ================================================================ */
.shift-confirm-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.shift-confirm-actions {
  display: flex;
  gap: 4px;
}
.btn-shift-confirm,
.btn-shift-reject {
  flex: 1;
  border: none;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}
.btn-shift-confirm {
  background: var(--green);
  color: #fff;
}
.btn-shift-confirm:hover { background: #1e8a4a; }
.btn-shift-reject {
  background: #e74c3c;
  color: #fff;
}
.btn-shift-reject:hover { background: #c0392b; }
.shift-confirmed-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  text-align: center;
  padding: 2px 0;
}

/* ================================================================
   PENDING CONFIRMATION ALERT BANNER
   ================================================================ */
.alert-pending-confirm {
  background: #FFF8E1;
  border: 1px solid #F5C842;
  color: #7A5C00;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.alert-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: auto;
}
.alert-link:hover { opacity: .8; }

/* ================================================================
   NAV BADGE — red dot / count on Requests link
   ================================================================ */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
}
/* Small red dot on the burger button when there are pending requests */
.navbar-burger { position: relative; }
.burger-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* ================================================================
   SHIFT REQUESTS PAGE
   ================================================================ */
.req-intro {
  font-size: 15px;
  color: var(--text-sec);
  margin-bottom: 20px;
}
.req-intro strong { color: var(--text); }

.req-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.req-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  overflow: hidden;
}
.req-card-bar {
  width: 5px;
  flex-shrink: 0;
}
.req-card-body {
  flex: 1;
  padding: 16px 18px;
}
.req-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.req-show-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.req-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.req-badge-pencilled { background: #FFF3CD; color: #7A4F00; }
.req-badge-lead      { background: var(--blue-light); color: var(--blue-dark); }

.req-card-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
}

.req-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}
.req-meta-item {
  font-size: 13px;
  color: var(--text);
  display: flex;
  gap: 5px;
}
.req-meta-label {
  font-weight: 700;
  color: var(--text-sec);
}

.req-card-notes {
  font-size: 13px;
  color: var(--text-sec);
  font-style: italic;
  margin-bottom: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.req-card-actions {
  display: flex;
  gap: 8px;
}
.btn-req-confirm,
.btn-req-reject {
  flex: 1;
  max-width: 160px;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-req-confirm { background: var(--green); color: #fff; }
.btn-req-confirm:hover { background: #1e8a4a; }
.btn-req-reject  { background: #e74c3c; color: #fff; }
.btn-req-reject:hover  { background: #c0392b; }

@media (max-width: 480px) {
  .btn-req-confirm,
  .btn-req-reject { max-width: none; }
}

/* Empty state */
.req-empty {
  text-align: center;
  padding: 60px 20px;
}
.req-empty-icon {
  font-size: 48px;
  color: var(--green);
  margin-bottom: 12px;
}
.req-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.req-empty-sub {
  font-size: 14px;
  color: var(--text-sec);
}

/* ================================================================
   CALENDAR SUBSCRIBE / NOTIFICATIONS BUTTONS (view-options bar)
   ================================================================ */
#calSubBtn,
#enableNotifBtn {
  white-space: nowrap;
}
#enableNotifBtn {
  border-color: rgba(0,132,193,.3);
}

/* ================================================================
   PWA INSTALL BANNER (fixed bottom bar, mobile only)
   ================================================================ */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,.10);
  padding: env(safe-area-inset-bottom, 0);
  transform: translateY(100%);
  transition: transform .3s ease;
}
.pwa-banner--visible {
  transform: translateY(0);
}
.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  max-width: 600px;
  margin: 0 auto;
}
.pwa-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.pwa-banner-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.pwa-banner-text strong {
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.pwa-banner-text span {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.3;
}
.pwa-banner-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}
.pwa-banner-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-sec);
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
}
.pwa-banner-close:hover {
  color: var(--text);
}

/* Hide banner on desktop — install prompt is only useful on mobile */
@media (min-width: 768px) {
  .pwa-banner { display: none !important; }
}

/* ================================================================
   PWA iOS INSTALL MODAL (bottom sheet)
   ================================================================ */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pwa-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .28s ease;
}
.pwa-ios-modal--open .pwa-ios-backdrop {
  opacity: 1;
}
.pwa-ios-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform .28s ease;
}
.pwa-ios-modal--open .pwa-ios-box {
  transform: translateY(0);
}
.pwa-ios-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pwa-ios-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.pwa-ios-close {
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-sec);
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.pwa-ios-close:hover {
  color: var(--text);
}
.pwa-ios-intro {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.5;
  margin-bottom: 16px;
}
.pwa-ios-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.pwa-ios-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.pwa-ios-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
}
.pwa-ios-share-icon {
  display: inline-block;
  font-size: 16px;
  vertical-align: middle;
  color: var(--blue);
}
.pwa-ios-action {
  color: var(--blue);
}
.pwa-ios-tip {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.5;
  background: var(--blue-light);
  padding: 10px 12px;
  border-radius: 8px;
}

/* Drawer install link styling */
.drawer-install-link {
  color: var(--blue) !important;
  font-weight: 600;
}

/* ================================================================
   NOTIFICATION TOGGLE (drawer + desktop nav)
   ================================================================ */
.drawer-notif-link {
  font-weight: 600;
}
.drawer-notif-link.notif-on {
  color: var(--text-sec) !important;
  font-weight: 400;
}
.nav-notif-link {
  font-size: 16px !important;
  padding: 6px 8px !important;
}
.nav-notif-link.notif-on {
  background: var(--blue-muted);
  border-radius: 8px;
}

/* ================================================================
   CALENDAR SYNC PAGE
   ================================================================ */
.cal-sync-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 680px;
}
.cal-sync-card {
  padding: 24px;
}
.cal-sync-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.cal-sync-desc {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.5;
  margin-bottom: 16px;
}
.cal-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cal-url-input {
  flex: 1;
  font-size: 13px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  color: var(--text);
  background: var(--bg);
  cursor: text;
}
.cal-instructions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-instruction-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cal-instruction-group[open] {
  border-color: var(--blue);
}
.cal-instruction-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  background: var(--bg);
  transition: background .15s;
}
.cal-instruction-title::-webkit-details-marker { display: none; }
.cal-instruction-title::after {
  content: '›';
  margin-left: auto;
  font-size: 18px;
  color: var(--text-sec);
  transition: transform .2s;
}
.cal-instruction-group[open] .cal-instruction-title::after {
  transform: rotate(90deg);
}
.cal-instruction-title:hover {
  background: var(--blue-light);
}
.cal-platform-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.cal-steps {
  padding: 8px 16px 16px 42px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.cal-steps a {
  color: var(--blue);
  text-decoration: none;
}
.cal-steps a:hover {
  text-decoration: underline;
}
.cal-sync-note p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}
.cal-sync-note strong {
  color: var(--text);
}

/* ── Setup / Getting Started extras ───────────────────────────── */
.setup-intro-card {
  border-left: 4px solid var(--blue);
}
.setup-requirement {
  font-size: 13px;
  color: var(--amber);
  background: #FFF8ED;
  border: 1px solid rgba(224,123,0,.18);
  border-radius: 8px;
  padding: 8px 14px;
  margin: 0 16px 10px 42px;
  line-height: 1.5;
}
.setup-done {
  font-size: 13px;
  color: var(--green);
  padding: 6px 16px 14px 42px;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .cal-url-row {
    flex-direction: column;
  }
  .cal-url-row .btn {
    width: 100%;
    justify-content: center;
  }
  .setup-requirement {
    margin-left: 16px;
  }
  .setup-done {
    padding-left: 16px;
  }
}
