/* ─── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #08000f;
  --bg2:         #110020;
  --pink:        #e040a0;
  --pink-bright: #f050b8;
  --pink-glow:   rgba(224, 64, 160, 0.18);
  --purple:      #8b2fc9;
  --purple-deep: #5b1a8a;
  --grad-btn:    linear-gradient(135deg, #c9359a 0%, #7b22b8 100%);
  --grad-btn-h:  linear-gradient(135deg, #d84aaa 0%, #8f2fd0 100%);
  --grad-btn-a:  linear-gradient(135deg, #a8287e 0%, #611ba0 100%);
  --text:        #f5f0fa;
  --text-sub:    rgba(245, 240, 250, 0.55);
  --glass:       rgba(255, 255, 255, 0.04);
  --glass-med:   rgba(255, 255, 255, 0.08);
  --border:      rgba(200, 120, 220, 0.18);
  --border-h:    rgba(224, 64, 160, 0.5);
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-pill: 100px;
  --shadow-btn:  0 4px 28px rgba(201, 53, 154, 0.38);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.45);
  --font:        'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;

  /* Admin */
  --adm-bg:      #0c0120;
  --adm-sidebar: #07001a;
  --adm-card:    #1c0035;
  --adm-card2:   #240044;
  --adm-border:  rgba(200, 100, 255, 0.25);
  --adm-input:   rgba(255, 255, 255, 0.08);
  --adm-accent:  #c050e8;
  --adm-success: #28c96a;
  --adm-danger:  #e03060;
  --adm-warn:    #d4880a;
  --adm-text:    #ede8ff;
  --adm-text-sub:rgba(237, 232, 255, 0.6);
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ─── Sparkle Canvas ────────────────────────────────────────────────────────── */
#sparkleCanvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HOMEPAGE
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-wrapper {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; margin: 0 auto;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ─── Carousel ──────────────────────────────────────────────────────────────── */
.carousel-section {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background: #0d001a;
  flex-shrink: 0;
}

.carousel-track {
  display: flex; height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide { flex: 0 0 100%; height: 100%; }
.carousel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-slide.empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  background: radial-gradient(ellipse at center, #1a0035 0%, #08000f 100%);
  color: rgba(255,255,255,0.12);
}

/* Gradient overlay bottom of carousel */
.carousel-section::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1; pointer-events: none;
}

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 18px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  backdrop-filter: blur(8px) saturate(1.4);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.carousel-btn:hover {
  background: rgba(201, 53, 154, 0.5);
  border-color: var(--pink);
  transform: translateY(-50%) scale(1.08);
}
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }

.carousel-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none; cursor: pointer;
  transition: all 0.25s;
}
.carousel-dot.active {
  background: var(--pink-bright);
  width: 20px; border-radius: 3px;
}

/* ─── Content Area ──────────────────────────────────────────────────────────── */
.content-area {
  flex: 1; display: flex; flex-direction: column;
  padding: 28px 22px 20px;
  gap: 10px;
}

/* ─── Site Buttons ──────────────────────────────────────────────────────────── */
.site-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px 24px;
  background: var(--grad-btn);
  color: #fff; font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-btn);
  border: none; cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.site-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.22s;
}
.site-btn:hover {
  background: var(--grad-btn-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(201, 53, 154, 0.52);
}
.site-btn:hover::before { opacity: 1; }
.site-btn:active { background: var(--grad-btn-a); transform: translateY(0); }

/* ─── Video Button ──────────────────────────────────────────────────────────── */
.video-trigger-wrap { /* no extra padding, sits in content-area gap */ }
.video-trigger-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 12px 24px;
  background: var(--glass-med);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: rgba(245,240,250,0.75); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.22s;
}
.video-trigger-btn:hover {
  background: var(--pink-glow);
  border-color: var(--border-h);
  color: #fff;
}
.video-trigger-btn i { font-size: 12px; }

