
/* TrustyBooker - Final Branding Theme (drop-in for /theme.css)
   Palette: Night Navy #0B0F1A, Ink #111624, Panel #141A2B, Border rgba(255,255,255,.08)
   Primary #5B8CFF, Accent #11C5A1, Warning #F59E0B, Danger #EF4444, Text #E7ECF5
*/

/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { font-size: 16px; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height: 1.45;
  background: #0B0F1A;
  color: #E7ECF5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* Disable automatic hyphenation across the entire app */
*, *::before, *::after, p, div, span, h1, h2, h3, h4, h5, h6, li {
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  -moz-hyphens: none !important;
}

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

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

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.2);
}

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

/* Modern Design System - Enhanced Tokens */
:root{
  /* Base Colors */
  --bg: #0A0E18;
  --bg-dim: #0F1220;
  --bg-elevated: #12182A;
  --panel: rgba(20, 26, 43, 0.75);
  --panel-solid: #141A2B;
  --panel-2: #0F1422;
  --panel-glass: rgba(15, 20, 40, 0.6);
  
  /* Text & Content */
  --text: #E7ECF5;
  --text-bright: #F5F7FA;
  --muted: #A7B2C7;
  --muted-dark: #7A8599;
  
  /* Primary Palette */
  --primary: #5B8CFF;
  --primary-600: #4A7AED;
  --primary-700: #3E6EF0;
  --primary-800: #2D5AD4;
  --primary-glow: rgba(91, 140, 255, 0.25);
  
  /* Accent Palette */
  --accent: #11C5A1;
  --accent-600: #0FB594;
  --accent-700: #0DA98B;
  --accent-800: #0A8A74;
  --accent-glow: rgba(17, 197, 161, 0.25);
  
  /* Status Colors */
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --danger: #EF4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --warn: #F59E0B;
  --warn-glow: rgba(245, 158, 11, 0.2);
  --info: #3B82F6;
  --info-glow: rgba(59, 130, 246, 0.2);
  
  /* Borders & Dividers */
  --border: rgba(255,255,255,.08);
  --border-focus: rgba(91, 140, 255, 0.4);
  --border-hover: rgba(255,255,255,.15);
  
  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow: 0 8px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.4);
  --shadow-xl: 0 24px 60px rgba(11,15,26,.45);
  --glow-primary: 0 0 32px var(--primary-glow);
  --glow-accent: 0 0 32px var(--accent-glow);
  
  /* Glass Effects */
  --glass-blur: blur(20px);
  --glass-bg: rgba(15, 20, 40, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Legacy support */
  --link: #9ABEFF;
  --tb-primary: var(--primary);
  --tb-accent: var(--accent);
}


/* Light Mode Theme */
[data-theme="light"], body[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-dim: #F1F5F9;
  --bg-elevated: #FFFFFF;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #FFFFFF;
  --panel-2: #F8FAFC;
  --panel-glass: rgba(255, 255, 255, 0.8);
  
  --text: #1E293B;
  --text-bright: #0F172A;
  --muted: #64748B;
  --muted-dark: #94A3B8;
  
  --primary: #3B7EFF;
  --primary-600: #2563EB;
  --primary-700: #1D4ED8;
  --primary-800: #1E40AF;
  --primary-glow: rgba(59, 126, 255, 0.15);
  
  --accent: #0D9488;
  --accent-600: #0F766E;
  --accent-700: #115E59;
  --accent-800: #134E4A;
  --accent-glow: rgba(13, 148, 136, 0.15);
  
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(59, 126, 255, 0.4);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  
  --link: #2563EB;
}

/* Layout */
.container{ max-width: 1120px; margin: 0 auto; padding: 18px 16px 48px; }
.h-sub{ color: var(--muted); margin:.25rem 0 .75rem; }

