/* ── Brand display font (MyWord) ──────────────────────────────────
 * The same face thegilpin.co.uk uses on its main headings.
 * Bundled locally from /static/fonts/ for performance + reliability
 * (no dependency on the marketing site being up).
 */
@font-face {
  font-family: 'MyWord';
  src: url('/static/fonts/MyWord.woff2') format('woff2'),
       url('/static/fonts/MyWord.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/*
 * ═══════════════════════════════════════════════════════════════
 *  GILPIN DIAMOND DESIGN SYSTEM — Full Reference Sheet for Billy
 *  Version: 1.1 | April 2026
 *
 *  Sections:
 *   1. Design Tokens (CSS custom properties — all colours, spacing, etc.)
 *   2. Base Styles (body, scrollbar, typography, focus rings)
 *   3. Navbar
 *   4. Nav Action Buttons
 *   5. View Tabs (secondary tab bar)
 *   6. Badge System
 *   7. Status Pills
 *   8. Notification Toasts
 *   9. Animations & Keyframes
 *  10. Utility Classes
 *
 *  HOW TO USE:
 *  ─────────────────────────────────────────────────────────────
 *  1. Link this file FIRST in your <head>, before your own CSS:
 *     <link rel="stylesheet" href="gilpin-design-reference.css">
 *
 *  2. Add the Google Fonts link to your <head>:
 *     <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600;700;900&display=swap" rel="stylesheet">
 *
 *  3. Set the theme on your root element:
 *     <html data-theme="dark">  ← default (preferred)
 *     <html data-theme="light"> ← light variant
 *
 *  4. Replace your existing colours / fonts with CSS variables:
 *     background: #f5f0eb  →  background: var(--bg-base)
 *     font-family: Helvetica  →  font-family: var(--font-sans)
 *     color: #333  →  color: var(--text-main)
 *
 *  KEY VALUES AT A GLANCE:
 *  Gold:        #C46A3A   var(--gilpin-gold)
 *  Dark bg:     #070707   var(--bg-base) in dark mode
 *  Light bg:    #fdfaf3   var(--bg-base) in light mode
 *  Serif font:  Playfair Display  var(--font-serif)
 *  Sans font:   Inter             var(--font-sans)
 *  Nav height:  70px      var(--nav-height)
 * ═══════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════ */

:root {
  /* ── Brand ── */
  --gilpin-gold:       #C46A3A;
  --gilpin-gold-light: #D68255;
  --gilpin-gold-dark:  #A3552A;

  /* ── Light mode colours ── */
  --bg-base:    #fdfaf3;
  --bg-dots:    #e8e1d4;
  --surface:    rgba(255, 255, 255, 0.7);
  --nav-bg:     rgba(253, 250, 243, 0.85);
  --nav-text:   #0f172a;
  --border-ui:  #C46A3A;
  --border-subtle: rgba(196, 106, 58, 0.2);

  /* ── Text ── */
  --text-main:    #0f172a;
  --text-muted:   #475569;
  --text-faint:   #94a3b8;

  /* ── Status colours ── */
  --color-success: #10b981;
  --color-error:   #ef4444;
  --color-warning: #f59e0b;
  --color-info:    #3b82f6;
  --color-vip:     #8b5cf6;

  /* ── Typography ── */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Brand display font — matches the "MyWord" face used on thegilpin.co.uk for h1/h2/h3. */
  --font-display: 'MyWord', 'Playfair Display', Georgia, serif;

  /* ── Sizing ── */
  --nav-height:   70px;
  --alert-height: 28px;

  /* ── Spacing scale ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* ── Border radius ── */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.25rem;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lux: 0 20px 40px -10px rgba(0, 0, 0, 0.08);

  /* ── Animation ── */
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --ease-out:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:     cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-premium:    cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Z-index ── */
  --z-dropdown: 100;
  --z-sticky:   500;
  --z-modal:    1000;
  --z-navbar:   1010;
  --z-toast:    9999;
}

/* Dark mode overrides */
[data-theme="dark"] {
  --bg-base:       #070707;
  --bg-dots:       #1a1a1a;
  --surface:       rgba(15, 15, 15, 0.8);
  --nav-bg:        rgba(7, 7, 7, 0.85);
  --nav-text:      #f8fafc;
  --border-ui:     rgba(196, 106, 58, 0.4);
  --border-subtle: rgba(196, 106, 58, 0.15);
  --text-main:     #f8fafc;
  --text-muted:    #94a3b8;
  --text-faint:    #64748b;
  --shadow-lux:    0 30px 60px -15px rgba(0, 0, 0, 0.9);
}


/* ═══════════════════════════════════════════
   2. BASE STYLES
   ═══════════════════════════════════════════ */

html {
  scroll-behavior: smooth;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  background-image: radial-gradient(var(--bg-dots) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text-main);
  margin: 0;
  min-height: 100%;
  transition: background-color 0.6s var(--ease-out);
  overflow-x: hidden;
  line-height: 1.5;
  touch-action: manipulation;
}

/* Premium gold scrollbar */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(196, 106, 58, 0.25);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 106, 58, 0.45);
  background-clip: content-box;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(196, 106, 58, 0.35);
  background-clip: content-box;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 106, 58, 0.55);
  background-clip: content-box;
}

