/* =============================================
   r-b.cc — Main Stylesheet
   Design: Dark luxury with neon accents
   ============================================= */

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

/* ---- CSS Variables ---- */
:root {
  --primary:    #6C63FF;
  --primary-h:  #5851DB;
  --secondary:  #0ea5a5;
  --accent:     #e11d74;

  --success:    #059669;
  --warning:    #d97706;
  --danger:     #dc2626;

  /* خلفيات فاتحة */
  --bg:         #f6f7fb;
  --bg-2:       #ffffff;
  --bg-3:       #f1f2f8;
  --bg-card:    #ffffff;

  /* حدود */
  --border:     rgba(0,0,0,0.08);
  --border-h:   rgba(108,99,255,0.35);

  /* نصوص */
  --text:       #1e1e2f;
  --text-2:     #5b5b73;
  --text-3:     #8a8aa3;

  /* ظلال خفيفة */
  --shadow:     0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.1);

  /* نفس الإعدادات */
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --font:       'Cairo', sans-serif;
  --mono:       'JetBrains Mono', monospace;

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: #000000;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-h); }
img { max-width: 100%; height: auto; }
input, textarea, select, button { font-family: var(--font); }
button { cursor: pointer; border: none; background: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(247 247 247 / 85%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 900; color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo:hover { color: var(--text); }
.nav-logo .accent { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link { color: var(--text-2); font-size: 0.95rem; font-weight: 600; padding: 0.3rem 0; transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-user {
  position: relative; display: flex; align-items: center; gap: 0.5rem;
  cursor: pointer; padding: 0.4rem 0.8rem; border-radius: 50px;
  background: var(--bg-3); border: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 600; color: var(--text-2);
  transition: all var(--transition);
}
.nav-user:hover { border-color: var(--border-h); color: var(--text); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 8px);
  left: 0; right: unset;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem; min-width: 160px;
  box-shadow: var(--shadow);
}
.nav-user:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 0.6rem 0.8rem; border-radius: 8px;
  color: var(--text-2); font-size: 0.9rem;
  transition: all var(--transition);
}
.nav-dropdown a:hover { background: var(--bg-3); color: var(--text); }
.nav-dropdown a.danger:hover { color: var(--danger); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: all var(--transition); }
.mobile-menu { display: none; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; gap: 0.5rem; }
.mobile-menu a { color: var(--text-2); font-weight: 600; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700;
  transition: all var(--transition); cursor: pointer; border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #5048d4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(108,99,255,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-h), #6059e0);
  box-shadow: 0 6px 20px rgba(108,99,255,0.5);
  transform: translateY(-1px); color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-h); color: var(--text); background: var(--bg-3); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* Icon buttons */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-2); transition: all var(--transition);
}
.btn-icon:hover { transform: translateY(-1px); }
.btn-icon--blue:hover  { background: rgba(59,130,246,0.15); border-color: #3b82f6; color: #3b82f6; }
.btn-icon--red:hover   { background: rgba(239,68,68,0.15); border-color: var(--danger); color: var(--danger); }
.btn-icon--green:hover { background: rgba(16,185,129,0.15); border-color: var(--success); color: var(--success); }
.btn-icon--orange:hover{ background: rgba(245,158,11,0.15); border-color: var(--warning); color: var(--warning); }

/* =============================================
   ALERTS & BADGES
   ============================================= */
.alert {
  padding: 0.85rem 1.1rem; border-radius: var(--radius);
  margin-bottom: 1.25rem; font-size: 0.93rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.6rem;
}
.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
  background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border);
}
.badge-active   { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.badge-inactive { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
.badge-expired  { background: rgba(245,158,11,0.1); color: #fcd34d; border-color: rgba(245,158,11,0.2); }
.badge-admin    { background: rgba(108,99,255,0.15); color: #a5b4fc; border-color: rgba(108,99,255,0.3); }
.badge-lock     { background: rgba(62,207,207,0.1); color: #5eead4; border-color: rgba(62,207,207,0.2); }

/* =============================================
   HOME — HERO
   ============================================= */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 5rem 1.5rem 4rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.18;
}
.blob-1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; right: -150px;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-2 {
  width: 500px; height: 500px;
  background: var(--secondary);
  bottom: -150px; left: -100px;
  animation: blobFloat 10s ease-in-out infinite reverse;
}
@keyframes blobFloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,20px) scale(1.05); } }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; max-width: 760px; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 1rem; border-radius: 50px;
  background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.3);
  color: #a5b4fc; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(108,99,255,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(108,99,255,0.4); } 70% { box-shadow: 0 0 0 10px rgba(108,99,255,0); } 100% { box-shadow: 0 0 0 0 rgba(108,99,255,0); } }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.2;
  letter-spacing: -1px; margin-bottom: 1rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-2); max-width: 540px;
  margin: 0 auto 2.5rem; font-weight: 400;
}

