@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --secondary: #6366f1;
  --accent: #8b5cf6;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --score-excellent: #22c55e;
  --score-good: #84cc16;
  --score-fair: #eab308;
  --score-poor: #f97316;
  --score-verypoor: #ef4444;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ═══════ NAVBAR ═══════ */
.credit-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); height: var(--nav-height); }
.credit-nav-inner { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 100%; padding: 0 1.5rem; }
.credit-nav-left { display: flex; align-items: center; gap: 2rem; }
.credit-nav-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; color: var(--primary-dark); }
.brand-icon { color: var(--primary); }
.brand-accent { color: var(--text-primary); font-weight: 900; }
.credit-nav-links { display: flex; gap: 0.25rem; }
.credit-nav-link { display: flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.85rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: all 0.2s; }
.credit-nav-link:hover { background: var(--primary-light); color: var(--primary-dark); }
.credit-nav-link.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.nav-icon { font-size: 1rem; }
.credit-nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-alerts-btn { position: relative; padding: 0.5rem; border-radius: 0.5rem; color: var(--text-secondary); transition: all 0.2s; }
.nav-alerts-btn:hover { background: var(--surface-hover); color: var(--primary); }
.alert-badge { position: absolute; top: 2px; right: 2px; background: var(--score-verypoor); color: #fff; font-size: 0.65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.nav-score-pill { background: var(--bg); border-radius: 99px; padding: 0.3rem 0.75rem; display: flex; align-items: center; gap: 0.4rem; border: 1px solid var(--border); }
.nav-score-value { font-weight: 800; font-size: 1rem; }
.nav-score-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-user-menu { position: relative; }
.nav-user-btn { display: flex; align-items: center; gap: 0.4rem; background: none; border: none; padding: 0.35rem; border-radius: 0.5rem; color: var(--text-secondary); transition: background 0.2s; }
.nav-user-btn:hover { background: var(--surface-hover); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.nav-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 240px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s; z-index: 200; }
.nav-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-header { padding: 1rem; }
.nav-dropdown-name { display: block; font-weight: 700; font-size: 0.95rem; }
.nav-dropdown-email { font-size: 0.8rem; color: var(--text-muted); }
.nav-dropdown-divider { height: 1px; background: var(--border); }
.nav-dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1rem; font-size: 0.875rem; color: var(--text-secondary); transition: background 0.15s; }
.nav-dropdown-item:hover { background: var(--surface-hover); }
.nav-dropdown-logout:hover { color: var(--score-verypoor); }
.nav-dd-badge { background: var(--score-verypoor); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; }
.mobile-menu-btn { display: none; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-secondary); padding: 0.5rem; }
@media (max-width: 1024px) {
  .credit-nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .credit-nav.mobile-open .credit-nav-links { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.5rem; box-shadow: var(--shadow-md); }
}
@media (max-width: 640px) {
  .nav-score-pill { display: none; }
  .brand-text { font-size: 1rem; }
}

/* ═══════ LAYOUT ═══════ */
.page-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-sidebar { display: grid; grid-template-columns: 380px 1fr; gap: 2rem; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-sidebar { grid-template-columns: 1fr; } }

