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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #060810;
  --surface:     #0d1018;
  --surface2:    #131620;
  --surface3:    #181c28;
  --border:      #1a1f30;
  --border2:     #252b40;
  --text:        #edf0f8;
  --text2:       #bcc4dc;
  --muted:       #5c6480;
  --accent:      #00d4ff;
  --accent-dim:  #00aad4;
  --accent-glow: rgba(0,212,255,.16);
  --accent2:     #5b6af5;
  --green:       #22c55e;
  --green-glow:  rgba(34,197,94,.14);
  --red:         #ef4444;
  --red-glow:    rgba(239,68,68,.12);
  --orange:      #f97316;
  --orange-glow: rgba(249,115,22,.12);
  --claude:      #cd6e46;
  --claude-glow: rgba(205,110,70,.14);
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 8px 40px rgba(0,0,0,.45);
  --shadow-lg:   0 20px 72px rgba(0,0,0,.6);
  --transition:  .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --bg:#f2f4fc; --surface:#ffffff; --surface2:#eaecf8; --surface3:#dfe3f5;
  --border:#ccd2ea; --border2:#b8c1de; --text:#0f1320; --text2:#2a3258; --muted:#636b98;
  --accent:#0088bb; --accent-dim:#006a99; --accent-glow:rgba(0,136,187,.12);
  --accent2:#4555e8;
  --green:#16a34a; --green-glow:rgba(22,163,74,.12);
  --red:#dc2626; --red-glow:rgba(220,38,38,.08);
  --orange:#ea6b08; --orange-glow:rgba(234,107,8,.08);
  --claude:#b85c35; --claude-glow:rgba(184,92,53,.12);
  --shadow:0 4px 24px rgba(0,0,0,.08); --shadow-lg:0 12px 48px rgba(0,0,0,.14);
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Tajawal','Inter',system-ui,sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

@keyframes fadeInUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes fadeIn     { from{opacity:0} to{opacity:1} }
@keyframes spin       { to{transform:rotate(360deg)} }
@keyframes pulse-glow { 0%,100%{box-shadow:0 0 0 0 var(--accent-glow)} 50%{box-shadow:0 0 0 10px transparent} }
@keyframes progressIn { from{width:0} }
@keyframes slideDown  { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:none} }
@keyframes shimmer    { from{background-position:-200% 0} to{background-position:200% 0} }
@keyframes floatUp    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ══════════════════════════════════════════
   DAY/NIGHT TOGGLE SWITCH