/* ─── Divider ───────────────────────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-sub); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 4px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.follow-label {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text-sub); letter-spacing: 0.12em;
  text-transform: uppercase; margin: 2px 0;
}

/* ─── Socials Row ───────────────────────────────────────────────────────────── */
.socials-section {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.social-icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  border: none; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
  text-decoration: none;
}
.social-icon-btn:hover {
  transform: translateY(-3px) scale(1.12);
  filter: brightness(1.15) saturate(1.2);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 16px 22px 20px;
  font-size: 11.5px;
  color: var(--text-sub);
  letter-spacing: 0.01em;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--pink); transition: color 0.2s; }
.site-footer a:hover { color: var(--pink-bright); }

/* ─── Contact Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 0, 14, 0.82);
  backdrop-filter: blur(10px) saturate(1.2);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: linear-gradient(160deg, #1a0035 0%, #0f001f 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-size: 19px; font-weight: 700; color: var(--text);
  letter-spacing: -0.01em;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-sub); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: var(--pink-glow); color: #fff; border-color: var(--border-h); }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-sub); margin-bottom: 6px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.form-control {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: var(--font);
  transition: border-color 0.2s, background 0.2s;
}
.form-control:focus {
  outline: none; border-color: var(--pink);
  background: var(--pink-glow);
}
.form-control::placeholder { color: rgba(245,240,250,0.2); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Video modal */
.video-modal-box {
  max-width: 720px; background: #000; padding: 0;
  border-radius: var(--radius); overflow: hidden; border-color: rgba(0,0,0,0.6);
}
.video-modal-box .modal-header {
  padding: 10px 12px; margin-bottom: 0; background: #111;
}
.video-frame { width: 100%; aspect-ratio: 16/9; border: none; display: block; }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 20px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; color: #fff;
  box-shadow: var(--shadow-card);
  animation: toastIn 0.28s cubic-bezier(0.4,0,0.2,1);
  max-width: 300px; backdrop-filter: blur(8px);
}
.toast.success { background: rgba(20,80,40,0.92); border: 1px solid rgba(40,201,106,0.4); }
.toast.error   { background: rgba(80,10,20,0.92);  border: 1px solid rgba(224,48,96,0.4); }
.toast.info    { background: rgba(20,10,60,0.92);  border: 1px solid rgba(139,47,201,0.4); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(14px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)   scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LINKTREE / SOCIALS PAGE
   ═══════════════════════════════════════════════════════════════════════════════ */

.lt-page {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
}

.lt-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.5) saturate(1.0) blur(2px);
  transform: scale(1.06);
  transition: opacity 0.4s;
}

/* Dark color fallback when no bg image */
.lt-bg-fallback {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, #2a0050 0%, #08000f 70%);
}

.lt-content {
  position: relative; z-index: 2;
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: 48px 24px 28px;
  display: flex; flex-direction: column; align-items: center;
}

.lt-profile-wrap {
  position: relative; margin-bottom: 18px;
}
.lt-profile-img {
  width: 108px; height: 108px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(224, 64, 160, 0.6);
  box-shadow:
    0 0 0 6px rgba(224, 64, 160, 0.1),
    0 8px 32px rgba(0,0,0,0.6);
}
.lt-profile-placeholder {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--grad-btn);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  border: 2px solid rgba(224, 64, 160, 0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.lt-name {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; font-style: italic;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(224,64,160,0.35);
  margin-bottom: 6px;
}
.lt-subtitle {
  font-size: 13px; color: rgba(245,240,250,0.55);
  text-align: center; margin-bottom: 28px; font-weight: 400;
  letter-spacing: 0.03em;
}

.lt-buttons {
  width: 100%; display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px;
}
.lt-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px 24px;
  background: rgba(15, 0, 30, 0.65);
  border: 1px solid rgba(200, 120, 220, 0.25);
  backdrop-filter: blur(14px) saturate(1.3);
  color: #fff; font-size: 14.5px; font-weight: 600;
  text-align: center; border-radius: var(--radius-pill);
  cursor: pointer; transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  letter-spacing: 0.01em;
}
.lt-btn:hover {
  background: var(--grad-btn-h);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn);
  color: #fff;
}

.lt-socials {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 24px;
}