/* ═══════ CARDS ═══════ */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.card-title { font-size: 1.05rem; font-weight: 700; }
.card-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.card-link { font-size: 0.85rem; color: var(--primary); font-weight: 600; }
.card-link:hover { text-decoration: underline; }
.card-badge { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-excellent { background: rgba(34,197,94,0.1); color: var(--score-excellent); }
.badge-good { background: rgba(132,204,22,0.1); color: #65a30d; }
.badge-fair { background: rgba(234,179,8,0.1); color: #b45309; }
.badge-poor { background: rgba(249,115,22,0.1); color: var(--score-poor); }
.badge-verypoor { background: rgba(239,68,68,0.1); color: var(--score-verypoor); }

/* ═══════ SCORE GAUGE (SVG) ═══════ */
.score-gauge-wrap { text-align: center; padding: 1.5rem 0; }
.score-gauge-svg { width: 240px; height: 140px; margin: 0 auto; }
.score-number { font-size: 3.5rem; font-weight: 900; line-height: 1; }
.score-rating { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.score-source { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }
.score-range-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-top: 1rem; gap: 2px; }
.score-range-bar span { flex: 1; }
.score-range-labels { display: flex; justify-content: space-between; margin-top: 0.35rem; font-size: 0.7rem; color: var(--text-muted); }

/* ═══════ FACTORS ═══════ */
.factor-list { display: flex; flex-direction: column; gap: 0.75rem; }
.factor-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: all 0.2s; }
.factor-row:hover { background: var(--primary-light); transform: translateX(4px); }
.factor-icon-box { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--surface); box-shadow: var(--shadow-sm); flex-shrink: 0; }
.factor-info { flex: 1; min-width: 0; }
.factor-name { font-weight: 600; font-size: 0.9rem; }
.factor-impact { font-size: 0.75rem; color: var(--text-muted); }
.factor-right { text-align: right; flex-shrink: 0; }
.factor-value { font-weight: 800; font-size: 1rem; }
.factor-status { font-size: 0.75rem; font-weight: 600; }
.status-excellent { color: var(--score-excellent); }
.status-good { color: var(--score-good); }
.status-fair { color: var(--score-fair); }
.status-poor { color: var(--score-poor); }
.status-verypoor { color: var(--score-verypoor); }
.factor-bar { height: 4px; background: var(--border); border-radius: 99px; margin-top: 0.5rem; overflow: hidden; }
.factor-bar-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }

/* ═══════ OFFER CARDS ═══════ */
.offer-card { display: flex; gap: 1.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: all 0.25s; margin-bottom: 1rem; }
.offer-card:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-md); transform: translateY(-2px); }
.offer-logo { width: 80px; height: 52px; background: linear-gradient(135deg, #e2e8f0, #cbd5e1); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.7rem; color: #475569; flex-shrink: 0; letter-spacing: 0.05em; }
.offer-body { flex: 1; min-width: 0; }
.offer-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.15rem; }
.offer-type { font-size: 0.8rem; color: var(--text-muted); }
.offer-perks { font-size: 0.875rem; color: var(--text-secondary); margin: 0.5rem 0; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }
.offer-meta-item { display: flex; align-items: center; gap: 0.25rem; }
.offer-tags { display: flex; gap: 0.5rem; margin-top: 0.65rem; flex-wrap: wrap; }
.offer-tag { font-size: 0.7rem; padding: 0.2rem 0.55rem; background: var(--bg); border-radius: 99px; color: var(--text-secondary); font-weight: 500; }
.offer-tag.match { background: rgba(34,197,94,0.1); color: var(--score-excellent); font-weight: 600; }
.offer-action { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; min-width: 120px; }
.offer-match { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.offer-match-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 640px) {
  .offer-card { flex-direction: column; }
  .offer-action { flex-direction: row; min-width: auto; }
}

/* ═══════ BUTTONS ═══════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1.25rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.875rem; border: none; transition: all 0.2s; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: 0.65rem; }
.btn-pill { border-radius: 99px; }
.btn-block { width: 100%; }

/* ═══════ ALERTS LIST ═══════ */
.alert-item { display: flex; gap: 1rem; padding: 1.15rem; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.alert-item:last-child { border-bottom: none; }
.alert-item:hover { background: var(--surface-hover); }
.alert-item.unread { background: rgba(13,148,136,0.03); border-left: 3px solid var(--primary); }
.alert-icon-box { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.alert-icon-box.positive { background: rgba(34,197,94,0.1); }
.alert-icon-box.info { background: rgba(99,102,241,0.1); }
.alert-icon-box.warning { background: rgba(234,179,8,0.1); }
.alert-body { flex: 1; }
.alert-title { font-weight: 600; font-size: 0.9rem; }
.alert-msg { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }
.alert-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ═══════ ACCOUNT LIST ═══════ */
.account-row { display: flex; align-items: center; gap: 1rem; padding: 1.15rem; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.account-row:last-child { border-bottom: none; }
.account-row:hover { background: var(--surface-hover); }
.account-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.account-info { flex: 1; min-width: 0; }
.account-name { font-weight: 600; font-size: 0.9rem; }
.account-detail { font-size: 0.8rem; color: var(--text-muted); }
.account-right { text-align: right; flex-shrink: 0; }
.account-balance { font-weight: 700; font-size: 0.95rem; }
.account-limit { font-size: 0.75rem; color: var(--text-muted); }
.util-bar { width: 80px; height: 4px; background: var(--border); border-radius: 99px; margin-top: 0.35rem; margin-left: auto; overflow: hidden; }
.util-bar-fill { height: 100%; border-radius: 99px; }

/* ═══════ TABS ═══════ */
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab { padding: 0.75rem 1.25rem; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: all 0.2s; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════ SIMULATOR ═══════ */
.sim-slider-group { margin-bottom: 1.75rem; }
.sim-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.sim-label-text { font-weight: 600; font-size: 0.9rem; }
.sim-label-value { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.sim-slider { width: 100%; -webkit-appearance: none; height: 6px; border-radius: 99px; background: var(--border); outline: none; transition: background 0.2s; }
.sim-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: var(--shadow-md); border: 3px solid #fff; transition: transform 0.15s; }
.sim-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.sim-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.sim-result { text-align: center; padding: 2rem; background: linear-gradient(135deg, var(--primary-light), #ede9fe); border-radius: var(--radius-lg); }
.sim-result-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 0.5rem; }
.sim-result-score { font-size: 4rem; font-weight: 900; line-height: 1; }
.sim-result-change { font-size: 1.1rem; font-weight: 700; margin-top: 0.5rem; }
.sim-result-change.positive { color: var(--score-excellent); }
.sim-result-change.negative { color: var(--score-verypoor); }

/* ═══════ STATS ROW ═══════ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.15rem; text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ═══════ HERO (LANDING) ═══════ */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; padding: 5rem 2rem; text-align: center; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(13,148,136,0.25), transparent 50%), radial-gradient(circle at 30% 80%, rgba(99,102,241,0.2), transparent 50%); pointer-events: none; }
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.25rem; background: linear-gradient(135deg, #5eead4, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 1.15rem; color: #94a3b8; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-btns .btn { padding: 0.9rem 2.25rem; font-size: 1.05rem; border-radius: 99px; }
.hero-btns .btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: #fff; }
.hero-btns .btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.features-section { max-width: 960px; margin: 0 auto; padding: 4rem 2rem; text-align: center; }
.features-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.features-desc { color: var(--text-secondary); margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; text-align: left; }
.feature-card { padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); transition: all 0.25s; }
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.feature-name { font-weight: 700; margin-bottom: 0.35rem; }
.feature-desc { font-size: 0.875rem; color: var(--text-secondary); }

/* ═══════ FOOTER ═══════ */
.credit-footer { text-align: center; padding: 2.5rem 2rem; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border); margin-top: 3rem; }
.credit-footer a { color: var(--text-muted); margin: 0 0.75rem; }
.credit-footer a:hover { color: var(--primary); }

/* ═══════ SCORE HISTORY CHART ═══════ */
.chart-container { position: relative; width: 100%; height: 200px; }
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ═══════ INQUIRY ROW ═══════ */
.inquiry-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.inquiry-row:last-child { border-bottom: none; }
.inquiry-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.inquiry-info { flex: 1; }
.inquiry-creditor { font-weight: 600; font-size: 0.9rem; }
.inquiry-type { font-size: 0.8rem; color: var(--text-muted); }
.inquiry-date { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }

/* ═══════ EMPTY STATE ═══════ */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state-title { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.5rem; }
