/* ============================================================
   IMC Volunteer Planner — Design System & Global Styles
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --surface3: #2c3040;
  --border: #2e3345;
  --border-light: #3a3f54;

  --text: #e4e6f0;
  --text-dim: #8b90a5;
  --text-muted: #5a5f75;

  --blue: #6c8cff;
  --blue-hover: #5a7af0;
  --blue-bg: rgba(108, 140, 255, 0.1);
  --gold: #d4a843;
  --gold-hover: #c49a38;
  --gold-bg: rgba(212, 168, 67, 0.1);
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.1);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.1);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;

  --sidebar-width: 240px;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--blue-hover);
}

img { max-width: 100%; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ============================================================
   Layout — Auth Pages (Centered Card)
   ============================================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-logo {
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 4px;
}

.auth-logo .logo-name {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 400;
}

.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-dim);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.auth-card .success-message {
  background: var(--green-bg);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
  color: var(--green);
  font-size: 0.95rem;
  line-height: 1.6;
}

.auth-card .success-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.auth-card .magic-link-info {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ============================================================
   Layout — Admin (Sidebar + Main)
   ============================================================ */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .org-icon {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
}

.sidebar-header .org-name {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--surface2);
}

.sidebar-nav a.active {
  color: var(--blue);
  background: var(--blue-bg);
  border-left-color: var(--blue);
}

.sidebar-nav a .nav-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.sidebar-footer a:hover { color: var(--red); }

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.page-header .page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--text-muted); }

/* --- Mobile sidebar toggle --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 150;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* ============================================================
   Layout — Volunteer Portal
   ============================================================ */

.portal-layout {
  min-height: 100vh;
}

.portal-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.portal-header .header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.portal-header .header-brand {
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
}

.portal-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.portal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ============================================================
   Summary / Stat Cards
   ============================================================ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.stat-card.accent-blue { border-top: 3px solid var(--blue); }
.stat-card.accent-gold { border-top: 3px solid var(--gold); }
.stat-card.accent-green { border-top: 3px solid var(--green); }
.stat-card.accent-amber { border-top: 3px solid var(--amber); }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card.clickable {
  cursor: pointer;
}
.card.clickable:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   Tables
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--surface2);
}

tbody tr.clickable {
  cursor: pointer;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface3);
  border-color: var(--border-light);
}

.btn-success {
  background: var(--green);
  color: #000;
}
.btn-success:hover:not(:disabled) {
  background: #3ad874;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: #f55;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  padding: 8px 12px;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--text);
}

.btn-gold {
  background: var(--gold);
  color: #000;
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-xs);
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}
.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
  padding: 4px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.form-group label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-bg);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b90a5' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

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

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 4px;
}

/* Search input with icon */
.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-wrapper .form-input {
  padding-left: 38px;
}

/* ============================================================
   Tags / Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.badge-blue   { background: var(--blue-bg); color: var(--blue); }
.badge-gold   { background: var(--gold-bg); color: var(--gold); }
.badge-green  { background: var(--green-bg); color: var(--green); }
.badge-amber  { background: var(--amber-bg); color: var(--amber); }
.badge-red    { background: var(--red-bg); color: var(--red); }
.badge-dim    { background: var(--surface2); color: var(--text-dim); }

/* ============================================================
   Tabs
   ============================================================ */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-success {
  border-left: 3px solid var(--green);
}

.toast.toast-error {
  border-left: 3px solid var(--red);
}

