/* ============================================================
   NorysTracking — Design System v2
   Dark · Violet · Animations · Polish
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap');

:root {
  --bg-base:      #08080D;
  --bg-surface:   #0F0F16;
  --bg-elevated:  #17171F;
  --bg-overlay:   #1E1E28;
  --bg-hover:     #252532;
  --border-subtle:  rgba(124,111,205,0.08);
  --border-default: rgba(124,111,205,0.14);
  --border-strong:  rgba(124,111,205,0.24);
  --text-primary:   #EEEDF8;
  --text-secondary: #9896B0;
  --text-tertiary:  #52516A;
  --brand:          #7C6FCD;
  --brand-soft:     #A090E0;
  --brand-bg:       #1A1830;
  --brand-border:   #352F60;
  --teal:           #2DD4BF;
  --success:        #22C55E;
  --warning:        #F59E0B;
  --error:          #EF4444;
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --radius-xl: 18px;
  --glow: rgba(124,111,205,0.25);
  --glow-strong: rgba(124,111,205,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }

/* ── KEYFRAMES ───────────────────────────────────────────── */
@keyframes fadeUp    { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn    { from{opacity:0} to{opacity:1} }
@keyframes pulse     { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes pulse-glow{ 0%,100%{box-shadow:0 0 8px var(--glow)} 50%{box-shadow:0 0 20px var(--glow-strong)} }
@keyframes ticker    { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes barGrow   { from{height:0} to{height:var(--target-h)} }
@keyframes scaleIn   { from{opacity:0;transform:scale(0.92)} to{opacity:1;transform:scale(1)} }
@keyframes float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes bounce    { 0%,100%{transform:translateY(0)} 30%{transform:translateY(-8px)} 60%{transform:translateY(-3px)} }
@keyframes shimmer   { 0%{background-position:200% center} 100%{background-position:-200% center} }
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes slide-right { from{transform:translateX(-6px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes pop       { 0%{transform:scale(1)} 50%{transform:scale(1.08)} 100%{transform:scale(1)} }
@keyframes orb-drift { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(20px,-15px) scale(1.05)} 66%{transform:translate(-10px,20px) scale(0.97)} }

/* ── ANIMATION CLASSES ───────────────────────────────────── */
.animate-fade-up  { animation: fadeUp  0.5s ease both; }
.animate-fade-in  { animation: fadeIn  0.4s ease both; }
.animate-float    { animation: float 3s ease-in-out infinite; }
.animate-bounce   { animation: bounce 2s ease-in-out infinite; }
.animate-pop      { animation: pop 0.25s ease; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

/* ── AMBIENT BACKGROUND ─────────────────────────────────── */
.bg-ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .35;
  animation: orb-drift 12s ease-in-out infinite;
}
.bg-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(124,111,205,.3) 0%, transparent 70%); top: -200px; left: -100px; animation-delay: 0s; }
.bg-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(45,212,191,.15) 0%, transparent 70%); bottom: -150px; right: -80px; animation-delay: -5s; }
.bg-orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(124,111,205,.2) 0%, transparent 70%); top: 40%; left: 60%; animation-delay: -8s; }
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(124,111,205,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(124,111,205,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  background: rgba(15,15,22,.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  font-size: 17px; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(135deg, #fff 20%, var(--brand-soft) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: .85; }
.nav-logo span { -webkit-text-fill-color: var(--brand-soft); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 13px; color: var(--text-secondary); transition: color .15s; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  font-size: 12px; font-weight: 600;
  background: var(--brand-bg); color: var(--brand-soft);
  border: 1px solid var(--brand-border); border-radius: var(--radius-md);
  padding: 7px 16px; cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.nav-cta:hover { background: #231F4A; border-color: #4A3F80; box-shadow: 0 0 12px rgba(124,111,205,.2); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; font-family: inherit;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
  opacity: 0; transition: opacity .2s;
}
.btn:hover::after { opacity: 1; }
.btn-primary { background: linear-gradient(135deg, var(--brand), #9060FF); color: #fff; box-shadow: 0 4px 16px rgba(124,111,205,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,111,205,.5); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border-default);
}
.btn-ghost:hover { background: var(--bg-overlay); border-color: var(--border-strong); color: var(--text-primary); }
.btn-sm { padding: 7px 15px; font-size: 12px; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-default); }
.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-glow {
  background: var(--bg-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 0 24px rgba(124,111,205,.1);
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: 999px; padding: 4px 12px; font-size: 11px; color: var(--text-secondary);
  transition: all .2s;
}
.badge-brand { background: var(--brand-bg); border-color: var(--brand-border); color: var(--brand-soft); }
.badge-success { background: rgba(34,197,94,.1); color: var(--success); border-color: rgba(34,197,94,.2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; display: inline-block; flex-shrink: 0; }

/* ── METRICS ─────────────────────────────────────────────── */
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all .2s;
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0; transition: opacity .3s;
}
.metric-card:hover { border-color: var(--border-default); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.metric-card:hover::before { opacity: 1; }
.metric-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 6px; font-weight: 500; letter-spacing: .02em; }
.metric-value { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.metric-delta { font-size: 11px; margin-top: 5px; display: flex; align-items: center; gap: 3px; }
.delta-up   { color: var(--success); }
.delta-down { color: var(--error); }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
input, select, textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 0 12px;
  height: 38px;
  width: 100%;
  outline: none;
  transition: all .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124,111,205,.12);
  background: var(--bg-overlay);
}
input::placeholder { color: var(--text-tertiary); }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.input-group { display: flex; }
.input-prefix {
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 0 12px; font-size: 13px; color: var(--text-tertiary);
  display: flex; align-items: center; white-space: nowrap;
}
.input-group input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ── TOGGLE ─────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.toggle-wrap:last-child { border-bottom: none; }
.toggle-info h4 { font-size: 13px; font-weight: 500; }
.toggle-info p  { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.toggle {
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  cursor: pointer; position: relative; transition: all .2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 8px rgba(124,111,205,.4); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.toggle.on .toggle-thumb { left: 18px; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  width: 210px; min-height: calc(100vh - 60px);
  padding: 16px 0;
  flex-shrink: 0;
  position: relative;
}
.sidebar::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--brand-border), transparent);
  opacity: .5;
}
.sb-section {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-tertiary);
  padding: 12px 18px 4px;
}
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; margin: 1px 8px; border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: all .15s; font-weight: 500;
  position: relative;
}
.sb-item:hover {
  background: var(--bg-elevated); color: var(--text-primary);
  transform: translateX(2px);
}
.sb-item.active {
  background: var(--brand-bg); color: var(--brand-soft);
  border: 1px solid var(--brand-border);
  box-shadow: 0 0 12px rgba(124,111,205,.1);
}
.sb-item.active::before {
  content: ''; position: absolute; left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.sb-item i { font-size: 16px; transition: transform .2s; }
.sb-item:hover i { transform: scale(1.1); }
.sb-badge {
  margin-left: auto; font-size: 10px; padding: 1px 7px;
  border-radius: 999px; background: var(--bg-elevated);
  color: var(--text-tertiary); transition: all .2s;
}
.sb-badge.live { background: rgba(34,197,94,.12); color: var(--success); animation: pulse 2s infinite; border: 1px solid rgba(34,197,94,.2); }

/* ── TABS ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 3px; background: var(--bg-elevated); padding: 3px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.tab { flex: 1; font-size: 12px; padding: 7px; text-align: center; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-tertiary); transition: all .15s; font-weight: 500; }
.tab:hover { color: var(--text-secondary); background: var(--bg-overlay); }
.tab.active { background: var(--brand-bg); color: var(--brand-soft); font-weight: 600; border: 1px solid var(--brand-border); box-shadow: 0 0 8px rgba(124,111,205,.15); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  display: none; align-items: center; gap: 8px;
  background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25);
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 13px; color: var(--success); margin-bottom: 16px;
  animation: scaleIn .3s ease; box-shadow: 0 0 16px rgba(34,197,94,.1);
}
.toast.show { display: flex; }

/* ── TICKER ──────────────────────────────────────────────── */
.ticker-track { overflow: hidden; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: 12px 0; position: relative; }
.ticker-track::before,.ticker-track::after { content:''; position:absolute; top:0; bottom:0; width:60px; z-index:1; }
.ticker-track::before { left:0; background:linear-gradient(90deg, var(--bg-base), transparent); }
.ticker-track::after  { right:0; background:linear-gradient(-90deg, var(--bg-base), transparent); }
.ticker-inner { display: flex; gap: 32px; animation: ticker 22s linear infinite; width: max-content; }
.ticker-item { font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.ticker-item i { color: var(--brand); font-size: 13px; }

/* ── CHART BARS ──────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 4px; }
.bar-item { flex: 1; border-radius: 3px 3px 0 0; transition: height .5s ease, opacity .2s; cursor: pointer; }
.bar-item:hover { opacity: .75; }

/* ── TABLES ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-align: left; padding: 0 0 8px; border-bottom: 1px solid var(--border-subtle); letter-spacing: .04em; text-transform: uppercase; }
.data-table td { font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(124,111,205,.03); }
.data-table td.primary { color: var(--text-primary); font-weight: 500; }

/* ── STATUS DOTS ─────────────────────────────────────────── */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.active  { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,.4); }
.status-dot.error   { background: var(--error);   box-shadow: 0 0 6px rgba(239,68,68,.4); }

/* ── SOURCE BARS ─────────────────────────────────────────── */
.source-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-name { font-size: 12px; color: var(--text-secondary); width: 72px; flex-shrink: 0; }
.source-bar-track { flex: 1; height: 5px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; }
.source-bar-fill { height: 100%; border-radius: 999px; transition: width .7s ease; }
.source-pct { font-size: 11px; color: var(--text-tertiary); width: 28px; text-align: right; }

/* ── PHONE FRAME ─────────────────────────────────────────── */
.phone-frame { width: 300px; background: #111; border-radius: 38px; padding: 10px; border: 3px solid #1a1a1a; flex-shrink: 0; box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 40px rgba(124,111,205,.1); }
.phone-screen { background: #0a0a0a; border-radius: 30px; overflow: hidden; min-height: 580px; }
.phone-status { display: flex; justify-content: space-between; padding: 10px 16px 4px; font-size: 11px; color: rgba(255,255,255,.35); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand-border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ── INLINE FORMS ────────────────────────────────────────── */
.inline-form { background: var(--bg-elevated); border: 1px solid var(--brand-border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; display: none; animation: scaleIn .15s ease both; box-shadow: 0 0 20px rgba(124,111,205,.1); }
.inline-form.open { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.form-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.fbtn { font-size: 12px; padding: 6px 14px; border-radius: var(--radius-md); cursor: pointer; border: none; font-family: inherit; font-weight: 600; transition: all .15s; }
.fbtn-cancel { background: var(--bg-overlay); color: var(--text-secondary); }
.fbtn-cancel:hover { background: var(--bg-hover); }
.fbtn-save { background: var(--brand); color: #fff; }
.fbtn-save:hover { background: #6B5FBF; box-shadow: 0 0 10px rgba(124,111,205,.3); }
.fi { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 13px; padding: 0 10px; height: 36px; outline: none; width: 100%; transition: all .15s; }
.fi:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,111,205,.12); }
.fs { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 12px; height: 36px; padding: 0 10px; outline: none; width: 100%; }

/* ── ADD BUTTON ──────────────────────────────────────────── */
.add-btn {
  font-size: 11px; color: var(--text-tertiary);
  cursor: pointer; padding: 4px 10px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  transition: all .15s; display: flex; align-items: center; gap: 4px;
  font-weight: 600;
}
.add-btn:hover { color: var(--brand-soft); border-color: var(--brand-border); background: var(--brand-bg); box-shadow: 0 0 8px rgba(124,111,205,.15); }

/* ── CARD HEADER ─────────────────────────────────────────── */
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-label { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.card-count {
  font-size: 11px; background: var(--bg-overlay); border: 1px solid var(--border-subtle);
  border-radius: 999px; padding: 2px 8px; color: var(--text-tertiary); font-weight: 600;
  transition: all .2s;
}

/* ── SLIDE-IN ANIMATION ──────────────────────────────────── */
@keyframes slideDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.slide-in { animation: slideDown .2s ease both; }

/* ── UTILITIES ───────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mb-2   { margin-bottom: 8px; }
.mb-4   { margin-bottom: 16px; }
.text-sm  { font-size: 12px; }
.text-xs  { font-size: 11px; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-brand     { color: var(--brand); }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ── GLOW EFFECTS ────────────────────────────────────────── */
.glow-purple { box-shadow: 0 0 20px rgba(124,111,205,.3); }
.glow-success { box-shadow: 0 0 16px rgba(34,197,94,.2); }
.border-glow { border-color: var(--brand-border) !important; box-shadow: 0 0 12px rgba(124,111,205,.15); }

/* ── GRADIENT TEXT ───────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--brand-soft) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-shimmer {
  background: linear-gradient(90deg, var(--brand-soft), #fff, var(--brand-soft));
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── HOVER CARDS ─────────────────────────────────────────── */
.hover-card { transition: all .2s; }
.hover-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3); border-color: var(--border-default) !important; }
.hover-lift { transition: transform .2s, box-shadow .2s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-track { height: 6px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-soft)); border-radius: 999px; transition: width 1s cubic-bezier(.34,1.56,.64,1); }
.progress-fill::after { content:''; position:absolute; right:0; top:50%; transform:translateY(-50%); width:10px; height:10px; border-radius:50%; background:#fff; box-shadow:0 0 6px var(--brand); }

/* ── CHIP TAGS ───────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; transition: all .2s; }
.chip-brand { background: var(--brand-bg); border: 1px solid var(--brand-border); color: var(--brand-soft); }
.chip-brand:hover { background: rgba(124,111,205,.15); box-shadow: 0 0 8px rgba(124,111,205,.2); }
.chip-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); color: var(--success); }
.chip-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: var(--error); }
.chip-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: var(--warning); }

/* ── SELECTION ───────────────────────────────────────────── */
::selection { background: rgba(124,111,205,.3); color: #fff; }

/* ══════════════════════════════════════════════════════════
   POLISH v3 — Glassmorphism · Ripple · Rich Gradients
   ══════════════════════════════════════════════════════════ */

/* ── GLASSMORPHISM CARDS ── */
.glass {
  background: rgba(23, 23, 31, 0.6) !important;
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border: 1px solid rgba(124, 111, 205, 0.12) !important;
}
.glass-strong {
  background: rgba(15, 15, 22, 0.75) !important;
  backdrop-filter: blur(24px) saturate(2);
  -webkit-backdrop-filter: blur(24px) saturate(2);
  border: 1px solid rgba(124, 111, 205, 0.18) !important;
}

/* ── METRIC CARDS RICH GRADIENTS ── */
.metric-card {
  background: linear-gradient(145deg, #13131A 0%, #0F0F16 100%) !important;
  border: 1px solid rgba(124,111,205,.1) !important;
  position: relative; overflow: hidden;
}
.metric-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(124,111,205,.08) 0%, transparent 60%);
  pointer-events: none;
}
.metric-card:hover {
  border-color: rgba(124,111,205,.25) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(124,111,205,.1) !important;
  transform: translateY(-2px);
}

/* ── RIPPLE EFFECT ── */
.ripple {
  position: relative; overflow: hidden;
}
.ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(124, 111, 205, 0.3);
  width: 100px; height: 100px;
  margin-left: -50px; margin-top: -50px;
  animation: none;
  pointer-events: none;
}
.ripple:active::after {
  top: var(--y, 50%); left: var(--x, 50%);
  animation: ripple-anim 0.5s ease-out forwards;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── BUTTONS WITH RIPPLE ── */
.btn-primary, .create-link-btn, .gms-btn-p, .add-lnk-btn, .fbtn-next, .fbtn-create {
  position: relative; overflow: hidden;
}
.btn-primary::before, .create-link-btn::before, .gms-btn-p::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transition: left 0.4s ease;
}
.btn-primary:hover::before, .create-link-btn:hover::before, .gms-btn-p:hover::before {
  left: 100%;
}

/* ── SIDEBAR GLOW ON ACTIVE ── */
.sb-item.active {
  box-shadow: 0 0 16px rgba(124,111,205,.12), inset 0 0 12px rgba(124,111,205,.05) !important;
}
.sb-item:hover i {
  color: var(--brand-soft);
  filter: drop-shadow(0 0 4px rgba(124,111,205,.5));
}

/* ── NAV LOGO ANIMATION ── */
.nav-logo {
  position: relative;
}
.nav-logo::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0; transition: opacity .3s;
}
.nav-logo:hover::after { opacity: 1; }

/* ── CHART BARS GLOW ── */
.chart-bar {
  transition: height .4s ease, filter .2s !important;
}
.chart-bar:hover {
  filter: brightness(1.3) drop-shadow(0 0 6px rgba(124,111,205,.6)) !important;
}

/* ── LIVE DOT PULSE RING ── */
.live-dot {
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0;
  animation: ping 1.5s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .4; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── CARDS HOVER BORDER GLOW ── */
.chart-card, .top-links-card, .live-card {
  transition: border-color .2s, box-shadow .2s, transform .2s !important;
}
.chart-card:hover, .top-links-card:hover, .live-card:hover {
  border-color: rgba(124,111,205,.2) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 0 1px rgba(124,111,205,.08) !important;
}

/* ── INPUT FOCUS GLOW ── */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(124,111,205,.15), 0 0 12px rgba(124,111,205,.1) !important;
}

/* ── GRADIENT BORDERS ── */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(124,111,205,.4), transparent, rgba(45,212,191,.2));
  z-index: -1;
}

/* ── STEP PILLS GLOW ── */
.step-pill.active {
  animation: pill-pulse 2s ease-in-out infinite !important;
}
@keyframes pill-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(124,111,205,.4); }
  50% { box-shadow: 0 0 24px rgba(124,111,205,.7), 0 0 48px rgba(124,111,205,.2); }
}

/* ── TYPE CARDS SELECTED GLOW ── */
.type-card.selected, .opt-card.on, .theme-card.sel .theme-mock {
  box-shadow: 0 0 0 2px var(--brand), 0 0 20px rgba(124,111,205,.2) !important;
}

/* ── METRIC VALUE COUNT-UP ANIMATION ── */
.metric-value {
  transition: all .4s ease;
}

/* ── SCROLL REVEAL ── */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: reveal-up .4s ease both; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .10s; }
.reveal-3 { animation-delay: .15s; }
.reveal-4 { animation-delay: .20s; }

