/* =========================================================
   Bernie's Pet Barn — Roster App Styles
   Redesigned: modern UI polish and consistency pass
   ========================================================= */

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

:root {
  --brand: #157AA8;
  --brand-dark: #0f5a7e;
  --brand-mid: #1a8cc0;
  --brand-light: #e1f0f7;
  --brand-xlight: #f0f8fc;
  --accent: #ED9698;
  --accent-dark: #d07072;
  --accent-light: #fdf0f0;
  --danger: #c62828;
  --danger-light: #ffebee;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --warning: #e07b00;
  --warning-light: #fff3e0;
  --grey-50: #fafafa;
  --grey-100: #f5f5f5;
  --grey-200: #eeeeee;
  --grey-300: #e0e0e0;
  --grey-400: #bdbdbd;
  --grey-500: #9e9e9e;
  --grey-600: #757575;
  --grey-800: #424242;
  --grey-900: #212121;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow: 0 2px 8px rgba(0,0,0,0.09);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.15s ease;
}

html, body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--grey-900);
  background: #eef2f5;
  line-height: 1.5;
  min-height: 100vh;
}

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

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 64px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.20);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: stretch;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.78);
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  height: 100%;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.nav-links a:hover {
  background: rgba(255,255,255,0.10);
  text-decoration: none;
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.40);
}
.nav-links a.active {
  background: rgba(255,255,255,0.16);
  color: var(--white);
  border-bottom-color: var(--white);
}

/* Sign Out button in nav */
.navbar .btn-sm {
  font-size: 0.8rem;
  padding: 0.3rem 0.85rem;
  min-height: 30px;
  background: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.90);
  border-color: rgba(255,255,255,0.28);
  margin-left: 8px;
}
.navbar .btn-sm:hover {
  background: rgba(255,255,255,0.22);
  color: var(--white);
  border-color: rgba(255,255,255,0.50);
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.04);
}

/* Section headings inside cards */
.card > h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--grey-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-200);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Violations panel h3 override — uses accent border */
.violations-panel.card > h3 {
  border-bottom-color: rgba(237,150,152,0.35);
  color: var(--grey-900);
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--grey-900);
  flex: 1;
  letter-spacing: -0.02em;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-300);
  background: var(--white);
  color: var(--grey-800);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition),
              transform 0.1s ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  gap: 6px;
}
.btn:hover {
  background: var(--grey-100);
  text-decoration: none;
  border-color: var(--grey-400);
  color: var(--grey-900);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible {
  outline: 3px solid rgba(21,122,168,0.30);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(21,122,168,0.30);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover {
  background: #1b5e20;
  border-color: #1b5e20;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(46,125,50,0.28);
}

.btn-edit {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}
.btn-edit:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.28);
}

.btn-secondary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #b71c1c;
  border-color: #b71c1c;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(198,40,40,0.28);
}

.btn-sm {
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}

.btn-block { width: 100%; }

/* =========================================================
   FORMS
   ========================================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* All text-like inputs */
.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  padding: 8px 12px;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--grey-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
  min-height: 38px;
  appearance: auto;
}
.form-group input:not([type="checkbox"]):hover,
.form-group select:hover {
  border-color: var(--grey-400);
}
.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21,122,168,0.14);
}
.form-group input:disabled,
.form-group select:disabled {
  background: var(--grey-100);
  color: var(--grey-500);
  cursor: not-allowed;
  border-color: var(--grey-200);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Hours Toggle (staff form) ---- */
.hours-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.hours-toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 225px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-800);
  text-transform: none;
  letter-spacing: normal;
}
.hours-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hours-input {
  width: 80px;
}
.hours-unit {
  color: var(--grey-600);
  font-size: 0.875rem;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 500;
}
.alert-success {
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1.5px solid #90c4dc;
}
.alert-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid #ef9a9a;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.4;
}
.badge-green {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.badge-red {
  background: var(--danger-light);
  color: var(--danger);
}
.badge-grey {
  background: var(--grey-200);
  color: var(--grey-600);
}

/* =========================================================
   TABLES (general)
   ========================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--grey-50);
  border-bottom: 2px solid var(--grey-200);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-600);
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover td {
  background: var(--grey-50);
}
.inactive-row td { opacity: 0.48; }
.text-center { text-align: center; }
.text-muted { color: var(--grey-500); font-size: 0.8rem; }

/* ---- Empty State ---- */
td.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--grey-500);
  font-size: 0.9rem;
}
td.empty-state a {
  color: var(--brand);
  font-weight: 600;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(145deg, var(--brand-mid) 0%, var(--brand) 40%, var(--brand-dark) 75%, #0a3f5e 100%);
}

.login-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}
.login-logo p {
  color: var(--grey-500);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.login-form .btn-primary {
  margin-top: 8px;
  padding: 0.7rem;
  font-size: 1rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

/* =========================================================
   WEEK SELECTOR — navigation widget
   ========================================================= */
.week-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-200);
  padding: 16px 24px;
  margin-bottom: 16px;
}
.week-label {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--grey-900);
  white-space: nowrap;
  text-align: center;
  letter-spacing: -0.02em;
  flex: 1;
}
.week-nav-btn {
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  min-width: 96px;
  text-align: center;
  flex-shrink: 0;
  background: var(--brand);
  color: var(--white) !important;
  border-color: var(--brand);
}
.week-nav-btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--white) !important;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(21,122,168,0.28);
}

