/* ===== CSS VARIABLES ===== */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent2: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #f1f5f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --border2: #cbd5e1;

  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --text-inv: #ffffff;

  --nav-bg: rgba(255,255,255,0.9);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg2: #111827;
  --bg3: #1e2433;
  --surface: #161d30;
  --surface2: #1e2433;
  --border: #2d3748;
  --border2: #374151;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --nav-bg: rgba(10,15,30,0.92);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4 { font-family: 'Syne', sans-serif; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font-family: inherit; }

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(79,70,229,0.4); }
.btn-ghost {
  background: transparent; color: var(--text2);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-shorten {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; padding: 12px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0;
}
.btn-shorten:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,70,229,0.4); }
.btn-icon { font-size: 16px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 22px; }
.logo-text { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--text); }
.logo-dot { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all 0.2s;
}
.theme-toggle:hover { background: var(--border); }
[data-theme="light"] .moon, [data-theme="dark"] .sun { display: none; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; display: block; }

.mobile-menu {
  display: none; flex-direction: column; gap: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 24px; font-weight: 500; color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--primary); background: var(--bg3); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 100px 24px 60px;
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg3) 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.25;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: var(--primary); top: -100px; right: -100px; animation-delay: 0s; }
.orb2 { width: 350px; height: 350px; background: var(--accent); bottom: -50px; left: -50px; animation-delay: 3s; }
.orb3 { width: 250px; height: 250px; background: var(--accent2); top: 50%; left: 40%; animation-delay: 5s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-30px)} }

.hero-content {
  position: relative; z-index: 1;
  max-width: 700px; width: 100%; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text2);
  margin-bottom: 28px; backdrop-filter: blur(8px);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero-title {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--text2); max-width: 560px;
  margin: 0 auto 40px; line-height: 1.7;
}

/* ===== SHORTEN CARD ===== */
.shorten-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  text-align: left;
}
.shorten-label {
  font-weight: 600; font-size: 15px; color: var(--text2);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.shorten-row {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.url-input {
  flex: 1; padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.url-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.url-input::placeholder { color: var(--text3); }

.shorten-options { display: flex; flex-direction: column; gap: 10px; }
.toggle-wrap {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--text2);
}
.toggle-wrap input[type=checkbox] { display: none; }
.slider {
  width: 44px; height: 24px; background: var(--border2);
  border-radius: 100px; position: relative; transition: 0.3s; flex-shrink: 0;
}
.slider::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; background: #fff;
  border-radius: 50%; top: 3px; left: 3px; transition: 0.3s;
}
input:checked + .slider { background: var(--primary); }
input:checked + .slider::after { left: 23px; }
.toggle-wrap em { font-style: normal; color: var(--text3); }

.custom-alias-row {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.alias-prefix {
  padding: 11px 14px; background: var(--bg3);
  color: var(--text3); font-size: 14px; border-right: 1.5px solid var(--border);
}
.alias-input {
  flex: 1; padding: 11px 14px; border: none; outline: none;
  background: var(--bg); color: var(--text); font-size: 14px;
}

.result-box {
  margin-top: 16px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(6,182,212,0.08));
  border: 1.5px solid rgba(79,70,229,0.3); border-radius: 12px;
}
.result-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.result-link { font-weight: 700; color: var(--primary); font-size: 16px; word-break: break-all; }
.copy-btn {
  padding: 8px 18px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: 0.2s;
}
.copy-btn:hover { background: var(--primary-dark); }
.result-note { font-size: 13px; color: var(--text2); }
.result-note a { color: var(--primary); font-weight: 600; }

/* ===== HERO STATS ===== */
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ===== FEATURES ===== */
.features { padding: 100px 24px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block; padding: 6px 14px;
  background: rgba(79,70,229,0.1); color: var(--primary);
  border-radius: 100px; font-size: 13px; font-weight: 600;
  margin-bottom: 16px; border: 1px solid rgba(79,70,229,0.2);
}
.section-header h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; max-width: 1000px; margin: 0 auto;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.feature-card.featured {
  background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(6,182,212,0.06));
  border-color: rgba(79,70,229,0.3);
}
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text2); font-size: 14px; line-height: 1.6; }