/* ── TEAL ACCENT ── */
.accent-teal { color: var(--teal); }
.bg-teal { background: rgba(45,212,191,.1); border-color: rgba(45,212,191,.2); }

/* ── FROSTED TOPBAR ── */
.nav {
  background: rgba(8, 8, 13, 0.8) !important;
  backdrop-filter: blur(24px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.6) !important;
  box-shadow: 0 1px 0 rgba(124,111,205,.08);
}

/* Tippy theme Norys */
.tippy-box[data-theme~='norys'] {
  background: rgba(15,15,22,.95);
  border: 1px solid rgba(124,111,205,.25);
  color: #EEEDF8;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 12px rgba(124,111,205,.1);
  border-radius: 8px;
  padding: 6px 12px;
}
.tippy-box[data-theme~='norys'] .tippy-arrow {
  color: rgba(124,111,205,.4);
}

/* ════════════════════════════════════════════════════════════
   Design refinement v1 — fond vivant + profondeur (tout le site)
   100% tokens existants · couches derrière le contenu · perf-friendly
   ════════════════════════════════════════════════════════════ */

/* ── Fond : mesh brand/teal sur --bg-base (porté par .bg-ambient) ── */
.bg-ambient {
  background:
    radial-gradient(60% 50% at 10% -6%,  rgba(124,111,205,.30) 0%, transparent 60%),
    radial-gradient(55% 50% at 104% 4%,  rgba(45,212,191,.16) 0%, transparent 55%),
    radial-gradient(72% 62% at 90% 114%, rgba(124,111,205,.26) 0%, transparent 60%),
    radial-gradient(65% 58% at 50% 46%,  rgba(124,111,205,.08) 0%, transparent 72%);
}
/* Grain statique ~5% (derrière les orbs) */
.bg-ambient::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Vignette (au-dessus des orbs, sous le contenu) */
.bg-ambient::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 110% at 50% 40%, transparent 50%, rgba(2,1,6,.62) 100%);
}
/* Orbs amplifiés — dérive plus lente et ample */
.bg-orb   { filter: blur(105px); opacity: .72; animation-duration: 26s; }
.bg-orb-1 { width: 680px; height: 680px; background: radial-gradient(circle, rgba(124,111,205,.55) 0%, transparent 70%); top: -260px; left: -160px; }
.bg-orb-2 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(45,212,191,.30) 0%, transparent 70%); bottom: -220px; right: -140px; animation-duration: 32s; }
.bg-orb-3 { width: 480px; height: 480px; background: radial-gradient(circle, rgba(124,111,205,.40) 0%, transparent 70%); top: 34%; left: 58%; animation-duration: 30s; }
/* Grille estompée vers les bords (profondeur) */
.bg-grid {
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(125% 95% at 50% 28%, #000 0%, rgba(0,0,0,.45) 55%, transparent 86%);
          mask-image: radial-gradient(125% 95% at 50% 28%, #000 0%, rgba(0,0,0,.45) 55%, transparent 86%);
}

/* ── Profondeur & hover des cartes ── */
.card, .card-elevated, .metric-card, .chart-card, .live-card, .top-links-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 1px 2px rgba(0,0,0,.25), 0 10px 26px -14px rgba(0,0,0,.55);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease, box-shadow .25s ease;
}
.card:hover, .card-elevated:hover, .metric-card:hover, .chart-card:hover, .live-card:hover, .top-links-card:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 4px rgba(0,0,0,.3), 0 18px 38px -16px rgba(0,0,0,.6), 0 0 22px -6px var(--glow);
}
/* metric-card : sweep de la barre supérieure (::before) au hover */
.metric-card::before { background-size: 200% 100%; }
.metric-card:hover::before { animation: mc-sweep 1.1s ease; }
@keyframes mc-sweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Motion : apparition au scroll plus douce ── */
.reveal { animation: reveal-up .55s cubic-bezier(.2,.8,.2,1) both; }

/* ── Accessibilité / perf ── */
@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none !important; }
  .reveal { animation: none !important; }
  .metric-card:hover::before { animation: none !important; }
}