/* ─── Homepage background image ─────────────────────────────────────────── */
.home-bg-img {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0.18;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

body.admin-body {
  background: var(--adm-bg); display: flex; min-height: 100vh;
}

/* ── Login ── */
.login-screen {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(ellipse at 50% 25%, #1c0040 0%, #05000c 70%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: linear-gradient(160deg, #140028 0%, #0a0018 100%);
  border: 1px solid var(--adm-border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
}
.login-icon { font-size: 36px; text-align: center; margin-bottom: 12px; }
.login-card h1 {
  text-align: center; font-size: 21px; font-weight: 700;
  color: var(--text); margin-bottom: 2px; letter-spacing: -0.01em;
}
.login-card p { text-align: center; color: var(--text-sub); font-size: 13px; margin-bottom: 28px; }
.error-text { color: #ff4466; font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }

/* ── Admin Layout ── */
.admin-app { display: flex; width: 100%; min-height: 100vh; }

.sidebar {
  width: 228px; min-height: 100vh;
  background: var(--adm-sidebar);
  border-right: 1px solid var(--adm-border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
}
.sidebar-brand {
  padding: 22px 20px 18px;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.01em;
}
.sidebar-brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink); flex-shrink: 0;
  box-shadow: 0 0 8px var(--pink);
}
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.nav-item, .sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; font-size: 13.5px; font-weight: 500;
  color: var(--adm-text-sub); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s; border: none; background: none;
  width: 100%; text-align: left; margin-bottom: 1px;
}
.nav-item:hover, .sidebar-link:hover { color: var(--adm-text); background: var(--glass-med); }
.nav-item.active, .sidebar-link.active { color: var(--adm-text); background: var(--pink-glow); }
.nav-item .nav-icon, .sidebar-link i { width: 20px; text-align: center; font-size: 14px; opacity: 0.8; }
.nav-item.active .nav-icon, .sidebar-link.active i { opacity: 1; color: var(--pink); }

.sidebar-footer {
  padding: 16px 16px; border-top: 1px solid var(--adm-border);
}
.sidebar-user-name { font-size: 11px; font-weight: 600; color: var(--text-sub); margin-bottom: 1px; text-transform: uppercase; letter-spacing: 0.07em; }
.sidebar-role { font-size: 13px; font-weight: 600; color: var(--pink); margin-bottom: 12px; }

/* ── Admin Main ── */
.admin-main {
  margin-left: 228px; flex: 1; padding: 32px;
  max-width: calc(100vw - 228px); overflow-x: hidden;
  background: var(--adm-bg);
}
.admin-header { margin-bottom: 24px; }
.admin-header h2 { font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.admin-header p { color: var(--text-sub); font-size: 13.5px; margin-top: 3px; }

/* 2FA Banner */
.twofa-banner {
  background: rgba(212, 136, 10, 0.1); border: 1px solid rgba(212,136,10,0.3);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px;
}
.twofa-banner a { color: var(--pink); font-weight: 600; cursor: pointer; }

/* ── Cards ── */
.adm-card {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px;
}
.adm-card h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; gap: 8px;
}
.adm-card h3 i { color: var(--pink); opacity: 0.8; }

/* ── Forms ── */
.adm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adm-form-group { margin-bottom: 14px; }
.adm-label {
  display: block; font-size: 11.5px; font-weight: 600;
  color: var(--text-sub); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.adm-input, .adm-select, .adm-textarea {
  width: 100%; padding: 9px 12px;
  background: var(--adm-input);
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); color: var(--adm-text); font-size: 13.5px;
  transition: border-color 0.2s, background 0.2s;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  outline: none; border-color: var(--adm-accent);
  background: rgba(176, 61, 207, 0.07);
}
.adm-input::placeholder { color: rgba(245,240,250,0.2); }
.adm-select option { background: #120025; color: var(--text); }
.adm-textarea { min-height: 80px; resize: vertical; }

.adm-color-row { display: flex; align-items: center; gap: 8px; }
.adm-color-input {
  width: 36px; height: 36px; padding: 2px; border-radius: 8px;
  border: 1px solid var(--adm-border); background: none; cursor: pointer;
}
.adm-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13.5px; color: var(--text-sub);
  user-select: none;
}
.adm-toggle input[type="checkbox"] { width: 36px; height: 20px; cursor: pointer; accent-color: var(--adm-accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all 0.18s; border: none; font-family: var(--font);
}
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 2px 16px rgba(176,61,207,0.28); }
.btn-primary:hover { background: var(--grad-btn-h); transform: translateY(-1px); box-shadow: 0 4px 24px rgba(176,61,207,0.42); }
.btn-secondary { background: var(--glass-med); color: var(--text); border: 1px solid var(--adm-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: rgba(224,48,96,0.12); color: #ff4466; border: 1px solid rgba(224,48,96,0.3); }
.btn-danger:hover { background: rgba(224,48,96,0.25); }
.btn-success { background: rgba(40,201,106,0.12); color: #28c96a; border: 1px solid rgba(40,201,106,0.3); }
.btn-success:hover { background: rgba(40,201,106,0.22); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.btn-block { width: 100%; justify-content: center; }

/* ── Tables ── */
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th {
  padding: 9px 12px; text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-sub); border-bottom: 1px solid var(--adm-border);
  font-weight: 600;
}
.adm-table td {
  padding: 12px 12px; border-bottom: 1px solid rgba(139,47,201,0.08);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.badge-xilari { background: rgba(224,64,160,0.15); color: var(--pink); }
.badge-owner  { background: rgba(255,140,0,0.15); color: #ff8c00; }
.badge-staff  { background: rgba(0,140,255,0.15); color: #0088ff; }
.badge-unread { background: rgba(224,64,160,0.2); color: var(--pink); }
.badge-read   { background: var(--glass); color: var(--text-sub); }
.badge-success{ background: rgba(40,201,106,0.15); color: var(--adm-success); }
.badge-danger { background: rgba(224,48,96,0.15); color: #ff4466; }

/* ── Image list (carousel editor) ── */
.img-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.img-list-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.img-list-thumb {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0; background: #222;
}
.img-list-url {
  flex: 1; font-size: 12px; color: var(--text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Media Grid ── */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-item {
  position: relative; border-radius: var(--radius-sm);
  overflow: hidden; background: #111; aspect-ratio: 1; cursor: pointer;
}
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; transition: opacity 0.18s;
}
.media-item:hover .media-item-overlay { opacity: 1; }
.media-item-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 5px 7px; font-size: 10px; color: #ccc;
  background: rgba(0,0,0,0.65);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--adm-border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  color: var(--text-sub); font-size: 13.5px;
  transition: all 0.2s; margin-bottom: 16px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--adm-accent); background: rgba(176,61,207,0.06); color: var(--text);
}
.drop-zone .drop-icon { font-size: 34px; margin-bottom: 10px; }

/* ── Social Editor ── */
.social-editor-item {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--glass); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.social-editor-preview {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; flex-shrink: 0;
}
.social-editor-item input[type="text"],
.social-editor-item input[type="url"] { flex: 1; min-width: 100px; }
.icon-picker-btn {
  padding: 6px 11px;
  background: var(--glass-med); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 12px;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.icon-picker-btn:hover { border-color: var(--adm-accent); }

/* ── Inbox ── */
.inbox-item {
  background: var(--adm-card); border: 1px solid var(--adm-border);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.18s;
}
.inbox-item:hover { border-color: rgba(176,61,207,0.4); }
.inbox-item.unread { border-left: 3px solid var(--pink); }
.inbox-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.inbox-name { font-weight: 600; font-size: 14.5px; }
.inbox-email { color: var(--text-sub); font-size: 13px; }
.inbox-time { color: var(--text-sub); font-size: 12px; margin-left: auto; }
.inbox-subject { font-size: 13px; color: var(--text-sub); margin-bottom: 3px; }
.inbox-preview { font-size: 13px; color: rgba(245,240,250,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-body { font-size: 13.5px; line-height: 1.65; margin-top: 10px; display: none; }
.inbox-item.expanded .inbox-body { display: block; }
.inbox-item.expanded .inbox-preview { display: none; }

/* ── Logs ── */
.log-flag { font-size: 18px; }
.log-type-login  { color: var(--adm-success); font-weight: 600; }
.log-type-change { color: #8877ee; font-weight: 600; }
.log-type-revert { color: var(--adm-warn); font-weight: 600; }

/* ── Profile / 2FA ── */
.qr-img { border-radius: var(--radius-sm); max-width: 200px; margin: 14px 0; }
.twofa-code { display: flex; align-items: center; gap: 10px; }
.twofa-code input { letter-spacing: 0.3em; font-size: 20px; text-align: center; width: 150px; }

/* ── Media Picker Modal ── */
.media-picker-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.media-picker-box {
  background: var(--adm-card); border: 1px solid var(--adm-border);
  border-radius: 18px; width: 100%; max-width: 700px; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.media-picker-header {
  padding: 18px 22px; border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600;
}
.media-picker-body { padding: 18px; overflow-y: auto; flex: 1; }
.media-picker-item {
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: border-color 0.18s;
}
.media-picker-item:hover { border-color: var(--pink); }
.media-picker-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Icon Picker Modal ── */
.icon-picker-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.icon-picker-box {
  background: var(--adm-card); border: 1px solid var(--adm-border);
  border-radius: 18px; width: 100%; max-width: 460px;
  max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.icon-picker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 16px; overflow-y: auto; flex: 1;
}
.icon-option {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 8px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--glass); border: 1px solid transparent;
  font-size: 11.5px; color: var(--text-sub);
  transition: all 0.15s; text-align: center;
}
.icon-option:hover { background: var(--pink-glow); border-color: var(--border-h); color: var(--text); }
.icon-option i { font-size: 20px; }

/* ── Tab content ── */
.tab-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.tab-header h2 {
  font-size: 20px; font-weight: 700; color: var(--adm-text);
  letter-spacing: -0.02em;
}
.tab-loading {
  text-align: center; padding: 60px; color: var(--adm-text-sub); font-size: 14px;
}

/* ── Carousel editor ── */
.carousel-item-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--adm-input); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px;
}
.carousel-thumb {
  width: 54px; height: 54px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0; background: #222;
}
.carousel-item-url {
  flex: 1; font-size: 12px; color: var(--adm-text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Button editor rows ── */
.btn-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--adm-input); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}

/* ── Social editor rows ── */
.social-editor-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px; background: var(--adm-input); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.social-preview-circle {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  transition: transform 0.2s;
}
.social-preview-circle:hover { transform: scale(1.1); }
.social-preview-circle { position: relative; }
.soc-circle-hint {
  position: absolute; bottom: -3px; right: -3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; color: #222; display: flex; align-items: center; justify-content: center;
  font-size: 7px; border: 1px solid rgba(0,0,0,0.2);
}
.color-picker {
  width: 36px; height: 36px; padding: 2px; border-radius: 8px;
  border: 1px solid var(--adm-border); background: none; cursor: pointer;
  flex-shrink: 0;
}

/* ── Upload row ── */
.upload-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--adm-input); border-radius: var(--radius-sm);
  margin-top: 6px; font-size: 13px; color: var(--adm-text-sub);
}

/* ── Inbox cards ── */
.inbox-card {
  background: var(--adm-input); border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
  cursor: pointer; transition: border-color 0.18s;
}
.inbox-card:hover { border-color: rgba(200,100,255,0.5); }
.inbox-card.unread-card { border-left: 3px solid var(--pink); }
.inbox-card-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.inbox-card-name { font-weight: 600; font-size: 14px; color: var(--adm-text); }
.inbox-card-time { color: var(--adm-text-sub); font-size: 12px; margin-left: auto; }
.inbox-card-subject { font-size: 13px; color: var(--adm-text-sub); }

/* ── Unread row in table ── */
.unread-row td { font-weight: 600; }

/* ── Media thumbs ── */
.media-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-item-actions {
  display: flex; gap: 6px; padding: 6px 8px;
  background: rgba(0,0,0,0.5); justify-content: center; flex-shrink: 0;
}

/* ── Icon pick button ── */
.icon-pick-btn {
  padding: 10px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid transparent;
  color: var(--text); font-size: 20px; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.icon-pick-btn:hover { background: var(--pink-glow); border-color: var(--border-h); }

/* ── SEO char counter ── */
.char-count {
  font-size: 11px; color: var(--adm-text-sub); margin-top: 4px; text-align: right;
}
.char-count.warn { color: var(--adm-warn); }
.char-count.over { color: var(--adm-danger); }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(176,61,207,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--adm-accent); }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLET
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── iOS safe-area insets (notch / Dynamic Island / home indicator) ──────────── */
.site-footer {
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.toast-container {
  bottom: max(24px, env(safe-area-inset-bottom));
  right:  max(20px, env(safe-area-inset-right));
}

/* ── Touch devices: bigger tap targets, prevent iOS auto-zoom on inputs ──────── */
@media (hover: none) and (pointer: coarse) {
  /* iOS Safari zooms in if input font < 16px — this stops that */
  .form-control,
  .adm-input, .adm-select, .adm-textarea { font-size: 16px; }

  .site-btn, .lt-btn { min-height: 52px; }
  .social-icon-btn  { width: 50px; height: 50px; font-size: 18px; }
  .carousel-btn     { width: 46px; height: 46px; }
  .btn              { min-height: 44px; }
  .btn-sm           { min-height: 38px; }
}

/* ── Tablets (769 – 1024px): narrow sidebar only ─────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar    { width: 190px; }
  .admin-main { margin-left: 190px; max-width: calc(100vw - 190px); padding: 22px; }
}

/* ══════════════════════════════ ≤ 768px (phones + small tablets) ═════════════ */
@media (max-width: 768px) {

  /* ── Homepage ── */
  .content-area { padding: 20px 16px 16px; }

  /* Contact / Video modal → bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
    max-height: 92vh;
    transform: translateY(24px);
  }
  .modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
  .video-modal-box { border-radius: 0; max-width: 100%; }

  /* Toast: full-width strip at bottom */
  .toast-container {
    left: 12px; right: 12px;
    bottom: max(20px, env(safe-area-inset-bottom));
    align-items: stretch;
  }
  .toast { max-width: 100%; }

  /* ── Socials / Linktree page ── */
  .lt-content   { padding: 36px 18px 24px; }
  .lt-name      { font-size: 22px; }
  .lt-subtitle  { font-size: 12.5px; margin-bottom: 22px; }

  /* ── Admin layout ── */
  .admin-app { flex-direction: column; }

  /* Sidebar → sticky horizontal strip at top */
  .sidebar {
    width: 100%; min-height: auto;
    position: sticky; top: 0; z-index: 100;
    flex-direction: column; height: auto;
  }
  .sidebar-brand { padding: 10px 14px; font-size: 13px; }
  .sidebar-nav {
    display: flex; flex-direction: row; gap: 2px;
    overflow-x: auto; padding: 4px 8px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-link {
    flex-direction: column; gap: 3px; padding: 8px 10px;
    font-size: 10px; white-space: nowrap;
    border-radius: var(--radius-sm); margin-bottom: 0; flex-shrink: 0;
  }
  .sidebar-link i { width: auto; font-size: 15px; }
  .sidebar-footer {
    order: -1; border-top: none; border-bottom: 1px solid var(--adm-border);
    padding: 8px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .sidebar-user-name { margin-bottom: 0; }
  .sidebar-role      { margin-bottom: 0; }

  .admin-main   { margin-left: 0; max-width: 100%; padding: 14px; }
  .admin-header { margin-bottom: 16px; }
  .admin-header h2 { font-size: 18px; }

  /* Cards — reduced padding, overflow scroll for tables inside */
  .adm-card   { padding: 14px 16px; margin-bottom: 14px; overflow-x: auto; }
  .adm-card h3 { font-size: 13px; margin-bottom: 14px; }

  /* Forms */
  .adm-form-row { grid-template-columns: 1fr; }

  /* Tables — scroll inside their card */
  .adm-table                        { min-width: 500px; font-size: 12.5px; }
  .adm-table th, .adm-table td      { padding: 8px 9px; }

  /* Media grid */
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }

  /* Drop zone */
  .drop-zone           { padding: 22px 14px; }
  .drop-zone .drop-icon { font-size: 24px; margin-bottom: 6px; }

  /* Carousel editor rows */
  .carousel-item-row  { flex-wrap: wrap; }
  .carousel-item-url  { min-width: 0; white-space: normal; word-break: break-all; }

  /* Button editor rows */
  .btn-row                   { gap: 6px; flex-wrap: wrap; }
  .btn-row .btn-label-input  { width: 110px !important; }
  .btn-row .btn-url-input    { flex: 1 1 100% !important; min-width: 0; }

  /* Social editor rows */
  .social-editor-row          { gap: 6px; flex-wrap: wrap; }
  .social-editor-row .soc-label { width: 80px; flex-shrink: 0; }
  .social-editor-row .soc-url   { flex: 1 1 140px; min-width: 0; }

  /* Tab header */
  .tab-header    { flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .tab-header h2 { font-size: 17px; }
  .tab-header .btn { padding: 8px 14px; font-size: 12.5px; }

  /* Icon picker */
  .icon-picker-overlay { padding: 10px; }
  .icon-picker-box     { max-height: 82vh; }
  .icon-picker-grid    { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 12px; }
  .icon-pick-btn       { padding: 9px; font-size: 18px; }

  /* Media picker */
  .media-picker-overlay { padding: 10px; }
  .media-picker-box     { max-height: 88vh; }
  .media-picker-body    { padding: 12px; }

  /* Login → bottom sheet */
  .login-screen { padding: 0; align-items: flex-end; }
  .login-card {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 32px 22px max(28px, env(safe-area-inset-bottom));
  }

  /* 2FA */
  .twofa-code       { flex-wrap: wrap; }
  .twofa-code input { width: 120px; font-size: 18px; }
}

/* ══════════════════════════════ ≤ 480px (small phones, iPhone SE etc.) ══════ */
@media (max-width: 480px) {

  /* Homepage */
  .carousel-section { aspect-ratio: 3 / 4; }
  .content-area     { padding: 16px 14px 14px; gap: 8px; }
  .site-btn         { padding: 14px 18px; font-size: 14px; }

  /* Socials page */
  .lt-content { padding: 28px 14px 20px; }
  .lt-profile-img,
  .lt-profile-placeholder { width: 88px; height: 88px; }
  .lt-profile-placeholder  { font-size: 34px; }
  .lt-name                 { font-size: 20px; }
  .lt-subtitle             { margin-bottom: 18px; }

  /* Admin */
  .admin-main  { padding: 10px; }
  .adm-card    { padding: 12px; }
  .adm-card h3 { font-size: 12.5px; }
  .sidebar-brand { padding: 8px 12px; font-size: 12px; }
  .sidebar-link  { padding: 6px 7px; font-size: 9px; }
  .sidebar-link i { font-size: 13px; }

  /* Button editor → label and save in one row, URL below */
  .btn-row .btn-label-input { width: auto !important; flex: 1 !important; }

  /* Social editor → fully stacked column */
  .social-editor-row { flex-direction: column; align-items: stretch; }
  .social-editor-row .social-preview-circle {
    align-self: center; width: 46px; height: 46px; font-size: 20px;
  }
  .social-editor-row .soc-label { width: 100%; }
  .social-editor-row .soc-url   { flex: none; width: 100%; min-width: 0 !important; }

  /* Icon picker grid tighter */
  .icon-picker-grid { grid-template-columns: repeat(4, 1fr); }
  .media-grid       { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }

  /* Modals */
  .modal-box    { padding: 20px 14px max(16px, env(safe-area-inset-bottom)); }
  .login-card   { padding: 28px 18px max(24px, env(safe-area-inset-bottom)); }
}

/* ─── Utilities ──────────────────────────────────────────────────────────────── */
.text-pink    { color: var(--pink); }
.text-muted   { color: var(--text-sub); }
.text-center  { text-align: center; }
.flex         { display: flex; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2        { gap: 8px; }
.mt-4         { margin-top: 16px; }
.mb-4         { margin-bottom: 16px; }
.w-full       { width: 100%; }
.hidden       { display: none !important; }
