/* ===== PROFESSIONAL CSS VARIABLES ===== */
:root {
  /* Colors - Professional palette */
  --bg: #ffffff;
  --fg: #1f2937;
  --text: #1f2937;
  --text-muted: #6b7280;
  --muted: #6b7280;
  --line: #e5e7eb;
  --border: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Typography - Professional scales */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Poppins', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Spacing - Consistent scale */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0d1117;
  --fg: #f0f6fc;
  --text: #f0f6fc;
  --text-muted: #8b949e;
  --muted: #8b949e;
  --line: #30363d;
  --border: #30363d;
  --card: #161b22;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  --primary: #58a6ff;
  --primary-hover: #388bfd;
}

/* ===== BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.6;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--space-md) 0;
  color: var(--fg);
  letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: var(--space-lg); }
h2 { font-size: 1.875rem; margin-bottom: var(--space-lg); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 var(--space-md) 0;
  color: var(--fg);
  line-height: 1.7;
}

.text-muted {
  color: var(--muted);
}

.text-small {
  font-size: 0.75rem;
}

/* Force color consistency */
.vp-container, body, h1, h2, h3, h4, h5, h6, p, span, li, div, label, a, th, td {
  color: var(--fg) !important;
}

/* ===== ENHANCED SELECT STYLING ===== */
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 32px;
}

[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* ===== ENHANCED DETAILS/SUMMARY ===== */
details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  background: var(--card);
  transition: all var(--transition-fast);
}

details:hover {
  border-color: var(--primary);
}

details[open] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

summary {
  cursor: pointer;
  font-weight: 500;
  padding: var(--space-sm);
  margin: calc(-1 * var(--space-sm));
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  list-style: none;
  position: relative;
  padding-left: var(--space-xl);
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '▶';
  position: absolute;
  left: var(--space-sm);
  transition: transform var(--transition-fast);
  color: var(--primary);
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary:hover {
  background: rgba(59, 130, 246, 0.05);
}

/* ===== RANGE INPUT IMPROVEMENTS ===== */
input[type="range"] {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  transition: all var(--transition-fast);
}

input[type="range"]:hover {
  background: var(--primary);
}

/* ===== CHECKBOX & RADIO IMPROVEMENTS ===== */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: var(--space-sm);
  accent-color: var(--primary);
  cursor: pointer;
}
/* ===== LAYOUT COMPONENTS ===== */
.vp-container {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.vp-navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.vp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  min-height: 64px;
}

.vp-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.vp-nav a {
  margin: 0 var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  color: var(--fg);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.vp-nav a:hover {
  background: rgba(var(--primary), 0.1);
  text-decoration: none;
}

.vp-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.vp-main {
  padding: var(--space-2xl) 0;
  min-height: calc(100vh - 200px);
}

.vp-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-lg) 0;
  margin-top: var(--space-2xl);
}

.vp-footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== CARDS ===== */
.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 40px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
/* ===== FORM INPUTS ===== */
.input,
select,
input[type=text],
input[type=number],
input[type=password],
input[type=file],
input[type=email],
input[type=tel],
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus,
select:focus,
input[type=text]:focus,
input[type=number]:focus,
input[type=password]:focus,
input[type=file]:focus,
input[type=email]:focus,
input[type=tel]:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Light theme: professional white inputs */
html:not([data-theme="dark"]) .input,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) input[type=text],
html:not([data-theme="dark"]) input[type=number],
html:not([data-theme="dark"]) input[type=password],
html:not([data-theme="dark"]) input[type=file],
html:not([data-theme="dark"]) input[type=email],
html:not([data-theme="dark"]) input[type=tel],
html:not([data-theme="dark"]) textarea {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 2px solid #e5e7eb !important;
}