══════════════════════════════════════════ */
.switch {
  position: relative; width: 90px; height: 34px; margin: 0;
  appearance: none; -webkit-appearance: none;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYYAAACWCAYAAADaIS/KAAAACXBIWXMAACE3AAAhNwEzWJ96AAAgAElEQVR42u19O48k25bWtx8RmVmPPuf0ucxlLAxskEBcAwMcQCMBBr8CpJkBCQ3iJwACwYyE+AE4GOCAgZjrI2yMQcJgeEjMcM+ru6sqMyNi777XwtgRkZlVmVX5rLytTyr1OV2dkRE79l7fei/z537rlwKFQqFQKFp4o2ugUCgUigViUGZQKBQKhVoMCoVCoXiFGDTEoFAoFAq1GBQKhUKhxKBQKBSKtYgBygwKhUKhUItBoVAoFEoMCoVCoVgLVpdAoVAoFAsWgzKDQqFQKBaIQYPPCoVCoVggBuUFhUKhUMzDGgCX9PMv/+4v8OsfR7i057qGn0O8u3PfD//pn/wV/NU//+u6P/TnXX8=');
  background-size: cover; background-repeat: no-repeat;
  border-radius: 17px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 2px 8px rgba(0,0,0,.3);
  transition: background-image .7s ease-in-out;
  outline: none; cursor: pointer; overflow: hidden; flex-shrink: 0;
}
.switch:checked {
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYYAAACWCAYAAADaIS/KAAAACXBIWXMAACE3AAAhNwEzWJ96AAAgAElEQVR42u2dx3IjXZbf/3nTJwACdFUs092f65FGE9MzitFWoTeQHkYvoIXWWugBJC20lrTTVlqOpJlp8/XX0/2ZcjQg4dNjXqdFgiiAFiABAiTPL6KiogpAmps377H3HON//iHVIAiCIIgxFgPJBYIgCGJaMBg0CARBEMSUYDBpDAiCIIgZi4FcSQRBEMSMYCBXEkEQBDEtGMiVRBAEQcwIBoMsBoIgCGJaMFCMgSAIgpgVDGQyEARBENOCgcQCQRAEMSMYTHIlEQRBENOCgdJVCYIgiBnBQHKBIAiCmBEMtI+BIAiCuGAxUIyBIAiCmBIMlK5KEARBzAoGGgOCIAhiWjCQwUAQBEEMWg==');
  background-size: cover; transition: background-image 1s ease-in-out;
}
.switch::after {
  content: ''; width: 30px; height: 30px; border-radius: 50%;
  background-color: #fff; position: absolute; left: 2px; top: 2px;
  animation: sw-off .7s forwards cubic-bezier(.8,.5,.2,1.4);
  box-shadow: inset 4px -4px 4px rgba(53,53,53,.3), 0 2px 6px rgba(0,0,0,.25);
}
.switch:checked::after { animation: sw-on .7s forwards cubic-bezier(.8,.5,.2,1.4); box-shadow: inset -4px -4px 4px rgba(53,53,53,.3), 0 2px 6px rgba(0,0,0,.25); }
@keyframes sw-off { 0%{transform:translateX(56px);width:30px} 50%{width:50px;border-radius:17px} 100%{transform:translateX(0);width:30px} }
@keyframes sw-on  { 0%{transform:translateX(0);width:30px} 50%{width:50px;border-radius:17px} 100%{transform:translateX(56px);width:30px} }
.switch:checked::before { content:'';width:10px;height:10px;border-radius:50%;position:absolute;left:10px;top:4px;transform-origin:36px 8px;background-color:transparent;box-shadow:3px -1px 0 #fff;filter:blur(0);animation:sw-sun .7s forwards ease; }
@keyframes sw-sun { 0%{transform:rotate(170deg);background:transparent;box-shadow:3px -1px 0 #fff;filter:blur(0)} 90%{background:#f5daaa;box-shadow:0 0 8px #f5deb4,0 0 16px #f5deb4;filter:blur(.8px)} 100%{transform:rotate(0);background:#f5daaa;box-shadow:0 0 8px #f5deb4,0 0 16px #f5deb4;filter:blur(.8px)} }
.switch::before { content:'';width:10px;height:10px;border-radius:50%;position:absolute;left:10px;top:4px;filter:blur(.8px);background:#f5daaa;box-shadow:0 0 8px #f5deb4,0 0 16px #f5deb4;transform-origin:36px 8px;animation:sw-moon .7s forwards ease; }
@keyframes sw-moon { 0%{transform:rotate(0);filter:blur(.8px)} 90%{background:transparent;box-shadow:3px -1px 0 #fff;filter:blur(0)} 100%{transform:rotate(170deg);background:transparent;box-shadow:3px -1px 0 #fff;filter:blur(0)} }

/* ══════════════════════════════════════════
   THEME PILL
══════════════════════════════════════════ */
.theme-pill {
  position: fixed; top: 18px; right: 18px; z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 6px 12px 6px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.04) inset;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.theme-pill:hover { border-color: var(--accent); box-shadow: 0 4px 24px rgba(0,212,255,.12), 0 1px 0 rgba(255,255,255,.04) inset; }
.theme-pill-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color var(--transition), opacity var(--transition);
  flex-shrink: 0;
}
.theme-pill-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.theme-pill .switch { width: 60px; height: 24px; }
.theme-pill .switch::after { width: 20px; height: 20px; top: 2px; left: 2px; }
.theme-pill .switch:checked::after { animation: sw-on-pill .7s forwards cubic-bezier(.8,.5,.2,1.4); }
.theme-pill .switch::after { animation: sw-off-pill .7s forwards cubic-bezier(.8,.5,.2,1.4); }
@keyframes sw-off-pill { 0%{transform:translateX(36px);width:20px} 50%{width:32px;border-radius:12px} 100%{transform:translateX(0);width:20px} }
@keyframes sw-on-pill  { 0%{transform:translateX(0);width:20px} 50%{width:32px;border-radius:12px} 100%{transform:translateX(36px);width:20px} }
[dir="rtl"] .theme-pill { right: auto; left: 18px; }

/* ══════════════════════════════════════════
   AUTH LAYOUT
══════════════════════════════════════════ */
.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 80px 20px 40px;
  background: var(--bg);
  position: relative;
}
.auth-body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 15%, rgba(0,212,255,.05) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 85%, rgba(91,106,245,.05) 0%, transparent 55%);
}

.auth-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  width: 100%; max-width: 440px;
  padding: 44px 40px;
  display: flex; flex-direction: column; gap: 22px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.03) inset;
  animation: fadeInUp .45s cubic-bezier(.4,0,.2,1);
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 55%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7; border-radius: 0 0 1px 1px;
}
.auth-card::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 35%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,106,245,.45), transparent);
  opacity: .5;
}

