@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* The HTML `hidden` attribute only sets display:none in the UA stylesheet,
   which class rules such as .confirm-overlay { display:flex } silently
   override — leaving modals permanently visible. Force it to win. */
[hidden] {
  display: none !important;
}

/* ============================================
   ROOT VARIABLES - MODERN CATHEDRAL THEME
   ============================================ */
:root {
  --midnight: #0A1628;
  --deep-navy: #0F2542;
  --cathedral-blue: #1B3A6B;
  --azure-deep: #1E4D8C;
  --azure-dark: #2563A8;
  --azure-mid: #3B82C4;
  --azure-primary: #4A90D9;
  --azure-bright: #5BA3E8;
  --azure-light: #7BB8F0;
  --azure-lighter: #A8D1F5;
  --azure-pale: #D4E8FA;
  --azure-ghost: #EBF4FC;

  --gold: #C9A961;
  --gold-light: #DCC28A;
  --gold-glow: rgba(201, 169, 97, 0.4);
  --gold-subtle: rgba(201, 169, 97, 0.15);

  --ivory: #FDFCF8;
  --ivory-warm: #F8F5EE;
  --paper: #FFFFFF;
  --parchment: #F4EFE4;

  --text-primary: #0A1628;
  --text-secondary: #3A4A5E;
  --text-tertiary: #6B7A8F;
  --text-muted: #94A3B8;
  --text-inverse: #FDFCF8;

  --glass-bg: rgba(253, 252, 248, 0.88);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 20px 60px -15px rgba(10, 22, 40, 0.25);

  --shadow-xs: 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 24px 60px rgba(10, 22, 40, 0.18);
  --shadow-gold: 0 8px 32px rgba(201, 169, 97, 0.25);

  --gradient-cathedral: linear-gradient(180deg, #0A1628 0%, #0F2542 40%, #1B3A6B 100%);
  --gradient-azure: linear-gradient(135deg, #1E4D8C 0%, #3B82C4 100%);
  --gradient-azure-hover: linear-gradient(135deg, #2563A8 0%, #4A90D9 100%);
  --gradient-gold: linear-gradient(135deg, #C9A961 0%, #DCC28A 50%, #C9A961 100%);
  --gradient-divine: radial-gradient(ellipse at top, rgba(201, 169, 97, 0.15) 0%, transparent 60%);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 250ms var(--ease-smooth);
  --transition-slow: 500ms var(--ease-smooth);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--midnight);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* Mobile nav toggle — hidden on desktop, shown on mobile */
.mobile-nav-toggle {
  display: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2.5rem 3.5rem;
  background: var(--ivory);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--gradient-cathedral);
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05), 8px 0 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border-right: 1px solid rgba(201, 169, 97, 0.1);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at top, rgba(201, 169, 97, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.3);
  border-radius: 3px;
}

.sidebar-brand {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(201, 169, 97, 0.15);
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(201, 169, 97, 0.5);
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
  background: var(--ivory);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-copy span {
  color: rgba(201, 169, 97, 0.85);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 3px;
}

.sidebar-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0;
  position: relative;
  z-index: 1;
}

.sidebar-section-label {
  display: block;
  padding: 1rem 0.875rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253, 252, 248, 0.35);
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  color: rgba(253, 252, 248, 0.65);
  text-decoration: none;
  transition: all var(--transition-base);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  border: 1px solid transparent;
}

.sidebar-links a svg {
  font-size: 1.05rem;
  flex-shrink: 0;
  opacity: 0.85;
  transition: all var(--transition-base);
}

.sidebar-links a:hover {
  color: var(--text-inverse);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(201, 169, 97, 0.15);
}

.sidebar-links a:hover svg {
  color: var(--gold);
  opacity: 1;
}

.sidebar-links a.active {
  color: var(--text-inverse);
  background: rgba(201, 169, 97, 0.1);
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: inset 0 0 0 1px rgba(201, 169, 97, 0.1);
}

.sidebar-links a.active svg {
  color: var(--gold);
}

.sidebar-links a.active::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--gradient-gold);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--gold-glow);
}

.sidebar-footer {
  border-top: 1px solid rgba(201, 169, 97, 0.15);
  padding-top: 1.25rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

.sidebar-user {
  color: var(--text-inverse);
  font-size: 0.85rem;
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(220, 38, 38, 0.12);
  color: rgba(253, 252, 248, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  transition: all var(--transition-base);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.5);
  color: var(--text-inverse);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
  background: transparent;
}

.auth-form {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 3rem 2.75rem;
  border-radius: var(--radius-xl);
  box-shadow:
    var(--glass-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  width: 100%;
  max-width: 440px;
  position: relative;
  border: 1px solid rgba(201, 169, 97, 0.25);
  z-index: 2;
}

/* ---- Login success modal (shown before redirecting to the dashboard) ---- */
.login-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: loginOverlayIn 240ms ease;
}
.login-success-modal {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(10, 22, 40, 0.35);
  padding: 2.25rem 1.75rem 1.75rem;
  animation: loginModalIn 300ms ease;
}
.login-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
  border: 2px solid rgba(46, 204, 113, 0.4);
}
.login-success-modal h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}
.login-success-sub { margin: 0 0 1.35rem; font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.login-success-sub strong { color: var(--text-primary); }
.login-success-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.08);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.login-success-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #C9A961, #27ae60);
  animation: loginBarFill 2.2s linear forwards;
}
.login-success-btn {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--gradient-azure);
  color: #fff;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.login-success-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(30, 77, 140, 0.35); }
@keyframes loginOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes loginModalIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes loginBarFill { from { width: 0; } to { width: 100%; } }

.auth-form::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 3px;
  opacity: 0.6;
}

.auth-form h2 {
  font-family: var(--font-heading);
  text-align: center;
  color: var(--text-primary);
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.auth-form .subtitle {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.auth-form input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.auth-form input:hover {
  border-color: rgba(10, 22, 40, 0.18);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--azure-mid);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12);
}

.auth-form input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.auth-form .remember-me {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  user-select: none;
  width: fit-content;
}

.auth-form .remember-me input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--azure-mid);
  cursor: pointer;
  box-shadow: none;
}

.auth-form .remember-me input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--azure-mid);
  outline-offset: 2px;
  box-shadow: none;
}

.auth-form button[type="submit"] {
  width: 100%;
  padding: 0.9rem;
  background: var(--gradient-azure);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(30, 77, 140, 0.3);
  position: relative;
  overflow: hidden;
}

.auth-form button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s var(--ease-out);
}

.auth-form button[type="submit"]:hover:not(:disabled) {
  background: var(--gradient-azure-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 77, 140, 0.4);
}

.auth-form button[type="submit"]:hover:not(:disabled)::before {
  left: 100%;
}

.auth-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-form .error {
  background: rgba(220, 38, 38, 0.06);
  color: #B91C1C;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.15);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-form .success {
  background: rgba(22, 163, 74, 0.06);
  color: #15803D;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(22, 163, 74, 0.15);
  font-weight: 500;
}

.auth-form > p,
.auth-form .auth-prompt {
  text-align: center;
  margin-top: 1.75rem;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-weight: 400;
}

.auth-form > p a,
.auth-form .auth-prompt a {
  color: var(--azure-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-base);
  border-bottom: 1px solid transparent;
}

.auth-form > p a:hover,
.auth-form .auth-prompt a:hover {
  color: var(--azure-mid);
  border-bottom-color: var(--azure-mid);
}

/* Password toggle inside input */
.auth-form .password-input-wrapper {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.auth-form .password-input-wrapper input,
.auth-form .password-input-wrapper input[type="password"],
.auth-form .password-input-wrapper input[type="text"] {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1.125rem;
  margin-bottom: 0;
  display: block;
}

.auth-form .password-input-wrapper .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
  margin: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-base), background var(--transition-base);
  z-index: 5;
  box-shadow: none;
}

.auth-form .password-input-wrapper .password-toggle:hover {
  color: var(--azure-dark);
  background: rgba(74, 144, 217, 0.08);
  transform: translateY(-50%);
}

.auth-form .password-input-wrapper .password-toggle:focus {
  outline: none;
  color: var(--azure-dark);
  background: rgba(74, 144, 217, 0.1);
}

.auth-form .password-input-wrapper .password-toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-form .password-input-wrapper .password-toggle svg {
  display: block;
  pointer-events: none;
  width: 18px;
  height: 18px;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.dashboard-loading,
.dashboard-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.dashboard-error { color: #B91C1C; }
.dashboard-error .error-detail { font-size: 0.8rem; color: var(--text-tertiary); max-width: 400px; text-align: center; }
.dashboard-error button { margin-top: 0.5rem; padding: 0.6rem 1.25rem; background: var(--gradient-azure); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }

.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(74, 144, 217, 0.15);
  border-top-color: var(--azure-mid);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* HERO */
.dash-hero {
  position: relative;
  background: linear-gradient(135deg, #0A1628 0%, #0F2542 45%, #1B3A6B 100%);
  border-radius: var(--radius-xl);
  padding: 2.75rem 3rem;
  margin-bottom: 2rem;
  overflow: hidden;
  color: var(--text-inverse);
  box-shadow: 0 20px 50px -20px rgba(10, 22, 40, 0.5);
}

.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(201, 169, 97, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(74, 144, 217, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.dash-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.6), transparent);
}

.dash-hero-content { position: relative; z-index: 2; max-width: 720px; }

.dash-hero-date {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 169, 97, 0.9);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.dash-hero-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--text-inverse);
}

.dash-hero-name {
  background: linear-gradient(135deg, #DCC28A 0%, #C9A961 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.dash-hero-sub {
  font-size: 1rem;
  color: rgba(253, 252, 248, 0.72);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 560px;
}

.dash-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.dash-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  background: linear-gradient(135deg, #C9A961 0%, #DCC28A 100%);
  color: #0A1628;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 8px 24px -8px rgba(201, 169, 97, 0.5);
}

.dash-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(201, 169, 97, 0.6); }

.dash-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.dash-btn-secondary:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); }

.dash-hero-ornament {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.5;
}

.hero-arch {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: inset 0 0 60px rgba(201, 169, 97, 0.1);
}

.hero-cross { position: relative; width: 40px; height: 60px; }
.hero-cross-v { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 2px; height: 100%; background: linear-gradient(to bottom, rgba(201, 169, 97, 0.9), rgba(201, 169, 97, 0.3)); }
.hero-cross-h { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); width: 30px; height: 2px; background: linear-gradient(to right, transparent, rgba(201, 169, 97, 0.9), transparent); }