/* Gold focus rings */
input:focus, textarea:focus, select:focus,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 106, 58, 0.4),
              0 0 12px rgba(196, 106, 58, 0.15) !important;
  border-color: var(--gilpin-gold) !important;
  transition: box-shadow 0.2s ease;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  color: #f5f5f4;
}


/* ═══════════════════════════════════════════
   3. NAVBAR
   ═══════════════════════════════════════════ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-ui);
  z-index: var(--z-navbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  color: var(--nav-text);
}

[data-theme="dark"] .navbar {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}


/* ═══════════════════════════════════════════
   4. NAV ACTION BUTTONS
   ═══════════════════════════════════════════ */

.nav-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(196, 106, 58, 0.3);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--nav-text);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring),
              background-color 0.15s ease,
              box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-action-btn:hover {
  background: rgba(196, 106, 58, 0.15);
  border-color: var(--gilpin-gold);
  transform: scale(1.06) translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 106, 58, 0.25),
              0 0 0 2px rgba(196, 106, 58, 0.1);
}

.nav-action-btn:active { transform: scale(0.94); }

.nav-action-btn--active {
  background: var(--gilpin-gold) !important;
  color: white !important;
  border-color: var(--gilpin-gold) !important;
  box-shadow: 0 4px 16px rgba(196, 106, 58, 0.4);
}