/* ===== HOW IT WORKS ===== */
.how-it-works { padding: 80px 24px; background: var(--bg3); }
.steps { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.step { text-align: center; flex: 1; min-width: 200px; }
.step-num { font-family: 'Syne', sans-serif; font-size: 48px; font-weight: 800; color: var(--primary); opacity: 0.3; line-height: 1; margin-bottom: 12px; }
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text2); font-size: 14px; }
.step-arrow { font-size: 24px; color: var(--text3); flex-shrink: 0; }

/* ===== CTA ===== */
.cta-section { padding: 80px 24px; }
.cta-card {
  max-width: 700px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg); padding: 64px 40px;
  position: relative; overflow: hidden;
}
.cta-orb {
  position: absolute; width: 400px; height: 400px;
  background: rgba(255,255,255,0.1); border-radius: 50%;
  top: -200px; right: -100px;
}
.cta-card h2 { color: #fff; font-size: 36px; font-weight: 800; margin-bottom: 14px; position: relative; }
.cta-card p { color: rgba(255,255,255,0.8); margin-bottom: 32px; position: relative; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-btns .btn-primary { background: #fff; color: var(--primary); }
.cta-btns .btn-primary:hover { background: #f0f0ff; }
.cta-btns .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-btns .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== FOOTER ===== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 60px 24px 24px; }
.footer-top { max-width: 1000px; margin: 0 auto; display: flex; gap: 60px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 40px; }
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand .logo-text { font-size: 22px; display: block; margin-bottom: 10px; }
.footer-brand p { color: var(--text2); font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text2); transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { max-width: 1000px; margin: 0 auto; border-top: 1px solid var(--border); padding-top: 24px; font-size: 13px; color: var(--text3); }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 24px 40px; background: var(--bg);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text { font-size: 28px; }
.auth-card h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-card .auth-sub { color: var(--text2); font-size: 14px; text-align: center; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; background: var(--bg); color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-control::placeholder { color: var(--text3); }
.form-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text2); }
.form-footer a { color: var(--primary); font-weight: 600; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.divider { text-align: center; color: var(--text3); font-size: 13px; margin: 18px 0; position: relative; }
.divider::before, .divider::after { content:''; position:absolute; top:50%; width:40%; height:1px; background:var(--border); }
.divider::before { left:0; } .divider::after { right:0; }

/* ===== DASHBOARD LAYOUT ===== */
.dash-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  position: fixed; top: 64px; left: 0; bottom: 0;
  overflow-y: auto; padding: 24px 12px;
  transition: transform 0.3s;
  z-index: 100;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all 0.2s; cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(79,70,229,0.1); color: var(--primary);
}
.sidebar-link .sicon { font-size: 18px; flex-shrink: 0; }
.sidebar-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text3); padding: 14px 14px 6px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }

.dash-main { flex: 1; margin-left: 240px; padding: 32px; min-width: 0; }
.dash-header { margin-bottom: 28px; }
.dash-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.dash-header p { color: var(--text2); font-size: 14px; }

/* ===== STATS CARDS ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-icon.blue { background: rgba(79,70,229,0.12); }
.stat-icon.green { background: rgba(16,185,129,0.12); }
.stat-icon.orange { background: rgba(245,158,11,0.12); }
.stat-icon.cyan { background: rgba(6,182,212,0.12); }
.stat-body {}
.stat-val { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; line-height: 1; }
.stat-lbl { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* ===== DASH TOOLBAR ===== */
.dash-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-wrap {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0 14px; height: 42px;
}
.search-wrap input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text);
}
.search-icon { color: var(--text3); font-size: 16px; }
.filter-select {
  padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-size: 14px; outline: none; cursor: pointer;
}

