/* ═══════════════════════════════════════════════════════
   TeckwikReels — Design System
   Pure CSS, no build step, no framework dependency
   ═══════════════════════════════════════════════════════ */

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

/* ─── Tokens ─── */
:root {
  --bg: #09090b;
  --bg-card: #18181b;
  --bg-hover: #27272a;
  --border: #27272a;
  --fg: #fafafa;
  --dim: #a1a1aa;
  --accent: #7c3aed;
  --accent-lt: #a78bfa;
  --blue: #2563eb;
  --green: #22c55e;
  --glow: rgba(124, 58, 237, 0.3);
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── Base ─── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
  padding-top: 88px;
  /* Navbar height(64) + Spacing(24) */
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ─── Container ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-md {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Typography ─── */
.grad-text {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-dim {
  color: var(--dim);
}

.text-sm {
  font-size: 14px;
}

.text-xs {
  font-size: 12px;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-lt);
  margin-bottom: 12px;
}

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Modern Billing Toggle ─── */
.billing-switcher {
  display: flex !important;
  flex-direction: row !important;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--border);
  position: relative;
  user-select: none;
  min-width: 240px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.billing-switcher-opt {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--dim);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 100px;
}

.billing-switcher-opt.active {
  color: #fff;
}

.billing-switcher-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-radius: 100px;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px var(--glow);
}

.billing-switcher.annual .billing-switcher-slider {
  transform: translateX(100%);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-image {
  width: 170px;
  height: 34px;
  max-width: 170px;
  object-fit: contain;
}

.nav-logo-image-sm {
  width: 150px;
  height: 30px;
  max-width: 150px;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.2s;
}

.nav-logo:hover .nav-logo-icon {
  transform: scale(1.08);
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--dim);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  padding: 8px 16px;
  transition: color 0.2s;
}

.nav-login:hover {
  color: var(--fg);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  box-shadow: 0 8px 30px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.card:hover {
  border-color: rgba(124, 58, 237, 0.25);
  background: #1f1f23;
}

.card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform 0.3s;
}

.card:hover .card-icon {
  transform: scale(1.15);
}

/* ─── Grid ─── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .nav-links,
  .nav-actions {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* ─── Hero Redesign ─── */
.hero {
  min-height: calc(100vh - 88px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-orb-1 {
  position: absolute;
  top: 80px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}

.hero-orb-2 {
  position: absolute;
  bottom: 80px;
  right: 20%;
  width: 400px;
  height: 400px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* Left Column: Content & Copy (Aligned Left) */
.hero-content {
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #ffffff;
  text-align: left;
}

.hero-sub {
  font-size: 18px;
  color: var(--dim);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 0 36px 0;
  text-align: left;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -4px rgba(124, 58, 237, 0.65);
}

/* ─── Right Column: Phone Mockup Showcase ─── */
.hero-mockup-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

/* Reel Switcher Buttons */
.hero-reel-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 320px;
  z-index: 5;
}

.reel-switcher-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(24, 24, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dim);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.reel-switcher-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.reel-switcher-btn.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(37, 99, 235, 0.3));
  border-color: rgba(167, 139, 250, 0.6);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.reel-btn-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease;
}

.reel-switcher-btn.active .reel-btn-pulse {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 1.8s ease-in-out infinite;
}

/* Phone Container & 3D Layering */
.phone-device-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Secondary Phone Peek on Desktop */
.phone-peek-backdrop {
  display: block;
  position: absolute;
  right: calc(50% - 240px);
  top: 30px;
  width: 200px;
  height: 410px;
  border-radius: 34px;
  border: 7px solid #1e2538;
  overflow: hidden;
  opacity: 0.5;
  transform: rotate(7deg) scale(0.92);
  z-index: 1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  background: #000;
}

.phone-peek-backdrop:hover {
  opacity: 0.85;
  transform: rotate(3deg) scale(0.96);
}

.phone-peek-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

.phone-peek-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 100px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* Main Phone Chassis */
.phone-mockup {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 310px;
  background: #0b0f19;
  border: 10px solid #1a2234;
  border-radius: 46px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85),
              0 0 0 1px rgba(255, 255, 255, 0.12),
              inset 0 0 0 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  box-sizing: border-box;
}

/* Dynamic Island Notch */
.phone-speaker-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 94px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.phone-camera-lens {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111a2e;
  border: 1.5px solid #24324d;
}

.phone-speaker-slit {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #1c2230;
}

/* Phone Screen (9:16 Aspect Ratio) */
.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000000;
  border-radius: 36px;
}

/* Videos inside phone */
.phone-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.phone-video.active {
  opacity: 1;
  pointer-events: auto;
}