/* Shortener Card */
.shortener-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  text-align: right;
}
.shorten-form { display: flex; flex-direction: column; gap: 1rem; }
.input-group { display: flex; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: border-color var(--transition); }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.url-input {
  flex: 1; padding: 0.9rem 1.2rem;
  background: var(--bg-3); border: none; outline: none;
  color: var(--text); font-size: 0.95rem; direction: ltr;
  font-family: var(--mono);
}
.url-input::placeholder { color: var(--text-3); font-family: var(--font); direction: rtl; }
.btn-shorten {
  padding: 0 1.6rem; background: linear-gradient(135deg, var(--primary), #5048d4);
  color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  border: none; white-space: nowrap; display: flex; align-items: center; gap: 0.5rem;
  transition: all var(--transition);
}
.btn-shorten:hover { background: linear-gradient(135deg, var(--primary-h), #6059e0); }
.btn-shorten:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-loader { display: flex; align-items: center; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.advanced-toggle {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--text-2); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; width: fit-content;
  transition: color var(--transition);
}
.advanced-toggle:hover { color: var(--primary); }
.advanced-options { display: none; }
.advanced-options.open { display: block; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }

.result-box { text-align: center; padding: 1rem 0; }
.result-label { font-weight: 700; color: var(--success); margin-bottom: 1rem; font-size: 1rem; }
.result-url-wrap {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.result-url { font-family: var(--mono); color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.btn-copy, .btn-qr {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; transition: all var(--transition);
}
.btn-copy:hover { color: var(--success); border-color: var(--success); }
.btn-qr:hover   { color: var(--secondary); border-color: var(--secondary); }
.btn-new {
  display: inline-flex; padding: 0.5rem 1.2rem;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); border-radius: 8px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-new:hover { color: var(--text); border-color: var(--primary); }
.shortener-hint { margin-top: 1rem; color: var(--text-3); font-size: 0.85rem; text-align: center; }

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2rem 1.5rem; }
.stats-inner { max-width: 700px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 3rem; }
.stat-item { text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-2); font-size: 0.88rem; font-weight: 600; margin-top: 0.2rem; }
.stat-divider { width: 1px; height: 50px; background: var(--border); }

/* =============================================
   FEATURES
   ============================================= */
.features { padding: 5rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 900; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-2); font-size: 1rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.8rem;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--border-h); transform: translateY(-3px); box-shadow: var(--shadow); }
.feat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.feat-icon--purple { background: rgba(108,99,255,0.12); color: var(--primary); }
.feat-icon--cyan   { background: rgba(62,207,207,0.12); color: var(--secondary); }
.feat-icon--green  { background: rgba(16,185,129,0.12); color: var(--success); }
.feat-icon--orange { background: rgba(245,158,11,0.12); color: var(--warning); }
.feat-icon--pink   { background: rgba(255,107,157,0.12); color: var(--accent); }
.feat-icon--blue   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-2); font-size: 0.92rem; line-height: 1.6; }

