/* ============================================================
   1) DESIGN TOKENS
   ============================================================ */
:root {
  --bg: #f7f8fc;
  --bg-2: #eef1f9;
  --surface: #ffffff;
  --surface-2: #f3f5fb;
  --surface-3: #eef1f9;
  --text: #0b1220;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e5e8f0;
  --border-2: #d5dae6;

  --primary: #6366f1;
  --primary-2: #8b5cf6;
  --primary-hover: #4f46e5;
  --primary-soft: rgba(99, 102, 241, 0.10);
  --primary-soft-2: rgba(99, 102, 241, 0.18);

  --accent: #06b6d4;
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);

  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --grad-button: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-text: linear-gradient(135deg, #6366f1 0%, #a855f7 60%, #ec4899 100%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.14), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 12px 32px -8px rgba(99, 102, 241, 0.35);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font: "Tajawal", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #070a15;
  --bg-2: #0d1220;
  --surface: #0f1421;
  --surface-2: #161c2c;
  --surface-3: #1e2537;
  --text: #e8ecf5;
  --text-2: #98a3b8;
  --text-3: #6b7894;
  --border: #1e2537;
  --border-2: #2a3346;

  --primary: #818cf8;
  --primary-2: #a78bfa;
  --primary-hover: #6366f1;
  --primary-soft: rgba(129, 140, 248, 0.14);
  --primary-soft-2: rgba(129, 140, 248, 0.22);

  --success-soft: rgba(16, 185, 129, 0.16);
  --danger-soft: rgba(239, 68, 68, 0.16);
  --warn-soft: rgba(245, 158, 11, 0.16);

  --grad-text: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 60%, #f0abfc 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 12px 32px -8px rgba(99, 102, 241, 0.55);
}

/* ============================================================
   2) BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  transition: background .3s ease, color .3s ease;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 {
  margin: 0 0 .6rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 .8rem; color: var(--text-2); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ============================================================
   3) BACKGROUND ORBS
   ============================================================ */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: .9;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  animation: float 22s ease-in-out infinite;
}
.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(99,102,241,.55), transparent 70%);
  top: -140px; right: -120px;
}
.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(217,70,239,.42), transparent 70%);
  bottom: -160px; left: -100px;
  animation-delay: -7s;
}
.orb-3 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(6,182,212,.38), transparent 70%);
  top: 40%; left: 45%;
  animation-delay: -14s;
}
[data-theme="dark"] .orb { opacity: .35; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.08); }
  66%      { transform: translate(-25px, 25px) scale(.94); }
}

/* ============================================================
   4) HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-logo {
  width: 38px; height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--grad-button);
  color: #fff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}
.brand-text { letter-spacing: -0.01em; }

.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.nav > a {
  color: var(--text-2);
  font-weight: 500;
  font-size: .92rem;
  padding: .45rem .75rem;
  border-radius: 10px;
  transition: background .15s, color .15s;
}
.nav > a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--primary);
  border: 1px solid var(--border-2);
  padding: .45rem .9rem;
  border-radius: 10px;
  font-weight: 600;
  margin-inline-start: .35rem;
  transition: all .15s;
}
.nav .btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.theme-toggle {
  width: 38px; height: 38px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  transition: all .15s;
  padding: 0;
}
.theme-toggle::before {
  content: "🌙";
  font-size: 1rem;
  line-height: 1;
}
[data-theme="dark"] .theme-toggle::before { content: "☀️"; }
.theme-toggle:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}

/* ============================================================
   5) MAIN
   ============================================================ */
.site-main { flex: 1; padding: 2.5rem 0 5rem; }

/* ============================================================
   6) HERO
   ============================================================ */
.hero { padding: 1rem 0 3rem; }
.hero-inner { text-align: center; max-width: 860px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  50%      { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}
.gradient-text {
  display: block;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto 2.2rem;
  line-height: 1.75;
}

/* ============================================================
   7) SHORTEN FORM
   ============================================================ */
.shorten-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 0 auto;
  text-align: right;
  position: relative;
  transition: box-shadow .25s, transform .25s;
}
.shorten-form:focus-within {
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--primary-soft);
}

.input-group {
  display: flex;
  gap: .5rem;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .35rem;
  transition: border-color .2s;
}
.input-group:focus-within {
  border-color: var(--primary);
  background: var(--surface);
}
.input-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  color: var(--text-3);
  flex-shrink: 0;
  padding-inline-start: .35rem;
}
.input-group input[type="url"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: .75rem .35rem;
  font-size: 1rem;
  min-width: 0;
}
.btn-submit {
  padding: .75rem 1.5rem;
  white-space: nowrap;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
}
.btn-submit:hover { transform: translateY(-1px); }