.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.auth-logo-img { height: 58px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,212,255,.18)); }
.auth-brand-title { font-size: 20px; font-weight: 900; letter-spacing: -.4px; }
.auth-brand-sub { font-size: 13px; color: var(--muted); }

.auth-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border2), transparent); }

.lang-switcher { display: flex; align-items: center; justify-content: center; gap: 5px; }
.lang-btn {
  padding: 5px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  cursor: pointer; transition: all var(--transition);
  font-family: 'Tajawal','Inter',sans-serif;
}
.lang-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.lang-btn:not(.active):hover { border-color: var(--border2); color: var(--text); }

/* ══════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════ */
.auth-error, .auth-success {
  display: flex; align-items: center; gap: 10px;
  border-radius: 11px; padding: 12px 16px;
  font-size: 13px; line-height: 1.5;
  animation: slideDown .25s ease;
}
.auth-error {
  background: var(--red-glow); border: 1px solid rgba(239,68,68,.28); color: var(--red);
}
.auth-success {
  background: var(--green-glow); border: 1px solid rgba(34,197,94,.28); color: var(--green);
}
.auth-error svg, .auth-success svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px;
  font-family: 'Inter',sans-serif;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon {
  position: absolute; left: 14px; width: 16px; height: 16px;
  fill: var(--muted); flex-shrink: 0; pointer-events: none;
  transition: fill var(--transition);
}
[dir="rtl"] .input-icon { left: auto; right: 14px; }
.input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Tajawal','Inter',sans-serif;
  font-size: 15px;
  padding: 13px 14px 13px 44px;
  outline: none; width: 100%;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
[dir="rtl"] .input { padding: 13px 44px 13px 14px; }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 16px rgba(0,212,255,.06);
  background: var(--surface3);
}
.input-wrap:focus-within .input-icon { fill: var(--accent); }
.input::placeholder { color: var(--muted); font-size: 14px; }
.input-no-icon { padding: 13px 14px !important; }

select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
[dir="rtl"] select.input { padding-right: 14px; padding-left: 40px; }
.select-wrap { position: relative; }
.select-wrap svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--muted); pointer-events: none; }
[dir="rtl"] .select-wrap svg { right: auto; left: 13px; }

.input-pass-wrap { position: relative; }
.input-pass-wrap .input { padding-right: 44px; }
[dir="rtl"] .input-pass-wrap .input { padding-right: 14px; padding-left: 44px; }
.pass-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 5px; line-height: 0; transition: color var(--transition); border-radius: 6px;
}
.pass-toggle:hover { color: var(--accent); background: var(--accent-glow); }
.pass-toggle svg { width: 16px; height: 16px; fill: currentColor; }
[dir="rtl"] .pass-toggle { right: auto; left: 12px; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-auth {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 13px; border: none;
  background: linear-gradient(135deg, #00d4ff 0%, #0096c7 55%, #006e99 100%);
  color: #000; font-weight: 900; font-size: 15px;
  font-family: 'Tajawal','Inter',sans-serif;
  cursor: pointer; transition: all .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 20px rgba(0,212,255,.3), 0 1px 0 rgba(255,255,255,.2) inset;
  letter-spacing: .2px; width: 100%;
}
.btn-auth::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent);
  pointer-events: none;
}
.btn-auth:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,212,255,.42), 0 1px 0 rgba(255,255,255,.2) inset;
}
.btn-auth:active:not(:disabled) { transform: translateY(0); box-shadow: 0 3px 12px rgba(0,212,255,.22); }
.btn-auth:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-auth svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text2);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,212,255,.06); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,255,.1);
}

