/* ============================================================
   CBA Sports Portal — Shared Stylesheet
   Design System: Soft UI Evolution
   Fonts: Lexend (headings) / Source Sans 3 (body)
   ============================================================ */

/* --- Google Fonts (loaded here so they're available before JS runs) --- */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

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

/* --- Design Tokens --- */
:root {
  /* Brand */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --primary-bg: #EFF6FF;

  /* Accent */
  --accent: #059669;
  --accent-light: #10B981;
  --accent-bg: #ECFDF5;

  /* Semantic */
  --success: #10B981;
  --success-bg: #D1FAE5;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;
  --info: #3B82F6;
  --info-bg: #DBEAFE;

  /* Surfaces */
  --bg: #F1F5F9;
  --card-bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Text */
  --text: #0F172A;
  --text-secondary: #334155;
  --text-light: #64748B;
  --text-muted: #64748B;

  /* Radii */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Fonts */
  --font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  font-size: 16px;
}

a { color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   NAVBAR  (injected by portal-nav.js)
   ============================================================ */
.portal-nav {
  background: linear-gradient(135deg, #1E3A5F 0%, var(--primary) 100%);
  color: white;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transform: translateZ(0);
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.18);
}

.portal-nav h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.portal-nav .nav-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  opacity: 0.8;
  font-weight: 500;
  margin-top: 2px;
  text-align: center;
  letter-spacing: 0.03em;
}

.portal-nav a { color: white; text-decoration: none; }

.portal-nav-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: white;
  transition: background 150ms ease, transform 100ms ease;
}
.portal-nav-btn:hover { background: rgba(255,255,255,0.2); }
.portal-nav-btn:active { background: rgba(255,255,255,0.3); transform: scale(0.95); }

.portal-nav-back { left: 16px; }
.portal-nav-home { left: 60px; }

.portal-nav-store {
  display: none;
  position: absolute;
  right: 14px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Legacy class names — keep for backward compatibility */
.navbar { background: linear-gradient(135deg, #1E3A5F 0%, var(--primary) 100%); color: white; padding: 18px 16px; display: flex; align-items: center; justify-content: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(30, 58, 95, 0.18); }
.navbar h1 { font-family: var(--font-heading); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.navbar a { color: white; text-decoration: none; }
.navbar-back { position: absolute; left: 16px; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); -webkit-tap-highlight-color: transparent; transition: background 150ms ease; }
.navbar-back:active { background: rgba(255,255,255,0.3); }
.navbar-home { position: absolute; left: 60px; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); -webkit-tap-highlight-color: transparent; transition: background 150ms ease; color: white; }
.navbar-home:active { background: rgba(255,255,255,0.3); }
.navbar-store { display: none; position: absolute; right: 14px; font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 4px 10px; border-radius: 6px; }
.navbar-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.1); cursor: pointer; -webkit-tap-highlight-color: transparent; text-decoration: none; color: white; }
.navbar-btn:active { background: rgba(255,255,255,0.3); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  padding: 20px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 200ms ease;
}

.card h2 {
  font-size: 20px;
  margin-bottom: 18px;
  color: var(--text);
}

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-card h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.admin-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 200ms ease, transform 120ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-primary:active:not(:disabled) { transform: scale(0.97); box-shadow: 0 1px 4px rgba(37, 99, 235, 0.18); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3); }