/* CTA */
.cta-section { background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(62,207,207,0.05)); border-top: 1px solid rgba(108,99,255,0.15); padding: 5rem 1.5rem; text-align: center; }
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-inner h2 { font-size: 2rem; font-weight: 900; margin-bottom: 0.8rem; }
.cta-inner p { color: var(--text-2); margin-bottom: 2rem; }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 2.5rem 1.5rem; }
.footer-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 900; color: var(--text); margin-bottom: 0.5rem; }
.footer-tagline { color: var(--text-2); font-size: 0.88rem; margin-bottom: 1rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: 0.88rem; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-3); font-size: 0.8rem; }

/* =============================================
   AUTH PAGES
   ============================================= */
.page-auth .auth-main {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem; position: relative; overflow: hidden;
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2.5rem;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 1;
}
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 900; color: var(--text); margin-bottom: 1.5rem; justify-content: center; }
.auth-title { font-size: 1.5rem; font-weight: 900; text-align: center; margin-bottom: 0.4rem; }
.auth-sub { color: var(--text-2); text-align: center; font-size: 0.92rem; margin-bottom: 1.8rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.2rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { color: var(--text-3); font-size: 0.82rem; }
.auth-switch { text-align: center; color: var(--text-2); font-size: 0.92rem; }
.auth-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.deco-blob-1 { position: absolute; width: 500px; height: 500px; background: var(--primary); border-radius: 50%; filter: blur(100px); opacity: 0.07; top: -200px; right: -200px; }
.deco-blob-2 { position: absolute; width: 400px; height: 400px; background: var(--secondary); border-radius: 50%; filter: blur(100px); opacity: 0.06; bottom: -100px; left: -100px; }
.forgot-link { float: left; font-size: 0.82rem; color: var(--text-3); }
.forgot-link:hover { color: var(--primary); }
.terms-check { display: flex; align-items: flex-start; gap: 0.6rem; }
.terms-check input[type="checkbox"] { accent-color: var(--primary); margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }
.terms-check label { font-size: 0.88rem; color: var(--text-2); cursor: pointer; }
.pass-strength { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.strength-bar { flex: 1; height: 4px; background: var(--bg-3); border-radius: 2px; }
.strength-fill { height: 100%; border-radius: 2px; transition: all 0.3s; }
#strengthLabel { font-size: 0.8rem; color: var(--text-2); min-width: 50px; }

/* =============================================
   FORM GROUPS
   ============================================= */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.88rem; font-weight: 700; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.input-icon-wrap { position: relative; }
.input-icon { position: absolute; top: 50%; transform: translateY(-50%); right: 1rem; color: var(--text-3); pointer-events: none; }
.input-icon-wrap input { padding-right: 2.8rem; }
.toggle-pass { position: absolute; top: 50%; transform: translateY(-50%); left: 0.8rem; color: var(--text-3); background: none; border: none; cursor: pointer; padding: 0; transition: color var(--transition); }
.toggle-pass:hover { color: var(--primary); }
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="search"],
select, textarea {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.93rem;
  transition: all var(--transition); outline: none;
  font-family: var(--font);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
input::placeholder { color: var(--text-3); }
select option { background: var(--bg-3); }
.alias-input-wrap { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: all var(--transition); }
.alias-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.alias-prefix { padding: 0.75rem 0.8rem; background: var(--bg-2); color: var(--text-3); font-size: 0.88rem; font-family: var(--mono); white-space: nowrap; border-left: 1px solid var(--border); }
.alias-input-wrap input { border: none; border-radius: 0; box-shadow: none; direction: ltr; font-family: var(--mono); }

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.page-dashboard { background: var(--bg); }
.dash-layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 260px; min-width: 260px;
  background: var(--bg-2); border-left: 1px solid var(--border);
  padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.sidebar-admin { border-color: rgba(108,99,255,0.2); }
.sidebar-brand { font-size: 1rem; font-weight: 900; color: var(--text); padding: 0.5rem 0.8rem 1rem; }
.sidebar-user { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 0.8rem; margin-bottom: 0.5rem; background: var(--bg-3); border-radius: var(--radius); border: 1px solid var(--border); }
.sidebar-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; color: #fff; flex-shrink: 0; }
.sidebar-name { font-weight: 700; font-size: 0.92rem; }
.sidebar-email { color: var(--text-3); font-size: 0.78rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.snav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.8rem; border-radius: 10px;
  color: var(--text-2); font-size: 0.92rem; font-weight: 600;
  transition: all var(--transition);
}
.snav-item:hover { background: var(--bg-3); color: var(--text); }
.snav-item.active { background: rgba(108,99,255,0.12); color: var(--primary); border: 1px solid rgba(108,99,255,0.2); }
.snav-danger { color: var(--text-3); }
.snav-danger:hover { background: rgba(239,68,68,0.08); color: var(--danger); }
.sidebar-sep { height: 1px; background: var(--border); margin: 0.5rem 0; }
.dash-main { flex: 1; padding: 2rem; max-width: 100%; overflow-x: hidden; }
.dash-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.dash-title { font-size: 1.5rem; font-weight: 900; }
.dash-sub { color: var(--text-2); font-size: 0.88rem; }

/* Shorten bar in dashboard */
.dash-shorten-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem; margin-bottom: 1.5rem; }
.dash-shorten-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dash-url-input { flex: 2; min-width: 200px; }
.dash-alias-input { flex: 1; min-width: 140px; }
.dash-shorten-form .btn { white-space: nowrap; }

/* Search */
.search-form { display: flex; gap: 0.5rem; }
.search-input { min-width: 200px; }

/* Links Table */
.links-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.links-table { width: 100%; border-collapse: collapse; }
.links-table th { background: var(--bg-3); padding: 0.85rem 1rem; text-align: right; font-size: 0.82rem; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.links-table td { padding: 0.9rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.9rem; vertical-align: middle; }
.links-table tr:last-child td { border-bottom: none; }
.links-table tr:hover td { background: rgba(255,255,255,0.02); }
.link-row--inactive { opacity: 0.55; }
.link-cell { max-width: 320px; }
.link-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.link-original { color: var(--text-3); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; margin-bottom: 0.3rem; }
.link-short-row { display: flex; align-items: center; gap: 0.3rem; }
.link-short { font-family: var(--mono); color: var(--primary); font-size: 0.85rem; font-weight: 700; }
.clicks-cell { text-align: center; }
.click-count { font-weight: 900; font-size: 1.1rem; }
.click-unique { color: var(--text-3); font-size: 0.8rem; }
.date-cell { color: var(--text-2); font-size: 0.85rem; white-space: nowrap; }
.actions-cell { display: flex; align-items: center; gap: 0.3rem; }

/* Pagination */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; color: var(--text-2); background: var(--bg-3); border: 1px solid var(--border); transition: all var(--transition); }
.page-btn:hover { color: var(--text); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-2); }
.empty-state svg { opacity: 0.2; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }

/* Back link */
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-2); font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; transition: color var(--transition); }
.back-link:hover { color: var(--primary); }

/* =============================================
   STATS PAGE
   ============================================= */
.stats-link-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.slc-info { flex: 1; }
.slc-title { font-size: 1.1rem; font-weight: 900; margin-bottom: 0.3rem; }
.slc-short { font-family: var(--mono); color: var(--primary); font-size: 1rem; font-weight: 700; display: block; margin-bottom: 0.3rem; }
.slc-original { color: var(--text-3); font-size: 0.83rem; word-break: break-all; }
.slc-meta { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.slc-qr img { border-radius: 8px; border: 2px solid var(--border); }
.stats-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.2rem; text-align: center; }
.stat-card-val { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card-label { color: var(--text-2); font-size: 0.82rem; font-weight: 600; margin-top: 0.3rem; }
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.chart-header { margin-bottom: 1rem; }
.chart-header h3 { font-size: 1rem; font-weight: 700; }
.stats-bottom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.stats-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.stats-panel h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.no-data { color: var(--text-3); font-size: 0.88rem; text-align: center; padding: 1.5rem 0; }
.country-list { display: flex; flex-direction: column; gap: 0.6rem; }
.country-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; }
.country-name { width: 100px; flex-shrink: 0; color: var(--text-2); }
.country-bar-wrap { flex: 1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.country-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 3px; transition: width 0.8s ease; }
.country-count { width: 50px; text-align: left; font-weight: 700; font-size: 0.85rem; }
.ref-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ref-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.ref-domain { font-family: var(--mono); font-size: 0.83rem; color: var(--text-2); }

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; position: relative; overflow: hidden; }
.admin-stat-card::before { content: ''; position: absolute; inset: 0; opacity: 0.04; }
.admin-stat-card--purple { border-color: rgba(108,99,255,0.25); }
.admin-stat-card--purple::before { background: var(--primary); }
.admin-stat-card--cyan { border-color: rgba(62,207,207,0.25); }
.admin-stat-card--cyan::before { background: var(--secondary); }
.admin-stat-card--green { border-color: rgba(16,185,129,0.25); }
.admin-stat-card--green::before { background: var(--success); }
.admin-stat-card--orange { border-color: rgba(245,158,11,0.25); }
.admin-stat-card--orange::before { background: var(--warning); }
.asc-icon { margin-bottom: 0.8rem; opacity: 0.6; }
.admin-stat-card--purple .asc-icon { color: var(--primary); }
.admin-stat-card--cyan .asc-icon    { color: var(--secondary); }
.admin-stat-card--green .asc-icon   { color: var(--success); }
.admin-stat-card--orange .asc-icon  { color: var(--warning); }
.asc-val { font-size: 2rem; font-weight: 900; margin-bottom: 0.2rem; }
.asc-label { color: var(--text-2); font-size: 0.88rem; font-weight: 600; }
.asc-today { color: var(--text-3); font-size: 0.8rem; margin-top: 0.2rem; }
.admin-section { margin-bottom: 2rem; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title-row h2 { font-size: 1.1rem; font-weight: 700; }

/* Settings form */
.settings-form { max-width: 800px; }
.settings-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.settings-group-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--text); }
.settings-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* =============================================
   ERROR PAGES
   ============================================= */