.auth-register-hint {
  text-align: center; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.auth-register-hint a { color: var(--accent); text-decoration: none; font-weight: 700; transition: opacity .2s; }
.auth-register-hint a:hover { opacity: .8; }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(0,0,0,.2); border-top-color: #000;
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}

/* ══════════════════════════════════════════
   REGISTER STEPS PROGRESS
══════════════════════════════════════════ */
.reg-progress { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 2px; }
.prog-step {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
  transition: all .35s ease; font-family: 'Inter',sans-serif; flex-shrink: 0;
}
.prog-step.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); box-shadow: 0 0 0 4px rgba(0,212,255,.08); }
.prog-step.done { border-color: var(--green); background: var(--green-glow); color: var(--green); }
.prog-line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; max-width: 44px; transition: background .35s ease; }
.prog-line.done { background: linear-gradient(90deg, var(--green), rgba(34,197,94,.5)); }
.step-label { font-size: 12px; color: var(--muted); text-align: center; font-family: 'Inter',sans-serif; font-weight: 500; }

.step-panel { display: none; flex-direction: column; gap: 14px; animation: fadeInUp .3s ease; }
.step-panel.active { display: flex; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:480px) { .field-row { grid-template-columns: 1fr; } }

.pass-strength { height: 5px; border-radius: 3px; margin-top: 8px; background: var(--border); overflow: hidden; }
.pass-strength-fill { height: 100%; border-radius: 3px; width: 0; transition: width .3s ease, background .3s ease; }
.pass-strength-label { font-size: 11px; color: var(--muted); margin-top: 5px; }

.terms-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); }
.terms-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.terms-row a { color: var(--accent); text-decoration: none; }

.field-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ══════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════ */
.dash-layout { display: flex; flex-direction: column; min-height: 100vh; }

.dash-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
  background: rgba(13,16,24,.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20; gap: 12px;
  transition: background var(--transition);
}
[data-theme="light"] .dash-topbar { background: rgba(255,255,255,.94); }
.dash-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dash-logo { height: 32px; width: auto; object-fit: contain; }
.dash-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.dash-welcome { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dash-welcome strong { color: var(--text); font-weight: 800; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,212,255,.18), rgba(91,106,245,.12));
  border: 1px solid rgba(0,212,255,.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 13px; font-weight: 900; flex-shrink: 0;
}

.btn-logout {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-glow); border: 1px solid rgba(239,68,68,.2);
  color: var(--red); border-radius: 10px; font-size: 13px; font-weight: 700;
  font-family: 'Tajawal','Inter',sans-serif; padding: 7px 13px;
  cursor: pointer; text-decoration: none; transition: all var(--transition);
}
.btn-logout svg { width: 14px; height: 14px; fill: currentColor; }
.btn-logout:hover { background: rgba(239,68,68,.2); border-color: var(--red); transform: translateY(-1px); }

.dash-main {
  padding: 32px 24px; max-width: 980px;
  margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 20px;
}

.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-btn { background: transparent; border: 1px solid var(--border2); color: var(--muted); border-radius: 7px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all var(--transition); font-family: inherit; line-height: 1.4; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 800; }

/* ══════════════════════════════════════════
   MODEL BANNER
══════════════════════════════════════════ */
.model-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(0,212,255,.07) 0%, rgba(91,106,245,.05) 50%, rgba(0,212,255,.03) 100%);
  border: 1px solid rgba(0,212,255,.2);
  border-radius: var(--radius); padding: 24px 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.model-banner:hover { border-color: rgba(0,212,255,.35); box-shadow: 0 0 48px rgba(0,212,255,.07); }