@media (max-width: 560px) {
  .input-group {
    flex-direction: column;
    padding: .5rem;
    gap: .5rem;
  }
  .input-icon { display: none; }
  .input-group input[type="url"] { padding: .65rem .75rem; }
  .btn-submit { width: 100%; }
}

/* Advanced */
.advanced {
  margin-top: .75rem;
  border-top: 1px dashed var(--border);
  padding-top: .75rem;
}
.advanced summary {
  cursor: pointer;
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem 0;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color .15s;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary:hover { color: var(--primary); }
.advanced[open] summary { color: var(--primary); }
.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .65rem;
  animation: fadeDown .25s ease;
}
@media (max-width: 560px) { .advanced-grid { grid-template-columns: 1fr; } }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.field { margin-bottom: .75rem; }
.field label {
  display: block;
  font-weight: 500;
  margin-bottom: .35rem;
  font-size: .88rem;
  color: var(--text-2);
}

/* ============================================================
   8) INPUTS / SELECTS / TEXTAREAS
   ============================================================ */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .7rem .95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }

/* ============================================================
   9) BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  transition: all .18s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad-button);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  color: #fff;
  box-shadow: var(--shadow-glow);
  filter: brightness(1.05);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border-2);
}
.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.inline { display: inline-block; margin: 0; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   10) ALERTS
   ============================================================ */
.alert {
  padding: .9rem 1.15rem;
  border-radius: var(--radius);
  margin: 1.25rem auto;
  max-width: 720px;
  font-weight: 500;
  font-size: .93rem;
  border: 1px solid transparent;
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(16, 185, 129, .35);
}
.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(239, 68, 68, .35);
}

/* ============================================================
   11) RESULT CARD
   ============================================================ */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 720px;
  margin: 1.5rem auto 0;
  box-shadow: var(--shadow-lg);
  text-align: right;
  animation: popIn .4s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.result-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
}
.result-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, .5);
  animation: scaleIn .5s cubic-bezier(.2, .9, .3, 1.4) .15s backwards;
}
@keyframes scaleIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.result-head h3 { margin: 0; font-size: 1.05rem; }
.result-head p  { margin: 0; }

.result-url {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .35rem;
}
.result-url input[type="text"] {
  flex: 1;
  min-width: 200px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: .65rem .5rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .95rem;
  color: var(--text);
  font-weight: 500;
}
.result-url input[type="text"]:focus { outline: none; }

/* ============================================================
   12) TRUST BADGES
   ============================================================ */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
  color: var(--text-3);
  font-size: .85rem;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 500;
}
.trust-item svg { color: var(--primary); }

/* ============================================================
   13) FEATURES
   ============================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 4rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity .3s;
  z-index: 0;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature > * { position: relative; z-index: 1; }
.feature-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--primary-soft);
}
.feature-icon-1 { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.feature-icon-2 { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.feature-icon-3 { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.feature-icon-4 { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
[data-theme="dark"] .feature-icon-1 { background: rgba(245, 158, 11, .18); }
[data-theme="dark"] .feature-icon-2 { background: rgba(59, 130, 246, .18); }
[data-theme="dark"] .feature-icon-3 { background: rgba(16, 185, 129, .18); }
[data-theme="dark"] .feature-icon-4 { background: rgba(139, 92, 246, .2); }
.feature h3 { margin-bottom: .5rem; }
.feature p { margin: 0; color: var(--text-2); font-size: .93rem; }

/* ============================================================
   14) CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* ============================================================
   15) ADMIN LAYOUT
   ============================================================ */
.admin { padding-top: 2rem; }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.admin-head h1 { margin: 0; font-size: 1.55rem; }
.admin-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   16) STATS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: relative;
  overflow: hidden;
  transition: all .2s;
}
.stat-card::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-button);
  opacity: 0;
  transition: opacity .2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}
.stat-card:hover::after { opacity: 1; }
.stat-label {
  color: var(--text-3);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ============================================================
   17) CHART
   ============================================================ */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: .75rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.chart-30 { gap: 3px; height: 200px; }
