/* ══════════════════════════════════════════════
   GLOBAL CSS — AI Placement Copilot
   Design System: Dark, Premium, Glassmorphism
══════════════════════════════════════════════ */

/* ── RESET & TOKENS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-900: #050508;
  --bg-800: #0d0d14;
  --bg-700: #13131f;
  --bg-600: #1a1a2e;
  --bg-glass: rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);

  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #a855f7;
  --accent-teal: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-100: #f8fafc;
  --text-200: #e2e8f0;
  --text-300: #94a3b8;
  --text-400: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-float: 0 20px 60px rgba(0,0,0,0.5);

  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-900);
  color: var(--text-200);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-family: var(--font-heading); line-height: 1.2; color: var(--text-100); }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--text-300); }
a  { color: inherit; text-decoration: none; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.btn::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,0); transition: background 0.2s; }
.btn:hover::after { background:rgba(255,255,255,0.06); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.45); }

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-200);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-glass-hover); border-color: var(--border-hover); transform: translateY(-2px); }

.btn-secondary {
  background: rgba(99,102,241,0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.25);
}
.btn-secondary:hover { background: rgba(99,102,241,0.2); }

.btn-xl { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: 0.84rem; }

/* ── GLASS CARD ── */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.glass-card:hover { border-color: var(--border-hover); }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
  border: 1px solid;
}
.badge-primary { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.badge-danger  { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.3);  color: #f87171; }

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SECTION HEADERS ── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-300); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.section-tag {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 14px; border-radius: 100px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: var(--primary-light); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── INPUTS ── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.87rem; font-weight: 500; color: var(--text-200); }
.input-field {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-100); font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; width: 100%;
}
.input-field::placeholder { color: var(--text-400); }
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.input-field option { background: var(--bg-700); }

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field .input-field {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  min-width: 56px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-glass);
  color: var(--text-200);
  font: 700 0.78rem var(--font-body);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: var(--border-hover);
  background: var(--bg-glass-hover);
  outline: none;
}

.password-strength {
  display: grid;
  gap: 6px;
  color: var(--text-300);
  font-size: 0.82rem;
}

.strength-meter {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-600);
}

.strength-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 0.2s ease, background 0.2s ease;
}

.strength-meter span[data-strength="medium"] {
  background: var(--warning);
}

.strength-meter span[data-strength="strong"] {
  background: var(--success);
}

.password-guidance {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-400);
  font-size: 0.8rem;
}

.password-guidance li.met,
.field-message.success {
  color: #34d399;
}

.field-message {
  min-height: 18px;
  color: var(--text-400);
  font-size: 0.82rem;
}

.field-message.error {
  color: #f87171;
}

.input-field.is-invalid {
  border-color: rgba(239, 68, 68, 0.75);
}

.input-field.is-valid {
  border-color: rgba(16, 185, 129, 0.65);
}

/* ── ORB BACKGROUNDS ── */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none; opacity: 0.5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-900); }
::-webkit-scrollbar-thumb { background: var(--bg-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── CHIP ── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
}
.chip-green { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.chip-red   { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.chip-yellow{ background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.chip-blue  { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.chip-purple{ background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg-700); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-float); min-width: 280px;
  animation: slideInToast 0.35s cubic-bezier(0.4,0,0.2,1);
}
.toast.toast-success { border-color: rgba(16,185,129,0.4); }
.toast.toast-error   { border-color: rgba(239,68,68,0.4); }
@keyframes slideInToast { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ── PROGRESS BAR ── */
.progress-bar { height: 6px; background: var(--bg-600); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 100px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px);} to { opacity:1; transform:translateY(0);} }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes pulse    { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }
@keyframes float    { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-12px); } }
@keyframes rotate   { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes shimmer  { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.4,0,0.2,1) both; }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; background: var(--bg-700); border-radius: var(--radius-md); padding: 4px; }
.tab-btn {
  flex: 1; padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 0.87rem; font-weight: 600; border: none; cursor: pointer;
  background: transparent; color: var(--text-300);
  transition: all 0.2s;
}
.tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.tab-btn:not(.active):hover { background: var(--bg-glass); color: var(--text-200); }

/* ── SKELETON LOADER ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-700) 25%, var(--bg-600) 50%, var(--bg-700) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Production polish layer: restrained Vyroo SaaS theme */
:root {
  --bg-900: #08090d;
  --bg-800: #101116;
  --bg-700: #171922;
  --bg-600: #20232d;
  --bg-glass: rgba(255, 255, 255, 0.045);
  --bg-glass-hover: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);
  --primary: #7c8cff;
  --primary-light: #aeb8ff;
  --primary-dark: #5664d9;
  --accent: #6ee7d8;
  --accent-teal: #54d7c8;
  --text-100: #f6f7fb;
  --text-200: #e7e9f0;
  --text-300: #a8afbd;
  --text-400: #757d8d;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.26);
  --shadow-float: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] {
  --bg-900: #f6f7f9;
  --bg-800: #ffffff;
  --bg-700: #f1f3f6;
  --bg-600: #e7eaf0;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(15, 23, 42, 0.18);
  --primary: #3f5dcb;
  --primary-light: #4f67d8;
  --primary-dark: #314ba8;
  --accent: #0f766e;
  --accent-teal: #0f766e;
  --success: #047857;
  --warning: #b45309;
  --danger: #dc2626;
  --text-100: #111827;
  --text-200: #1f2937;
  --text-300: #4b5563;
  --text-400: #6b7280;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-float: 0 24px 70px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
  letter-spacing: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 140, 255, 0.08), transparent 34rem),
    var(--bg-900);
}