.model-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,.6), transparent);
}
.model-banner-left { display: flex; align-items: center; gap: 20px; }
.claude-icon-wrap {
  width: 62px; height: 62px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(205,110,70,.15), rgba(180,90,50,.1));
  border: 1px solid rgba(205,110,70,.28); border-radius: 17px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 7px;
  animation: floatUp 4s ease-in-out infinite;
}
.claude-img { width: 100%; height: 100%; object-fit: contain; }
.model-info { display: flex; flex-direction: column; gap: 5px; }
.model-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-family: 'Inter',sans-serif; }
.model-name { font-size: 18px; font-weight: 900; color: var(--text); letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.anthropic-tag { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); background: var(--accent-glow); border: 1px solid rgba(0,212,255,.2); border-radius: 6px; padding: 2px 9px; font-family: 'Inter',sans-serif; }
.model-desc { font-size: 13px; color: var(--muted); max-width: 380px; line-height: 1.55; }
.model-badge { display: inline-flex; align-items: center; gap: 7px; background: var(--green-glow); border: 1px solid rgba(34,197,94,.28); color: var(--green); border-radius: 24px; font-size: 12px; font-weight: 700; padding: 8px 18px; white-space: nowrap; font-family: 'Inter',sans-serif; }
.model-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse-glow 2s infinite; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeInUp .4s cubic-bezier(.4,0,.2,1) both;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.card:hover { border-color: var(--border2); }
.card:nth-child(2){animation-delay:.06s} .card:nth-child(3){animation-delay:.12s}
.card:nth-child(4){animation-delay:.18s} .card:nth-child(5){animation-delay:.24s}
.card:nth-child(6){animation-delay:.30s} .card:nth-child(7){animation-delay:.36s}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.card-header h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.card-header h2 svg { width: 17px; height: 17px; fill: var(--accent); flex-shrink: 0; }
.card-body { padding: 22px; }

/* ══════════════════════════════════════════
   API KEY DISPLAY
══════════════════════════════════════════ */
.key-display {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 16px; margin-bottom: 14px;
  transition: border-color var(--transition);
}
.key-display:hover { border-color: var(--border2); }
.key-code {
  font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 13px; color: var(--accent); flex: 1;
  word-break: break-all; line-height: 1.6;
  background: none; border: none; outline: none; cursor: default; user-select: all;
}
.key-meta { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); font-family: 'Inter',sans-serif; flex-wrap: wrap; }
.key-meta span { display: flex; align-items: center; gap: 5px; }
.key-meta svg { width: 13px; height: 13px; fill: currentColor; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--muted); border-radius: 9px; font-size: 12px; font-weight: 700;
  font-family: 'Inter',sans-serif; padding: 8px 14px;
  cursor: pointer; transition: all var(--transition); flex-shrink: 0; white-space: nowrap;
}
.btn-copy svg { width: 13px; height: 13px; fill: currentColor; }
.btn-copy.copied { border-color: var(--green); color: var(--green); background: var(--green-glow); }
.btn-copy:hover:not(.copied) { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); transform: translateY(-1px); }

.btn-generate {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #00d4ff 0%, #0096c7 100%);
  color: #000; border: none; border-radius: 13px; font-size: 15px; font-weight: 900;
  font-family: 'Tajawal','Inter',sans-serif; padding: 14px 32px;
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(0,212,255,.3); letter-spacing: .2px;
}
.btn-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,212,255,.42); }
.btn-generate:active:not(:disabled) { transform: translateY(0); }
.btn-generate:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-generate svg { width: 18px; height: 18px; fill: currentColor; }