.btn-success {
  background: linear-gradient(135deg, #059669 0%, var(--success) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-success:active:not(:disabled) { transform: scale(0.97); }
.btn-success:hover:not(:disabled) { background: linear-gradient(135deg, #047857 0%, #059669 100%); }

.btn-danger {
  background: linear-gradient(135deg, #DC2626 0%, var(--danger) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:active:not(:disabled) { transform: scale(0.97); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:active:not(:disabled) { transform: scale(0.97); background: var(--bg); }
.btn-secondary:hover:not(:disabled) { background: var(--bg); border-color: #CBD5E1; box-shadow: var(--shadow); }

.btn-warning { background: linear-gradient(135deg, #D97706 0%, var(--warning) 100%); color: white; }
.btn-warning:active:not(:disabled) { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: none;
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { background: rgba(0,0,0,0.04); }
.btn-ghost:active:not(:disabled) { transform: scale(0.97); }

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-full { width: 100%; }

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-group .btn { flex: 1; min-width: 0; }

/* ============================================================
   FORMS
   ============================================================ */
label {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

select, input[type="text"], input[type="number"], input[type="password"],
input[type="date"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-body);
  background: #FAFBFC;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

select {
  background: #FAFBFC 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='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input:disabled, select:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

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

.form-checkbox {
  flex-direction: row;
  gap: 10px;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.form-checkbox label { margin: 0; }

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: block;
  margin-top: 8px;
}

.file-input-wrapper input[type="file"] {
  font-size: 16px;
  width: 100%;
  padding: 14px;
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #FAFBFC;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.filter-row select {
  flex: 1;
  min-width: 0;
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filters select {
  flex: 1;
  min-width: 150px;
}

/* ============================================================
   FLASH / ALERTS
   ============================================================ */
.flash {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: flashSlideIn 250ms ease-out;
}

@keyframes flashSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash.success { background: var(--success-bg); color: #065F46; border-left: 4px solid var(--success); }
.flash.error { background: var(--danger-bg); color: #991B1B; border-left: 4px solid var(--danger); }
.flash.info { background: var(--info-bg); color: #1E40AF; border-left: 4px solid var(--info); }

.alert {
  padding: 12px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.95rem;
}

.alert-error {
  background: var(--danger-bg);
  color: #991b1b;
  border-left: 3px solid #dc2626;
}

.alert-success {
  background: var(--success-bg);
  color: #166534;
  border-left: 3px solid var(--success);
}

.form-notice {
  background: var(--warning-bg);
  border-left: 3px solid #fcd34d;
  padding: 12px;
  margin: 16px 0;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #92400e;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Reimbursement statuses */
.status-Pending   { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.status-Approved  { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.status-Denied    { background: var(--danger-bg); color: #991B1B; border: 1px solid #FECACA; }
.status-Paid      { background: var(--info-bg); color: #1E40AF; border: 1px solid #BFDBFE; }

/* Days off statuses */
.status-requested { background: var(--info-bg); color: #1e40af; border: 1px solid #BFDBFE; }
.status-approved  { background: var(--success-bg); color: #166534; border: 1px solid #A7F3D0; }
.status-denied    { background: var(--danger-bg); color: #991b1b; border: 1px solid #FECACA; }
.status-cancelled { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }

/* Ticket statuses */
.status-open        { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.status-in-progress { background: var(--info-bg); color: #1E40AF; border: 1px solid #BFDBFE; }
.status-resolved    { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.status-closed      { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }

.store-tag {
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.reason-tag {
  background: #EDE9FE;
  color: #5B21B6;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.warn-badge {
  background: var(--warning-bg);
  color: #92400e;
  border: 1.5px solid #FDE68A;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Generic badge (used in ticket list on admin) */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-Open        { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.badge-InProgress  { background: var(--info-bg); color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-Resolved    { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.badge-Closed      { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
.badge-Scheduled   { background: var(--primary-bg); color: var(--primary); border: 1px solid #BFDBFE; }

/* Priority labels */
.priority-Low      { color: var(--text-muted); }
.priority-Medium   { color: #D97706; font-weight: 600; }
.priority-High     { color: #DC2626; font-weight: 700; }
.priority-Urgent   { color: #991B1B; font-weight: 700; text-transform: uppercase; }

/* ============================================================
   REQUEST CARDS (days-off admin, reimbursement list)
   ============================================================ */
.request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease;
}

.request-card:hover { box-shadow: var(--shadow-md); }

.request-card.requested { border-color: #93c5fd; border-left: 4px solid var(--info); }
.request-card.approved  { border-color: #86efac; border-left: 4px solid var(--success); }
.request-card.denied    { border-color: #fca5a5; border-left: 4px solid var(--danger); }

.request-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.request-header:hover { background: var(--bg); }

.request-info { flex: 1; }
.request-name { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; }

.request-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.request-detail {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
}

.detail-row.warning {
  background: var(--warning-bg);
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid #fcd34d;
}

.detail-row .label {
  font-weight: 600;
  min-width: 120px;
  color: var(--text-light);
}

.request-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.request-item:last-child { border-bottom: none; }
.request-item .title { font-family: var(--font-heading); font-weight: 600; font-size: 17px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.modal-actions .btn {
  flex: 1;
  max-width: 150px;
}

/* ============================================================
   TICKET CARDS (maintenance tickets list)
   ============================================================ */
.ticket-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
}

.ticket-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.ticket-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

.ticket-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-card-header .priority { font-size: 1.1rem; flex-shrink: 0; }

.ticket-card-header .ticket-title {
  flex: 1;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 0;
}

.ticket-card-meta {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
  flex-wrap: wrap;
  padding-left: 30px;
}

.badge-scheduled {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Ticket detail */
.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ticket-detail-header h2 {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
}

.ticket-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 0.9rem;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.ticket-description {
  margin-bottom: 16px;
}

.ticket-description h3 { font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; color: var(--text-light); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.ticket-description p { font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; }

.resolution-notes {
  background: var(--accent-bg);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.resolution-notes h3 { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; color: #166534; margin-bottom: 6px; }
.resolution-notes p { font-size: 0.95rem; white-space: pre-wrap; }

/* Update history */
.update-history { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 12px; }
.update-history h3 { font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 10px; }
.update-entry { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 0.85rem; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.update-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.update-time { color: var(--text-light); white-space: nowrap; font-size: 0.78rem; }

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 150ms ease;
}

.photo-grid img:hover { transform: scale(1.03); }

.photo-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.photo-upload-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.photo-upload-btn:active { transform: scale(0.98); }

/* Photo lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  cursor: pointer;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

/* ============================================================
   NAV GRID (reimbursement home)
   ============================================================ */
.nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.nav-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.nav-card:hover { box-shadow: var(--shadow-md); border-color: #CBD5E1; }
.nav-card:active { transform: scale(0.97); }
.nav-card .icon { font-size: 36px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.nav-card .icon svg { width: 36px; height: 36px; }
.nav-card .label { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--text-secondary); }

/* ============================================================
   UTILITIES
   ============================================================ */
.loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.amount {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.success-message {
  color: #166534;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .portal-nav h1 { font-size: 16px; }
  .container { padding: 14px 12px; }
  .form-card { padding: 20px; }
  .admin-card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .ticket-meta-grid { grid-template-columns: 1fr; }
}