:root[data-theme="light"] body {
  background: linear-gradient(180deg, #fbfcfd 0%, var(--bg-900) 46%);
}

.glass-card,
.feature-card,
.metric-card,
.stat-item,
.result-card,
.portfolio-preview-card,
.company-card,
.modal,
.edit-modal,
.onboard-card {
  box-shadow: var(--shadow-soft);
}

.glass-card,
.feature-card,
.metric-card,
.result-card,
.company-card,
.edit-modal,
.onboard-card {
  backdrop-filter: blur(14px);
}

.btn {
  border-radius: 999px;
  min-height: 40px;
  justify-content: center;
}

.btn-primary {
  background: var(--text-100);
  color: var(--bg-900);
  box-shadow: none;
}

.btn-primary:hover {
  box-shadow: var(--shadow-soft);
}

.btn-secondary,
.btn-ghost {
  background: var(--bg-glass);
}

.input-field,
input,
select,
textarea {
  border-radius: 14px;
}

.input-field:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.14);
}

.vyroo-theme-toggle {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-200);
  font: 700 0.78rem var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vyroo-theme-toggle:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.vyroo-global-footer,
.footer {
  color: var(--text-400);
}

.vyroo-global-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg-800) 84%, transparent);
}

.vyroo-footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.vyroo-footer-links a {
  color: var(--text-300);
  transition: color 0.2s;
}

.vyroo-footer-links a:hover {
  color: var(--text-100);
}

.vyroo-footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-400);
}

.vyroo-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10000;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-800) 94%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(22px);
}

.vyroo-cookie-banner strong {
  display: block;
  color: var(--text-100);
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.vyroo-cookie-banner p {
  font-size: 0.82rem;
  color: var(--text-400);
  margin: 0;
}

.vyroo-cookie-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vyroo-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.vyroo-loading-overlay.show {
  display: flex;
}

.vyroo-loading-card {
  min-width: 220px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-800);
  box-shadow: var(--shadow-float);
  text-align: center;
}

.vyroo-loading-card p {
  margin-top: 14px;
  font-size: 0.9rem;
}

.toast {
  border-radius: 18px;
  background: var(--bg-800);
  color: var(--text-200);
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg-700);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-100);
}

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-shell {
  width: min(900px, calc(100% - 32px));
  margin: 96px auto 48px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-glass);
  box-shadow: var(--shadow-card);
}

.legal-shell h1 {
  margin-bottom: 10px;
}

.legal-shell h2 {
  font-size: 1.05rem;
  margin: 28px 0 8px;
}

.legal-shell p,
.legal-shell li {
  color: var(--text-300);
  font-size: 0.95rem;
}

.legal-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-300);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.auth-panel {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 440px);
  gap: 44px;
  align-items: center;
}

.auth-logo {
  position: absolute;
  top: 28px;
  left: max(24px, calc((100vw - 1040px) / 2));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-100);
}

.auth-logo .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--text-100);
  color: var(--bg-900);
}

.auth-copy h1 {
  max-width: 560px;
  margin: 12px 0 16px;
}

.auth-copy p {
  max-width: 500px;
  font-size: 1.04rem;
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.auth-stack {
  display: grid;
  gap: 14px;
}

.auth-card-compact {
  padding: 20px;
}

.auth-card .btn {
  width: 100%;
}

.google-auth-btn {
  justify-content: center;
}

.auth-inline-link {
  margin: -6px 0 0;
  text-align: right;
  font-size: 0.86rem;
}

.auth-inline-link a {
  color: var(--primary-light);
  font-weight: 700;
}

.auth-message {
  min-height: 22px;
  color: var(--text-400);
  font-size: 0.86rem;
}

.auth-message.error {
  color: #f87171;
}

.auth-message.success {
  color: #34d399;
}

.input-field[readonly] {
  cursor: not-allowed;
  color: var(--text-300);
  background: rgba(255,255,255,0.02);
}

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--primary-light);
  font-weight: 700;
}

@media (max-width: 760px) {
  .vyroo-cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .vyroo-cookie-actions {
    justify-content: stretch;
  }

  .vyroo-cookie-actions .btn {
    flex: 1;
  }

  .vyroo-global-footer {
    padding: 20px;
  }

  .legal-shell {
    margin-top: 72px;
    padding: 24px;
  }

  .auth-shell {
    padding-top: 92px;
  }

  .auth-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-logo {
    left: 20px;
  }
}