/* Phone Status Bar */
.phone-status-bar {
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  z-index: 8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Social Media Top Feeds */
.phone-social-top {
  position: absolute;
  top: 38px;
  left: 0;
  width: 100%;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  z-index: 8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.phone-tabs {
  display: flex;
  gap: 14px;
  font-size: 13.5px;
}

.phone-tab-inactive {
  opacity: 0.65;
  font-weight: 500;
}

.phone-tab-active {
  opacity: 1;
  font-weight: 700;
  position: relative;
}

.phone-tab-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
}

/* Top Video Controls: Sound & Play/Pause Buttons */
.phone-ctrl-pills {
  position: absolute;
  top: 72px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9;
  pointer-events: none;
}

.phone-ctrl-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
}

.phone-ctrl-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.9);
}

/* Big Center Play Indicator (when paused) */
.phone-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.phone-center-play.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.center-play-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease;
}

.center-play-circle:hover {
  transform: scale(1.08);
}

/* Right Social Actions Column */
.phone-social-actions {
  position: absolute;
  right: 12px;
  bottom: 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  z-index: 8;
}

.phone-action-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
}

.avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  overflow: hidden;
  background: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.avatar-follow-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid #000000;
}

.phone-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: #ffffff;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform 0.15s ease;
}

.phone-action-btn:hover {
  transform: scale(1.1);
}

.action-btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.action-label {
  font-size: 10.5px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* Vinyl Record Spin */
.phone-action-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111111;
  border: 5px solid #1f1f23;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.disc-center {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
}

.spinning {
  animation: spin 5s linear infinite;
}

.phone-action-disc.paused .spinning {
  animation-play-state: paused;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Bottom Caption Info */
.phone-social-bottom {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 16px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 65%, transparent 100%);
  z-index: 7;
  color: #ffffff;
  pointer-events: none;
}

.phone-account {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.account-name {
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.verified-badge {
  display: inline-flex;
}

.generated-tag {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.7);
  font-weight: 600;
}

.phone-caption {
  font-size: 11.5px;
  line-height: 1.4;
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phone-audio-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #cbd5e1;
}

.audio-marquee {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 185px;
}

/* Bottom Progress Scrub */
.phone-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 9;
}

.phone-progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.15s linear;
}

/* Stats Strip */
.hero-stats-strip {
  margin-top: 56px;
  width: 100%;
}

.stat-card {
  text-align: center;
  padding: 20px 16px;
}

.stat-number {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
}

.stat-label {
  font-size: 12px;
  margin-top: 4px;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 991px) {
  .hero {
    min-height: auto;
    padding: 30px 0 50px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }

  .hero-badge {
    margin: 0 auto 20px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 7.5vw, 2.8rem);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-sub {
    margin: 0 auto 28px;
    text-align: center;
    font-size: 16px;
    max-width: 600px;
  }

  .hero-ctas {
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
  }

  .phone-peek-backdrop {
    display: none !important;
  }

  .hero-mockup-wrapper {
    margin-top: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .phone-mockup {
    max-width: 295px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero-container {
    padding: 0 16px;
  }

  .hero-content {
    text-align: center;
    align-items: center;
    width: 100%;
  }

  .hero-badge {
    margin: 0 auto 16px;
    text-align: center;
    font-size: 12px;
    padding: 5px 14px;
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: clamp(1.9rem, 7.5vw, 2.4rem);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-sub {
    font-size: 14.5px;
    line-height: 1.6;
    text-align: center;
    margin: 0 auto 24px;
    max-width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
  }

  .hero-ctas .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-features-list {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .phone-mockup {
    max-width: 280px;
    border-width: 8px;
    border-radius: 40px;
  }

  .phone-screen {
    border-radius: 30px;
  }

  .hero-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 36px;
  }

  .stat-card {
    padding: 14px 10px;
  }
}

@media (max-width: 380px) {
  .hero-container {
    padding: 0 12px;
  }

  .phone-mockup {
    max-width: 265px;
    border-width: 7px;
    border-radius: 36px;
  }

  .phone-screen {
    border-radius: 26px;
  }
}

/* ─── Sections ─── */
.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  margin-top: 16px;
  color: var(--dim);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Public Pages ─── */
.public-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.public-center {
  text-align: center;
}

.public-hero {
  padding: 96px 0 56px;
  position: relative;
  overflow: hidden;
}

.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.12), transparent 38%),
    radial-gradient(ellipse at 80% 10%, rgba(37, 99, 235, 0.08), transparent 34%);
  pointer-events: none;
}

.public-hero .public-container {
  position: relative;
}