.error-main { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 128px); padding: 2rem; }
.error-content { text-align: center; }
.error-code { font-size: 8rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.error-content h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.error-content p { color: var(--text-2); margin-bottom: 2rem; }

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  padding: 0.75rem 1.5rem; border-radius: 50px;
  font-weight: 700; font-size: 0.9rem; z-index: 9999;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
  pointer-events: none; white-space: nowrap;
}
.toast-success { background: var(--success); color: #fff; box-shadow: 0 4px 20px rgba(16,185,129,0.4); }
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; min-width: unset; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 1rem; border-left: none; border-bottom: 1px solid var(--border); gap: 0; }
  .sidebar-user { display: none; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 0.3rem; }
  .snav-item { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
  .sidebar-sep { display: none; }
  .sidebar-brand { display: none; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .stats-inner { gap: 1.5rem; }
  .stat-num { font-size: 1.6rem; }
  .hero-title { font-size: 2rem; }
  .adv-grid { grid-template-columns: 1fr; }
  .dash-shorten-form { flex-direction: column; }
  .links-table th:nth-child(4),
  .links-table td:nth-child(4) { display: none; }
}
@media (max-width: 520px) {
  .shortener-card { padding: 1.2rem; }
  .input-group { flex-direction: column; border-radius: var(--radius); }
  .url-input { border-radius: var(--radius) var(--radius) 0 0; }
  .btn-shorten { border-radius: 0 0 var(--radius) var(--radius); padding: 0.9rem; justify-content: center; }
  .auth-card { padding: 1.5rem; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}