[data-theme="dark"] .nav-action-btn { background: rgba(255, 255, 255, 0.06); }
[data-theme="light"] .nav-action-btn { background: rgba(0, 0, 0, 0.04); color: #1e293b; }

/* Theme toggle button */
.theme-toggle-btn.nav-action-btn {
  padding: 8px 10px;
  min-width: unset;
  line-height: 1;
}
.theme-toggle-btn svg {
  display: block;
}


/* ═══════════════════════════════════════════
   5. VIEW TABS (secondary tab bar)
   ═══════════════════════════════════════════ */

.dashboard-view-tabs {
  z-index: 1005;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--gilpin-gold);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.view-tabs-container {
  display: flex;
  gap: 6px;
  padding: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.view-tab {
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: 1.5px solid rgba(196, 106, 58, 0.35);
  background: rgba(196, 106, 58, 0.12);
  color: var(--text-main);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.view-tab:hover {
  background: rgba(196, 106, 58, 0.20);
  border-color: var(--gilpin-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 106, 58, 0.15);
}

.view-tab.active {
  background: var(--gilpin-gold);
  color: white;
  border-color: var(--gilpin-gold);
  box-shadow: 0 4px 16px rgba(196, 106, 58, 0.35);
  font-weight: 800;
}

/* Gold shimmer sweep on active tab */
.view-tab.active::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

[data-theme="dark"] .view-tab {
  background: rgba(196, 106, 58, 0.10);
  border-color: rgba(196, 106, 58, 0.30);
  color: #e2e8f0;
}


/* ═══════════════════════════════════════════
   6. BADGE SYSTEM
   ═══════════════════════════════════════════ */

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 10px;
  display: inline-block;
  margin: 1px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
}

.badge-gold {
  background: rgba(196, 106, 58, 0.15);
  color: var(--gilpin-gold);
  border: 1px solid rgba(196, 106, 58, 0.4);
}

.badge-vip {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: breathe 2s ease-in-out infinite;
}


/* ═══════════════════════════════════════════
   7. STATUS PILLS (connection / sync state)
   ═══════════════════════════════════════════ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.status-badge.connected {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

.status-badge.connecting {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
}

.status-badge:hover { transform: scale(1.05); }


/* ═══════════════════════════════════════════
   8. NOTIFICATION TOASTS
   ═══════════════════════════════════════════ */

.notification-toast-container {
  position: fixed;
  top: calc(var(--nav-height, 70px) + 10px);
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
  width: 100%;
  pointer-events: none;
}

.notification-toast-container > * { pointer-events: auto; }

.notification-toast {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-ui);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  animation: toast-slide-in 0.35s var(--ease-bounce) forwards;
}

.notification-toast:hover {
  transform: translateX(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border-color: var(--gilpin-gold);
}

.notification-toast-accent { width: 4px; flex-shrink: 0; }

.notification-toast-body {
  flex: 1;
  padding: 10px 12px;
  min-width: 0;
}

.notification-toast-dept {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-toast-message {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-toast-guest {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--gilpin-gold);
  opacity: 0.6;
  animation: toast-progress linear forwards;
  width: 100%;
}


/* ═══════════════════════════════════════════
   9. ANIMATIONS & KEYFRAMES
   ═══════════════════════════════════════════ */

/* ── Entrance ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes card3DEntrance {
  from { opacity: 0; transform: perspective(800px) rotateX(8deg) translateY(30px) scale(0.92); }
  to   { opacity: 1; transform: perspective(800px) rotateX(0deg) translateY(0) scale(1); }
}

/* ── Loops ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(196, 106, 58, 0.15); }
  50%       { box-shadow: 0 0 20px rgba(196, 106, 58, 0.3); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.85; }
}

@keyframes floatingGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(196, 106, 58, 0.1), 0 4px 20px rgba(0,0,0,0.2); }
  50%       { box-shadow: 0 0 25px rgba(196, 106, 58, 0.25), 0 8px 30px rgba(0,0,0,0.15); }
}

@keyframes syncPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50%       { box-shadow: 0 0 6px 2px rgba(34, 197, 94, 0.2); }
}

/* ── Micro-interactions ── */
@keyframes statusChangePop {
  0%   { transform: scale(1); }
  20%  { transform: scale(1.28); }
  40%  { transform: scale(0.92); }
  60%  { transform: scale(1.08); }
  80%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

@keyframes successRipple {
  0%   { box-shadow: 0 0 0 0 rgba(196, 106, 58, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(196, 106, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 106, 58, 0); }
}

@keyframes elasticScale {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.2); }
  50%  { transform: scale(0.9); }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

/* ── UI transitions ── */
@keyframes toast-slide-in {
  0%   { opacity: 0; transform: translateX(100%); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes toast-progress {
  0%   { width: 100%; }
  100% { width: 0%; }
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

@keyframes tabSwitchIn {
  from { opacity: 0.6; transform: scale(0.97) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; transform: translateY(-8px); }
  to   { opacity: 1; max-height: 500px; transform: translateY(0); }
}

@keyframes skeletonShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Entrance utility classes ── */
.animate-entrance { animation: fadeSlideUp 0.5s var(--ease-premium) both; }
.animate-fade     { animation: fadeIn 0.4s ease both; }
.animate-scale    { animation: scaleIn 0.35s var(--ease-premium) both; }
.modal-enter      { animation: modalSlideUp 0.4s var(--ease-premium) both; }
.card-3d-enter    { animation: card3DEntrance 0.5s var(--ease-premium) both; }
.view-switch-animate { animation: tabSwitchIn 0.35s var(--ease-premium) both; }
.expand-row-enter { animation: slideDown 0.3s var(--ease-premium) both; overflow: hidden; }
.status-pop       { animation: statusChangePop 0.5s var(--ease-spring); }
.success-ripple   { animation: successRipple 0.6s ease-out; }
.elastic-pop      { animation: elasticScale 0.4s var(--ease-spring); }

/* ── Staggered delays ── */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* ── Persistent states ── */
.ai-highlighted { animation: floatingGlow 3s ease-in-out infinite; }
.sync-dot-connected { animation: syncPulse 3s ease-in-out infinite; }
.timeline-dot   { animation: glowPulse 2.5s ease-in-out infinite; }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, rgba(196, 106, 58, 0.08) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ── Ripple click effect ── */
.ripple-container { position: relative; overflow: hidden; }
.ripple-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(196, 106, 58, 0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  border-radius: inherit;
  pointer-events: none;
}
.ripple-container:active::after { animation: ripple 0.6s ease-out; }

/* ── Table row staggered entrance ── */
tbody tr {
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  animation: fadeSlideUp 0.3s var(--ease-premium) both;
  will-change: opacity, transform;
  contain: layout style;
}
tbody tr:nth-child(1)  { animation-delay: 0.02s; }
tbody tr:nth-child(2)  { animation-delay: 0.04s; }
tbody tr:nth-child(3)  { animation-delay: 0.06s; }
tbody tr:nth-child(4)  { animation-delay: 0.08s; }
tbody tr:nth-child(5)  { animation-delay: 0.10s; }
tbody tr:nth-child(6)  { animation-delay: 0.12s; }
tbody tr:nth-child(7)  { animation-delay: 0.14s; }
tbody tr:nth-child(8)  { animation-delay: 0.16s; }
tbody tr:nth-child(9)  { animation-delay: 0.18s; }
tbody tr:nth-child(10) { animation-delay: 0.20s; }
tbody tr:nth-child(n+11) { animation-delay: 0.22s; }

tbody tr:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  z-index: 2;
  position: relative;
}

[data-theme="dark"] tbody tr:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

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


/* ═══════════════════════════════════════════
   10. UTILITY CLASSES
   ═══════════════════════════════════════════ */

.heading-font       { font-family: var(--font-serif); }
.brand-heading      { font-family: var(--font-display); }
.text-gilpin-gold   { color: var(--gilpin-gold); }

/* ── Gilpin wordmark ──────────────────────────────────────────────
 * Drop-in replacement for the old "GILPIN HOTEL & LAKE HOUSE" uppercase
 * text label. Default is a small inline wordmark suitable for navbars;
 * use --lg for login/register card headers.
 * !important on sizing beats per-template img rules that would otherwise
 * try to stretch the image to fill flex containers.
 */
.gilpin-wordmark {
  height: 32px !important;
  width: auto !important;
  max-height: 32px !important;
  max-width: 160px !important;
  object-fit: contain !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.gilpin-wordmark--lg {
  height: 72px !important;
  max-height: 72px !important;
  max-width: 260px !important;
}
[data-theme="dark"] .gilpin-wordmark {
  filter: invert(1) brightness(1.1);
}

/* ── Brand-heading override ──────────────────────────────────────
 * Force the Gilpin MyWord display font onto the main per-page
 * headings across both apps. Uses !important because each template
 * sets its own font-family inline and would otherwise win on
 * specificity/source-order.
 * Covers:
 *   .top-bar h1        — Prof Plato admin pages, staff home top-bar
 *   .page-header h1    — admin.html, admin_progress.html, etc.
 *   .hero-title        — main staff home hero
 *   .welcome h2        — Plato / Prof Plato chat welcome screens
 *   .navbar-brand-title — chat.html trainer header
 */
.top-bar h1,
.page-header h1,
.hero-title,
.welcome h2,
.navbar-brand-title {
  font-family: var(--font-display) !important;
}
.bg-gilpin-gold     { background-color: var(--gilpin-gold); }
.text-muted         { color: var(--text-muted); }
.transition-theme {
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

/* Tab notification dot */
.tab-badge-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  color: white;
  border: 2px solid var(--bg-base, white);
  animation: badge-pulse 2s infinite;
}

/* Card hover lift */
.dashboard-stat-card {
  animation: fadeSlideUp 0.4s var(--ease-premium) both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .dashboard-stat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}


/* ═══════════════════════════════════════════
   11. MOBILE RESPONSIVE — Global rules
   ═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    height: 60px;
  }
  :root { --nav-height: 60px; }
  [data-theme="dark"] { --nav-height: 60px; }

  .nav-action-btn {
    padding: 6px 12px;
    font-size: 9px;
  }

  .view-tab {
    padding: 6px 14px;
    font-size: 10px;
  }

  .dashboard-view-tabs {
    padding: 8px 12px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .navbar {
    padding: 0 12px;
    height: 56px;
  }
  :root { --nav-height: 56px; }
  [data-theme="dark"] { --nav-height: 56px; }

  .nav-action-btn {
    padding: 5px 10px;
    font-size: 9px;
    letter-spacing: 0.04em;
  }

  .theme-toggle-btn.nav-action-btn {
    padding: 6px 8px;
  }

  .view-tab {
    padding: 5px 12px;
    font-size: 9px;
  }

  /* Prevent iOS zoom on input focus — inputs must be >= 16px */
  input, textarea, select {
    font-size: 16px !important;
  }
}