.public-hero h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.public-hero-compact {
  padding-bottom: 48px;
}

.public-hero-compact h1 {
  margin-left: auto;
  margin-right: auto;
}

.public-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: center;
}

.public-hero-copy {
  max-width: 640px;
  margin-top: 20px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.8;
}

.public-hero-compact .public-hero-copy {
  margin-left: auto;
  margin-right: auto;
}

.public-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.public-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.public-hero-card {
  position: relative;
  overflow: hidden;
}

.public-hero-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  filter: blur(36px);
}

.public-device {
  position: relative;
  width: 132px;
  margin: 0 auto 24px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #0f0f12;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.public-device-bar {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 8px;
}

.public-device-screen {
  min-height: 190px;
  border-radius: 18px;
  padding: 18px 12px;
  background:
    linear-gradient(160deg, rgba(124, 58, 237, 0.46), rgba(37, 99, 235, 0.24)),
    linear-gradient(180deg, #202026, #111114);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.public-device-screen span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: auto;
}

.public-device-screen strong {
  font-size: 13px;
  line-height: 1.25;
}

.public-device-screen small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  margin-top: 4px;
}

.public-check {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.public-check:first-child {
  padding-top: 0;
}

.public-check:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.public-check span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  margin-top: 8px;
  flex: 0 0 auto;
  box-shadow: 0 0 20px var(--glow);
}

.public-check p {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}

.public-story-grid {
  display: grid;
  gap: 16px;
}

.public-story-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.public-story-card:hover,
.public-contact-card:hover,
.public-proof-card:hover,
.public-article:hover {
  transform: none;
}

.public-story-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.public-story-card p {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.75;
}

.public-story-index {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.22);
}

.public-card-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-lt);
  margin-bottom: 12px;
}

.public-band {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(124, 58, 237, 0.04), rgba(255, 255, 255, 0.01));
}

.public-band .section-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.public-feature-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.public-feature-row span {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  font-weight: 600;
}

.public-contact-grid,
.public-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.public-contact-card,
.public-proof-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.public-contact-card h3,
.public-proof-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.public-article {
  display: grid;
  gap: 0;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.public-article article {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.public-article article:first-child {
  padding-top: 0;
}

.public-article article:last-child {
  border-bottom: none;
}

.public-article h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  letter-spacing: 0;
}

.public-article p {
  color: var(--dim);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .public-hero-grid {
    grid-template-columns: 1fr;
  }

  .public-panel {
    max-width: 520px;
  }

  .public-contact-grid,
  .public-proof-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .public-hero {
    padding: 72px 0 42px;
  }

  .public-story-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .public-article {
    padding: 24px;
  }

  .public-actions {
    flex-direction: column;
  }

  .public-actions .btn {
    width: 100%;
  }
}

/* ─── Pipeline ─── */
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.3s;
}

.pipeline-step:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.pipeline-step-emoji {
  font-size: 28px;
}

.pipeline-step-label {
  font-weight: 600;
  font-size: 14px;
}

.pipeline-step-sub {
  font-size: 12px;
  color: var(--dim);
}

.pipeline-arrow {
  text-align: center;
  padding: 4px 0;
  color: var(--accent);
}

/* ─── Step badge ─── */
.step-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 20px;
}