.toast .toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================================
   Loading & Empty States
   ============================================================ */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-dim);
  gap: 12px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state .empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state .empty-desc {
  font-size: 0.88rem;
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============================================================
   Shift Block
   ============================================================ */

.shift-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.shift-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.shift-header .shift-time {
  font-weight: 600;
  font-size: 1rem;
}

.shift-header .shift-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.shift-body {
  padding: 16px 20px;
}

.assignment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.assignment-row:last-child {
  border-bottom: none;
}

.assignment-row .vol-name {
  font-weight: 500;
  min-width: 140px;
}

.assignment-row .vol-location {
  flex: 1;
  min-width: 120px;
}

.assignment-row .vol-status {
  min-width: 80px;
}

.assignment-row .vol-actions {
  display: flex;
  gap: 6px;
}

.shift-add-row {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Coverage Grid
   ============================================================ */

.coverage-grid {
  overflow-x: auto;
}

.coverage-grid table {
  min-width: 500px;
}

.coverage-grid th,
.coverage-grid td {
  text-align: center;
  padding: 10px 14px;
  min-width: 100px;
}

.coverage-grid th:first-child,
.coverage-grid td:first-child {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}

.coverage-cell {
  border-radius: var(--radius-xs);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 500;
}

.coverage-cell.accepted { background: var(--green-bg); color: var(--green); }
.coverage-cell.pending { background: var(--amber-bg); color: var(--amber); }
.coverage-cell.invited { background: var(--blue-bg); color: var(--blue); }
.coverage-cell.declined { background: var(--red-bg); color: var(--red); }
.coverage-cell.gap { background: var(--surface2); color: var(--text-muted); font-style: italic; }

.coverage-total {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 16px;
  padding: 12px 0;
  color: var(--text);
}

/* ============================================================
   Dropdown (searchable)
   ============================================================ */

.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu .dropdown-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
}

.dropdown-menu .dropdown-search input {
  width: 100%;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.85rem;
}
.dropdown-menu .dropdown-search input:focus {
  outline: none;
  border-color: var(--blue);
}

.dropdown-item {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background: var(--surface2);
}

.dropdown-item .item-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: auto;
}

/* ============================================================
   Progress Bar
   ============================================================ */

.progress-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-fill.green { background: var(--green); }
.progress-fill.amber { background: var(--amber); }
.progress-fill.red { background: var(--red); }
.progress-fill.blue { background: var(--blue); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 72px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .assignment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
  }

  .portal-header {
    padding: 0 16px;
  }

  .portal-header .header-left {
    gap: 12px;
  }

  .portal-content {
    padding: 24px 16px;
  }

  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

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

  .auth-card {
    padding: 32px 24px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
  }

  .toast {
    max-width: 100%;
  }
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .sidebar, .sidebar-toggle, .sidebar-overlay,
  .portal-header, .toast-container,
  .btn, .no-print {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .card, .shift-block {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  table {
    border: 1px solid #ccc;
  }

  th, td {
    border: 1px solid #ccc !important;
    color: #000 !important;
    padding: 6px 10px !important;
  }

  th {
    background: #eee !important;
  }

  .badge {
    color: #000 !important;
    background: transparent !important;
    border: 1px solid #999 !important;
  }

  a { color: #000 !important; text-decoration: none !important; }

  .page-break { page-break-before: always; }
}

/* ============================================================
   Print — Day Sheet Specific
   ============================================================ */

.day-sheet {
  background: #fff;
  color: #000;
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.day-sheet h1 {
  font-size: 22pt;
  margin-bottom: 4px;
  color: #000;
}

.day-sheet .ds-date {
  font-size: 14pt;
  color: #333;
  margin-bottom: 24px;
}

.day-sheet .ds-shift {
  margin-bottom: 24px;
  break-inside: avoid;
}

.day-sheet .ds-shift h2 {
  font-size: 13pt;
  background: #eee;
  padding: 8px 12px;
  margin-bottom: 0;
  color: #000;
  border: 1px solid #ccc;
  border-bottom: none;
}

.day-sheet table {
  width: 100%;
  border-collapse: collapse;
}

.day-sheet th,
.day-sheet td {
  border: 1px solid #ccc;
  padding: 8px 10px;
  text-align: left;
  font-size: 10pt;
  color: #000;
}

.day-sheet th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 9pt;
  text-transform: uppercase;
}

.day-sheet .ds-empty-row td {
  height: 32px;
  color: #999;
}

.day-sheet .ds-section {
  margin-top: 32px;
  break-inside: avoid;
}

.day-sheet .ds-section h3 {
  font-size: 12pt;
  border-bottom: 2px solid #333;
  padding-bottom: 4px;
  margin-bottom: 12px;
  color: #000;
}

.day-sheet .ds-section ul {
  list-style: disc;
  padding-left: 24px;
  font-size: 10pt;
}

.day-sheet .ds-section li {
  margin-bottom: 4px;
  color: #000;
}

@media print {
  .day-sheet {
    padding: 0;
  }
  .day-sheet .no-print {
    display: none !important;
  }
}

/* ============================================================
   Utility Classes
   ============================================================ */

.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--blue); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