/* ===== Brand lockup (text + optional icon) ===== */
.brand-wrap{ display:flex; align-items:center; gap:12px; text-decoration:none; transition: opacity 0.2s ease; }
.brand-wrap:hover{ opacity: 0.85; }
.brand-logo{ 
  width:48px; height:48px; border-radius:12px; 
  background: transparent;
  box-shadow: 0 8px 24px rgba(91,140,255,.35);
  display: flex; align-items: center; justify-content: center; 
  position: relative;
  overflow: hidden;
}
.brand-logo img{
  filter: none;
  object-fit: contain;
}
.brand-logo svg{
  width: 28px; height: 28px; position: relative; z-index: 1;
}
.brand-wordmark{ font-weight: 800; letter-spacing:.3px; display:flex; gap:8px; font-size: 1.25rem; white-space: nowrap; flex-wrap: wrap; }
.brand-trusty{ background: linear-gradient(135deg, var(--text), rgba(255,255,255,0.9)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand-booker{ background: linear-gradient(135deg, var(--accent), #0DA98B); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
@media (max-width: 767px){
  .brand-logo{ width:40px; height:40px; font-size: 20px; }
  .brand-wordmark{ font-size: 1.1rem; }
}

/* ===== Top nav + hamburger ===== */
.nav{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.nav-left, .nav-right{ display:flex; align-items:center; gap:14px; }
.nav-right a{ color: var(--muted); text-decoration:none; padding: 10px 14px; border-radius:12px; }
.nav-right a:hover{ color: var(--text); background: var(--panel-2); }

/* Hamburger */
.hamburger{ display:none; background:transparent; border:1px solid var(--border); color:var(--text); border-radius:12px; padding: 10px 12px; }
.hamburger span{ display:inline-block; width:18px; height:2px; background:var(--text); position:relative; }
.hamburger span::before, .hamburger span::after{
  content:''; position:absolute; left:0; width:18px; height:2px; background:var(--text);
}
.hamburger span::before{ top:-6px; } .hamburger span::after{ top:6px; }

/* Mobile nav sheet (fixed, dark, readable) */
.mobile-sheet{ 
  position: fixed; inset:0; 
  background: rgba(0,0,0,.6); 
  backdrop-filter: blur(8px);
  display:none; 
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
.mobile-sheet.open{ display:block; }
/* Hide popups when mobile menu is open */
/* Prevent body scroll when mobile menu is open - FIXED for mobile */
body.menu-open {
  overflow: hidden !important;
  height: 100vh !important;
}


body.menu-open .tb-popup,
body.menu-open .tb-popup-overlay { display:none !important; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
/* Trusty Mascot Animations - User-Friendly Character Movement */
@keyframes trustyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes trustyGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}
@keyframes trustyWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}
.trusty-logo-animated:hover .trusty-mascot,
.trusty-brand-animated:hover .trusty-mascot {
  animation: trustyBounce 1s ease-in-out infinite;
}
.trusty-glow {
  animation: trustyGlow 3s ease-in-out infinite;
}
.brand-wrap:hover .trusty-logo-animated,
.brand-wrap:hover .trusty-brand-animated {
  animation: trustyWiggle 0.5s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .trusty-logo-animated:hover .trusty-mascot,
  .trusty-brand-animated:hover .trusty-mascot,
  .trusty-glow,
  .brand-wrap:hover .trusty-logo-animated,
  .brand-wrap:hover .trusty-brand-animated {
    animation: none;
  }
}
.mobile-panel{
  position:absolute; top:0; right:0; 
  width:min(85vw, 380px); height:100%;
  background: linear-gradient(180deg, #12182A, #0C1222);
  border-left:2px solid rgba(91, 140, 255, 0.2); 
  box-shadow: -10px 0 60px rgba(0,0,0,0.5); 
  padding:20px;
  color: var(--text);
  animation: slideIn 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-panel::-webkit-scrollbar{ width:6px; }
.mobile-panel::-webkit-scrollbar-track{ background:rgba(255,255,255,0.05); border-radius:3px; }
.mobile-panel::-webkit-scrollbar-thumb{ background:rgba(91,140,255,0.3); border-radius:3px; }
.mobile-panel::-webkit-scrollbar-thumb:hover{ background:rgba(91,140,255,0.5); }
.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-links{ 
  display:flex; 
  flex-direction:column; 
  gap:8px; 
  margin-top:20px; 
}
.mobile-link{
  display:flex; 
  align-items:center; 
  gap: 12px;
  text-decoration:none; 
  color:var(--text);
  padding:14px 16px; 
  font-size:1rem; 
  border-radius:12px; 
  border:1px solid transparent;
  background: rgba(255,255,255,0.03);
  transition: all 0.3s ease;
  position: relative;
}
.mobile-link:hover{ 
  background: rgba(91, 140, 255, 0.1); 
  border-color: rgba(91, 140, 255, 0.3);
  transform: translateX(4px);
}
/* Active page indicator */
.mobile-link.active{
  background: rgba(91, 140, 255, 0.15);
  border-color: rgba(91, 140, 255, 0.4);
  color: #5B8CFF;
  font-weight: 600;
}
.mobile-link.active::before{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 4px 4px 0;
}
/* Visual feedback during tap */
.mobile-link:active{
  transform: scale(0.98);
  opacity: 0.8;
}
.mobile-link-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 140, 255, 0.1);
  border-radius: 12px;
}

/* Modern Button System with Enhanced Microinteractions */
.btn{
  appearance:none; 
  border:1px solid var(--border); 
  color:var(--text); 
  background: var(--panel-glass);
  backdrop-filter: var(--glass-blur);
  padding:12px 20px; 
  border-radius: var(--radius-md); 
  cursor:pointer; 
  transition: all var(--transition-base);
  font-weight:600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.btn::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}
.btn:hover::before{
  left: 100%;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2), transparent 70%);
  transition: opacity var(--transition-fast);
}
.btn:hover{ 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: var(--shadow-lg), var(--glow-primary);
  border-color: var(--border-hover);
}
.btn:hover::after {
  opacity: 1;
}
.btn:active{
  transform: translateY(0) scale(0.98);
  transition: transform var(--transition-fast);
}
.btn.primary{ 
  background: linear-gradient(135deg, var(--primary), var(--primary-600)); 
  border-color: transparent; 
  color:#fff;
  box-shadow: var(--shadow), var(--glow-primary);
}
.btn.primary:hover{ 
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: var(--shadow-lg), 0 0 40px var(--primary-glow);
  transform: translateY(-3px) scale(1.03);
}
.btn.accent{ 
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  border-color: transparent; 
  color:#fff;
  box-shadow: var(--shadow), var(--glow-accent);
}
.btn.accent:hover{
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  box-shadow: var(--shadow-lg), 0 0 40px var(--accent-glow);
}

/* Floating Action Button */
.fab-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(91,140,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 90;
}
.fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(91,140,255,0.5);
}
@media (max-width: 768px) {
  .fab-btn {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
}
.btn.accent:hover{
  background: linear-gradient(135deg, #0DA98B, #0B8A74);
  box-shadow: 0 8px 24px rgba(17,197,161,.4);
}
.btn.ghost{ 
  background: transparent; 
  border-color: var(--border); 
  color: var(--text);
  box-shadow: none;
}
.btn.ghost:hover{
  background: rgba(91,140,255,.08);
  border-color: rgba(91,140,255,.3);
}
.btn.active-tab{
  background: rgba(91,140,255,.15) !important;
  border-color: var(--tb-primary) !important;
  color: var(--tb-primary) !important;
  font-weight: 600;
}
.btn.warn{ 
  background: linear-gradient(135deg, #F59E0B, #D97706); 
  border-color: transparent; 
  color:#fff;
  box-shadow: 0 4px 16px rgba(245,158,11,.25);
}
.btn.warn:hover{
  background: linear-gradient(135deg, #D97706, #B45309);
}
.btn.danger{ 
  background: linear-gradient(135deg, #EF4444, #DC2626); 
  border-color: transparent;
  color:#fff;
  box-shadow: 0 4px 16px rgba(239,68,68,.25);
}
.btn.danger:hover{
  background: linear-gradient(135deg, #DC2626, #B91C1C);
}

/* Loading Spinner for Buttons */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

.btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.btn:disabled:hover{
  transform: none !important;
  box-shadow: none !important;
}

/* Icon support in buttons */
.btn svg, .btn i{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Modern Input System with Glass Effects */
.input, select, textarea{
  width:100%; 
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel-glass); 
  backdrop-filter: var(--glass-blur);
  border:1px solid var(--border); 
  color: var(--text);
  padding:12px 16px; 
  border-radius: var(--radius-md); 
  outline:none;
  transition: all var(--transition-base);
  font-size: 0.95rem;
  resize: vertical;
  position: relative;
}
textarea {
  min-height: 100px;
  font-family: inherit;
  line-height: 1.6;
}
.input:hover, select:hover, textarea:hover{
  border-color: var(--border-hover);
  background: rgba(20, 26, 43, 0.85);
  transform: translateY(-1px);
}
.input:focus, select:focus, textarea:focus{ 
  border-color: var(--border-focus); 
  box-shadow: 0 0 0 4px var(--primary-glow), var(--shadow);
  background: var(--panel-solid);
  transform: translateY(-2px);
}
.input::placeholder{
  color: var(--muted-dark);
  opacity: 0.7;
  transition: opacity var(--transition-base);
}
.input:focus::placeholder{
  opacity: 0.5;
}

/* Input hints & tooltips */
.input-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tooltip-trigger {
  display: inline-block;
  cursor: help;
  font-size: 14px;
  color: var(--primary);
  position: relative;
  transition: transform 0.2s ease;
}
.tooltip-trigger:hover {
  transform: scale(1.2);
}
.tooltip-trigger[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #0B0F1A;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  white-space: normal;
  min-width: 200px;
  max-width: 280px;
  font-size: 0.85rem;
  line-height: 1.4;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
}
.tooltip-trigger[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary);
  z-index: 1001;
}

/* Modern Glass Cards & Panels */
.card{
  background: var(--panel-glass);
  backdrop-filter: var(--glass-blur);
  border:1px solid var(--glass-border); 
  border-radius: var(--radius-lg); 
  padding: var(--space-lg); 
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,140,255,0.3), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--glow-primary);
  border-color: var(--border-hover);
}
.card:hover::before {
  opacity: 1;
}

/* Modern Data Tables */
.table{ 
  width:100%; 
  border-collapse: separate; 
  border-spacing: 0; 
  background: var(--panel-glass);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.table th { 
  background: linear-gradient(135deg, rgba(91,140,255,0.15), rgba(17,197,161,0.1));
  color: var(--text-bright);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  padding: 16px 12px; 
  text-align:left; 
  border-bottom: 2px solid var(--border-focus);
  position: sticky;
  top: 0;
  z-index: 10;
}
.table td { 
  border-bottom:1px solid var(--border); 
  padding:14px 12px; 
  text-align:left; 
  font-size:.95rem;
  transition: all var(--transition-fast);
}
.table tr:hover td { 
  background: rgba(91,140,255,0.08);
  transform: scale(1.01);
}
.table tbody tr {
  transition: all var(--transition-base);
  border-left: 3px solid transparent;
}
.table tbody tr:hover {
  border-left-color: var(--primary);
}

/* Standardized table scroll wrapper */
.table-scroll { 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch; 
  margin: 0; 
  position: relative;
  border-radius: 8px;
}
@media (max-width: 768px){
  .table-scroll { margin: 0 -16px; padding: 0 16px; }
  .table { min-width: 100%; width: 100%; }
}

/* Cards Grid Layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
/* Modern Card Animations */
@keyframes cardEntranceSlide { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes shimmerProgress { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 20px rgba(91,140,255,0.1); } 50% { box-shadow: 0 0 35px rgba(91,140,255,0.25); } }

.credit-card {
  background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(30,41,59,0.9));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardEntranceSlide 0.5s ease-out forwards;
  opacity: 0;
}
.credit-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91,140,255,0.1), rgba(17,197,161,0.1));
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}
.credit-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 0 40px rgba(91,140,255,0.2);
  border-color: rgba(91,140,255,0.4);
}
.credit-card:hover::after {
  opacity: 1;
}
.credit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #5B8CFF, #11C5A1, #5B8CFF);
  background-size: 200% 100%;
  animation: shimmerProgress 3s linear infinite;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  flex: 1;
  min-width: 0;
}
.card-health {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.health-good { background: rgba(16, 185, 129, 0.2); color: #10B981; }
.health-warning { background: rgba(245, 158, 11, 0.2); color: #F59E0B; }
.health-danger { background: rgba(239, 68, 68, 0.2); color: #EF4444; }

/* Tier Badge Overlay on Logo */
.brand-logo-wrapper {
  position: relative;
  display: inline-block;
}
.tier-logo-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 2px solid #0F1424;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}
.tier-sky {
  background: linear-gradient(135deg, #5B8CFF, #4A7CE8);
}
.tier-orbit {
  background: linear-gradient(135deg, #06B6D4, #0891B2);
}
.tier-nebula {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}
.tier-admin {
  background: linear-gradient(135deg, #A855F7, #9333EA);
}

/* Dashboard Tier Badge */
.dashboard-tier-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  max-width: 100%;
  overflow: hidden;
}
.dashboard-tier-badge .tier-text {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.dashboard-tier-badge svg {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

/* Tier-specific colors */
.tier-badge-FREE {
  background: rgba(167, 178, 199, 0.15);
  border: 1px solid rgba(167, 178, 199, 0.3);
}
.tier-badge-FREE .tier-text {
  color: #A7B2C7;
}
.tier-badge-STARTER {
  background: rgba(91, 140, 255, 0.15);
  border: 1px solid rgba(91, 140, 255, 0.3);
}
.tier-badge-STARTER .tier-text {
  color: #5B8CFF;
}
.tier-badge-PRO {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.tier-badge-PRO .tier-text {
  color: #06B6D4;
}
.tier-badge-PREMIUM {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.tier-badge-PREMIUM .tier-text {
  color: #F59E0B;
}
.tier-badge-ENTERPRISE {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.tier-badge-ENTERPRISE .tier-text {
  color: #A855F7;
}
.tier-badge-ADMIN {
  background: rgba(91, 140, 255, 0.15);
  border: 1px solid rgba(91, 140, 255, 0.3);
}
.tier-badge-ADMIN .tier-text {
  color: #5B8CFF;
}

.card-utilization {
  margin: 16px 0;
}
.utilization-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--muted);
}
.utilization-percentage {
  font-weight: 600;
  color: var(--text);
}
.utilization-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.utilization-fill {
  height: 100%;
  border-radius: 10px;
  position: relative;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.utilization-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmerProgress 2s infinite;
  background-size: 200% 100%;
  transition: width 0.3s ease;
}
.card-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.detail-item {
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}
.detail-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.detail-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}
.detail-value input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 600;
  padding: 4px 0;
}
.detail-value input:focus {
  outline: none;
  border-bottom: 1px solid var(--primary);
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.card-actions .btn {
  flex: 1 1 auto;
  min-width: 100px;
}
@media (max-width: 480px) {
  .card-actions {
    flex-direction: column;
  }
  .card-actions .btn {
    width: 100%;
    min-width: unset;
  }
}
.empty-cards-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-cards-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-cards-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.empty-cards-list {
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}
.empty-cards-list li {
  padding-left: 8px;
  margin-bottom: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}
.toast {
  pointer-events: all;
  background: linear-gradient(135deg, #12182A, #0F1424);
  border: 1px solid rgba(91,140,255,0.3);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.3s ease-out;
  min-width: 280px;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastFadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}
.toast.removing {
  animation: toastFadeOut 0.3s ease-out forwards;
}
.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.toast-content {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}
.toast-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.toast-close:hover {
  color: #fff;
}
.toast.success {
  border-color: rgba(17,197,161,0.4);
}
.toast.error {
  border-color: rgba(239,68,68,0.4);
}
.toast.warning {
  border-color: rgba(245,158,11,0.4);
}
.toast.info {
  border-color: rgba(91,140,255,0.4);
}
@media (max-width: 768px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
  .toast {
    min-width: auto;
  }
}

/* Confirmation Modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-modal.open {
  display: flex;
}
.confirm-box {
  background: linear-gradient(180deg, #10172A, #0C1222);
  border: 1px solid rgba(91,140,255,0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalFadeIn 0.3s ease-out;
}
.confirm-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.confirm-message {
  color: #A7B2C7;
  margin-bottom: 20px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Pricing grid */
.pricing-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; }
.price-card{ position:relative; }
.badge{
  position:absolute; top:12px; right:12px; font-size:.75rem; background: #0F1A30; color:#B4CDFF;
  border:1px solid var(--border); padding:4px 8px; border-radius:999px;
}
.price-amt{ font-size: 1.9rem; font-weight:800; margin: 6px 0 2px; }
.price-feats{ list-style:none; padding:0; margin:.5rem 0 0; }
.price-feats li{ margin:.25rem 0; color: var(--muted); }

/* Notification bell/drawer (from pack) */
.tb-bell{ 
  border:1px solid var(--border); 
  border-radius:12px; 
  background: linear-gradient(135deg, #0F1526, #0B1220);
  color:var(--text);
  transition: all 0.2s ease;
}
.tb-bell:hover{
  background: linear-gradient(135deg, #12182A, #0F1526);
  border-color: rgba(91,140,255,.3);
}
.tb-dot{ 
  background: linear-gradient(135deg, #EF4444, #DC2626);
  box-shadow: 0 0 8px rgba(239,68,68,.5);
}

/* Modern Status Badges */
.badge-success{
  background: linear-gradient(135deg, #11C5A1, #0DA98B);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.badge-warning{
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.badge-info{
  background: linear-gradient(135deg, #5B8CFF, #4A7AED);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Chat bubbles */
#chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.chat-user, .chat-bot {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 85%;
  line-height: 1.5;
  font-size: 0.95rem;
  animation: slideIn 0.3s ease;
}

.chat-user {
  background: linear-gradient(135deg, #5B8CFF, #4A7AED);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(91, 140, 255, 0.3);
}

.chat-bot {
  background: linear-gradient(135deg, #12182A, #0F1424);
  color: #E7ECF5;
  align-self: flex-start;
  border: 1px solid rgba(91, 140, 255, 0.2);
  border-bottom-left-radius: 4px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Links */
a{ color: var(--link); }
a:hover{ color: #c6dbff; }

/* Hero/landing */
.hero{
  background: radial-gradient(1200px 600px at 20% -10%, rgba(91,140,255,.18), transparent),
              radial-gradient(1000px 600px at 110% 10%, rgba(17,197,161,.14), transparent);
  border:1px solid var(--border); border-radius:20px; padding:32px 28px;
  margin-bottom: 28px;
}

/* Enhanced typography */
.h-eyebrow{ 
  font-size: 0.9rem; 
  color: var(--accent); 
  font-weight: 600; 
  letter-spacing: 0.3px; 
  margin-bottom: 16px; 
  display: block;
  text-transform: uppercase;
  opacity: 0.95;
}

.h-title{ 
  font-size: 3rem; 
  font-weight: 900; 
  line-height: 1.4; 
  margin: 0 0 24px 0;
  background: linear-gradient(135deg, #E7ECF5 0%, #9ABEFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h-sub{ 
  font-size: 1.15rem; 
  color: var(--muted); 
  line-height: 1.6; 
  margin: 0 0 24px 0;
  max-width: 680px;
}

/* Better visual elements */
.hero-visual{
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(91,140,255,.12), transparent 70%);
}

/* Enhanced animated bubbles */
.bubble{
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(91,140,255,.4), rgba(17,197,161,.3));
  filter: blur(1px);
  opacity: 0.7;
  animation: float 6s ease-in-out infinite;
}
.bubble.b1{ width: 180px; height: 180px; top: 20%; left: 15%; animation-delay: 0s; }
.bubble.b2{ width: 140px; height: 140px; top: 50%; right: 20%; animation-delay: 2s; }
.bubble.b3{ width: 100px; height: 100px; bottom: 25%; left: 45%; animation-delay: 4s; }

@keyframes float{
  0%, 100%{ transform: translateY(0) scale(1); opacity: 0.7; }
  50%{ transform: translateY(-20px) scale(1.05); opacity: 0.85; }
}

/* Performance hints for animations */
.bubble{
  will-change: transform, opacity;
}
.step:hover{
  will-change: transform, box-shadow;
}
.btn{
  will-change: transform, background-color;
}

/* 2025 CSS Containment & Content Visibility for advanced performance */
.card{
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
.step{
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
/* Lazy render below-fold sections for faster initial paint */
.lazy-section{
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}
.mobile-sheet{
  contain: layout;
}

/* Better logo pills */
.logos{ 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  margin-top: 24px;
}
.logo-pill{ 
  background: rgba(91,140,255,.08); 
  border: 1px solid rgba(91,140,255,.15); 
  padding: 8px 14px; 
  border-radius: 20px; 
  font-size: 0.85rem; 
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .logo-pill {
    white-space: normal;
    text-wrap: balance;
  }
}

/* Enhanced Steps Section */
.steps{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.step{
  background: linear-gradient(145deg, #12182A, #0F1424);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  border-color: rgba(91,140,255,.3);
}
.step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.num{
  min-width: 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.step-title{
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.step-text{
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.step h3{
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text);
}
.step p{
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Enhanced Features Section */
.features{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.feature{
  background: linear-gradient(135deg, #0F1526, #0C1220);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  transition: border-color 0.2s ease;
}
.feature:hover{
  border-color: rgba(91,140,255,.25);
}
.feature strong{
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}

/* Enhanced Testimonials */
.testimonials{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.testi{
  background: linear-gradient(145deg, #12182A, #0F1424);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
}
.testi::before{
  content: '"';
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 3rem;
  color: rgba(91,140,255,.2);
  font-family: Georgia, serif;
  line-height: 1;
}
.who{
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
}

/* Enhanced CTA Section */
.cta{
  text-align: center;
  margin-top: 40px;
  padding: 32px 24px;
  background: radial-gradient(800px 400px at 50% 50%, rgba(91,140,255,.12), transparent),
              linear-gradient(180deg, #12182A, #0F1424);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.cta h3{
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 12px 0;
  background: linear-gradient(135deg, #E7ECF5 0%, #9ABEFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cta p{
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 24px 0;
}

/* Utility */
.grid{ display:grid; gap:12px; }
@media (max-width: 1024px){
  .pricing-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px){
  .nav-right{ display:none; }
  .hamburger{ display:inline-flex; }
  .brand-wordmark{ font-size: 1rem; max-width: calc(100vw - 120px); }
  .pricing-grid{ grid-template-columns: 1fr; }
  .table th, .table td{ font-size:.95rem; padding: 10px 8px; }
  .steps{ grid-template-columns: 1fr; }
  .features{ grid-template-columns: 1fr; }
  .testimonials{ grid-template-columns: 1fr; }
  .metrics-dashboard{ grid-template-columns: 1fr !important; gap: 12px; }
  .metric-card-dash{ padding: 16px !important; }
  .metric-card-dash div[style*="font-size: 2rem"]{ font-size: 1.75rem !important; }
}

/* Extra small screens - zero overlaps */
@media (max-width: 480px){
  .btn, button{ 
    white-space: normal !important;
  }
  .brand-wordmark{ 
    font-size: 0.95rem; 
    white-space: normal !important;
  }
  h1{ font-size: 1.75rem; }
  h2{ font-size: 1.5rem; }
  .login-title{ font-size: 1.75rem !important; }
  .login-container{ padding: 24px 20px !important; }
  
  /* Stack card details grid on very small screens - prevent overlap */
  .card-details {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  /* Ensure all inputs fit - zero overflow */
  input, select, textarea, .input {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Prevent any grid overflow */
  [class*="grid"], .grid {
    max-width: 100% !important;
  }
}

/* Tablet/Mobile tier badge responsive (768px first, then 480px overrides) */
@media (max-width: 768px) {
  .dashboard-tier-badge {
    padding: 6px 12px;
    gap: 8px;
    font-size: 0.85rem;
    max-width: calc(100vw - 140px);
  }
  .dashboard-tier-badge .tier-text {
    font-size: 0.85rem;
    max-width: 120px;
  }
  .dashboard-tier-badge svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* Extra small screens - tier badge overrides */
@media (max-width: 480px) {
  .dashboard-tier-badge {
    padding: 6px 10px;
    gap: 8px;
    max-width: calc(100vw - 100px);
  }
  .dashboard-tier-badge .tier-text {
    font-size: 0.8rem;
    max-width: 100px;
  }
  .dashboard-tier-badge svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ==== Touch-Friendly Form Inputs (44px minimum touch targets) =============================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  min-height: 44px;
  padding: 12px 16px;
  font-size: 16px; /* Prevents iOS zoom on focus */
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  transition: all 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.1);
}

/* Mobile-specific form enhancements */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important; /* Critical: prevents iOS auto-zoom */
    min-height: 48px; /* Larger touch target on mobile */
  }
  
  .btn {
    min-height: 48px;
    padding: 14px 24px;
    font-size: 16px;
  }
  
  /* Make form grids stack on mobile */
  form > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Calculator outputs and summaries - overflow protection */
#utilSummary, #stmtSummary, #payOut, .calc-output, .result-summary {
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tag elements used in calculator outputs */
.tag {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* ==== Mobile-First Data Tables & Responsive Cards =============================== */
/* Mobile-optimized table: converts to card layout on small screens */
.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table thead { background: rgba(91, 140, 255, 0.1); }
.responsive-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: #5B8CFF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.responsive-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}
.responsive-table tr:hover {
  background: rgba(91, 140, 255, 0.05);
}

@media (max-width: 768px) {
  /* Hide table headers on mobile */
  .responsive-table thead {
    display: none;
  }
  
  /* Make table rows into cards */
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr {
    display: block;
    width: 100%;
  }
  
  .responsive-table tr {
    margin-bottom: 16px;
    background: linear-gradient(135deg, #12182A, #0F1424);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  
  .responsive-table tr:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #1a2332, #12182A);
  }
  
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border: none;
    font-size: 0.95rem;
  }
  
  .responsive-table td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #A7B2C7;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 12px;
  }
  
  .responsive-table td:last-child {
    padding-bottom: 0;
  }
  
  /* Mobile-optimized action buttons in tables */
  .responsive-table button,
  .responsive-table .btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 15px;
    white-space: nowrap;
  }
}

/* ===== SEO & UX OPTIMIZATION: Enhanced Text Overflow & Word Breaking ===== */
/* Global word-break rules for user-friendly text wrapping */
.responsive-table td {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.responsive-table td[data-label="Description"],
.responsive-table td[data-label="Email"] {
  max-width: 200px;
}

/* Enhanced word-break for emails, URLs, and long text */
.responsive-table td[data-label="Email"],
.email-text,
[type="email"],
a[href^="mailto:"] {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.responsive-table td[data-label="URL"],
.responsive-table td[data-label="Link"],
.url-text,
a[href^="http"],
a[href^="https"] {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Long card names and descriptions */
.card-name,
.card-issuer,
.notification-title,
.milestone-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Mobile: Enable proper word wrapping */
@media (max-width: 768px) {
  .responsive-table td {
    max-width: none;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  /* Mobile text optimization */
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  p, div, span, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }
  
  .container, .card, .panel {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ==== Mobile polish (menu, overlaps, Trusty popup) =============================== */
@media (max-width: 768px){
  .nav-menu, .sheet, .drawer, .mobile-sheet, .mobile-panel {
    background: rgba(10,14,18,.98) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 10px 40px rgba(0,0,0,.4);
    font-size: 18px;
    line-height: 1.5;
  }
  .nav-menu a, .mobile-links a { 
    color: #e6f3ff; 
    display:block; 
    padding:12px 16px; 
  }
  .nav-menu a:hover, .mobile-links a:hover { 
    background: rgba(255,255,255,.06); 
    border-radius:12px; 
  }

  /* Remove stray numeric bullets (like "1 / 2 / 3") if any list styles leak */
  .steps, .how-it-works, ol, .ol {
    list-style: none !important;
    counter-reset: none !important;
  }
  .steps li::marker { content: "" !important; }

  /* Trusty popup spacing so it doesn't cover CTA */
  .trusty-pop {
    max-width: 600px;
    width: calc(100% - 32px);
    left: 16px; 
    right: 16px; 
    bottom: 16px;
    z-index: 60;
  }

  /* Better mobile spacing for landing page */
  .container {
    padding: 16px 20px;
  }
  
  .hero {
    padding: 24px 18px !important;
    margin-bottom: 24px;
  }
  
  .hero .card {
    flex-direction: column;
    gap: 8px !important;
  }
  
  .hero .btn {
    width: 100%;
    justify-content: center;
  }
  
  .h-title {
    font-size: 2rem !important;
    line-height: 1.4 !important;
    margin: 16px 0 !important;
  }
  
  .h-sub {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }
  
  .num {
    min-width: 42px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
  }
  
  .step-header {
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
  
  .step-title {
    font-size: 1.15rem !important;
    line-height: 1.4 !important;
  }
  
  .step-text {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
  
  .hero-visual {
    min-height: 200px !important;
  }
  
  .logos {
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 16px !important;
  }
  
  .steps {
    margin-top: 24px !important;
    gap: 16px !important;
  }
  
  .step {
    padding: 20px !important;
  }
  
  .step h3 {
    font-size: 1.2rem !important;
    margin: 8px 0 !important;
  }
  
  .features {
    gap: 12px !important;
  }
  
  .feature {
    font-size: 0.95rem !important;
    padding: 14px !important;
  }
  
  .testimonials {
    margin-top: 20px !important;
    gap: 12px !important;
  }
  
  .testi {
    padding: 16px !important;
    font-size: 0.95rem !important;
  }
  
  .cta {
    margin-top: 28px !important;
    padding: 24px 20px !important;
  }
  
  .cta h3 {
    font-size: 1.4rem !important;
  }
  
  /* Proper z-index hierarchy (consistent with desktop):
     Toast: 100000, Confirm: 100001, Trusty Modal: 10000, Mobile Menu: 9999, Drawer: 9997, Chat: 9995, Float Btn: 9000 */
  .trusty-modal { z-index: 10000 !important; }
  .mobile-panel { z-index: 9999 !important; }
  .tb-drawer { z-index: 9997 !important; }
  #tbDrawer { z-index: 9997 !important; }
  .trusty-chat { z-index: 9995 !important; }
  .trusty-float-btn { bottom: 20px !important; right: 16px !important; z-index: 9000 !important; }
}

/* Slightly brighter body text for contrast on dark */
body { color: rgba(240,246,255,.92); }

/* ===== SKELETON LOADERS & LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.03) 25%, 
    rgba(255,255,255,0.08) 50%, 
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
  border-radius: 6px;
}

.skeleton-card {
  height: 120px;
  border-radius: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Modern Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(91,140,255,0.15);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: modernSpin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-large {
  width: 48px;
  height: 48px;
  border-width: 4px;
  box-shadow: 0 0 20px rgba(91,140,255,0.3);
}

@keyframes modernSpin {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modern Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--panel-glass);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  z-index: 100;
  border-radius: inherit;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ARIA live region for screen readers */
.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== ENHANCED ACCESSIBILITY ===== */
/* Better focus indicators for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(91, 140, 255, 0.2);
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -60px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  z-index: 100000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid white;
  outline-offset: -3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255,255,255,0.3);
    --text: #FFFFFF;
  }
  
  .btn {
    border-width: 2px;
  }
  
  input, select, textarea {
    border-width: 2px;
  }
}

/* ===== PERFORMANCE & UX ENHANCEMENTS ===== */
/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Loading state for buttons */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Lazy loaded images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Error states */
.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-message::before {
  content: '⚠️';
  font-size: 16px;
}

.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* Success states */
.success-message {
  color: var(--accent);
  font-size: 0.875rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.success-message::before {
  content: '✅';
  font-size: 16px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.empty-state-description {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

/* Progress indicators */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
  border-radius: 4px;
}

/* Tooltip accessibility improvements */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  white-space: nowrap;
  font-size: 0.875rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary);
  z-index: 1001;
}

/* ===== MOBILE-SPECIFIC OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  /* Prevent text size adjust on iOS */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  /* Tap highlight color */
  * {
    -webkit-tap-highlight-color: rgba(91, 140, 255, 0.2);
  }
  
  /* Improve touch scrolling */
  .mobile-panel,
  .modal-content,
  .drawer-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* Better mobile tooltips */
  [data-tooltip]:hover::after,
  [data-tooltip]:focus::after {
    bottom: auto;
    top: calc(100% + 8px);
    max-width: calc(100vw - 40px);
    white-space: normal;
  }
  
  [data-tooltip]:hover::before,
  [data-tooltip]:focus::before {
    bottom: auto;
    top: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--primary);
  }
}

/* ===== PERFORMANCE: Contain layout shifts ===== */
.card, .btn, .input, select, textarea {
  contain: layout style;
}

.hero, .feature, .testi {
  contain: layout;
}

/* Will-change for animations */
.toast, .modal, .drawer, .confirm-modal {
  will-change: transform, opacity;
}

.btn:hover, .card:hover {
  will-change: transform;
}

/* ===== MASCOT TRANSPARENCY (Brand Guide) ===== */
.hero-owl, .tb-mascot, .hero-owl *, .mascot-wrapper, .mascot-container {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hero-owl, .mascot-wrapper, .mascot-container {
  box-shadow: none !important;
  border: 0 !important;
}

.tb-mascot, img[src*="mascot"], img[alt*="Trusty"] {
  display: block;
  width: 100%;
  height: auto;
  max-width: 560px;
  margin: 0 auto;
  image-rendering: auto;
  mix-blend-mode: normal !important;
  filter: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  background: transparent !important;
}

/* Kill overlays that cause square background - but NOT the mascot! */
.hero::before,
.hero-overlay,
.hero > .overlay {
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
}

/* Optional: soft glow for mascot on dark backgrounds */
.tb-mascot-glow {
  box-shadow: 0 0 42px rgba(17, 184, 177, 0.25);
  border-radius: 24px;
}

/* Transparent gradient option (instead of solid fill) */
.hero-owl-gradient {
  background: radial-gradient(120% 120% at 50% 0%,
              rgba(17, 184, 177, 0.12) 0%,
              rgba(3, 22, 38, 0) 60%) !important;
  border-radius: 24px;
}

/* ===== ANIMATED HEAD HOVER & BLINK (from TrustyBooker_Animated_Head_Pack) ===== */
.tb-hover-animate {
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
  animation: tbBlink 4.5s infinite ease-in-out;
}

@keyframes tbBlink {
  0%, 92%, 100% { transform: rotate(0deg) scale(1); filter: brightness(1); }
  45% { transform: rotate(-2deg) scale(1.02); }
  55% { transform: rotate(2deg) scale(1.02); }
}

.tb-hover-animate:hover {
  transform: translateY(-3px) scale(1.05);
  filter: brightness(1.12) saturate(1.1);
}