.chart::-webkit-scrollbar { height: 6px; }
.chart::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 3px;
}
.bar {
  flex: 1 0 18px;
  min-width: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  position: relative;
}
.bar-fill {
  width: 100%;
  min-height: 3px;
  background: var(--grad-button);
  border-radius: 5px 5px 0 0;
  transition: height .4s cubic-bezier(.2,.9,.3,1);
  position: relative;
}
.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.25), transparent);
  border-radius: inherit;
  pointer-events: none;
}
.bar:hover .bar-fill {
  filter: brightness(1.15);
  box-shadow: 0 0 12px var(--primary-soft-2);
}
.bar-label {
  font-size: .68rem;
  color: var(--text-3);
  margin-top: 4px;
  white-space: nowrap;
}

/* ============================================================
   18) TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: var(--surface);
}
.table th,
.table td {
  padding: .8rem .9rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th {
  background: var(--surface-2);
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
  color: var(--primary);
  padding: .15rem .5rem;
  background: var(--primary-soft);
  border-radius: 6px;
  font-size: .85rem;
}
.truncate {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ============================================================
   19) BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ============================================================
   20) FILTERS
   ============================================================ */
.filters {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}
.filters input[type="text"] {
  flex: 1;
  min-width: 200px;
}
.filters select { min-width: 160px; }

/* ============================================================
   21) PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: .35rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.page-link {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 .7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 600;
  font-size: .9rem;
  transition: all .15s;
}
.page-link:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  border-color: var(--border-2);
}
.page-link.active {
  background: var(--grad-button);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   22) KV
   ============================================================ */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .9rem;
}
.kv:last-child { border-bottom: none; }
.kv span { color: var(--text-2); }
.kv strong { color: var(--text); font-weight: 700; }

/* ============================================================
   23) AUTH
   ============================================================ */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ============================================================
   24) ERROR PAGE
   ============================================================ */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* ============================================================
   25) PAGES
   ============================================================ */
.page-content { max-width: 780px; margin: 0 auto; padding: 1rem 0; }
.page-content h1 { margin-bottom: 1rem; }
.page-content h2 { margin-top: 1.75rem; font-size: 1.15rem; }
.page-content ul { padding-inline-start: 1.25rem; }
.page-content li { margin-bottom: .35rem; color: var(--text-2); }

/* ============================================================
   26) FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  text-align: center;
  color: var(--text-2);
  font-size: .88rem;
}
.site-footer p { margin: 0 0 .35rem; color: var(--text-2); }
.site-footer .small { color: var(--text-3); font-size: .82rem; }

/* ============================================================
   27) UTILITIES
   ============================================================ */
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.center { text-align: center; }
.narrow { max-width: 720px; margin: 0 auto; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ============================================================
   28) RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .header-inner { padding: .75rem 1rem; }
  .brand-text { font-size: 1rem; }
  .nav > a:not(.btn-outline):not(.theme-toggle) { display: none; }
  .site-main { padding: 1.5rem 0 3rem; }
  .hero { padding: 0 0 2rem; }
  .hero-badge { font-size: .8rem; padding: .35rem .85rem; }
  .trust-badges { gap: 1rem; }
  .features { margin-top: 2.5rem; }
  .feature { padding: 1.35rem 1.15rem; }
  .admin-head { flex-direction: column; align-items: stretch; }
  .admin-actions { width: 100%; }
  .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .shorten-form { padding: .75rem; border-radius: var(--radius); }
  .result-card { padding: 1.15rem; }
}

/* ============================================================
   29) REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   30) SELECTION
   ============================================================ */
::selection { background: var(--primary); color: #fff; }
::-moz-selection { background: var(--primary); color: #fff; }

/* ============================================================
   31) SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }


/* ============================================================
   32) ADMIN PRO — Welcome / Stats / Tabs / Login
   ============================================================ */

/* --- Welcome Banner --- */
.welcome-banner {
  background: var(--grad-button);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}
.welcome-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.25), transparent 55%);
  pointer-events: none;
}
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-text h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: #fff;
}
.welcome-text p {
  margin: 0;
  opacity: .9;
  color: #fff;
  font-size: .95rem;
}
.welcome-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: 2px solid rgba(255,255,255,.4);
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