/* ---- Week Nav (legacy) ---- */
.week-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  margin: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-200);
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--grey-900);
  /* Reset card h3 styles */
  border: none;
  padding: 0;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--grey-500);
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.modal-close:hover {
  color: var(--grey-900);
  background: var(--grey-100);
}
.modal-body {
  padding: 20px;
}
.modal-body p { margin-bottom: 8px; }
.modal-body ul {
  margin: 8px 0 12px 20px;
  line-height: 1.8;
}
.modal-body li { margin-bottom: 4px; }
.modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--grey-200);
  justify-content: flex-end;
}

/* =========================================================
   ROSTER GRID
   ========================================================= */
.roster-wrapper {
  overflow: hidden;
  padding: 0;
}

.roster-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 900px;
}

/* Column header row */
.roster-table th {
  background: var(--brand);
  color: var(--white);
  padding: 10px 8px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  border-right: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  z-index: 8;
}

/* Sticky first column — header */
.roster-table th.employee-col {
  text-align: left;
  min-width: 155px;
  width: 155px;
  padding-left: 16px;
  position: sticky;
  left: 0;
  z-index: 15;
  background: var(--brand-dark);
  border-right: 2px solid rgba(255,255,255,0.22);
}

.roster-table td {
  border-right: 1px solid var(--grey-200);
  border-bottom: 1px solid var(--grey-200);
  padding: 0;
  vertical-align: middle;
  min-width: 112px;
}

/* Sticky first column — body */
.employee-name-cell {
  padding: 8px 12px 8px 16px !important;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--grey-50) !important;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 2px solid var(--grey-300) !important;
  box-shadow: 3px 0 6px rgba(0,0,0,0.05);
}

.shift-cell {
  height: 62px;
  position: relative;
  text-align: center;
}

.shift-cell.empty-cell:hover {
  background: var(--brand-xlight);
  cursor: pointer;
}

/* Xero leave */
.shift-cell.cell-on-leave {
  background: #f0f6f9;
  cursor: default;
}
.shift-cell.cell-on-leave:hover {
  background: #e6f0f6;
}

/* Leave badge — consistent pill */
.leave-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--brand-dark);
  font-weight: 700;
  padding: 3px 8px;
  background: var(--brand-light);
  border-radius: 999px;
  border: 1px solid rgba(21,122,168,0.22);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Add shift button */
.add-shift-btn {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--grey-400);
  transition: all var(--transition);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-shift-btn:hover {
  color: var(--brand);
  background: var(--brand-xlight);
}

/* Shift block */
.shift-block {
  background: var(--brand-light);
  border-left: 3px solid var(--brand);
  margin: 4px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.shift-block:hover {
  background: #bfd9eb;
  box-shadow: 0 2px 6px rgba(21,122,168,0.18);
}

.shift-time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: block;
  line-height: 1.3;
}
.shift-break {
  font-size: 0.68rem;
  color: var(--grey-600);
  display: block;
  margin-top: 2px;
}

.shift-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--grey-500);
  font-size: 0.9rem;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 4px;
  transition: all var(--transition);
}
.shift-delete:hover {
  background: var(--danger);
  color: var(--white);
}

/* ---- Violations panel ---- */
.violations-panel {
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
}
.violations-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.violation-item {
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--grey-900);
  border-left: 3px solid var(--accent);
}

.violations {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
}
.violation-badge {
  font-size: 0.85rem;
  cursor: help;
}