/* ===== LINK CARDS ===== */
.links-list { display: flex; flex-direction: column; gap: 14px; }
.link-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all 0.2s;
}
.link-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.link-thumb {
  width: 64px; height: 48px; border-radius: 8px;
  background: var(--bg3); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text3); border: 1px solid var(--border);
}
.link-thumb img { width: 100%; height: 100%; object-fit: cover; }
.link-body { flex: 1; min-width: 0; }
.link-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-short { color: var(--primary); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.link-short a { color: inherit; }
.link-original { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.link-badge { padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.badge-active { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-expired { background: rgba(239,68,68,0.15); color: var(--danger); }
.link-clicks { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 4px; }
.link-date { font-size: 12px; color: var(--text3); }
.link-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: all 0.2s;
}
.icon-btn:hover { background: var(--border); }
.icon-btn.danger:hover { background: rgba(239,68,68,0.1); border-color: var(--danger); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95); transition: transform 0.2s;
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h3 { font-size: 20px; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg3); border: none; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: 0.2s;
}
.modal-close:hover { background: var(--border); }

/* IMAGE UPLOAD */
.image-upload-wrap {
  border: 2px dashed var(--border2); border-radius: 12px;
  padding: 28px; text-align: center; cursor: pointer;
  transition: 0.2s; position: relative; overflow: hidden;
}
.image-upload-wrap:hover, .image-upload-wrap.dragover { border-color: var(--primary); background: rgba(79,70,229,0.04); }
.image-upload-wrap input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-text { font-size: 14px; color: var(--text2); }
.upload-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }
.upload-preview { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; display: none; }
.upload-preview.visible { display: block; }
.remove-img { margin-top: 8px; display: none; }
.remove-img.visible { display: inline-flex; }

/* ===== PROFILE NAV ===== */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer;
}
.user-dropdown {
  position: absolute; top: 48px; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px;
  min-width: 180px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: 0.2s; z-index: 500;
}
.user-dropdown.open { opacity: 1; pointer-events: all; transform: none; }
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text2); width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  transition: 0.2s;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg3); color: var(--text); }
.user-info { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-info strong { display: block; font-size: 14px; font-weight: 700; }
.user-info span { font-size: 12px; color: var(--text3); }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px; border-radius: 10px; font-size: 14px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.alert-success { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.alert-danger { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.alert-info { background: rgba(79,70,229,0.1); color: var(--primary); border: 1px solid rgba(79,70,229,0.25); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text2); font-size: 14px; margin-bottom: 20px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text2); display: flex; align-items: center; justify-content: center;
  transition: 0.2s;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: slideIn 0.3s ease; max-width: 320px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:none;opacity:1} }

