/* ============================================================
   Carrerai Website — Styles
   ============================================================ */

:root {
  --gold: #C9A84C;
  --gold-dark: #A68A3E;
  --gold-light: #F5ECD7;
  --dark: #1A1A1A;
  --bg: #FFFFFF;
  --bg2: #FAFAF8;
  --bg3: #F3F3F0;
  --text: #1A1A1A;
  --text2: #4B5563;
  --text3: #9CA3AF;
  --border: #E5E5E0;
  --green: #22C55E;
  --yellow: #EAB308;
  --red: #EF4444;
  --blue: #3B82F6;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--r-sm); font-size: 15px; font-weight: 600;
  border: none; transition: all 0.2s;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-white { background: #fff; color: var(--text); }
.btn-white:hover { background: var(--bg2); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---- Header ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.header-logo {
  display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700;
}
.header-logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.header-nav { display: flex; align-items: center; gap: 32px; }
.header-nav a { font-size: 14px; font-weight: 500; color: var(--text2); transition: color 0.2s; }
.header-nav a:hover { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Hero ---- */
.hero {
  padding: 140px 0 80px; text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.hero h1 {
  font-size: 52px; font-weight: 800; line-height: 1.15; letter-spacing: -1px;
  max-width: 700px; margin: 0 auto 20px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 18px; color: var(--text2); max-width: 560px; margin: 0 auto 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 24px; padding: 6px 16px; border-radius: 20px;
  background: var(--gold-light); color: var(--gold-dark);
  font-size: 13px; font-weight: 600;
}

/* ---- Features ---- */
.features { padding: 100px 0; }
.section-label {
  text-align: center; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold); margin-bottom: 12px;
}
.section-title { text-align: center; font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.section-desc { text-align: center; font-size: 16px; color: var(--text2); max-width: 520px; margin: 0 auto 56px; }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  padding: 32px; border-radius: var(--r); border: 1px solid var(--border);
  background: var(--bg); transition: all 0.3s;
}
.feature-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.feature-icon.gold { background: var(--gold-light); color: var(--gold); }
.feature-icon.green { background: #DCFCE7; color: var(--green); }
.feature-icon.blue { background: #DBEAFE; color: var(--blue); }
.feature-icon.red { background: #FEE2E2; color: var(--red); }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ---- How It Works ---- */
.how-it-works { padding: 100px 0; background: var(--bg2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text2); }

/* ---- Pricing ---- */
.pricing { padding: 100px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 720px; margin: 0 auto; }
.price-card {
  padding: 36px; border-radius: var(--r); border: 1.5px solid var(--border);
  background: var(--bg); position: relative;
}
.price-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-lg);
}
.price-card.featured::before {
  content: "Most Popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #fff; padding: 4px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.price-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.price-amount { font-size: 42px; font-weight: 800; margin-bottom: 4px; }
.price-amount span { font-size: 16px; font-weight: 500; color: var(--text3); }
.price-period { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.price-features { list-style: none; margin-bottom: 28px; }
.price-features li { padding: 8px 0; font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 10px; }
.price-features li::before { content: "✓"; color: var(--green); font-weight: 700; }
.price-features li.disabled { opacity: 0.4; }
.price-features li.disabled::before { content: "✕"; color: var(--text3); }

/* ---- CTA ---- */
.cta-section {
  padding: 80px 0; text-align: center;
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%); color: #fff;
}
.cta-section h2 { font-size: 32px; font-weight: 700; margin-bottom: 14px; }
.cta-section p { font-size: 16px; color: #aaa; margin-bottom: 32px; }

/* ---- Footer ---- */
.site-footer {
  padding: 48px 0; border-top: 1px solid var(--border); background: var(--bg2);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 13px; color: var(--text3); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text3); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* ---- Auth Modal ---- */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg); border-radius: var(--r); padding: 40px;
  width: 420px; max-width: 92vw; box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.modal-box .subtitle { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  font-size: 20px; color: var(--text3); cursor: pointer;
}
.modal-box .divider {
  display: flex; align-items: center; gap: 14px; margin: 20px 0;
  font-size: 13px; color: var(--text3);
}
.modal-box .divider::before, .modal-box .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-google {
  width: 100%; padding: 12px; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--bg); font-size: 14px; font-weight: 600; display: flex; align-items: center;
  justify-content: center; gap: 10px; transition: all 0.2s;
}
.btn-google:hover { border-color: var(--gold); background: var(--bg2); }
.btn-google svg { width: 18px; height: 18px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text2); }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 14px; transition: border-color 0.2s; background: var(--bg);
}
.form-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.1); }
textarea.form-input { resize: vertical; min-height: 100px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 6px; min-height: 18px; }
.form-tabs { display: flex; gap: 0; margin-bottom: 20px; }
.form-tab {
  flex: 1; padding: 10px; text-align: center; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; transition: all 0.2s;
}
.form-tab:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.form-tab:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: none; }
.form-tab.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---- Dashboard Layout ---- */
.dashboard-body { background: var(--bg2); }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
  background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 50;
}
.sidebar-top { padding: 20px 20px 24px; display: flex; align-items: center; gap: 10px; }
.sidebar-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.sidebar-brand { font-size: 18px; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all 0.15s; cursor: pointer;
}
.sidebar-nav a:hover { background: var(--bg2); color: var(--text); }
.sidebar-nav a.active { background: var(--gold-light); color: var(--gold-dark); font-weight: 600; }
.sidebar-nav a .nav-icon { width: 20px; text-align: center; font-size: 16px; }
.sidebar-bottom { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-user { font-size: 13px; color: var(--text3); word-break: break-all; margin-bottom: 10px; }

.dashboard-main { margin-left: 240px; padding: 32px; min-height: 100vh; }
.dash-section { display: none; animation: fadeUp 0.3s ease; }
.dash-section.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dash-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.dash-desc { font-size: 14px; color: var(--text3); margin-bottom: 28px; }

/* ---- Dashboard Cards ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r);
  padding: 20px; transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; }
.stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r);
  padding: 24px; margin-bottom: 20px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg2); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-yellow { background: #FEF9C3; color: #A16207; }
.badge-red { background: #FEE2E2; color: #B91C1C; }
.badge-blue { background: #DBEAFE; color: #1D4ED8; }
.badge-gray { background: var(--bg3); color: var(--text3); }
.badge-gold { background: #FEF3C7; color: #92400E; }

/* ---- AI Result Card ---- */
.ai-result {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
  padding: 24px; margin-top: 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.8;
}
.ai-result h4 { font-weight: 700; margin-bottom: 6px; }

/* ---- Score Ring ---- */
.score-ring {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; position: relative;
}
.score-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 6px solid var(--border);
}
.score-ring.green { color: var(--green); }
.score-ring.green::before { border-color: var(--green); }
.score-ring.yellow { color: var(--yellow); }
.score-ring.yellow::before { border-color: var(--yellow); }
.score-ring.red { color: var(--red); }
.score-ring.red::before { border-color: var(--red); }