/* ---- Closed Day columns ---- */
/* Diagonal stripe pattern for closed days */
.col-closed {
  background-color: #f2f2f4 !important;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0px,
    transparent 6px,
    rgba(0,0,0,0.04) 6px,
    rgba(0,0,0,0.04) 12px
  ) !important;
  color: #bbb;
  cursor: default;
  pointer-events: none;
}

.col-closed-header {
  background: #2d5f7a !important;
  opacity: 0.90;
}

.closed-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.90);
  background: rgba(0,0,0,0.22);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---- Hours tracker column ---- */
.hours-col {
  white-space: nowrap;
  text-align: center;
  min-width: 92px;
  background: rgba(0,0,0,0.03) !important;
  border-left: 1px solid var(--grey-300) !important;
}
.hours-tracker-cell {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,0.01);
  border-left: 1px solid var(--grey-200);
}
.hours-tracker {
  font-size: 0.82rem;
  white-space: nowrap;
  font-weight: 600;
  display: block;
}

/* Hours tracker state classes */
.hours-tracker.hours-ok {
  color: var(--success);
}
.hours-tracker.hours-under {
  color: var(--warning);
}
.hours-tracker.hours-over {
  color: var(--danger);
}
.hours-tracker.hours-neutral {
  color: var(--grey-600);
  font-weight: 400;
}

/* =========================================================
   CARD SPACING HELPERS
   ========================================================= */
.settings-card {
  margin-top: 24px;
}
.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

/* =========================================================
   SETTINGS
   ========================================================= */

/* Store hours table */
.store-hours-table {
  margin-bottom: 16px;
}

/* Closed days table */
.closed-days-table {
  margin-bottom: 24px;
}
.closed-days-table .actions-col {
  width: 130px;
}
/* Store hours table — day name column */
.store-hours-table td:first-child {
  font-weight: 600;
  width: 120px;
  color: var(--grey-800);
}
/* Store hours table — time inputs */
.store-hours-table input[type="time"] {
  width: 128px;
  padding: 6px 10px;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.store-hours-table input[type="time"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21,122,168,0.14);
  outline: none;
}
.store-hours-table input[type="time"]:disabled {
  background: var(--grey-100);
  color: var(--grey-400);
  border-color: var(--grey-200);
}

/* Button groups inside table cells */
.table td .btn + .btn {
  margin-left: 4px;
}

/* Inline button group */
.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-btn-form {
  display: inline;
}

/* Section sub-heading (e.g. "Add Closed Day") */
.subsection-heading {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-600);
  margin-bottom: 12px;
}

/* Inline form row (e.g. Add Closed Day) */
.inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.inline-form-field {
  margin-bottom: 0;
}
.inline-form-check {
  justify-content: flex-end;
  padding-bottom: 2px;
}

/* Screen reader only label */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Store hours closed checkbox label */
.store-closed-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-700);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

/* Card description text */
.card-description {
  margin-bottom: 16px;
  font-size: 0.875rem;
}

/* Settings info paragraphs */
.settings-info-list p {
  margin-bottom: 8px;
  font-size: 0.875rem;
}
.settings-info-list p:last-child {
  margin-bottom: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.settings-row p {
  margin-bottom: 4px;
}
.settings-row p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   DANGER ZONE
   ========================================================= */
.danger-zone-card {
  border: 1.5px solid #e57373 !important;
  background: linear-gradient(to bottom, #fffefe 0%, #fff7f7 100%) !important;
  box-shadow: 0 2px 10px rgba(198,40,40,0.08) !important;
}
.danger-zone-header {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #fdd;
  display: flex;
  align-items: center;
  gap: 6px;
}
.danger-zone-label {
  font-size: 0.70rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--danger);
}
.danger-zone-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.danger-zone-info strong {
  font-size: 0.95rem;
  color: var(--grey-900);
  display: block;
  margin-bottom: 4px;
}
.danger-zone-info p {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin: 0;
}

/* =========================================================
   COPY FROM PREVIOUS WEEK
   ========================================================= */
.copy-week-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  margin-bottom: 16px;
}

.btn-copy-prev {
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition);
}