/* ─── CTA Banner ─── */
.cta-banner {
  text-align: center;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-banner-orb {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* ─── FAQ ─── */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item+.faq-item {
  margin-top: 12px;
}

.faq-item summary {
  list-style: none;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.faq-item summary:hover {
  background: var(--bg-hover);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-answer {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--dim);
  line-height: 1.7;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  color: var(--dim);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

details[open] .faq-chevron {
  transform: rotate(180deg);
}

/* ─── Pricing Cards ─── */
.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  width: 100%;
  max-width: 260px;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: rgba(124, 58, 237, 0.5);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, var(--bg-card) 50%);
  box-shadow: 0 0 30px var(--glow), inset 0 0 30px rgba(124, 58, 237, 0.04);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  box-shadow: 0 4px 20px var(--glow);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.pricing-currency {
  font-size: 14px;
  color: var(--dim);
  font-weight: 500;
}

.pricing-amount {
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.pricing-period {
  font-size: 14px;
  color: var(--dim);
  font-weight: 500;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  padding: 6px 0;
}

.feature-list li.disabled {
  color: rgba(161, 161, 170, 0.4);
  text-decoration: line-through;
}

.feature-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Compare Table ─── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-card);
}

.compare-table th:first-child {
  text-align: left;
  color: var(--dim);
}

.compare-table td {
  padding: 14px 24px;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.compare-table td:first-child {
  color: var(--fg);
}

.compare-table td:nth-child(2) {
  text-align: center;
  color: var(--dim);
}

.compare-table td:nth-child(3) {
  text-align: center;
  font-weight: 500;
  color: var(--fg);
}

.compare-table tr:nth-child(even) {
  background: rgba(24, 24, 27, 0.4);
}

/* ─── Guarantee ─── */
.guarantee {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--dim);
  line-height: 1.7;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a,
.footer-links span {
  font-size: 14px;
  color: var(--dim);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-bottom {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--dim);
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials a {
  color: var(--dim);
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: var(--fg);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Animations ─── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.anim {
  animation: fade-up 0.6s ease-out both;
}

.anim-d1 {
  animation-delay: 0.12s;
}

.anim-d2 {
  animation-delay: 0.24s;
}

.anim-d3 {
  animation-delay: 0.36s;
}

/* ─── Mobile menu ─── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  z-index: 110;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
}

.mobile-menu-icon {
  width: 22px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-btn.is-active .mobile-menu-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.is-active .mobile-menu-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.is-active .mobile-menu-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Public Mobile Backdrop */
.public-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.public-mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Public Mobile Drawer */
.public-mobile-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  background: #09090d;
  z-index: 999;
  padding: 16px 18px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.public-mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.public-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.public-mobile-header-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dim);
}

.public-mobile-close {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.public-mobile-close:hover {
  color: var(--fg);
  background: var(--bg-hover);
}

.public-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-radius: 12px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s ease;
  min-height: 48px;
}

.public-mobile-link:hover, .public-mobile-link:active {
  background: var(--bg-hover);
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--accent-lt);
}

.public-mobile-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   Dashboard / App Layout
   ═══════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: width 0.25s ease;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 62px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-link svg {
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

.sidebar-link.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--fg);
}

.sidebar-link.active svg {
  color: var(--accent-lt);
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.sidebar-credits {
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.sidebar-text {
  transition: opacity 0.2s;
  overflow: hidden;
}

/* ─── Collapsed sidebar ─── */
.sidebar.collapsed {
  width: 68px;
}

.sidebar.collapsed .sidebar-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
}

.sidebar.collapsed .sidebar-header .nav-logo {
  display: none;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-credits .text-xs {
  display: none;
}

.sidebar.collapsed .sidebar-user {
  justify-content: center;
}

/* ─── Main content area ─── */
.app-main {
  flex: 1;
  margin-left: 260px;
  transition: margin-left 0.25s ease;
}

.app-main.sidebar-collapsed {
  margin-left: 68px;
}

/* ─── App header ─── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-header-title {
  font-size: 16px !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.app-mobile-toggle:hover {
  background: var(--bg-hover);
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 140;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.app-header-icon {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.app-header-icon:hover {
  background: var(--bg-hover);
  color: var(--fg);
}

.app-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-content {
  max-width: 1100px;
  padding: 28px 32px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Native Mobile Bottom Navigation Bar ─── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(14, 14, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 95;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--dim);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.bottom-nav-item svg {
  transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav-item:hover, .bottom-nav-item:active {
  color: var(--fg);
}

.bottom-nav-item.active {
  color: var(--accent-lt);
  font-weight: 700;
}

.bottom-nav-item.active svg {
  color: var(--accent-lt);
  transform: translateY(-2px);
}

.bottom-nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-lt);
  box-shadow: 0 0 8px var(--accent-lt);
}

/* Floating Center Action Button in Mobile Bottom Nav */
.bottom-nav-create {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  margin-top: -14px;
}

.bottom-nav-create-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px var(--glow), 0 0 0 3px rgba(9, 9, 11, 0.95);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-create:active .bottom-nav-create-btn {
  transform: scale(0.92);
}

.bottom-nav-create span {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-lt);
  margin-top: 2px;
}

/* Responsive: Mobile App View (< 768px) */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    display: flex !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-header .sidebar-close-btn {
    display: flex !important;
  }

  .sidebar-toggle {
    display: none;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100%;
    min-width: 0;
  }

  .app-header {
    padding: 0 16px;
    height: 56px;
  }

  .app-mobile-toggle {
    display: flex;
  }

  .app-content {
    padding: 16px 14px;
    padding-bottom: 96px; /* Safe padding for bottom nav */
    max-width: 100%;
    overflow-x: hidden;
  }

  .mobile-bottom-nav {
    display: flex !important;
  }
}

/* ─── Responsive Helper Classes ─── */
.grid-2-resp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-split-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
}

@media (max-width: 768px) {
  .grid-2-resp {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .grid-split-sidebar {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
}

/* ─── Disabled button ─── */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
