/* ── INFLUMATCH v2 DESIGN SYSTEM ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --brand: #6366F1; --brand-dark: #4F46E5; --brand-light: #818CF8;
  --accent: #F59E0B; --accent-dark: #D97706;
  --success: #10B981; --danger: #EF4444; --warning: #F59E0B; --info: #3B82F6;
  /* Neutrals */
  --bg: #0F0F14; --surface: #16161E; --surface2: #1E1E2A; --surface3: #26263A;
  --border: rgba(255,255,255,.08); --border2: rgba(255,255,255,.12);
  --text: #F1F1F5; --text2: #A0A0B8; --text3: #6B6B85;
  /* Coin */
  --coin: #F59E0B;
  /* Fonts */
  --font-h: 'Plus Jakarta Sans', sans-serif;
  --font-b: 'Inter', sans-serif;
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow: 0 4px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --glow: 0 0 24px rgba(99,102,241,.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body { background: var(--bg); color: var(--text); font-family: var(--font-b); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { font-family: var(--font-b); }
input, select, textarea { font-family: var(--font-b); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ── NAV ── */
.nav { position: sticky; top: 0; z-index: 100; height: 62px; display: flex; align-items: center; padding: 0 28px; background: rgba(15,15,20,.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1280px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--font-h); font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.logo .dot { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 20px; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s; white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 12px rgba(99,102,241,.35); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 4px 20px rgba(99,102,241,.5); transform: translateY(-1px); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover:not(:disabled) { background: var(--surface3); border-color: rgba(255,255,255,.2); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.btn-danger { background: rgba(239,68,68,.12); color: var(--danger); border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }
.btn-success { background: rgba(16,185,129,.12); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.btn-coin { background: rgba(245,158,11,.12); color: var(--coin); border: 1px solid rgba(245,158,11,.25); }
.btn-coin:hover { background: rgba(245,158,11,.22); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: 14px; }
.btn-full { width: 100%; }
.btn-icon { padding: 9px; border-radius: 9px; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* ── INPUTS ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; letter-spacing: .4px; text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%; background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 14px; color: var(--text);
  font-size: 14px; outline: none; transition: all .18s; -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: var(--surface2); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.input::placeholder, .textarea::placeholder { color: var(--text3); }
.select option { background: var(--surface2); color: var(--text); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .input { padding-left: 40px; }
.input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text3); pointer-events: none; }
.input-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.field-hint { font-size: 11px; color: var(--text3); margin-top: 5px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.field.verified .input { border-color: var(--success); padding-right: 36px; }
.field-verified-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--success); font-size: 16px; }

/* ── CARDS ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.card-sm { padding: 16px; border-radius: 12px; }
.card-lg { padding: 32px; border-radius: 20px; }
.card-hover { transition: .2s; }
.card-hover:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-brand { border-color: rgba(99,102,241,.25); background: rgba(99,102,241,.04); }
.card-title { font-family: var(--font-h); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.card-sub { font-size: 13px; color: var(--text2); margin-bottom: 20px; line-height: 1.6; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; letter-spacing: .2px; }
.badge-brand { background: rgba(99,102,241,.15); color: var(--brand-light); }
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-info { background: rgba(59,130,246,.12); color: var(--info); }
.badge-grey { background: rgba(255,255,255,.06); color: var(--text3); }
.badge-coin { background: rgba(245,158,11,.12); color: var(--coin); }

/* ── GRADE ── */
.grade { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.grade-S { background: linear-gradient(135deg,rgba(245,158,11,.2),rgba(245,158,11,.05)); color: #F59E0B; border: 1px solid rgba(245,158,11,.2); }
.grade-A { background: rgba(16,185,129,.1); color: #10B981; border: 1px solid rgba(16,185,129,.2); }
.grade-B { background: rgba(59,130,246,.1); color: #3B82F6; border: 1px solid rgba(59,130,246,.2); }
.grade-C { background: rgba(139,92,246,.1); color: #8B5CF6; border: 1px solid rgba(139,92,246,.2); }
.grade-D { background: rgba(255,255,255,.05); color: var(--text3); border: 1px solid var(--border); }

/* ── AVATAR ── */
.avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; position: relative; overflow: hidden; }
.av-sm { width: 36px; height: 36px; font-size: 15px; }
.av-md { width: 48px; height: 48px; font-size: 19px; }
.av-lg { width: 64px; height: 64px; font-size: 26px; }
.av-xl { width: 88px; height: 88px; font-size: 36px; }
.av-verified::after { content: '✓'; position: absolute; bottom: 0; right: 0; width: 16px; height: 16px; background: var(--success); color: #fff; font-size: 9px; border-radius: 50%; border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(8px); z-index: 500; overflow-y: auto; padding: 24px 16px; }
.modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; width: 100%; margin: auto; position: relative; box-shadow: var(--shadow-lg); }
.modal-sm { max-width: 400px; }
.modal-md { max-width: 540px; }
.modal-lg { max-width: 720px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; background: var(--surface2); border: 1px solid var(--border); color: var(--text2); border-radius: 8px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: .2s; z-index: 1; }
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal-header { padding: 24px 24px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── TABS ── */
.tabs { display: flex; gap: 2px; background: var(--surface2); border-radius: 12px; padding: 4px; }
.tab-btn { flex: 1; padding: 9px 14px; border: none; background: transparent; color: var(--text3); font-family: var(--font-b); font-size: 13px; font-weight: 600; border-radius: 9px; cursor: pointer; transition: .18s; white-space: nowrap; }
.tab-btn.active { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.3); }
.tab-btn:hover:not(.active) { color: var(--text); background: var(--surface3); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── SIDEBAR LAYOUT ── */
.app-layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 62px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.sidebar-section { font-size: 10px; font-weight: 700; color: var(--text3); letter-spacing: 1.5px; text-transform: uppercase; padding: 12px 12px 6px; margin-top: 8px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text2); cursor: pointer; transition: .18s; border: none; background: none; width: 100%; text-align: left; }
.sidebar-link:hover { color: var(--text); background: var(--surface2); }
.sidebar-link.active { color: #fff; background: rgba(99,102,241,.15); font-weight: 600; }
.sidebar-link .s-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-link .s-badge { margin-left: auto; font-size: 10px; font-weight: 700; background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 20px; }
.main-content { padding: 28px 32px 60px; overflow-x: hidden; }

/* ── STATS GRID ── */
.stats-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.stats-grid-2 { grid-template-columns: repeat(2,1fr); }
.stats-grid-3 { grid-template-columns: repeat(3,1fr); }
.stats-grid-4 { grid-template-columns: repeat(4,1fr); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.stat-value { font-family: var(--font-h); font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text2); }
.stat-trend { font-size: 11px; margin-top: 6px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ── CREATOR CARD ── */
.creator-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; cursor: pointer; transition: .2s; position: relative; overflow: hidden; }
.creator-card:hover { border-color: rgba(99,102,241,.35); transform: translateY(-3px); box-shadow: var(--shadow); }
.creator-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg,var(--brand),var(--brand-light)); opacity: 0; transition: .2s; }
.creator-card:hover::before { opacity: 1; }

/* ── BLUR LOCK ── */
.blurred { filter: blur(8px); pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(15,15,20,.82); backdrop-filter: blur(3px); border-radius: inherit; z-index: 10; gap: 10px; padding: 20px; text-align: center; }
.lock-icon-wrap { width: 48px; height: 48px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.lock-title { font-family: var(--font-h); font-size: 14px; font-weight: 700; color: var(--text); }
.lock-sub { font-size: 12px; color: var(--text2); }

/* ── PROGRESS ── */
.progress-bar { height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--brand); transition: width .6s ease; }

/* ── PLATFORM TAGS ── */
.plat-ig { background: rgba(236,72,153,.1); color: #EC4899; border: 1px solid rgba(236,72,153,.2); }
.plat-yt { background: rgba(239,68,68,.1); color: #EF4444; border: 1px solid rgba(239,68,68,.2); }
.plat-fb { background: rgba(59,130,246,.1); color: #3B82F6; border: 1px solid rgba(59,130,246,.2); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; background: var(--surface2); border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ── TOGGLE ── */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--surface3); border-radius: 11px; transition: .25s; }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; }
.toggle input:checked + .toggle-slider { background: var(--brand); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface2); border: 1px solid var(--border2); color: var(--text); padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .3s; pointer-events: none; max-width: 320px; display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(16,185,129,.3); }
.toast.error { border-color: rgba(239,68,68,.3); }

/* ── DIVIDER ── */
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.divider span { font-size: 12px; color: var(--text3); }

/* ── COIN BADGE NAV ── */
.coin-nav { display: flex; align-items: center; gap: 6px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2); color: var(--coin); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 20px; cursor: pointer; transition: .18s; }
.coin-nav:hover { background: rgba(245,158,11,.18); }

/* ── KM BADGE ── */
.km-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 20px; }

/* ── SECTION ── */
.page-header { margin-bottom: 24px; }
.page-title { font-family: var(--font-h); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.page-sub { font-size: 14px; color: var(--text2); }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.creators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }

/* ── ALERT ── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: var(--danger); }
.alert-success { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2); color: var(--success); }
.alert-info { background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2); color: var(--brand-light); }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: var(--warning); }

/* ── OTP INPUT ── */
.otp-wrap { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.otp-input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; background: var(--surface2); border: 1.5px solid var(--border); border-radius: 10px; color: var(--text); outline: none; transition: .18s; }
.otp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

/* ── LOCATION PILL ── */
.loc-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--text2); }
.loc-pill.detected { border-color: rgba(16,185,129,.25); color: var(--success); }
.loc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── MEDIA PLAYER ── */
.media-player { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.media-player video, .media-player iframe { width: 100%; aspect-ratio: 16/9; display: block; }
.media-controls { padding: 12px 14px; display: flex; align-items: center; gap: 10px; }

/* ── CREDIT SCORE ── */
.credit-ring { position: relative; }
.credit-ring svg { transform: rotate(-90deg); }
.credit-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .25s ease forwards; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; top: 62px; z-index: 200; height: calc(100vh - 62px); transition: left .25s; width: 250px; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .main-content { padding: 20px 16px 60px; }
  .stats-grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .stats-grid-3, .stats-grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .input-row-2, .input-row-3 { grid-template-columns: 1fr; }
  .creators-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; }
}
@media (max-width: 480px) {
  .nav { padding: 0 16px; }
  .creators-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid-3, .stats-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* ── VERSION FOOTER ── */
.version-footer{text-align:center;padding:12px;font-size:11px;color:var(--text3);border-top:1px solid var(--border);margin-top:auto}
.version-footer a{color:var(--text3);text-decoration:none}
.version-footer a:hover{color:var(--brand)}