/* METRICS */
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.dash-metric {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-base);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dash-metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent, var(--azure-mid));
  opacity: 0.85;
}

.dash-metric.clickable { cursor: pointer; }
.dash-metric:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(10, 22, 40, 0.1); }

.dash-metric-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.dash-metric-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent, var(--azure-mid)) 12%, transparent); color: var(--accent, var(--azure-mid)); }
.dash-metric-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); font-weight: 600; }
.dash-metric-value { font-family: var(--font-heading); font-size: 2.25rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.5rem; }
.dash-metric-hint { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* SECTIONS */
.dash-section { margin-bottom: 2.5rem; }

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.dash-section-head h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.dash-section-sub { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 0.25rem; font-weight: 400; }

.dash-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.625rem;
  background: var(--azure-ghost);
  color: var(--azure-deep);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dash-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: var(--azure-dark);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.375rem 0;
  letter-spacing: 0.02em;
  transition: color var(--transition-base);
}

.dash-link:hover { color: var(--azure-mid); }

.dash-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.dash-col-main { min-width: 0; }
.dash-col-side { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 1.5rem; }

.dash-side-card {
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ---- Admin dashboard: appointment calendar side card ---- */
.admin-cal { margin-bottom: 1rem; }
.admin-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.admin-cal-nav span { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.01em; }
.admin-cal-nav button {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.12); border-radius: 7px;
  font: inherit; font-size: 1rem; line-height: 1; color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition-base);
}
.admin-cal-nav button:hover { background: rgba(74, 144, 217, 0.08); border-color: rgba(74, 144, 217, 0.45); color: var(--azure-dark); }
.admin-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.admin-cal-weekdays { margin-bottom: 4px; }
.admin-cal-weekdays span { text-align: center; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.admin-cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 36px; padding: 0; border: 1px solid transparent; border-radius: 8px;
  background: rgba(10, 22, 40, 0.04);
  font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--text-primary);
  cursor: pointer; transition: all var(--transition-base);
}
.admin-cal-cell.is-blank { background: transparent; cursor: default; pointer-events: none; }
.admin-cal-cell.has-appt { background: rgba(74, 144, 217, 0.14); color: var(--azure-deep); }
.admin-cal-cell:hover:not(.is-blank) { border-color: rgba(74, 144, 217, 0.55); }
.admin-cal-cell.is-today { outline: 2px solid #C9A961; outline-offset: -2px; }
.admin-cal-cell.is-selected { background: #1E4D8C; border-color: #1E4D8C; color: #fff; }
.admin-cal-num { line-height: 1; }
.admin-cal-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.8; }

/* Selected day's appointments */
.appt-panel { border-top: 1px solid rgba(10, 22, 40, 0.08); padding-top: 0.85rem; }
.appt-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.appt-panel-head strong { font-size: 0.82rem; color: var(--text-primary); }
.appt-panel-head span { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.appt-placeholder, .appt-empty { margin: 0; font-size: 0.78rem; color: var(--text-muted); }
.appt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; max-height: 300px; overflow-y: auto; }
.appt-item {
  display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 0.6rem;
  background: rgba(74, 144, 217, 0.05); border: 1px solid rgba(74, 144, 217, 0.16); border-radius: 8px;
}
.appt-time {
  flex-shrink: 0; font-size: 0.68rem; font-weight: 700; color: var(--azure-deep);
  background: var(--paper); border: 1px solid rgba(74, 144, 217, 0.3); border-radius: 5px;
  padding: 0.15rem 0.35rem; white-space: nowrap;
}
.appt-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.appt-body strong { font-size: 0.78rem; color: var(--text-primary); overflow-wrap: anywhere; }
.appt-meta { font-size: 0.7rem; color: var(--text-tertiary); overflow-wrap: anywhere; }

/* STATUS PILLS */
.dash-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.dash-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-status-pending { background: rgba(217, 119, 6, 0.1); color: #B45309; }
.dash-status-processing { background: rgba(139, 92, 246, 0.1); color: #6D28D9; }
.dash-status-ready { background: rgba(22, 163, 74, 0.1); color: #15803D; }
.dash-status-completed { background: rgba(10, 22, 40, 0.08); color: #3A4A5E; }
.dash-status-rejected { background: rgba(220, 38, 38, 0.1); color: #B91C1C; }
.dash-status-cancelled { background: rgba(100, 116, 139, 0.12); color: #64748B; }

/* TRACKER */
.tracker { background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.tracker-header { margin-bottom: 1.75rem; }
.tracker-title { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.015em; }
.tracker-sub { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 0.25rem; }
.tracker-steps { display: flex; justify-content: space-between; position: relative; margin-bottom: 1.75rem; }
.tracker-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.625rem; }
.tracker-step-marker { width: 32px; height: 32px; border-radius: 50%; background: rgba(10, 22, 40, 0.06); border: 2px solid transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; transition: all var(--transition-base); position: relative; z-index: 2; }
.tracker-step.done .tracker-step-marker { background: var(--gradient-azure); color: white; border-color: var(--azure-mid); box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12); }
.tracker-step.active .tracker-step-marker { box-shadow: 0 0 0 6px rgba(74, 144, 217, 0.18); }
.tracker-step-label { font-size: 0.7rem; color: var(--text-tertiary); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; }
.tracker-step.done .tracker-step-label { color: var(--azure-dark); }
.tracker-step-line { position: absolute; top: 16px; left: 50%; right: -50%; height: 2px; background: rgba(10, 22, 40, 0.08); z-index: 1; }
.tracker-step.done .tracker-step-line { background: var(--azure-mid); }
.tracker-rejected { display: flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.125rem; background: rgba(220, 38, 38, 0.06); border: 1px solid rgba(220, 38, 38, 0.15); color: #B91C1C; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; margin-bottom: 1.5rem; }
/* Rejection reason block (user-side Track panel) */
.tracker-reason { margin-bottom: 1.5rem; padding: 0.875rem 1.125rem; background: rgba(220, 38, 38, 0.04); border: 1px solid rgba(220, 38, 38, 0.15); border-left: 3px solid #B91C1C; border-radius: var(--radius-md); }
.tracker-rejected + .tracker-reason { margin-top: -0.75rem; }
.tracker-steps + .tracker-reason { margin-top: 1.25rem; }
.tracker-reason-previous { background: rgba(10, 22, 40, 0.03); border-color: rgba(10, 22, 40, 0.1); border-left-color: var(--text-tertiary); }
.tracker-reason-title { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: #B91C1C; margin-bottom: 0.375rem; }
.tracker-reason-previous .tracker-reason-title { color: var(--text-muted); }
.tracker-reason-text { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Re-upload receipt form (rejected GCash requests) */
.req-resend-form { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; padding: 1rem 1.125rem; background: rgba(74, 144, 217, 0.05); border: 1px solid rgba(74, 144, 217, 0.22); border-radius: var(--radius-md); }
.req-resend-form .tracker-reason-title { color: var(--azure-dark); }
.req-resend-input { font-size: 0.85rem; color: var(--text-secondary); }
.req-resend-input::file-selector-button { font: inherit; font-size: 0.8rem; font-weight: 600; margin-right: 0.75rem; padding: 0.4rem 0.75rem; color: var(--text-primary); background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.15); border-radius: 6px; cursor: pointer; }
.req-resend-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.9rem; background: #1E4D8C; color: #fff; border: none; border-radius: 6px; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: background var(--transition-base); }
.req-resend-btn:hover { background: #163a68; }
.req-resend-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.req-reject-inline { margin-top: 0.2rem; color: #B91C1C; font-size: 0.75rem; font-weight: 500; }
.tracker-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid rgba(10, 22, 40, 0.06); }
.tracker-meta-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; margin-bottom: 0.25rem; }
.tracker-meta-value { display: block; font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }

/* LISTS */
.dash-list { display: flex; flex-direction: column; background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.dash-list-item { display: flex; align-items: center; gap: 1rem; padding: 1.125rem 1.375rem; border-bottom: 1px solid rgba(10, 22, 40, 0.05); transition: background var(--transition-base); }
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item:hover { background: rgba(74, 144, 217, 0.03); }
.dash-list-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-list-body { flex: 1; min-width: 0; }
.dash-list-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.125rem; letter-spacing: -0.005em; }
.dash-list-meta { font-size: 0.78rem; color: var(--text-tertiary); font-weight: 400; }
.dash-list-meta.dash-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-list-end { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.dash-list-end time { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.dash-icon-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid rgba(10, 22, 40, 0.08); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: all var(--transition-base); }
.dash-icon-btn:hover { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.2); color: #B91C1C; }

/* DOWNLOAD BUTTON */
.dash-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #1E4D8C 0%, #3B82C4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 220ms var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(30, 77, 140, 0.25);
  flex-shrink: 0;
  white-space: nowrap;
}
.dash-download-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 77, 140, 0.4); }
.dash-download-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

.dash-list-item.dash-list-item-approved {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.04), transparent 60%);
  border-left: 3px solid #15803D;
  padding-left: calc(1.375rem - 3px);
}
.dash-list-item.dash-list-item-approved:hover {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.07), rgba(74, 144, 217, 0.03) 60%);
}

/* ANNOUNCEMENTS */
.dash-announce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.dash-announce-card { position: relative; background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-lg); padding: 1.5rem 1.375rem 1.25rem; transition: all var(--transition-base); box-shadow: var(--shadow-sm); }
.dash-announce-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(201, 169, 97, 0.25); }
.dash-announce-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-sm); background: rgba(201, 169, 97, 0.12); color: #8B7340; margin-bottom: 0.875rem; }
.dash-announce-card h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: -0.015em; line-height: 1.35; }
.dash-announce-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.875rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dash-announce-card time { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
/* Announcement cards open a read-only modal */
.dash-announce-card[data-aid] { cursor: pointer; }
.dash-announce-card[data-aid]:focus-visible { outline: 2px solid rgba(59, 130, 196, 0.55); outline-offset: 3px; }
.dash-announce-card[data-aid]:hover .dash-announce-icon { background: rgba(201, 169, 97, 0.22); }

/* Announcement modal */
.confirm-modal.announce-modal { max-width: 520px; text-align: left; }
.announce-modal-head { text-align: center; margin-bottom: 1.25rem; flex-shrink: 0; }
.announce-modal-badge { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(201, 169, 97, 0.14); color: #8B7340; margin-bottom: 0.75rem; }
.announce-modal .confirm-eyebrow { margin-bottom: 0.375rem; }
.announce-modal .confirm-title { margin-bottom: 0.375rem; }
.announce-modal-date { margin: 0; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.announce-modal-body { font-size: 0.925rem; color: var(--text-secondary); line-height: 1.75; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

/* EVENTS */
.dash-event-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.dash-event-item { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem; border-radius: var(--radius-md); transition: background var(--transition-base); }
.dash-event-item:hover { background: rgba(74, 144, 217, 0.04); }
.dash-event-date { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-md); background: linear-gradient(135deg, rgba(30, 77, 140, 0.08), rgba(59, 130, 196, 0.08)); border: 1px solid rgba(74, 144, 217, 0.15); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.dash-event-day { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; color: var(--azure-deep); }
.dash-event-month { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--azure-dark); font-weight: 600; margin-top: 2px; }
.dash-event-body { flex: 1; min-width: 0; }
.dash-event-body strong { display: block; font-size: 0.875rem; color: var(--text-primary); font-weight: 600; margin-bottom: 0.125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-event-body span { font-size: 0.75rem; color: var(--text-tertiary); }

/* NOTIFICATIONS */
.dash-notif-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.dash-notif-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(10, 22, 40, 0.05); }
.dash-notif-item:last-child { border-bottom: none; }
.dash-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--azure-mid); flex-shrink: 0; margin-top: 6px; box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15); }
.dash-notif-item p { font-size: 0.85rem; color: var(--text-primary); line-height: 1.5; margin-bottom: 0.25rem; font-weight: 400; }
.dash-notif-item time { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

/* HELP CARD */
.dash-help-card { background: linear-gradient(135deg, rgba(30, 77, 140, 0.04), rgba(201, 169, 97, 0.06)); border-color: rgba(201, 169, 97, 0.2); }
.dash-help-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--gradient-gold); color: #0A1628; margin-bottom: 1rem; box-shadow: 0 6px 16px -6px rgba(201, 169, 97, 0.5); }
.dash-help-card h3 { font-family: var(--font-heading); font-size: 1rem; color: var(--text-primary); margin-bottom: 0.5rem; font-weight: 700; letter-spacing: -0.01em; }
.dash-help-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* QUICK ACTIONS */
.dash-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.dash-action-card { display: flex; align-items: center; gap: 1rem; padding: 1.125rem 1.25rem; background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-lg); cursor: pointer; transition: all var(--transition-base); text-align: left; font-family: var(--font-sans); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.dash-action-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--azure-mid)); opacity: 0; transition: opacity var(--transition-base); }
.dash-action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(74, 144, 217, 0.2); }
.dash-action-card:hover::before { opacity: 1; }
.dash-action-icon { width: 42px; height: 42px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent, var(--azure-mid)) 12%, transparent); color: var(--accent, var(--azure-mid)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-action-body { flex: 1; min-width: 0; }
.dash-action-body strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.125rem; letter-spacing: -0.005em; }
.dash-action-body span { display: block; font-size: 0.78rem; color: var(--text-tertiary); line-height: 1.4; }
.dash-action-arrow { color: var(--text-muted); transition: all var(--transition-base); flex-shrink: 0; }
.dash-action-card:hover .dash-action-arrow { color: var(--accent, var(--azure-mid)); transform: translateX(3px); }