.btn-copy-prev:hover {
  background: var(--brand-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-copy-prev:active {
  transform: translateY(0);
}

/* =========================================================
   CONFIRM ALL BANNER
   ========================================================= */
.confirm-all-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: #7a5a00;
}

.btn-confirm-all {
  background: #2e7d32;
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.btn-confirm-all:hover {
  background: #1b5e20;
}

/* =========================================================
   PENDING SHIFT STYLES
   ========================================================= */
.shift-pending {
  opacity: 0.65;
  background: rgba(255, 180, 0, 0.15) !important;
  border: 1px dashed #e0a800 !important;
  position: relative;
}

.pending-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 3px;
  z-index: 10;
}

.confirm-btn,
.remove-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.confirm-btn {
  background: #2e7d32;
  color: #fff;
}

.remove-btn {
  background: #c62828;
  color: #fff;
}

.confirm-btn:hover,
.remove-btn:hover {
  transform: scale(1.18);
  filter: brightness(1.15);
}

/* =========================================================
   WEEKLY SUMMARY SECTION
   ========================================================= */
.weekly-summary-section {
  margin-top: 28px;
}

.weekly-summary-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--grey-900);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-light);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.summary-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--grey-900);
}

.summary-unconfirmed-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #7a5a00;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.summary-shifts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.summary-shifts li {
  font-size: 0.8rem;
  color: var(--grey-800);
  padding: 3px 0;
  border-bottom: 1px solid var(--grey-100);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.summary-shifts li:last-child {
  border-bottom: none;
}

.summary-no-shifts {
  font-size: 0.82rem;
  color: var(--grey-400);
  font-style: italic;
  flex: 1;
}

.summary-total {
  font-size: 0.85rem;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid var(--grey-200);
  margin-top: auto;
  font-variant-numeric: tabular-nums;
}

/* Reuse hours tracker colour states */
.summary-total.summary-hours.hours-ok   { color: var(--success); }
.summary-total.summary-hours.hours-under { color: var(--warning); }
.summary-total.summary-hours.hours-over  { color: var(--danger); }
.summary-total.summary-hours.hours-neutral { color: var(--grey-600); font-weight: 600; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  .week-label {
    font-size: 1.05rem;
  }
  .week-selector {
    gap: 8px;
    padding: 12px 16px;
  }
  .week-nav-btn {
    min-width: 72px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
  }
  .card {
    padding: 16px;
  }
  .card > h3 {
    margin-bottom: 12px;
  }
  .navbar {
    padding: 0 16px;
  }
  .nav-links a {
    padding: 0 12px;
    font-size: 0.85rem;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .week-nav { flex-wrap: wrap; }
  .login-container { padding: 28px 24px; }
}

/* =========================================================
   ADD STAFF — CHOICE SCREEN (Step 1)
   ========================================================= */
.add-staff-choice-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.add-staff-choice-subtitle {
  color: var(--grey-600);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.add-staff-choice-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.add-staff-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--grey-300);
  background: var(--white);
  color: var(--grey-900);
  text-decoration: none;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.add-staff-choice-btn:hover {
  border-color: var(--brand);
  background: var(--brand-xlight);
  box-shadow: 0 4px 16px rgba(21,122,168,0.12);
  text-decoration: none;
  color: var(--grey-900);
}

.choice-btn-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.choice-btn-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--grey-900);
}

.choice-btn-hint {
  font-size: 0.78rem;
  color: var(--grey-500);
  line-height: 1.4;
  text-align: center;
}

/* =========================================================
   XERO EMPLOYEE SEARCH (Step 2a)
   ========================================================= */
.xero-search-input {
  width: 100%;
  max-width: 420px;
}

.xero-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
}

.xero-result-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.xero-result-row:hover {
  border-color: var(--brand);
  background: var(--brand-xlight);
  box-shadow: 0 2px 6px rgba(21,122,168,0.10);
}

.xero-result-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--grey-900);
  flex: 1;
}

.xero-result-email {
  font-size: 0.82rem;
  color: var(--grey-500);
}

.xero-empty-hint {
  margin-top: 12px;
  color: var(--grey-500);
  font-size: 0.875rem;
}

.xero-confirm-text {
  font-size: 1rem;
  color: var(--grey-800);
  margin-bottom: 4px;
}

/* Legacy — kept for compatibility */
.xero-search-card {
  border-left: 3px solid #1AB5B9;
}

.xero-search-card h3 {
  color: #1AB5B9;
}

.xero-prefill-note {
  margin-top: 6px;
  color: #1AB5B9;
  font-size: 0.85rem;
  font-weight: 600;
}

.xero-divider {
  text-align: center;
  margin: 0.5rem 0 1rem;
  color: #aaa;
  font-size: 0.85rem;
}

.xero-divider span {
  background: #f5f6fa;
  padding: 0 12px;
}