/* ---- Upload Area ---- */
.upload-box {
  border: 2px dashed var(--border); border-radius: var(--r); padding: 40px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.upload-box:hover { border-color: var(--gold); background: rgba(201,168,76,0.03); }
.upload-box.drag { border-color: var(--gold); background: var(--gold-light); }
.upload-box p { font-size: 14px; color: var(--text2); margin-top: 8px; }
.upload-box .upload-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ---- Progress ---- */
.progress-track { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.5s ease; }

/* ---- Upgrade Banner ---- */
.upgrade-banner {
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
  color: #fff; border-radius: var(--r); padding: 24px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.upgrade-banner h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.upgrade-banner p { font-size: 13px; color: #aaa; }

/* ---- Spinner ---- */
.spinner {
  display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--border);
  border-top-color: var(--gold); border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Loading State ---- */
.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--text3); font-size: 14px; gap: 14px;
}

/* ---- Chip List ---- */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--bg3); color: var(--text2);
}
.chip.gold { background: var(--gold-light); color: var(--gold-dark); }
.chip.green { background: #DCFCE7; color: #15803D; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 200px; }
  .dashboard-main { margin-left: 200px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .sidebar { width: 60px; overflow: hidden; }
  .sidebar-brand, .sidebar-nav a span, .sidebar-user, .sidebar-bottom .btn span { display: none; }
  .sidebar-nav a { justify-content: center; padding: 12px; }
  .dashboard-main { margin-left: 60px; padding: 20px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .upgrade-banner { flex-direction: column; gap: 14px; text-align: center; }
}

/* ---- Utility ---- */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text3); font-size: 13px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-12 { gap: 12px; }