/* ══════════════════════════════════════════
   USAGE STATS
══════════════════════════════════════════ */
.usage-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.usage-stat {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.usage-stat:hover { border-color: var(--border2); }
.usage-num { font-size: 30px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.usage-num.used { color: var(--accent); }
.usage-num.remaining { color: var(--green); }
.usage-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-family: 'Inter',sans-serif; }
.usage-bar { height: 8px; background: var(--surface3); border-radius: 8px; overflow: hidden; margin-bottom: 10px; border: 1px solid var(--border); }
.usage-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), #00aaff); transition: width .65s cubic-bezier(.4,0,.2,1); }
.usage-fill.warning { background: linear-gradient(90deg, var(--orange), #ffac4a); }
.usage-fill.danger { background: linear-gradient(90deg, var(--red), #ff7070); }
.usage-pct { font-size: 12px; color: var(--muted); text-align: right; font-family: 'Inter',sans-serif; }
.usage-pct strong { color: var(--accent); }

/* ══════════════════════════════════════════
   PROGRESS / OLD COMPAT
══════════════════════════════════════════ */
.progress-track { height: 9px; background: var(--surface2); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.progress-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), #00aaff); transition: width .6s cubic-bezier(.4,0,.2,1); animation: progressIn .6s ease; }
.progress-fill.warning { background: linear-gradient(90deg, var(--orange), #ffac4a); }
.progress-fill.danger { background: linear-gradient(90deg, var(--red), #ff7070); }
.usage-remaining { font-size: 14px; color: var(--muted); }
.usage-remaining strong { color: var(--text); font-weight: 800; }
.usage-remaining .pct { color: var(--accent); font-weight: 800; }
.usage-numbers { display: flex; align-items: baseline; gap: 6px; }
.usage-used { font-size: 36px; font-weight: 900; letter-spacing: -1.5px; }
.usage-sep { font-size: 22px; color: var(--muted); }
.usage-total { font-size: 20px; color: var(--muted); font-weight: 600; }

/* ══════════════════════════════════════════
   NO KEY STATE
══════════════════════════════════════════ */
.no-key-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; padding: 60px 24px; text-align: center;
}
.no-key-icon {
  width: 76px; height: 76px;
  background: var(--accent-glow); border: 1px solid rgba(0,212,255,.2);
  border-radius: 22px; display: flex; align-items: center; justify-content: center;
  animation: pulse-glow 3s infinite;
}
.no-key-icon svg { width: 36px; height: 36px; fill: var(--accent); }
.no-key-icon.orange-icon { background: var(--orange-glow); border-color: rgba(249,115,22,.2); animation: none; }
.no-key-icon.orange-icon svg { fill: var(--orange); }
.no-key-title { font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.no-key-desc { font-size: 14px; color: var(--muted); max-width: 360px; line-height: 1.75; }
.pending-info {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; background: var(--orange-glow);
  border: 1px solid rgba(249,115,22,.22); border-radius: 10px;
  font-size: 13px; color: var(--orange);
}
.pending-info svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.empty-logs { text-align: center; padding: 48px 24px; color: var(--muted); font-size: 14px; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 24px; color: var(--muted); font-size: 14px; }

/* ══════════════════════════════════════════
   BAN CARD
══════════════════════════════════════════ */
.ban-card {
  background: rgba(239,68,68,.06); border: 1.5px solid rgba(239,68,68,.28);
  border-radius: var(--radius); padding: 24px;
  display: flex; gap: 16px; align-items: flex-start;
}
.ban-card-icon { width: 46px; height: 46px; border-radius: 50%; background: rgba(239,68,68,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ban-card-icon svg { width: 22px; height: 22px; fill: var(--red); }
.ban-card-body { flex: 1; }
.ban-card-title { font-size: 16px; font-weight: 800; color: var(--red); margin: 0 0 6px; }
.ban-card-desc { font-size: 13px; color: var(--text2); line-height: 1.65; margin: 0 0 10px; }
.ban-reason-box { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.18); border-radius: 9px; padding: 10px 14px; font-size: 13px; color: var(--text); font-style: italic; line-height: 1.6; }

/* ══════════════════════════════════════════
   NOTIFICATIONS
══════════════════════════════════════════ */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface2); transition: border-color var(--transition); }
.notif-item:hover { border-color: var(--border2); }
.notif-item.unread { background: rgba(0,212,255,.04); border-color: rgba(0,212,255,.18); }
.notif-item.type-warning { background: rgba(249,115,22,.05); border-color: rgba(249,115,22,.18); }
.notif-item.type-success { background: rgba(34,197,94,.05); border-color: rgba(34,197,94,.18); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 5px; }
.notif-dot.type-warning { background: var(--orange); }
.notif-dot.type-success { background: var(--green); }
.notif-dot.read { background: var(--border2); }
.notif-msg { font-size: 13px; color: var(--text); line-height: 1.6; flex: 1; }
.notif-time { font-size: 11px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.notif-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mark-read-btn { font-size: 12px; color: var(--accent); background: none; border: none; cursor: pointer; font-family: inherit; padding: 0; opacity: .8; }
.mark-read-btn:hover { opacity: 1; }
#unread-badge {
  background: var(--accent); color: #000; font-size: 10px; font-weight: 900;
  padding: 1px 7px; border-radius: 12px; font-family: 'Inter',sans-serif;
}

/* ══════════════════════════════════════════
   SOCIAL FOLLOW
══════════════════════════════════════════ */
.req-intro { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; background: var(--orange-glow); border: 1px solid rgba(249,115,22,.22); border-radius: 11px; margin-bottom: 16px; }
.req-intro-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(249,115,22,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.req-intro-icon svg { width: 18px; height: 18px; fill: var(--orange); }
.req-intro-text { display: flex; flex-direction: column; gap: 3px; }
.req-intro-text strong { font-size: 14px; font-weight: 800; color: var(--orange); }
.req-intro-text span { font-size: 13px; color: var(--muted); line-height: 1.5; }

.social-grid { display: flex; flex-direction: column; gap: 10px; }
.social-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; transition: border-color var(--transition), background var(--transition); flex-wrap: wrap; }
.social-row:hover { border-color: var(--border2); }
.social-row.done { border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.04); }
.social-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.social-icon svg { width: 22px; height: 22px; }
.si-fb { background: rgba(24,119,242,.12); } .si-fb svg { fill: #1877F2; }
.si-wa { background: rgba(37,211,102,.12); } .si-wa svg { fill: #25D366; }
.si-ig { background: linear-gradient(135deg, rgba(253,88,73,.12), rgba(131,58,180,.1)); }
.si-li { background: rgba(10,102,194,.12); } .si-li svg { fill: #0A66C2; }
.social-info { flex: 1; min-width: 120px; }
.social-name { font-size: 14px; font-weight: 800; color: var(--text); }
.social-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.social-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-follow { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 700; font-family: 'Tajawal','Inter',sans-serif; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn-follow svg { width: 13px; height: 13px; fill: currentColor; }
.btn-fb { background: rgba(24,119,242,.12); color: #1877F2; border: 1px solid rgba(24,119,242,.22); }
.btn-fb:hover { background: rgba(24,119,242,.22); transform: translateY(-1px); }
.btn-wa { background: rgba(37,211,102,.12); color: #25D366; border: 1px solid rgba(37,211,102,.22); }
.btn-wa:hover { background: rgba(37,211,102,.22); transform: translateY(-1px); }
.btn-ig { background: rgba(131,58,180,.1); color: #C13584; border: 1px solid rgba(131,58,180,.18); }
.btn-ig:hover { background: rgba(131,58,180,.2); transform: translateY(-1px); }
.btn-li { background: rgba(10,102,194,.1); color: #0A66C2; border: 1px solid rgba(10,102,194,.18); }
.btn-li:hover { background: rgba(10,102,194,.2); transform: translateY(-1px); }
.upload-label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 9px; font-size: 12px; font-weight: 700; font-family: 'Tajawal','Inter',sans-serif; background: var(--surface3); border: 1.5px dashed var(--border2); color: var(--muted); cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.upload-label:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.upload-label svg { width: 13px; height: 13px; fill: currentColor; }
.upload-label input { display: none; }
.proof-thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border2); cursor: pointer; display: none; }
.verified-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 700; font-family: 'Inter',sans-serif; background: var(--green-glow); border: 1px solid rgba(34,197,94,.22); color: var(--green); }
.verified-tag svg { width: 12px; height: 12px; fill: currentColor; }
.req-footer { padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.req-footer-note { font-size: 12px; color: var(--muted); }
.btn-submit-proof { display: inline-flex; align-items: center; gap: 8px; padding: 11px 28px; border-radius: 12px; font-size: 14px; font-weight: 900; font-family: 'Tajawal','Inter',sans-serif; background: var(--accent); color: #000; border: none; cursor: pointer; transition: all var(--transition); box-shadow: 0 4px 16px rgba(0,212,255,.22); }
.btn-submit-proof:hover:not(:disabled) { background: var(--accent-dim); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,212,255,.34); }
.btn-submit-proof:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-submit-proof svg { width: 16px; height: 16px; fill: currentColor; }

/* ══════════════════════════════════════════
   SUPPORT CARD
══════════════════════════════════════════ */
.support-inner { display: flex; align-items: center; gap: 18px; padding: 22px; flex-wrap: wrap; }
.support-icon { width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0; background: rgba(24,119,242,.12); border: 1px solid rgba(24,119,242,.2); display: flex; align-items: center; justify-content: center; }
.support-icon svg { width: 26px; height: 26px; fill: #1877F2; }
.support-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.support-text strong { font-size: 16px; font-weight: 800; }
.support-text span { font-size: 13px; color: var(--muted); line-height: 1.55; }
.btn-support { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 11px; background: rgba(24,119,242,.12); border: 1px solid rgba(24,119,242,.22); color: #1877F2; font-size: 14px; font-weight: 800; font-family: 'Tajawal','Inter',sans-serif; text-decoration: none; white-space: nowrap; transition: all var(--transition); }
.btn-support svg { width: 16px; height: 16px; fill: currentColor; }
.btn-support:hover { background: rgba(24,119,242,.22); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(24,119,242,.2); text-decoration: none; color: #1877F2; }

/* ══════════════════════════════════════════
   AFFILIATE
══════════════════════════════════════════ */
.affiliate-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; opacity: .6; }
.affiliate-inner { display: flex; align-items: center; gap: 18px; padding: 22px; flex-wrap: wrap; }
.affiliate-icon { width: 54px; height: 54px; border-radius: 15px; flex-shrink: 0; background: var(--claude-glow); border: 1px solid rgba(205,110,70,.22); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.affiliate-icon img { width: 100%; height: 100%; object-fit: contain; }
.affiliate-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.affiliate-title { font-size: 16px; font-weight: 800; }
.affiliate-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.affiliate-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; font-family: 'Inter',sans-serif; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.affiliate-code { font-family: 'JetBrains Mono',monospace; font-size: 11px; padding: 3px 8px; background: var(--surface3); border-radius: 5px; color: var(--muted); }

/* ══════════════════════════════════════════
   OLD KEY COMPAT
══════════════════════════════════════════ */
.key-row { display: flex; align-items: center; gap: 10px; }
.key-value { font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 12.5px; color: var(--accent); flex: 1; word-break: break-all; line-height: 1.6; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; }
.btn-create { display: inline-flex; align-items: center; gap: 9px; background: var(--accent); color: #000; border: none; border-radius: 12px; font-size: 15px; font-weight: 900; font-family: 'Tajawal','Inter',sans-serif; padding: 13px 30px; cursor: pointer; transition: all var(--transition); box-shadow: 0 4px 20px rgba(0,212,255,.25); }
.btn-create svg { width: 18px; height: 18px; fill: currentColor; }
.btn-create:hover:not(:disabled) { background: var(--accent-dim); transform: translateY(-1px); }
.btn-create:disabled { opacity: .55; cursor: not-allowed; }

/* ══════════════════════════════════════════
   RTL OVERRIDES
══════════════════════════════════════════ */
[dir="rtl"] .dash-brand { margin-right: 0; }
[dir="rtl"] .dash-user { flex-direction: row-reverse; }
[dir="rtl"] .ban-card { flex-direction: row-reverse; }
[dir="rtl"] .notif-item { flex-direction: row-reverse; }
[dir="rtl"] .model-banner-left { flex-direction: row-reverse; }
[dir="rtl"] .support-inner { flex-direction: row-reverse; }
[dir="rtl"] .affiliate-inner { flex-direction: row-reverse; }
[dir="rtl"] .req-intro { flex-direction: row-reverse; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media(max-width:768px) {
  .dash-topbar { padding: 0 16px; height: 56px; }
  .dash-main { padding: 22px 16px; }
  .model-banner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .auth-card { padding: 32px 24px; }
  .usage-row { grid-template-columns: 1fr 1fr; }
}
@media(max-width:480px) {
  .auth-card { padding: 28px 18px; }
  .usage-row { grid-template-columns: 1fr; }
  .support-inner { flex-direction: column; }
  .affiliate-inner { flex-direction: column; }
  .social-row { flex-direction: column; align-items: flex-start; }
}