/* TABLE */
.dash-table-wrap { background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.06); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.dash-table thead { background: var(--ivory-warm); }
.dash-table th { text-align: left; padding: 0.875rem 1.25rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-tertiary); font-weight: 600; border-bottom: 1px solid rgba(10, 22, 40, 0.06); }
.dash-table td { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(10, 22, 40, 0.04); color: var(--text-primary); font-weight: 400; }
.dash-table tbody tr { cursor: pointer; transition: background var(--transition-base); }
.dash-table tbody tr:hover { background: rgba(74, 144, 217, 0.04); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table-id { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.8rem; color: var(--azure-dark); font-weight: 600; }
.dash-table-date { color: var(--text-tertiary); font-size: 0.8rem; }

/* BREAKDOWN */
.dash-breakdown { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.dash-breakdown-row { display: flex; flex-direction: column; gap: 0.5rem; }
.dash-breakdown-head { display: flex; justify-content: space-between; align-items: center; }
.dash-breakdown-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.dash-breakdown-dot { width: 8px; height: 8px; border-radius: 50%; }
.dash-breakdown-value { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.dash-breakdown-track { width: 100%; height: 6px; background: rgba(10, 22, 40, 0.05); border-radius: 3px; overflow: hidden; }
.dash-breakdown-fill { height: 100%; border-radius: 3px; transition: width 0.6s var(--ease-out); opacity: 0.85; }

/* EMPTY STATE */
.dash-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.5rem 1.5rem; background: var(--paper); border: 1px dashed rgba(10, 22, 40, 0.12); border-radius: var(--radius-lg); }
.dash-empty.compact { padding: 1.5rem 1rem; }
.dash-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(74, 144, 217, 0.08); color: var(--azure-mid); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.dash-empty.compact .dash-empty-icon { width: 42px; height: 42px; margin-bottom: 0.75rem; }
.dash-empty h3 { font-family: var(--font-heading); font-size: 1rem; color: var(--text-primary); font-weight: 700; margin-bottom: 0.375rem; letter-spacing: -0.01em; }
.dash-empty.compact h3 { font-size: 0.9rem; }
.dash-empty p { font-size: 0.85rem; color: var(--text-tertiary); max-width: 320px; line-height: 1.5; margin-bottom: 1rem; }
.dash-empty.compact p { font-size: 0.8rem; margin-bottom: 0; }

/* ============================================
   REQUEST PAGE
   ============================================ */
.request-page { max-width: 1400px; margin: 0 auto; }
.request-page h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--text-primary); margin-bottom: 2rem; font-weight: 700; letter-spacing: -0.025em; }
.request-page-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.request-form { background: var(--paper); padding: 2.5rem; border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); box-shadow: var(--shadow-sm); max-width: 760px; margin: 0 auto; }
.form-section { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(10, 22, 40, 0.06); }
.form-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.form-section h3 { font-family: var(--font-heading); color: var(--text-primary); font-size: 1.15rem; margin-bottom: 0.5rem; font-weight: 700; letter-spacing: -0.015em; }
.form-section > p { color: var(--text-tertiary); font-size: 0.9rem; margin-bottom: 1.75rem; font-weight: 400; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  background: var(--paper);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
}

.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--azure-mid); box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12); }
.form-group input[type="file"] { padding: 0.5rem; background: var(--ivory-warm); cursor: pointer; }
.form-group small { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.375rem; font-weight: 400; }

/* ---- Appointment date picker (Wed–Sun only) ---- */
.appointment-date-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
}
.appointment-date-btn:hover { border-color: var(--azure-mid); }
.appointment-date-btn:focus { outline: none; border-color: var(--azure-mid); box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12); }
.appointment-date-btn.is-placeholder { color: var(--text-muted); }

.appointment-calendar {
  position: absolute;
  z-index: 60;
  top: calc(100% - 4px);
  left: 0;
  min-width: 282px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 34px rgba(10, 22, 40, 0.18);
}
.appointment-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.appointment-calendar-head button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(10, 22, 40, 0.12);
  background: var(--ivory-warm, #f5f0e6);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-primary);
}
.appointment-calendar-head button:disabled { opacity: 0.35; cursor: not-allowed; }
.appointment-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
#calendar-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  padding: 4px 0;
  text-transform: uppercase;
}
#calendar-days button,
#calendar-days .calendar-blank {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
#calendar-days button { cursor: pointer; }
#calendar-days button:hover:not(:disabled) { background: rgba(74, 144, 217, 0.12); }
#calendar-days button:disabled { color: rgba(10, 22, 40, 0.28); cursor: not-allowed; text-decoration: line-through; }
#calendar-days button.is-selected { background: #1E4D8C; color: #fff; font-weight: 700; }
#calendar-days button.is-today { box-shadow: inset 0 0 0 1.5px rgba(74, 144, 217, 0.65); }
#calendar-days .calendar-blank { visibility: hidden; }
@media (max-width: 520px) { .appointment-calendar { min-width: 0; width: 100%; } }

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  background: var(--paper);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  resize: vertical;
  line-height: 1.55;
  min-height: 84px;
}
.form-textarea:focus { outline: none; border-color: var(--azure-mid); box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12); }
.form-textarea::placeholder { color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.radio-group { display: flex; gap: 1.5rem; padding: 0.5rem 0; }
.radio-group label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text-primary); font-weight: 400; font-size: 0.9rem; }
.radio-group input[type="radio"] { accent-color: var(--azure-mid); width: 18px; height: 18px; cursor: pointer; }

.gcash-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--ivory-warm, #faf7f0);
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-md);
}
.gcash-qr-frame {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.gcash-qr-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  transition: width 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.gcash-qr-zoom {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.gcash-qr-zoom-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.18);
  border-radius: var(--radius-sm);
  color: var(--text-primary, #0A1628);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gcash-qr-zoom-btn:hover { background: rgba(59, 130, 196, 0.08); border-color: rgba(59, 130, 196, 0.4); }
.gcash-qr-zoom-btn-wide { font-size: 0.78rem; font-weight: 600; padding: 0 0.6rem; }
.gcash-qr-zoom-range { width: 110px; accent-color: var(--azure-mid, #3B82C4); cursor: pointer; }
.gcash-qr-hint {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 260px;
}

/* ---- Full-screen QR lightbox ---- */
.qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-lightbox[hidden] { display: none; }
.qr-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.78);
  backdrop-filter: blur(2px);
}
.qr-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 92vw;
  max-height: 92vh;
  padding: 1.5rem;
  background: var(--paper, #fff);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(10, 22, 40, 0.35);
}
.qr-lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.06);
  border: none;
  border-radius: 50%;
  color: var(--text-primary, #0A1628);
  font-size: 1rem;
  cursor: pointer;
}
.qr-lightbox-close:hover { background: rgba(10, 22, 40, 0.12); }
.qr-lightbox-img {
  width: 70vmin;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  image-rendering: pixelated;
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  touch-action: none;
  transition: width 0.1s ease;
}
.qr-lightbox-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.qr-lightbox-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--gradient-azure);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 1rem;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(30, 77, 140, 0.3);
}
.submit-btn:hover { background: var(--gradient-azure-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30, 77, 140, 0.4); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.request-sidebar { background: var(--paper); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); height: fit-content; position: sticky; top: 2rem; box-shadow: var(--shadow-sm); }
.request-sidebar h3 { font-family: var(--font-heading); color: var(--text-primary); margin-bottom: 1rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em; }
.request-sidebar p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; margin-bottom: 1.25rem; font-weight: 400; }
.request-sidebar ul { list-style: none; padding: 0; }
.request-sidebar ul li { padding: 0.75rem 0; border-bottom: 1px solid rgba(10, 22, 40, 0.05); color: var(--text-primary); font-size: 0.875rem; font-weight: 400; display: flex; align-items: flex-start; gap: 0.5rem; }
.request-sidebar ul li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 0.5rem; }
.request-sidebar ul li:last-child { border-bottom: none; }
.request-sidebar ul li strong { color: var(--text-primary); font-weight: 600; }