/* --- Stat Card with Icon --- */
.stat-card-pro {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.stat-card-pro:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}
.stat-icon-primary { background: rgba(99,102,241,.12); color: #6366f1; }
.stat-icon-success { background: rgba(16,185,129,.14); color: #10b981; }
.stat-icon-warn    { background: rgba(245,158,11,.14); color: #f59e0b; }
.stat-icon-danger  { background: rgba(239,68,68,.14);  color: #ef4444; }
.stat-icon-info    { background: rgba(6,182,212,.14);  color: #06b6d4; }
.stat-icon-violet  { background: rgba(139,92,246,.14); color: #8b5cf6; }

.stat-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.stat-info .stat-label {
  font-size: .82rem;
  color: var(--text-3);
  font-weight: 500;
}
.stat-info .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* --- Section Header --- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.section-head h2::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--grad-button);
  border-radius: 3px;
}

/* --- Admin Button Row --- */
.admin-btn-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* --- Admin Table --- */
.admin-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table-head {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-table-head h2 { margin: 0; font-size: 1.05rem; }
.admin-table-head .count { color: var(--text-3); font-size: .85rem; }

/* --- Filters Bar --- */
.filters-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .65rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  align-items: center;
}
@media (max-width: 720px) {
  .filters-bar { grid-template-columns: 1fr; }
}

/* --- Admin Login Split --- */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 68px);
  margin: 0;
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
.login-brand {
  background: var(--grad-button);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: #fff;
  overflow: hidden;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.2), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.15), transparent 45%);
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand h2 {
  font-size: 2rem;
  margin: 1.5rem 0 .75rem;
  color: #fff;
  text-align: center;
}
.login-brand p {
  color: rgba(255,255,255,.85);
  text-align: center;
  max-width: 320px;
  margin: 0;
}
.login-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.35);
  display: grid;
  place-items: center;
  font-size: 2rem;
  backdrop-filter: blur(10px);
}
.login-brand-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.login-brand-list li {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.92);
  font-size: .93rem;
}
.login-brand-list li::before {
  content: "✓";
  width: 22px; height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  font-size: .75rem;
  font-weight: 800;
}
.login-form-side {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
}
.login-form-side .auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}
.login-form-side .auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}
.login-form-side .auth-card .lead-small {
  color: var(--text-3);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

/* --- Two-column admin edit form --- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-2); }

/* --- Chart container --- */
.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   33) SETTINGS PAGE — Tabs / Presets / System / Danger
   ============================================================ */

.tabs-nav {
  display: flex;
  gap: .25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .35rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  box-shadow: var(--shadow-sm);
}
.tabs-nav::-webkit-scrollbar { height: 4px; }
.tabs-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.tab-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  color: var(--text-2);
  font-family: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}
.tab-btn:hover { background: var(--surface-2); color: var(--text); }
.tab-btn.active {
  background: var(--grad-button);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.tab-btn svg { width: 16px; height: 16px; }

.tab-pane { display: none; animation: fadeInPane .25s ease; }
.tab-pane.active { display: block; }

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Color Presets */
.color-presets {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin: .5rem 0 .85rem;
}
.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.selected {
  border-color: var(--surface);
  outline-color: var(--text);
  transform: scale(1.1);
}

.color-input-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.color-input-row input[type="color"] {
  width: 60px;
  height: 44px;
  padding: .2rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
}
.color-input-row input[type="text"] {
  flex: 1;
  font-family: "SFMono-Regular", Consolas, monospace;
  text-transform: lowercase;
}

/* Live Preview Card */
.color-preview {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  margin-top: .75rem;
  flex-wrap: wrap;
}
.color-preview .preview-btn {
  background: var(--grad-button);
  color: #fff;
  padding: .55rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  box-shadow: var(--shadow-glow);
}
.color-preview .preview-link {
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
}

/* System Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
}
.info-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.info-item .info-label {
  font-size: .78rem;
  color: var(--text-3);
  font-weight: 500;
}
.info-item .info-value {
  font-size: .95rem;
  color: var(--text);
  font-weight: 700;
  word-break: break-all;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.info-item.ok .info-value { color: var(--success); }
.info-item.warn .info-value { color: var(--warn); }

/* Danger Zone */
.danger-zone {
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(239,68,68,.04), rgba(239,68,68,.01));
  padding: 1.5rem;
  margin-top: 1rem;
}
.danger-zone .section-head h2 { color: var(--danger); }
.danger-zone .section-head h2::before { background: var(--danger); }
.danger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px dashed rgba(239,68,68,.2);
  flex-wrap: wrap;
}
.danger-item:last-child { border-bottom: none; }
.danger-item-text h4 {
  margin: 0 0 .2rem;
  font-size: .95rem;
  color: var(--text);
}
.danger-item-text p {
  margin: 0;
  color: var(--text-3);
  font-size: .85rem;
}


/* ============================================================
   34) SWITCH TOGGLE — نسخة محسّنة
   ============================================================ */

label.switch,
.field label.switch,
.field .switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: .75rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  margin-bottom: 0 !important;
  width: auto !important;
  line-height: 1.5;
  color: var(--text);
  padding: .35rem 0;
  position: relative;
}