html:not([data-theme="dark"]) .input:focus,
html:not([data-theme="dark"]) select:focus,
html:not([data-theme="dark"]) input[type=text]:focus,
html:not([data-theme="dark"]) input[type=number]:focus,
html:not([data-theme="dark"]) input[type=password]:focus,
html:not([data-theme="dark"]) input[type=file]:focus,
html:not([data-theme="dark"]) input[type=email]:focus,
html:not([data-theme="dark"]) input[type=tel]:focus,
html:not([data-theme="dark"]) textarea:focus {
  border-color: #3b82f6 !important;
}

/* Dark theme uses CSS variables */
[data-theme="dark"] .input,
[data-theme="dark"] select,
[data-theme="dark"] input[type=text],
[data-theme="dark"] input[type=number],
[data-theme="dark"] input[type=password],
[data-theme="dark"] input[type=file],
[data-theme="dark"] input[type=email],
[data-theme="dark"] input[type=tel],
[data-theme="dark"] textarea {
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--line);
}

/* Form labels */
label {
  display: block;
  font-weight: 500;
  margin: 0 0 var(--space-xs) 0;
  color: var(--fg);
  font-size: 0.875rem;
}

/* Form groups */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

/* ===== FORM VALIDATION STYLES ===== */
.field-valid {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.field-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-valid:focus,
.field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.field-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}
.row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center }
.muted{ color:var(--muted) }
/* Pills */
.pill{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid var(--line); color:var(--muted) }


/* Brand logo sizing */
.brand-logo{ height:72px !important; width:auto !important; max-height:none; vertical-align:middle; margin-right:10px; display:inline-block; object-fit:contain }
/* Utility */
.mt-1{ margin-top:8px } .mt-2{ margin-top:16px } .mt-3{ margin-top:24px }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px }
/* Home hero and marketing visuals */
.hero{ position: relative; overflow: hidden; background: var(--card); border-radius: 16px; padding: 16px;}
[data-theme="dark"] .hero{ background: linear-gradient(135deg, rgba(30,64,175,.2), rgba(239,68,68,.15)); }
.hero::before{ content:""; position:absolute; inset:0; background: radial-gradient(1200px 400px at -10% -20%, rgba(59,130,246,.25), transparent 60%), radial-gradient(1000px 300px at 110% 20%, rgba(239,68,68,.18), transparent 60%); pointer-events:none }
.hero-card{display:flex; gap:20px; align-items:center; justify-content:space-between; padding: 12px 16px; position: relative;}
.hero-media img{max-width: 360px; height: auto; display:block; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35));}
.hero-copy h1{margin:0 0 6px; font-size: 28px;}
.hero-copy p{margin:0 0 12px;}

/* Desktop defaults: show desktop hero, hide mobile replacement */
.desktop-hero{ display:block }
.mobile-hero-replacement{ display:none }

.features-strip{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-top: 8px;}
.feature-pill{display:flex; align-items:center; gap:10px; padding:10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card)}
.feature-pill .icon{font-size:18px}

.stats-strip{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px}
.stat{padding:12px; border-radius: 12px; border:1px solid var(--line); background: var(--card); text-align:center}

/* Buttons variants */
.btn{transition: transform .05s ease, box-shadow .2s ease;}
.btn:hover{transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.15)}
.btn.alt{background: var(--btn-alt-bg, #0ea5e9); color: #fff;}
.btn.danger{background: var(--btn-danger-bg, #ef4444); color: #fff;}

/* ===== USER MENU STYLES ===== */
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 20;
}

.menu-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--transition-fast);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.menu-item:hover {
  background-color: var(--bg);
  color: var(--fg);
}

[data-theme="dark"] .menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 6px 6px;
  border-radius: 1px;
}

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

.avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 980px){
  .hero-card{flex-direction: column; align-items:flex-start}
  .features-strip, .stats-strip{grid-template-columns: 1fr}
  .hero-media img{max-width:100%}
  .brand-logo{ height:56px !important; }
  
  .menu {
    min-width: 200px;
    right: 0;
  }
}
  .vp-controls{ display:flex; flex-wrap:wrap; gap:8px }