.request-sidebar-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #1E4D8C 0%, #3B82C4 100%);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(30, 77, 140, 0.25);
}

.request-sidebar ul li.with-check { padding-left: 1.5rem; position: relative; }
.request-sidebar ul li.with-check::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0.5rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  color: #15803D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

/* ============================================
   REVIEW REQUESTS
   ============================================ */
.review-page { max-width: 1400px; margin: 0 auto; }
.review-page h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--text-primary); margin-bottom: 1.5rem; font-weight: 700; letter-spacing: -0.025em; }
.status-message { background: var(--azure-ghost); color: var(--azure-deep); padding: 0.875rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; border: 1px solid rgba(74, 144, 217, 0.2); font-weight: 500; font-size: 0.875rem; }
.requests-table { overflow-x: auto; background: var(--paper); border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); box-shadow: var(--shadow-sm); }
.requests-table table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.requests-table th { text-align: left; padding: 1rem 1.25rem; color: var(--text-tertiary); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid rgba(10, 22, 40, 0.08); white-space: nowrap; background: var(--ivory-warm); }
.requests-table td { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(10, 22, 40, 0.05); color: var(--text-primary); vertical-align: middle; font-weight: 400; }
.requests-table tr:hover td { background: rgba(74, 144, 217, 0.03); }
.requests-table tr:last-child td { border-bottom: none; }

.status-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; text-transform: capitalize; letter-spacing: 0.03em; }
.status-pending { background: rgba(74, 144, 217, 0.15); color: var(--azure-deep); }
.status-processing { background: rgba(139, 92, 246, 0.12); color: #6D28D9; }
.status-ready { background: rgba(22, 163, 74, 0.12); color: #15803D; }
.status-completed { background: rgba(10, 22, 40, 0.08); color: var(--text-secondary); }
.status-rejected { background: rgba(220, 38, 38, 0.1); color: #B91C1C; }
.status-cancelled { background: rgba(100, 116, 139, 0.14); color: #64748B; }
.verified { color: #15803D; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.03em; }
.unverified { color: #B91C1C; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.03em; }

.status-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(10, 22, 40, 0.08); }
.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-full);
  background: var(--paper);
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all var(--transition-base);
}
.status-tab:hover { border-color: rgba(74, 144, 217, 0.4); background: rgba(74, 144, 217, 0.05); color: var(--azure-dark); }
.status-tab.active {
  background: var(--gradient-azure);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 77, 140, 0.25);
}
.status-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: var(--radius-full);
  background: rgba(10, 22, 40, 0.06);
  font-size: 0.65rem;
  font-weight: 700;
  color: inherit;
}
.status-tab.active .status-tab-count { background: rgba(255, 255, 255, 0.25); }

.request-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.request-actions button { padding: 0.4rem 0.875rem; border: none; border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; transition: all var(--transition-base); font-weight: 600; letter-spacing: 0.02em; }
.request-actions button:first-child { background: var(--azure-mid); color: white; }
.request-actions button:first-child:hover { background: var(--azure-dark); }
.request-actions button:last-child { background: rgba(10, 22, 40, 0.06); color: var(--text-primary); }
.request-actions button:last-child:hover { background: rgba(10, 22, 40, 0.12); }
.request-actions select { padding: 0.4rem 0.625rem; border: 1.5px solid rgba(10, 22, 40, 0.1); border-radius: var(--radius-sm); font-size: 0.75rem; background: var(--paper); color: var(--text-primary); font-weight: 500; cursor: pointer; }

.link-button { background: none; border: none; color: var(--azure-dark); text-decoration: underline; cursor: pointer; font-size: 0.8rem; font-weight: 500; padding: 0; }
.link-button:hover { color: var(--azure-mid); }

/* ============================================
   PREVIEW MODAL
   ============================================ */
.preview-overlay { position: fixed; inset: 0; background: rgba(10, 22, 40, 0.75); display: flex; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(8px); padding: 1.5rem; }
.preview-card { background: var(--paper); padding: 2rem; border-radius: var(--radius-xl); max-width: 90%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-xl); border: 1px solid rgba(201, 169, 97, 0.2); }
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(10, 22, 40, 0.06); }
.preview-header strong { font-family: var(--font-heading); font-size: 1.1rem; color: var(--text-primary); font-weight: 700; letter-spacing: -0.01em; }
.close-modal-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-tertiary); transition: color var(--transition-base); line-height: 1; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.close-modal-btn:hover { color: #B91C1C; background: rgba(220, 38, 38, 0.06); }
.preview-image { max-width: 100%; max-height: 70vh; border-radius: var(--radius-md); }
.preview-file { padding: 2rem; text-align: center; color: var(--text-tertiary); }

/* ---- File Receipt: inline thumbnail in the review table ---- */
.receipt-thumb-btn { display: block; padding: 0; border: none; background: none; cursor: pointer; line-height: 0; }
.receipt-thumb { width: 68px; height: 68px; object-fit: cover; border: 1px solid rgba(10, 22, 40, 0.15); border-radius: var(--radius-sm); background: var(--paper); transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base); }
.receipt-thumb-btn:hover .receipt-thumb { transform: scale(1.06); border-color: var(--azure-mid); box-shadow: var(--shadow-md); }
.receipt-thumb-name { display: block; max-width: 84px; margin-top: 4px; font-size: 0.68rem; line-height: 1.25; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }

/* ---- Receipt viewer lightbox (maximize / minimize) ---- */
/* ---- OCR verification checks (duplicate ref + amount vs fee) ---- */
.ocr-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.ocr-check-icon { flex-shrink: 0; font-weight: 800; line-height: 1.4; }
.ocr-check[data-state="pending"] { background: #EBF4FC; border-color: #D4E8FA; color: #6B7A8F; }
.ocr-check[data-state="ok"] { background: rgba(46, 204, 113, 0.1); border-color: rgba(39, 174, 96, 0.4); color: #1E7A44; }
.ocr-check[data-state="warn"] { background: rgba(230, 126, 34, 0.1); border-color: rgba(217, 119, 6, 0.4); color: #8A5300; }
.ocr-check[data-state="error"] { background: rgba(139, 26, 26, 0.08); border-color: rgba(139, 26, 26, 0.4); color: #8B1A1A; }
#ocr-verify-form button[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; }

.receipt-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.receipt-lightbox[hidden] { display: none; }
.receipt-lightbox-backdrop { position: absolute; inset: 0; background: rgba(10, 22, 40, 0.82); backdrop-filter: blur(8px); }
.receipt-lightbox-panel { position: relative; z-index: 1; width: 100%; max-width: 940px; max-height: 92vh; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-xl); border: 1px solid rgba(201, 169, 97, 0.2); }
.receipt-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(10, 22, 40, 0.08); }
.receipt-lightbox-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.receipt-lightbox-controls { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.receipt-zoom-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 0.55rem; background: var(--ivory-warm); border: 1px solid rgba(10, 22, 40, 0.15); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 1rem; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none; transition: background var(--transition-base), border-color var(--transition-base); }
.receipt-zoom-btn:hover { background: #EBF4FC; border-color: var(--azure-mid); }
.receipt-zoom-btn-wide { font-size: 0.78rem; }
.receipt-zoom-range { width: 120px; accent-color: var(--azure-mid); cursor: pointer; }
.receipt-zoom-close:hover { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.4); color: #B91C1C; }
.receipt-lightbox-stage { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 1rem; background: #F3F1EC; }
.receipt-lightbox-img { max-width: 100%; max-height: 66vh; width: auto; height: auto; object-fit: contain; background: #fff; border: 1px solid rgba(10, 22, 40, 0.12); border-radius: var(--radius-md); padding: 0.5rem; touch-action: none; user-select: none; -webkit-user-drag: none; transition: width 0.1s ease; }
.receipt-lightbox-hint { margin: 0; padding: 0.55rem 1rem; font-size: 0.74rem; color: var(--text-tertiary); text-align: center; border-top: 1px solid rgba(10, 22, 40, 0.06); }

.preview-details { padding: 0.5rem 0.25rem; min-width: 380px; max-width: 520px; }
.preview-details-sub { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 1.25rem; font-weight: 500; }
.preview-details-list { display: flex; flex-direction: column; gap: 0; }
.preview-details-row { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(10, 22, 40, 0.05); }
.preview-details-row:last-child { border-bottom: none; }
.preview-details-row dt { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); align-self: start; padding-top: 2px; }
.preview-details-row dd { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; margin: 0; word-break: break-word; line-height: 1.55; white-space: pre-wrap; }

/* ============================================
   POST ANNOUNCEMENTS
   ============================================ */
.post-page { max-width: 900px; margin: 0 auto; }
.post-page h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--text-primary); margin-bottom: 2rem; font-weight: 700; letter-spacing: -0.025em; }
.tabs { display: flex; gap: 0.25rem; margin-bottom: 2rem; background: rgba(10, 22, 40, 0.04); padding: 0.35rem; border-radius: var(--radius-md); width: fit-content; }
.tabs button { padding: 0.625rem 1.5rem; border: none; border-radius: var(--radius-sm); font-size: 0.875rem; cursor: pointer; transition: all var(--transition-base); background: transparent; color: var(--text-tertiary); font-weight: 500; letter-spacing: 0.01em; }
.tabs button:hover { color: var(--text-primary); }
.tabs button.active { background: var(--paper); color: var(--text-primary); box-shadow: var(--shadow-sm); font-weight: 600; }
.post-form { background: var(--paper); padding: 2.5rem; border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); box-shadow: var(--shadow-sm); }
.post-form .form-group { margin-bottom: 1.5rem; }
.post-form label { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.post-form input, .post-form textarea { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid rgba(10, 22, 40, 0.12); border-radius: var(--radius-md); font-size: 0.95rem; transition: all var(--transition-base); background: var(--paper); color: var(--text-primary); font-family: var(--font-sans); font-weight: 400; }
.post-form input:focus, .post-form textarea:focus { outline: none; border-color: var(--azure-mid); box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12); }
.post-form textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.post-form button { padding: 0.875rem 2rem; background: var(--gradient-azure); color: white; border: none; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition-base); letter-spacing: 0.02em; box-shadow: 0 4px 14px rgba(30, 77, 140, 0.3); }
.post-form button:hover { background: var(--gradient-azure-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30, 77, 140, 0.4); }