/* ===== MOBILE NAV SIDEBAR ===== */
.sidebar-toggle {
  display: none; position: fixed; bottom: 24px; left: 24px; z-index: 200;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  font-size: 20px; box-shadow: 0 4px 15px rgba(79,70,229,0.4);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 99; backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ===== QR MODAL ===== */
.qr-wrap { text-align: center; padding: 20px; }
.qr-wrap canvas { border-radius: 12px; }

/* ===== SETTINGS PAGE ===== */
.settings-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
}
.settings-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.settings-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.settings-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.settings-info p { font-size: 13px; color: var(--text2); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-actions .btn-ghost, .nav-actions .btn-primary { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 90px 20px 50px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 16px; }
  .shorten-row { flex-direction: column; }
  .btn-shorten { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; }

  .features-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }

  .cta-card { padding: 40px 24px; }
  .cta-card h2 { font-size: 26px; }

  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar-toggle { display: flex; }
  .dash-main { margin-left: 0; padding: 20px; }

  .link-card { flex-wrap: wrap; }
  .link-actions { width: 100%; justify-content: flex-end; }
  .link-thumb { width: 48px; height: 36px; }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 20px; }
  .footer-top { flex-direction: column; gap: 32px; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ===== LOADING ===== */
.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ===== COPY SUCCESS ===== */
.copied { background: var(--success) !important; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; background: var(--bg3); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.tab-btn {
  flex: 1; padding: 9px; border-radius: 8px; border: none;
  background: transparent; font-size: 14px; font-weight: 600;
  color: var(--text2); cursor: pointer; transition: 0.2s;
}
.tab-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ADVANCED OPTS */
.advanced-opts { display: none; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.advanced-opts.open { display: block; }
.advanced-link { background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 4px; }

/* ===== ADMIN PANEL EXTRAS ===== */
.admin-nav { background: rgba(6,11,24,0.95); border-bottom: 1px solid rgba(79,70,229,0.25); backdrop-filter: blur(20px); }
.admin-badge-nav { display:inline-flex;align-items:center;gap:6px;background:rgba(79,70,229,0.15);border:1px solid rgba(79,70,229,0.3);padding:4px 12px;border-radius:100px;font-size:11px;font-weight:700;color:#818cf8;letter-spacing:.5px;text-transform:uppercase; }
.admin-sidebar { background:#0d1323 !important; border-right:1px solid #1e2d47 !important; }
.admin-sidebar .sidebar-link { color:#64748b !important; }
.admin-sidebar .sidebar-link:hover,.admin-sidebar .sidebar-link.active { background:rgba(79,70,229,0.12) !important; color:#818cf8 !important; }
.data-table { width:100%;border-collapse:collapse; }
.data-table th { padding:12px 16px;text-align:left;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#475569;border-bottom:1px solid var(--border);background:var(--surface2); }
.data-table td { padding:14px 16px;border-bottom:1px solid var(--border);font-size:14px;vertical-align:middle; }
.data-table tr:hover td { background:rgba(79,70,229,.04); }
.data-table tr:last-child td { border-bottom:none; }
.table-wrap { background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden;overflow-x:auto; }
.role-badge { padding:3px 10px;border-radius:100px;font-size:11px;font-weight:700; }
.role-admin { background:rgba(245,158,11,.15);color:#f59e0b; }
.role-user { background:rgba(79,70,229,.15);color:#818cf8; }
.chart-wrap { background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px;margin-bottom:20px; }
.chart-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:20px; }
.chart-title { font-weight:700;font-size:16px; }
.mini-bar-chart { display:flex;align-items:flex-end;gap:6px;height:80px; }
.bar { flex:1;background:linear-gradient(to top,rgba(79,70,229,.8),rgba(6,182,212,.6));border-radius:4px 4px 0 0;min-height:4px;transition:.2s; }
.bar:hover { opacity:.7;cursor:pointer; }
.activity-item { display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border); }
.activity-item:last-child { border-bottom:none; }
.activity-icon { width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0; }
.activity-body { flex:1;min-width:0; }
.activity-body strong { font-size:14px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.activity-body span { font-size:12px;color:var(--text3); }
.activity-time { font-size:11px;color:var(--text3);flex-shrink:0; }
.setting-row { display:flex;align-items:center;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--border);gap:20px;flex-wrap:wrap; }
.setting-row:last-child { border-bottom:none; }
.setting-info h4 { font-size:15px;font-weight:600;margin-bottom:3px; }
.setting-info p { font-size:13px;color:var(--text2); }

/* Admin dark override */
[data-theme="dark"] .admin-main { background:#060b18; }
[data-theme="dark"] .admin-stat { background:linear-gradient(135deg,#0d1323,#111827);border-color:#1e2d47; }
[data-theme="dark"] .admin-stat:hover { border-color:rgba(79,70,229,.4);box-shadow:0 0 20px rgba(79,70,229,.1); }

/* Uploads dir placeholder */
.link-thumb img { width:100%;height:100%;object-fit:cover; }