label.switch input[type="checkbox"],
.field label.switch input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

label.switch .switch-track,
.field label.switch .switch-track {
  display: inline-block !important;
  position: relative;
  width: 48px;
  height: 26px;
  min-width: 48px;
  background: var(--surface-3);
  border-radius: 999px;
  transition: background .25s ease;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
  order: 0;
}

label.switch .switch-track::after,
.field label.switch .switch-track::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-start: 3px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: inset-inline-start .25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.02);
}

label.switch input[type="checkbox"]:checked ~ .switch-track,
label.switch input[type="checkbox"]:checked + .switch-track {
  background: var(--grad-button);
  border-color: transparent;
  box-shadow: 0 4px 12px -4px var(--primary);
}

label.switch input[type="checkbox"]:checked ~ .switch-track::after,
label.switch input[type="checkbox"]:checked + .switch-track::after {
  inset-inline-start: calc(100% - 23px);
}

label.switch input[type="checkbox"]:focus-visible ~ .switch-track,
label.switch input[type="checkbox"]:focus-visible + .switch-track {
  outline: 3px solid var(--primary-soft-2);
  outline-offset: 2px;
}

label.switch > span:last-child {
  font-size: .93rem;
  line-height: 1.5;
  user-select: none;
  flex: 1;
}

label.switch:hover .switch-track {
  border-color: var(--border-2);
}

/* Checkbox عادي (غير Switch) */
.checkbox label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}
/* ============================================================
   35) AD SLOTS (Header / Footer)
   ============================================================ */

.ad-slot {
  max-width: 1120px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  position: relative;
  text-align: center;
}

.ad-slot .ad-label {
  position: absolute;
  top: -10px;
  inset-inline-start: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: .68rem;
  padding: 1px 9px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .05em;
  z-index: 2;
}

.ad-slot .ad-content {
  background: var(--surface);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color .2s;
}
.ad-slot .ad-content:hover {
  border-color: var(--primary);
}

.ad-slot .ad-content ins,
.ad-slot .ad-content iframe,
.ad-slot .ad-content img {
  max-width: 100%;
  height: auto;
}

.ad-slot .ad-content img {
  border-radius: 8px;
}

/* المساحة الفارغة (للمدير) */
.ad-slot.ad-placeholder .ad-content {
  background: var(--surface-2);
  border-style: dashed;
  color: var(--text-3);
  font-size: .85rem;
  font-weight: 500;
}

/* إعلان الهيدر */
.ad-slot-header {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* إعلان الفوتر */
.ad-slot-footer {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

/* على الجوال: مساحة أصغر */
@media (max-width: 720px) {
  .ad-slot { padding: 0 1rem; margin: 1rem auto; }
  .ad-slot .ad-content { padding: .85rem; min-height: 70px; }
}
/* ============================================================
   36) FOOTER PRO — Multi-column + Social + Contact
   ============================================================ */

.footer-inner { padding: 2rem 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2rem;
  text-align: right;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
}

.footer-col { min-width: 0; }

.footer-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 .75rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.footer-tagline {
  font-size: .92rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 .5rem;
}

.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.footer-links a,
.footer-contact a {
  color: var(--text-2);
  font-size: .9rem;
  transition: color .15s;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--primary);
  text-decoration: none;
}
.footer-links a::before {
  content: "›";
  margin-inline-end: .4rem;
  color: var(--text-3);
  font-weight: 700;
}

.footer-contact li {
  color: var(--text-2);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.footer-social {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-2);
  transition: all .18s;
  text-decoration: none;
}
.social-link:hover {
  background: var(--grad-button);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
}
.footer-bottom p {
  margin: 0 0 .35rem;
  color: var(--text-2);
  font-size: .88rem;
}

.site-footer-mini { padding: .75rem 0; }
.site-footer-mini p { font-size: .82rem; }

/* معاينة الشعار */
.logo-preview {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.logo-preview img {
  max-height: 48px;
  max-width: 180px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface);
  padding: 4px;
  border: 1px solid var(--border);
}
.remove-check {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
}
.remove-check input { width: auto; }

/* حقول رفع الملفات */
input[type="file"] {
  width: 100%;
  padding: .65rem .9rem;
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .15s;
}
input[type="file"]:hover { border-color: var(--primary); }
input[type="file"]::file-selector-button {
  background: var(--grad-button);
  color: #fff;
  border: none;
  padding: .4rem .9rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  margin-inline-end: .75rem;
}