/* ============================================
   REPORTS
   ============================================ */
.reports-page { max-width: 1400px; margin: 0 auto; }
.reports-page h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--text-primary); margin-bottom: 1.5rem; font-weight: 700; letter-spacing: -0.025em; }
.report-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; background: var(--paper); padding: 1.25rem; border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); margin-bottom: 1.5rem; align-items: center; box-shadow: var(--shadow-sm); }
.report-filters select, .report-filters input { padding: 0.6rem 0.875rem; border: 1.5px solid rgba(10, 22, 40, 0.1); border-radius: var(--radius-md); font-size: 0.85rem; background: var(--paper); color: var(--text-primary); min-width: 150px; font-weight: 400; }
.report-filters select:focus, .report-filters input:focus { outline: none; border-color: var(--azure-mid); box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1); }
.report-filters button { padding: 0.6rem 1.25rem; background: var(--gradient-azure); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: all var(--transition-base); font-size: 0.85rem; letter-spacing: 0.02em; }
.report-filters button:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(30, 77, 140, 0.3); }
.report-summary { background: var(--ivory-warm); padding: 1rem 1.5rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; color: var(--text-primary); font-weight: 500; font-size: 0.9rem; border: 1px solid rgba(10, 22, 40, 0.06); }
.report-table { width: 100%; background: var(--paper); border-radius: var(--radius-lg); border: 1px solid rgba(10, 22, 40, 0.06); border-collapse: collapse; overflow: hidden; box-shadow: var(--shadow-sm); }
.report-table th { text-align: left; padding: 1rem 1.25rem; background: var(--ivory-warm); color: var(--text-tertiary); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid rgba(10, 22, 40, 0.08); }
.report-table td { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(10, 22, 40, 0.05); color: var(--text-primary); font-size: 0.875rem; }
.report-table tr:hover td { background: rgba(74, 144, 217, 0.03); }
/* ============================================
   CHURCH BACKGROUND — CATHEDRAL NIGHT
   ============================================ */
.church-background { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; background: var(--gradient-cathedral); }
.bg-base-gradient { position: absolute; inset: 0; background: radial-gradient(ellipse 100% 60% at 50% -10%, rgba(201, 169, 97, 0.25) 0%, transparent 55%), radial-gradient(ellipse 80% 50% at 50% 110%, rgba(59, 130, 196, 0.15) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 15% 50%, rgba(74, 144, 217, 0.08) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 85% 50%, rgba(201, 169, 97, 0.06) 0%, transparent 60%); }
.cathedral-vault { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 1400px; height: 45vh; opacity: 0.5; }
.vault-arch { position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 1px solid rgba(201, 169, 97, 0.15); border-bottom: none; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: transparent; }
.vault-arch-1 { width: 30%; height: 55%; }
.vault-arch-2 { width: 45%; height: 75%; opacity: 0.7; }
.vault-arch-3 { width: 60%; height: 90%; opacity: 0.5; }
.vault-arch-4 { width: 75%; height: 100%; opacity: 0.3; }

.rose-window { position: absolute; top: 6%; left: 50%; transform: translateX(-50%); width: 240px; height: 240px; border-radius: 50%; opacity: 0.7; display: flex; align-items: center; justify-content: center; z-index: 2; }
.rose-window::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(201, 169, 97, 0.4); box-shadow: 0 0 60px rgba(201, 169, 97, 0.2), 0 0 120px rgba(201, 169, 97, 0.1), inset 0 0 80px rgba(201, 169, 97, 0.05); }
.rose-window::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 1px solid rgba(201, 169, 97, 0.3); }
.rose-center { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle, #DCC28A 0%, #C9A961 60%, #8B7340 100%); box-shadow: 0 0 24px rgba(201, 169, 97, 0.5); z-index: 3; }
.rose-petal { position: absolute; top: 50%; left: 50%; width: 34px; height: 92px; border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%; transform-origin: 0% 0%; opacity: 0.55; filter: blur(0.5px); }
.petal-1 { background: linear-gradient(180deg, #3B82C4, #1E4D8C); transform: rotate(0deg) translate(-50%, -100%); }
.petal-2 { background: linear-gradient(180deg, #C9A961, #8B7340); transform: rotate(45deg) translate(-50%, -100%); }
.petal-3 { background: linear-gradient(180deg, #5BA3E8, #2563A8); transform: rotate(90deg) translate(-50%, -100%); }
.petal-4 { background: linear-gradient(180deg, #8B7340, #C9A961); transform: rotate(135deg) translate(-50%, -100%); }
.petal-5 { background: linear-gradient(180deg, #2563A8, #3B82C4); transform: rotate(180deg) translate(-50%, -100%); }
.petal-6 { background: linear-gradient(180deg, #DCC28A, #C9A961); transform: rotate(225deg) translate(-50%, -100%); }
.petal-7 { background: linear-gradient(180deg, #4A90D9, #1E4D8C); transform: rotate(270deg) translate(-50%, -100%); }
.petal-8 { background: linear-gradient(180deg, #A88B47, #DCC28A); transform: rotate(315deg) translate(-50%, -100%); }

.stained-glass { position: absolute; top: 50%; transform: translateY(-50%); width: 200px; height: 340px; opacity: 0.65; filter: blur(0.3px); }
.stained-glass-left { left: 3%; }
.stained-glass-right { right: 3%; }
.glass-arch { width: 100%; height: 100%; border-radius: 100px 100px 16px 16px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 2px; border: 1px solid rgba(201, 169, 97, 0.3); box-shadow: 0 0 60px rgba(74, 144, 217, 0.15), 0 0 120px rgba(74, 144, 217, 0.08), inset 0 0 40px rgba(0, 0, 0, 0.3); padding: 3px; background: rgba(10, 22, 40, 0.4); }
.glass-pane { opacity: 0.85; border-radius: 2px; transition: opacity 0.5s ease; }
.pane-1 { background: linear-gradient(135deg, #3B82C4, #1E4D8C); }
.pane-2 { background: linear-gradient(135deg, #C9A961, #8B7340); }
.pane-3 { background: linear-gradient(135deg, #4A90D9, #2563A8); }
.pane-4 { background: linear-gradient(135deg, #1E4D8C, #0F2542); }
.pane-5 { background: linear-gradient(135deg, #5BA3E8, #3B82C4); }
.pane-6 { background: linear-gradient(135deg, #DCC28A, #A88B47); }

.light-rays { position: absolute; top: -15%; left: 50%; transform: translateX(-50%); width: 100%; height: 75%; z-index: 1; }
.ray { position: absolute; top: 0; left: 50%; width: 1px; height: 100%; background: linear-gradient(to bottom, rgba(201, 169, 97, 0.25) 0%, rgba(201, 169, 97, 0.08) 40%, transparent 100%); transform-origin: top center; border-radius: 50%; filter: blur(0.5px); }
.ray-1 { transform: rotate(-32deg); }
.ray-2 { transform: rotate(-20deg); animation: shimmer 8s ease-in-out infinite; }
.ray-3 { transform: rotate(-10deg); }
.ray-4 { transform: rotate(0deg); width: 2px; opacity: 0.9; animation: shimmer 6s ease-in-out infinite; }
.ray-5 { transform: rotate(10deg); }
.ray-6 { transform: rotate(20deg); animation: shimmer 8s ease-in-out infinite 2s; }
.ray-7 { transform: rotate(32deg); }

@keyframes shimmer { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.dove { position: absolute; color: rgba(201, 169, 97, 0.12); animation: floatDove 18s ease-in-out infinite; filter: blur(0.5px); }
.dove svg { width: 100%; height: 100%; display: block; }
.dove-1 { top: 22%; right: 12%; width: 120px; height: 72px; }
.dove-2 { top: 62%; left: 10%; width: 90px; height: 54px; animation-delay: -9s; animation-duration: 22s; color: rgba(74, 144, 217, 0.1); }

@keyframes floatDove {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-25px, -18px) rotate(-3deg); }
  50% { transform: translate(-10px, -30px) rotate(0deg); }
  75% { transform: translate(18px, -14px) rotate(3deg); }
}

.dot-pattern { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(201, 169, 97, 0.08) 1px, transparent 0); background-size: 40px 40px; opacity: 0.6; mix-blend-mode: overlay; }

.church-background::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 22, 40, 0.6) 100%); pointer-events: none; }

/* ============================================
   LAYER Z-INDEX MANAGEMENT
   ============================================ */
.main-content { position: relative; z-index: 1; }
.sidebar { z-index: 1000; }
.auth-form input,
.auth-form button,
.auth-form .password-toggle { position: relative; z-index: 2; }

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: confirmOverlayIn 220ms var(--ease-out);
}

@keyframes confirmOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.confirm-modal {
  position: relative;
  background: var(--paper);
  border-radius: 24px;
  padding: 3rem 2.5rem 2.25rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  overflow: hidden;
  /* Tall content scrolls inside the modal instead of spilling off-screen.
     `margin: auto` keeps it centred while still allowing the overlay to scroll. */
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  margin: auto;
  box-shadow: 0 40px 100px -30px rgba(10, 22, 40, 0.5), 0 10px 40px -15px rgba(10, 22, 40, 0.25), 0 0 0 1px rgba(10, 22, 40, 0.06);
  animation: confirmModalIn 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.confirm-arch { position: absolute; top: 0; left: 0; right: 0; height: 60px; overflow: hidden; pointer-events: none; opacity: 0.15; }
.confirm-arch svg { width: 100%; height: 100%; }
.confirm-danger .confirm-arch { color: #DC2626; }
.confirm-warning .confirm-arch { color: #D97706; }
.confirm-primary .confirm-arch { color: #3B82C4; }
.confirm-success .confirm-arch { color: #15803D; }

.confirm-modal::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 3px; border-radius: 0 0 3px 3px; z-index: 2; }
.confirm-danger::before { background: linear-gradient(90deg, transparent, #DC2626, transparent); box-shadow: 0 0 20px rgba(220, 38, 38, 0.4); }
.confirm-warning::before { background: linear-gradient(90deg, transparent, #D97706, transparent); box-shadow: 0 0 20px rgba(217, 119, 6, 0.4); }
.confirm-primary::before { background: linear-gradient(90deg, transparent, #3B82C4, transparent); box-shadow: 0 0 20px rgba(59, 130, 196, 0.4); }
.confirm-success::before { background: linear-gradient(90deg, transparent, #15803D, transparent); box-shadow: 0 0 20px rgba(22, 163, 74, 0.4); }

.confirm-icon-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center; }
.confirm-icon-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed; opacity: 0.3; animation: iconRingSpin 20s linear infinite; }
@keyframes iconRingSpin { to { transform: rotate(360deg); } }
.confirm-danger .confirm-icon-ring { border-color: #DC2626; }
.confirm-warning .confirm-icon-ring { border-color: #D97706; }
.confirm-primary .confirm-icon-ring { border-color: #3B82C4; }
.confirm-success .confirm-icon-ring { border-color: #15803D; }

.confirm-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; animation: iconPulse 3s ease-in-out infinite; }
@keyframes iconPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.confirm-danger .confirm-icon { background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0.06)); color: #DC2626; box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15) inset, 0 8px 24px -8px rgba(220, 38, 38, 0.3); }
.confirm-warning .confirm-icon { background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.06)); color: #D97706; box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15) inset, 0 8px 24px -8px rgba(217, 119, 6, 0.3); }
.confirm-primary .confirm-icon { background: linear-gradient(135deg, rgba(59, 130, 196, 0.14), rgba(59, 130, 196, 0.06)); color: #3B82C4; box-shadow: 0 0 0 1px rgba(59, 130, 196, 0.15) inset, 0 8px 24px -8px rgba(59, 130, 196, 0.3); }
.confirm-success .confirm-icon { background: linear-gradient(135deg, rgba(22, 163, 74, 0.14), rgba(22, 163, 74, 0.06)); color: #15803D; box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15) inset, 0 8px 24px -8px rgba(22, 163, 74, 0.3); }

.confirm-icon-svg { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.confirm-icon-svg svg { width: 100%; height: 100%; }

.confirm-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.625rem; }
.confirm-danger .confirm-eyebrow { color: #DC2626; }
.confirm-warning .confirm-eyebrow { color: #D97706; }
.confirm-primary .confirm-eyebrow { color: #3B82C4; }
.confirm-success .confirm-eyebrow { color: #15803D; }

.confirm-title { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 0.625rem; }
.confirm-message { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; max-width: 340px; margin: 0 auto 1.75rem; }

.confirm-divider { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.75rem; opacity: 0.5; }
.confirm-divider-line { height: 1px; width: 60px; background: linear-gradient(90deg, transparent, rgba(10, 22, 40, 0.2), transparent); }
.confirm-divider-diamond { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; box-shadow: 0 0 8px rgba(201, 169, 97, 0.6); }

.confirm-actions { display: flex; gap: 0.75rem; justify-content: center; }
.confirm-btn { flex: 1; max-width: 190px; padding: 0.8rem 1.5rem; border-radius: 10px; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; transition: all 220ms var(--ease-smooth); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; position: relative; overflow: hidden; }
.confirm-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

.confirm-cancel { background: var(--paper); color: var(--text-secondary); border-color: rgba(10, 22, 40, 0.12); box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04); }
.confirm-cancel:hover:not(:disabled) { background: var(--ivory-warm); border-color: rgba(10, 22, 40, 0.2); color: var(--text-primary); }

.confirm-btn.confirm-danger { background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); color: white; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }
.confirm-btn.confirm-danger:hover:not(:disabled) { background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(220, 38, 38, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }

.confirm-btn.confirm-warning { background: linear-gradient(135deg, #D97706 0%, #B45309 100%); color: white; box-shadow: 0 4px 14px rgba(217, 119, 6, 0.28), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }
.confirm-btn.confirm-warning:hover:not(:disabled) { background: linear-gradient(135deg, #B45309 0%, #92400E 100%); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(217, 119, 6, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }

.confirm-btn.confirm-primary { background: var(--gradient-azure); color: white; box-shadow: 0 4px 14px rgba(30, 77, 140, 0.28), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }
.confirm-btn.confirm-primary:hover:not(:disabled) { background: var(--gradient-azure-hover); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30, 77, 140, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }

.confirm-btn.confirm-success { background: linear-gradient(135deg, #15803D 0%, #166534 100%); color: white; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }
.confirm-btn.confirm-success:hover:not(:disabled) { background: linear-gradient(135deg, #166534 0%, #14532D 100%); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(22, 163, 74, 0.4), 0 1px 0 rgba(255, 255, 255, 0.15) inset; }

.confirm-btn-spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: white; border-radius: 50%; animation: confirmSpin 700ms linear infinite; flex-shrink: 0; }
@keyframes confirmSpin { to { transform: rotate(360deg); } }

.confirm-modal.has-custom-body { max-width: 620px; text-align: left; }
.confirm-modal.has-custom-body .confirm-icon-wrap,
.confirm-modal.has-custom-body .confirm-eyebrow,
.confirm-modal.has-custom-body .confirm-title,
.confirm-modal.has-custom-body .confirm-message { text-align: center; }
.confirm-modal.has-custom-body .confirm-message { margin-left: auto; margin-right: auto; }
/* This is the single scroll region for modal content — it grows until the
   modal hits its max-height, then scrolls instead of overflowing. */
.confirm-custom-body {
  margin-bottom: 1.75rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-right: 0.25rem;
}
.confirm-custom-body::-webkit-scrollbar { width: 6px; }
.confirm-custom-body::-webkit-scrollbar-track { background: transparent; }
.confirm-custom-body::-webkit-scrollbar-thumb { background: rgba(10, 22, 40, 0.18); border-radius: 3px; }
.confirm-custom-body::-webkit-scrollbar-thumb:hover { background: rgba(10, 22, 40, 0.3); }
.confirm-modal.has-custom-body .confirm-actions { justify-content: flex-end; flex-shrink: 0; }
.confirm-modal.has-custom-body .confirm-btn { max-width: 220px; }

/* Post preview inside modal */
.post-preview { background: linear-gradient(135deg, rgba(30, 77, 140, 0.03), rgba(201, 169, 97, 0.05)); border: 1px solid rgba(10, 22, 40, 0.08); border-radius: 14px; padding: 1.5rem 1.5rem 1.25rem; position: relative; overflow: hidden; }
.post-preview::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.6; }
.post-preview-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(201, 169, 97, 0.14); color: #8B7340; margin-bottom: 0.875rem; }
.post-preview-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.015em; line-height: 1.35; margin-bottom: 0.5rem; }
.post-preview-content { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-word; }
.post-preview-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.post-preview-chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: var(--paper); border: 1px solid rgba(10, 22, 40, 0.08); border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.005em; }
.post-preview-chip svg { color: var(--azure-mid); flex-shrink: 0; }

/* ============================================
   CERTIFICATE PREVIEW MODAL
   ============================================ */
.cert-preview-overlay { position: fixed; inset: 0; background: rgba(10, 22, 40, 0.85); backdrop-filter: blur(10px); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; animation: certFadeIn 220ms ease; }
@keyframes certFadeIn { from { opacity: 0; } to { opacity: 1; } }

.cert-preview-shell { background: var(--paper); border-radius: 20px; width: 100%; max-width: 960px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.5); }
.cert-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.75rem; border-bottom: 1px solid rgba(10, 22, 40, 0.08); background: var(--ivory); }
.cert-preview-head h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin: 0 0 2px; }
.cert-preview-head p { font-size: 0.8rem; color: var(--text-tertiary); margin: 0; }
.cert-preview-actions { display: flex; gap: 0.5rem; }

.cert-btn { padding: 0.6rem 1.1rem; border-radius: 8px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent; font-family: var(--font-sans); }
.cert-btn-primary { background: linear-gradient(135deg, #1E4D8C 0%, #3B82C4 100%); color: white; box-shadow: 0 4px 14px rgba(30, 77, 140, 0.25); }
.cert-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30, 77, 140, 0.35); }
.cert-btn-secondary { background: rgba(10, 22, 40, 0.05); color: var(--text-primary); border-color: rgba(10, 22, 40, 0.1); }
.cert-btn-secondary:hover:not(:disabled) { background: rgba(10, 22, 40, 0.09); }
.cert-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cert-preview-scroll { flex: 1; overflow: auto; background: #e5e7eb; padding: 2rem; display: flex; justify-content: center; align-items: flex-start; }
.cert-preview-stage { position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); background: white; }
.cert-preview-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.cert-preview-text { position: absolute; color: #000; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; pointer-events: none; }
.cert-preview-empty { padding: 4rem 2rem; text-align: center; color: var(--text-tertiary); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.cert-preview-empty p:first-child { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.cert-preview-empty p:not(:first-child) { font-size: 0.85rem; max-width: 400px; line-height: 1.6; }

/* ============================================
   SUBMIT REVIEW MODAL
   ============================================ */
/* Submit review — the label-left / value-right rows are laid out in two
   columns so long forms stay half as tall. Each section is its own grid so
   related fields stay grouped. */
.confirm-modal.has-custom-body .submit-review { text-align: left; }
.confirm-modal.has-custom-body .submit-review-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.75rem;
  margin-bottom: 0.75rem;
}
.confirm-modal.has-custom-body .submit-review-section:last-child { margin-bottom: 0; }
/* A section holding a single row (the certificate type) spans the full width. */
.confirm-modal.has-custom-body .submit-review-section > .submit-review-row:only-child { grid-column: 1 / -1; }
.submit-review-row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  align-items: start;
  min-width: 0;
}
.submit-review-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding-top: 2px; min-width: 0; }
.submit-review-value { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; min-width: 0; }

/* ============================================================
   MOBILE REDESIGN — CLEAN & TOUCH-FRIENDLY
   Applies only at ≤ 768px width
   ============================================================ */
@media (max-width: 768px) {

  /* ---- Base ---- */
  html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; line-height: 1.55; }

  /* ---- App Layout ---- */
  .app-layout { flex-direction: column; }
  .main-content { margin-left: 0 !important; padding: 1rem 1rem 5rem; min-height: auto; }

  /* ---- Sidebar → top bar with hamburger ---- */
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
  }
  .sidebar-brand { padding: 0; margin: 0; border: none; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
  .sidebar-brand a { gap: 0.625rem; flex: 1; min-width: 0; }
  .logo-icon { width: 44px; height: 44px; }
  .brand-copy strong { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-copy span { font-size: 0.6rem; letter-spacing: 0.12em; }

  .sidebar-links { display: none; }
  .sidebar-footer { display: none; }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(201, 169, 97, 0.25);
    color: #FDFCF8;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .mobile-nav-toggle:hover, .mobile-nav-toggle:active { background: rgba(255, 255, 255, 0.16); }
  .mobile-nav-toggle svg { width: 22px; height: 22px; }

  .sidebar.mobile-open {
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar.mobile-open .sidebar-brand { flex-direction: row; justify-content: space-between; align-items: center; }
  .sidebar.mobile-open .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0 0.5rem;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(201, 169, 97, 0.15);
    width: 100%;
  }
  .sidebar.mobile-open .sidebar-links a { padding: 0.875rem 1rem; font-size: 0.95rem; border-radius: 10px; }
  .sidebar.mobile-open .sidebar-links a svg { font-size: 1.15rem; }
  .sidebar.mobile-open .sidebar-footer {
    display: block;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(201, 169, 97, 0.15);
    width: 100%;
  }
  .sidebar.mobile-open .sidebar-user { font-size: 0.85rem; padding: 0.625rem 0.875rem; }
  .sidebar.mobile-open .logout-btn { padding: 0.75rem 1rem; font-size: 0.9rem; }

  /* Lock scroll when menu open */
  body:has(.sidebar.mobile-open) { overflow: hidden; }

  /* ---- Auth ---- */
  .auth-container { padding: 1rem; align-items: flex-start; padding-top: 3rem; min-height: 100vh; }
  .auth-form { padding: 2rem 1.5rem; border-radius: 16px; max-width: 100%; }
  .auth-form h2 { font-size: 1.5rem; }
  .auth-form .subtitle { font-size: 0.85rem; margin-bottom: 1.5rem; }
  .auth-form input { padding: 0.9rem 1rem; font-size: 16px; }
  .auth-form .password-input-wrapper input { padding: 0.9rem 3rem 0.9rem 1rem; font-size: 16px; }
  .auth-form button[type="submit"] { padding: 1rem; font-size: 1rem; }

  /* ---- Dashboard ---- */
  .dashboard { padding-bottom: 2rem; }
  .dash-hero { padding: 1.75rem 1.5rem; border-radius: 18px; margin-bottom: 1.25rem; }
  .dash-hero-date { font-size: 0.7rem; letter-spacing: 0.14em; }
  .dash-hero-title { font-size: 1.5rem; line-height: 1.25; }
  .dash-hero-sub { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.25rem; }
  .dash-hero-ornament { display: none; }
  .dash-hero-actions { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .dash-btn-primary, .dash-btn-secondary { width: 100%; justify-content: center; padding: 0.875rem 1rem; font-size: 0.9rem; }

  .dash-metrics { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
  .dash-metric { padding: 1rem 0.875rem; border-radius: 12px; }
  .dash-metric-top { gap: 0.5rem; margin-bottom: 0.625rem; }
  .dash-metric-icon { width: 30px; height: 30px; border-radius: 8px; }
  .dash-metric-icon svg { width: 15px; height: 15px; }
  .dash-metric-label { font-size: 0.65rem; letter-spacing: 0.06em; }
  .dash-metric-value { font-size: 1.625rem; margin-bottom: 0.25rem; }
  .dash-metric-hint { font-size: 0.7rem; line-height: 1.4; }

  .dash-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .dash-col-side { position: static; }

  .dash-section { margin-bottom: 1.5rem; }
  .dash-section-head { margin-bottom: 1rem; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; }
  .dash-section-head h2 { font-size: 1.1rem; }
  .dash-section-sub { font-size: 0.75rem; line-height: 1.4; margin-top: 0.125rem; }

  .dash-side-card { padding: 1.125rem; border-radius: 14px; }

  .dash-list-item { padding: 0.875rem 1rem; gap: 0.75rem; flex-wrap: wrap; }
  .dash-list-icon { width: 36px; height: 36px; border-radius: 10px; }
  .dash-list-icon svg { width: 16px; height: 16px; }
  .dash-list-title { font-size: 0.875rem; }
  .dash-list-meta { font-size: 0.72rem; line-height: 1.4; }
  .dash-list-end { gap: 0.5rem; }

  .dash-download-btn { width: 100%; justify-content: center; padding: 0.5rem 0.875rem; font-size: 0.8rem; order: 3; margin-top: 0.25rem; }
  .dash-status-pill { font-size: 0.65rem; padding: 0.25rem 0.625rem; margin-left: auto; order: 2; }

  .dash-announce-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .dash-announce-card { padding: 1.125rem 1rem; border-radius: 14px; }
  .dash-announce-card h3 { font-size: 0.95rem; }
  .dash-announce-card p { font-size: 0.8rem; line-height: 1.5; -webkit-line-clamp: 4; }

  .dash-event-item { padding: 0.625rem; gap: 0.75rem; }
  .dash-event-date { width: 42px; height: 42px; }
  .dash-event-day { font-size: 1rem; }
  .dash-event-body strong { font-size: 0.85rem; }
  .dash-event-body span { font-size: 0.72rem; }

  .dash-notif-item p { font-size: 0.8rem; }

  .tracker { padding: 1.25rem 1rem; border-radius: 14px; }
  .tracker-title { font-size: 1rem; }
  .tracker-sub { font-size: 0.72rem; line-height: 1.4; }
  .tracker-steps { flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
  .tracker-step { flex-direction: row; justify-content: flex-start; gap: 0.75rem; align-items: center; }
  .tracker-step-line { display: none; }
  .tracker-step-label { font-size: 0.8rem; letter-spacing: 0.02em; text-align: left; text-transform: none; font-weight: 500; color: var(--text-secondary); }
  .tracker-step.done .tracker-step-label { color: var(--azure-dark); font-weight: 600; }
  .tracker-step-marker { width: 28px; height: 28px; flex-shrink: 0; }
  .tracker-meta { grid-template-columns: 1fr; gap: 0.75rem; padding-top: 1rem; }

  /* ---- Request form ---- */
  .request-page h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
  .request-page-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .request-form { padding: 1.25rem; border-radius: 14px; }
  .form-section { padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
  .form-section h3 { font-size: 1.05rem; }
  .form-section > p { font-size: 0.8rem; line-height: 1.5; margin-bottom: 1rem; }
  .form-group { margin-bottom: 1rem; }
  .gcash-qr-frame { width: 180px; height: 180px; }
  .qr-lightbox-img { width: 86vmin; }
  .form-label { font-size: 0.72rem; margin-bottom: 0.375rem; }
  .form-group input, .form-group select, .form-textarea { padding: 0.875rem 1rem; font-size: 16px; border-radius: 10px; }
  .form-textarea { min-height: 100px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .radio-group { flex-direction: column; gap: 0.5rem; padding: 0.375rem 0; }
  .radio-group label { padding: 0.75rem 1rem; background: var(--ivory-warm); border: 1px solid rgba(10, 22, 40, 0.08); border-radius: 10px; font-size: 0.9rem; transition: all 0.2s ease; }
  .radio-group label:has(input:checked) { background: rgba(59, 130, 196, 0.08); border-color: rgba(59, 130, 196, 0.3); }
  .submit-btn { padding: 1rem; font-size: 1rem; border-radius: 12px; }
  .request-sidebar { padding: 1.25rem; border-radius: 14px; position: static; }
  .request-sidebar h3 { font-size: 1.05rem; }
  .request-sidebar p { font-size: 0.85rem; }
  .request-sidebar ul li { font-size: 0.85rem; padding: 0.5rem 0 0.5rem 1.5rem; }

  /* ---- Review Requests — Cards instead of table ---- */
  .review-page h2 { font-size: 1.5rem; }

  .requests-table { background: transparent; border: none; padding: 0; box-shadow: none; overflow: visible; }
  .requests-table table, .requests-table thead, .requests-table tbody, .requests-table tr, .requests-table td { display: block; width: 100%; }
  .requests-table thead { display: none; }
  .requests-table tr { background: white; border: 1px solid rgba(10, 22, 40, 0.08); border-radius: 14px; padding: 1rem; margin-bottom: 0.75rem; box-shadow: 0 2px 8px rgba(10, 22, 40, 0.04); }
  .requests-table td { padding: 0.4rem 0; border: none; font-size: 0.85rem; line-height: 1.5; }
  .requests-table td:before { content: attr(data-label); display: inline-block; min-width: 100px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-right: 0.5rem; }
  .requests-table td:first-child { display: flex; align-items: center; padding-bottom: 0.75rem; margin-bottom: 0.5rem; border-bottom: 1px dashed rgba(10, 22, 40, 0.08); }
  .requests-table td:first-child:before { content: 'Select'; min-width: auto; margin-right: 0.5rem; }
  .requests-table td:first-child input[type="checkbox"] { width: 22px; height: 22px; cursor: pointer; }

  .request-actions { flex-direction: column; gap: 0.5rem; padding-top: 0.75rem !important; margin-top: 0.5rem; border-top: 1px dashed rgba(10, 22, 40, 0.08); }
  .request-actions button, .request-actions select { width: 100%; padding: 0.75rem 1rem; font-size: 0.85rem; border-radius: 10px; min-height: 44px; }

  /* Bulk action bar */
  .review-page > div[style*="display: flex"][style*="flex-wrap: wrap"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 1rem !important;
  }
  .review-page > div[style*="display: flex"][style*="flex-wrap: wrap"] > span { text-align: center; padding-bottom: 0.25rem; }
  .review-page > div[style*="display: flex"][style*="flex-wrap: wrap"] button {
    width: 100%;
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
    min-height: 44px;
    margin-left: 0 !important;
  }

  /* ---- Confirm Modal ---- */
  .confirm-modal { padding: 2rem 1.25rem 1.5rem; border-radius: 20px; max-width: calc(100vw - 2rem); }
  .confirm-modal.has-custom-body { max-width: calc(100vw - 2rem); }
  .confirm-title { font-size: 1.15rem; }
  .confirm-message { font-size: 0.85rem; line-height: 1.55; }
  .confirm-actions { flex-direction: column-reverse; gap: 0.5rem; }
  .confirm-btn { width: 100%; max-width: none; padding: 0.875rem 1rem; font-size: 0.9rem; min-height: 48px; border-radius: 12px; }
  .confirm-icon-wrap { width: 72px; height: 72px; margin-bottom: 1.25rem; }
  .confirm-icon { width: 54px; height: 54px; }
  .confirm-icon-svg svg { width: 24px; height: 24px; }
  .confirm-eyebrow { font-size: 0.65rem; }

  /* Submit review body — keep two columns down to phone widths; the modal
     itself narrows with the viewport, so tighten the gutter and type. */
  .confirm-modal.has-custom-body .submit-review-section { column-gap: 1rem; }
  .submit-review-row { gap: 0.5rem; padding: 0.5rem 0; }
  .submit-review-label { font-size: 0.64rem; }
  .submit-review-value { font-size: 0.84rem; }

  /* ---- Certificate Preview Modal — Full screen ---- */
  .cert-preview-overlay { padding: 0; }
  .cert-preview-shell { border-radius: 0; max-height: 100vh; height: 100vh; max-width: 100%; }
  .cert-preview-head { padding: 1rem; flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .cert-preview-head h3 { font-size: 1rem; }
  .cert-preview-head p { font-size: 0.75rem; }
  .cert-preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .cert-btn { padding: 0.75rem 1rem; font-size: 0.85rem; min-height: 44px; justify-content: center; }
  .cert-preview-scroll { padding: 1rem 0.5rem; }
  .cert-preview-stage { transform-origin: top left; }

  /* ---- Reports ---- */
  .reports-page h2 { font-size: 1.5rem; }
  .report-filters { flex-direction: column; padding: 1rem; gap: 0.5rem; }
  .report-filters select, .report-filters input, .report-filters button { width: 100%; min-width: 0; padding: 0.75rem 1rem; font-size: 16px; min-height: 44px; border-radius: 10px; }
  .report-filters button { margin-left: 0 !important; }
  .report-summary { font-size: 0.8rem; padding: 0.875rem 1rem; }
  .report-table { font-size: 0.75rem; }
  .report-table th, .report-table td { padding: 0.625rem 0.75rem; white-space: nowrap; }

  /* ---- Post Announcements ---- */
  .post-page h2 { font-size: 1.5rem; }
  .tabs { width: 100%; }
  .tabs button { padding: 0.75rem 1rem; font-size: 0.85rem; min-height: 44px; }
  .post-form { padding: 1.25rem; border-radius: 14px; }
  .post-form .form-group { margin-bottom: 1.125rem; }
  .post-form input, .post-form textarea { padding: 0.875rem 1rem; font-size: 16px; border-radius: 10px; }
  .post-form button { width: 100%; padding: 0.875rem 1rem; font-size: 0.9rem; min-height: 44px; }

  /* ---- Preview Modal (file/details) ---- */
  .preview-card { padding: 1.25rem; max-width: calc(100vw - 2rem); border-radius: 16px; }
  .preview-header strong { font-size: 1rem; }
  .preview-details { min-width: 0; max-width: 100%; }
  .preview-details-row { grid-template-columns: 1fr; gap: 0.125rem; padding: 0.625rem 0; }
  .preview-details-row dt { font-size: 0.65rem; }
  .preview-details-row dd { font-size: 0.85rem; }
}

/* ============================================================
   SMALL PHONES (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .main-content { padding: 0.875rem 0.875rem 4rem; }

  .dash-metrics { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .dash-metric { padding: 0.875rem 0.75rem; }
  .dash-metric-value { font-size: 1.375rem; }

  .dash-hero { padding: 1.25rem 1rem; border-radius: 14px; }
  .dash-hero-title { font-size: 1.25rem; }
  .dash-hero-sub { font-size: 0.85rem; }

  .dash-section-head h2 { font-size: 1rem; }
  .dash-side-card { padding: 1rem; }

  .cert-preview-actions { grid-template-columns: 1fr; }

  .confirm-modal { padding: 1.75rem 1rem 1.25rem; border-radius: 16px; }
  .confirm-icon-wrap { width: 64px; height: 64px; }
  .confirm-icon { width: 48px; height: 48px; }

  /* Too narrow for two columns — stack the rows, and put each label above
     its value so long labels like "Sponsors (Ninong/Ninang)" stay readable. */
  .confirm-modal.has-custom-body .submit-review-section { grid-template-columns: 1fr; column-gap: 0; row-gap: 0.25rem; }
  .confirm-modal.has-custom-body .submit-review-section > .submit-review-row:only-child { grid-column: auto; }
  .submit-review-row { grid-template-columns: 1fr; gap: 0.125rem; padding: 0.5rem 0; }
  .submit-review-label { font-size: 0.62rem; padding-top: 0; }
  .submit-review-value { font-size: 0.82rem; }
}

/* Short viewports: the decorative icon would squeeze the scrollable body
   down to nothing, so drop it and give the content the room instead. */
@media (max-height: 640px) {
  .confirm-modal { padding-top: 2rem; }
  .confirm-modal .confirm-icon-wrap { display: none; }
  .confirm-modal .confirm-message { font-size: 0.82rem; }
}

/* Very short viewports (phones in landscape). Strip the remaining chrome so
   the review body keeps a usable scroll area instead of collapsing to 0. */
@media (max-height: 460px) {
  .confirm-modal { padding: 1.125rem 1rem 0.875rem; }
  .confirm-modal .confirm-eyebrow,
  .confirm-modal .confirm-divider { display: none; }
  .confirm-modal .confirm-title { font-size: 1rem; margin-bottom: 0.375rem; }
  .confirm-modal .confirm-message { font-size: 0.78rem; line-height: 1.4; margin-bottom: 0.625rem; }
  .confirm-custom-body { margin-bottom: 0.625rem; }
  .confirm-modal.has-custom-body .confirm-btn { padding: 0.6rem 1rem; min-height: 0; font-size: 0.8rem; }
}
/* ============================================================
   PHP APP GLUE STYLES
   ============================================================ */

/* Password visibility toggle icons */
.auth-form .password-toggle .pw-hide { display: none; }
.auth-form .password-input-wrapper.show-password .password-toggle .pw-show { display: none; }
.auth-form .password-input-wrapper.show-password .password-toggle .pw-hide { display: block; }

/* Sidebar hamburger icon swap */
.nav-icon-close { display: none; }
.sidebar.mobile-open .nav-icon-open { display: none; }
.sidebar.mobile-open .nav-icon-close { display: block; }

/* Buttons inside tables / toolbars */
.requests-table select,
.report-filters select {
  padding: 6px 8px;
  border: 1px solid var(--glass-border, #d9d2c2);
  border-radius: var(--radius-sm, 6px);
  background: var(--paper, #fff);
  font: inherit;
  font-size: 0.8rem;
}

/* ============================================
   PAGINATION BAR (search / rows-per-page / pager)
   ============================================ */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--paper, #fff);
  border: 1px solid var(--glass-border, #e5dfd2);
  border-radius: var(--radius-md, 10px);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted, #6B7A8F);
}

.per-page-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted, #6B7A8F);
}

.per-page-form select {
  padding: 4px 8px;
  border: 1px solid var(--glass-border, #d9d2c2);
  border-radius: var(--radius-sm, 6px);
  background: var(--paper, #fff);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--glass-border, #d9d2c2);
  border-radius: var(--radius-sm, 6px);
  background: var(--paper, #fff);
  color: var(--text-muted, #3A4A5E);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.page-btn:hover {
  border-color: var(--azure-primary, #4A90D9);
  color: var(--azure-primary, #4A90D9);
}

.page-btn.current {
  background: var(--azure-primary, #4A90D9);
  border-color: var(--azure-primary, #4A90D9);
  color: #fff;
  pointer-events: none;
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--text-muted, #6B7A8F);
}

@media (max-width: 640px) {
  .pagination-bar { flex-direction: column; align-items: stretch; }
  .pagination-nav { justify-content: center; flex-wrap: wrap; }
}

/* ============================================
   MY REQUESTS PAGE
   (status tabs + search + rows-per-page + pager)
   ============================================ */
.req-panel { max-width: 1200px; }
.req-panel .dash-section-head { align-items: center; }
.req-panel-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.req-panel-actions .dash-btn-primary { white-space: nowrap; }

.req-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.875rem; }
.req-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: var(--radius-full);
  background: var(--paper);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all var(--transition-base);
}
.req-tab:hover { border-color: rgba(74, 144, 217, 0.4); background: rgba(74, 144, 217, 0.05); color: var(--azure-dark); }
.req-tab.active {
  background: var(--gradient-azure);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 77, 140, 0.25);
}
.req-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: var(--radius-full);
  background: rgba(10, 22, 40, 0.06);
  font-size: 0.65rem;
  font-weight: 700;
}
.req-tab.active .req-tab-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

.req-search { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; max-width: 560px; }
.req-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-base);
}
.req-search input[type="search"]:focus {
  outline: none;
  border-color: var(--azure-mid);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}
.req-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-azure);
  color: #fff;
  cursor: pointer;
  transition: all 220ms var(--ease-smooth);
}
.req-search button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30, 77, 140, 0.3); }
.req-search-clear { font-size: 0.78rem; font-weight: 600; color: var(--azure-dark); text-decoration: none; }
.req-search-clear:hover { text-decoration: underline; }

.req-panel .pagination-bar { margin-top: 1rem; }

/* ---- row wrapper + expandable track panel ---- */
.req-item { border-bottom: 1px solid rgba(10, 22, 40, 0.05); }
.req-item:last-child { border-bottom: none; }
.req-item > .dash-list-item { border-bottom: none; }

.req-track {
  padding: 0 1.375rem;
  background: rgba(10, 22, 40, 0.02);
  border-top: 1px dashed rgba(10, 22, 40, 0.1);
}
.req-track .tracker {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1.125rem 0 1.25rem;
}
.req-track .tracker-steps { margin-bottom: 1.25rem; }
.req-track .tracker-meta { padding-top: 1rem; }
.tracker-cancelled { background: rgba(100, 116, 139, 0.08); border-color: rgba(100, 116, 139, 0.3); color: #64748B; }

/* ---- row actions (Track / Cancel) ---- */
.req-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.req-cancel-form { display: inline-flex; margin: 0; }

.req-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-base);
}
.req-action-btn:hover {
  border-color: rgba(74, 144, 217, 0.4);
  background: rgba(74, 144, 217, 0.06);
  color: var(--azure-dark);
}
.req-action-btn.is-open {
  border-color: rgba(74, 144, 217, 0.45);
  background: rgba(74, 144, 217, 0.1);
  color: var(--azure-deep);
}
.req-action-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

.req-action-cancel { border-color: rgba(220, 38, 38, 0.25); color: #B91C1C; }
.req-action-cancel:hover { background: rgba(220, 38, 38, 0.07); border-color: rgba(220, 38, 38, 0.45); color: #B91C1C; }

@media (max-width: 768px) {
  .req-panel .dash-section-head { align-items: flex-start; }
  .req-panel-actions { width: 100%; justify-content: space-between; }
  .req-panel-actions .dash-btn-primary { flex: 1; justify-content: center; }
  .req-search { max-width: none; }
  .req-actions { width: 100%; order: 4; margin-top: 0.25rem; }
  .req-actions .req-action-btn,
  .req-actions .req-cancel-form { flex: 1; }
  .req-cancel-form .req-action-btn { width: 100%; justify-content: center; }
  .req-track { padding: 0 1rem; }
}

