/* ============================================================
   META PLATFORM — Unified App Shell Stylesheet
   Theme: Dark cyan/purple (RTL Arabic)
   ============================================================ */

/* ---------- 1. CSS Variables / Theme ---------- */
:root {
  /* Surfaces */
  --bg-base:        #050a13;
  --bg-app:         #060b18;
  --bg-sidebar:     #07101e;
  --bg-header:      rgba(8, 14, 26, 0.85);
  --bg-card:        rgba(13, 21, 38, 0.72);
  --bg-card-solid:  #0d1526;
  --bg-input:       rgba(255, 255, 255, 0.04);
  --bg-hover:       rgba(143, 118, 255, 0.06);

  /* Borders */
  --border-glass:   rgba(255, 255, 255, 0.06);
  --border-strong:  rgba(143, 118, 255, 0.2);
  --border-subtle:  rgba(255, 255, 255, 0.04);

  /* Text */
  --text-primary:   #e6edf7;
  --text-secondary: rgba(230, 237, 247, 0.72);
  --text-muted:     rgba(230, 237, 247, 0.48);
  --text-faint:     rgba(230, 237, 247, 0.32);

  /* Accents */
  --accent:         #8f76ff;
  --accent-soft:    rgba(143, 118, 255, 0.14);
  --accent-strong:  #c7b6ff;
  --purple:         #6f58ff;
  --purple-soft:    rgba(111, 88, 255, 0.16);
  --pink:           #b59cff;
  --gradient:       linear-gradient(135deg, #dcd3ff 0%, #8f76ff 52%, #6f58ff 100%);
  --gradient-soft:  linear-gradient(135deg, rgba(143, 118, 255,0.14), rgba(111,88,255,0.08));

  /* Status */
  --success:        #22c55e;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;

  /* Layout */
  --sidebar-w:      244px;
  --header-h:       62px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:      0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:      0 16px 48px rgba(0,0,0,0.45);
  --shadow-glow:    0 0 24px rgba(111, 88, 255, 0.24);

  /* Motion */
  --t-fast: 0.15s ease;
  --t-med:  0.25s ease;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body {
  background:
    radial-gradient(900px circle at 90% -10%, rgba(168, 85, 247,0.08), transparent 55%),
    radial-gradient(800px circle at 10% 100%, rgba(168,85,247,0.07), transparent 55%),
    var(--bg-base);
  background-attachment: fixed;
  position: relative;
}

.meta-motion-root {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.meta-motion-canvas,
.meta-motion-grid,
.meta-motion-orb {
  position: absolute;
  inset: 0;
}
.meta-motion-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.95;
}
.meta-motion-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.meta-motion-orb {
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.34;
  animation: metaOrbFloat 14s ease-in-out infinite alternate;
}
.meta-motion-orb--1 {
  top: -10%;
  right: -8%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent 70%);
  animation-duration: 16s;
}
.meta-motion-orb--2 {
  bottom: -15%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(224, 64, 251, 0.26), transparent 70%);
  animation-duration: 19s;
  animation-delay: -4s;
}
.meta-motion-orb--3 {
  top: 44%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
  transform: translate(-50%, -50%);
  animation-duration: 11s;
  animation-delay: -2s;
}
@keyframes metaOrbFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, -36px, 0) scale(1.08); }
  100% { transform: translate3d(-18px, 18px, 0) scale(0.96); }
}

/* ---------- Ambient Background Orbs (global) ---------- */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}
body::before {
  width: 520px; height: 520px;
  top: -120px; right: -160px;
  background: radial-gradient(circle, rgba(168, 85, 247,0.35), transparent 70%);
  animation: orbDrift1 16s ease-in-out infinite alternate;
}
body::after {
  width: 460px; height: 460px;
  bottom: -160px; left: -140px;
  background: radial-gradient(circle, rgba(168,85,247,0.30), transparent 70%);
  animation: orbDrift2 22s ease-in-out infinite alternate;
}
@keyframes orbDrift1 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-60px, 80px) scale(1.12); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(60px, -70px) scale(0.92); }
}

/* Subtle grid mask */
.app-bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 80%);
}
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-strong); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ---------- 3. App Shell Layout ---------- */
.app {
  min-height: 100vh;
  padding-right: var(--sidebar-w);
  position: relative;
  z-index: 1;
}
.app__header  { /* sticky on top of main column */ }
.app__main    { padding: 22px 28px 40px; min-width: 0; position: relative; z-index: 1; }

/* ---------- 4. Sidebar ---------- */
.app__sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--sidebar-w);
  background:
    radial-gradient(220px 90px at 72% 0%, rgba(143, 118, 255, 0.1), transparent 74%),
    linear-gradient(180deg, rgba(17, 27, 48, 0.96) 0%, rgba(8, 15, 29, 0.98) 100%);
  border-left: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  z-index: 60;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), -18px 0 38px rgba(2, 8, 20, 0.24);
  isolation: isolate;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247,0.25) transparent;
}
.app__sidebar::before,
.app__sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.app__sidebar::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 20%, transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 34%);
  opacity: 0.45;
}
.app__sidebar::after {
  background: radial-gradient(220px 120px at 50% 0%, rgba(173, 115, 255, 0.09), transparent 74%);
  opacity: 0.55;
}
.app__sidebar::-webkit-scrollbar { width: 4px; }
.app__sidebar::-webkit-scrollbar-thumb { background: rgba(168, 85, 247,0.25); border-radius: 4px; }

.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.sb-brand__logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  padding: 4px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(111, 88, 255, 0.18);
}
.sb-brand__logo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.sb-brand__title { font-size: 14px; font-weight: 800; line-height: 1.2; }
.sb-brand__title small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }

.sb-nav { padding: 10px 10px 22px; flex: 1; }
.sb-group {
  font-size: 10.5px; font-weight: 800; color: rgba(216, 180, 254, 0.55);
  text-transform: uppercase; letter-spacing: 0.7px;
  padding: 14px 12px 6px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
  margin-bottom: 2px;
}
.sb-item i {
  width: 18px; text-align: center; font-size: 13px;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.sb-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sb-item:hover i { color: var(--accent); }
.sb-item.active {
  background: var(--gradient-soft);
  color: var(--text-primary);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sb-item.active i { color: var(--accent); }
.sb-badge {
  margin-inline-start: auto;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- 5. Header ---------- */
.app__header {
  position: sticky; top: 0;
  height: var(--header-h);
  background:
    radial-gradient(220px 90px at 72% 0%, rgba(143, 118, 255, 0.1), transparent 74%),
    linear-gradient(180deg, rgba(17, 27, 48, 0.92) 0%, rgba(8, 15, 29, 0.94) 100%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  overflow: visible;
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 28px rgba(2, 8, 20, 0.18);
  z-index: 50;
}
.app__header::before,
.app__header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.app__header::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 20%, transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 34%);
  opacity: 0.45;
}
.app__header::after {
  background: radial-gradient(220px 120px at 50% 0%, rgba(173, 115, 255, 0.09), transparent 74%);
  opacity: 0.55;
}
.app__header > * {
  position: relative;
  z-index: 1;
}
.hdr-title { display: flex; flex-direction: column; min-width: 0; }
.hdr-title__name { font-size: 15px; font-weight: 800; color: var(--text-primary); white-space: nowrap; }
.hdr-title__crumb { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.hdr-title__crumb i { font-size: 9px; color: var(--text-faint); }

.hdr-search {
  flex: 1; max-width: 420px;
  position: relative;
}
.hdr-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 9px 38px 9px 14px;
  color: var(--text-primary);
  font-family: inherit; font-size: 13px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.hdr-search input::placeholder { color: var(--text-faint); }
.hdr-search input:focus { outline: none; border-color: var(--accent); background: rgba(168, 85, 247,0.04); }
.hdr-search i {
  position: absolute; top: 50%; right: 13px;
  transform: translateY(-50%);
  color: var(--text-faint); font-size: 13px;
  pointer-events: none;
}

.hdr-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.hdr-icon-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  position: relative;
  transition: all var(--t-fast);
}
.hdr-icon-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.hdr-icon-btn .dot {
  position: absolute; top: 8px; left: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg-header);
}

.hdr-user {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.hdr-user:hover { border-color: var(--border-strong); }
.hdr-user__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #04101c; font-weight: 800; font-size: 12px;
}
.hdr-user__name { font-size: 12.5px; font-weight: 700; }
.hdr-user > i.fa-chevron-down { font-size: 9px; color: var(--text-muted); }

.hdr-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: 240px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 200;
}
.hdr-menu.open { display: block; }
.hdr-menu__head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}
.hdr-menu__head .name { font-size: 13px; font-weight: 700; }
.hdr-menu__head .email { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.hdr-menu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}
.hdr-menu__item:hover { background: var(--bg-hover); color: var(--text-primary); }
.hdr-menu__item i { width: 16px; text-align: center; color: var(--text-muted); }
.hdr-menu__item.danger:hover { background: rgba(239,68,68,0.1); color: var(--danger); }
.hdr-menu__item.danger:hover i { color: var(--danger); }
.hdr-menu__sep { height: 1px; background: var(--border-subtle); margin: 6px 4px; }

/* Sub-tabs (under header for grouped pages) */
.hdr-subtabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 0 28px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: var(--header-h); z-index: 49;
}
.hdr-subtabs__tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  color: var(--text-secondary);
  font-size: 12.5px; font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
}
.hdr-subtabs__tab:hover { color: var(--text-primary); }
.hdr-subtabs__tab i { font-size: 11px; color: var(--text-muted); }
.hdr-subtabs__tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.hdr-subtabs__tab.active i { color: var(--accent); }

/* Mobile toggle */
.hdr-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 11px; border: 1px solid var(--border-subtle);
  background: var(--bg-input); color: var(--accent);
  align-items: center; justify-content: center;
  font-size: 16px;
}
@media (max-width: 1024px) {
  .app { padding-right: 0; }
  .app__sidebar { width: min(86vw, 320px); transform: translateX(100%); transition: transform var(--t-med); box-shadow: var(--shadow-lg); }
  .app__sidebar.open { transform: translateX(0); }
  .hdr-toggle { display: inline-flex; }
  .hdr-search { display: none; }
  .app__main { padding: 16px; }
  .hdr-subtabs { padding: 0 16px; }
}
@media (max-width: 720px) {
  .app__header {
    padding: 0 14px;
    gap: 10px;
  }
  .hdr-title__crumb { display: none; }
  .hdr-title__name { font-size: 14px; }
  .hdr-tools { gap: 6px; }
  .hdr-user {
    padding: 5px 8px 5px 5px;
  }
  .hdr-user__name,
  .hdr-user > i.fa-chevron-down { display: none; }
  .hdr-icon-btn,
  .hdr-toggle {
    width: 36px;
    height: 36px;
  }
  .hdr-subtabs {
    padding: 0 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .hdr-subtabs::-webkit-scrollbar { display: none; }
  .hdr-subtabs__tab {
    white-space: nowrap;
    padding: 10px 12px;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  .page-head__actions {
    margin-inline-start: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .page-head__actions .btn {
    flex: 1 1 150px;
    justify-content: center;
  }
  .show-hero__stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  .show-hero__stat { min-width: 108px; }
  .card,
  .stat { padding: 16px; }
}
@media (max-width: 560px) {
  body::before,
  body::after { opacity: 0.4; }
  .meta-motion-orb--1 {
    width: 360px;
    height: 360px;
  }
  .meta-motion-orb--2 {
    width: 280px;
    height: 280px;
  }
  .meta-motion-orb--3 {
    width: 220px;
    height: 220px;
  }
  .app__header { padding: 0 10px; }
  .app__main { padding: 12px 12px 24px; }
  .page-head h1 { font-size: 18px; }
  .page-head p { font-size: 12px; }
  .show-hero { padding: 20px 16px; }
  .show-hero__typing { font-size: 14px; }
  .show-hero__stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .show-hero__cta .btn {
    width: 100%;
    justify-content: center;
  }
}
.app__backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 55;
}
.app__backdrop.open { display: block; }

/* ---------- 6. Common Components ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; gap: 12px;
  margin: -4px 0 16px;
}
.card__title { font-size: 15px; font-weight: 800; }
.card__sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn:hover { border-color: var(--border-strong); }
.btn--primary {
  background: var(--gradient); border: none;
  color: #04101c;
  box-shadow: 0 4px 14px rgba(168, 85, 247,0.25);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(168, 85, 247,0.35); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: rgba(239,68,68,0.3); }
.btn--sm { padding: 6px 11px; font-size: 12px; }
.btn--lg { padding: 12px 22px; font-size: 14px; }
.btn i { font-size: 12px; }

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--text-primary);
  font-family: inherit; font-size: 13px;
  transition: border-color var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
}
.label { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 7px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.badge--purple { background: var(--purple-soft); color: var(--purple); }
.badge--success { background: rgba(34,197,94,0.14); color: var(--success); }
.badge--warning { background: rgba(245,158,11,0.14); color: var(--warning); }
.badge--danger { background: rgba(239,68,68,0.14); color: var(--danger); }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.stat {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat__label { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.stat__value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat__trend { font-size: 11px; margin-top: 4px; color: var(--success); }
.stat__icon {
  position: absolute; top: 16px; left: 16px;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--gradient-soft); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 15px;
}

table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--border-subtle); }
.table th { font-weight: 700; color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; }
.table tbody tr:hover { background: var(--bg-hover); }

/* Toasts */
.toast-host {
  position: fixed; bottom: 22px; left: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-right: 3px solid var(--accent);
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  min-width: 240px; max-width: 380px;
  animation: toastIn 0.25s ease;
}
.toast.success { border-right-color: var(--success); }
.toast.warn    { border-right-color: var(--warning); }
.toast.error   { border-right-color: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Page heading row */
.page-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.page-head h1 { margin: 0; font-size: 20px; font-weight: 800; }
.page-head p  { margin: 3px 0 0; color: var(--text-muted); font-size: 12.5px; }
.page-head__actions { margin-inline-start: auto; display: flex; gap: 8px; }

/* ---------- 7. Animations & Entrances ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247,0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(168, 85, 247,0); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.25; }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ringPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.8; }
  50%      { transform: translate(-50%,-50%) scale(1.08); opacity: 1; }
}
@keyframes heroWaveDrift {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50%      { transform: translateX(8px); opacity: 0.8; }
}
@keyframes typingBlink {
  0%, 100% { opacity: 1; } 50% { opacity: 0; }
}

.app__main > * { animation: fadeInUp 0.5s ease both; }
.app__main > *:nth-child(1) { animation-delay: 0.05s; }
.app__main > *:nth-child(2) { animation-delay: 0.12s; }
.app__main > *:nth-child(3) { animation-delay: 0.18s; }
.app__main > *:nth-child(4) { animation-delay: 0.24s; }
.app__main > *:nth-child(5) { animation-delay: 0.30s; }
.app__main > *:nth-child(6) { animation-delay: 0.36s; }

.card, .stat, .channel, .quick-card, .wa-tile {
  position: relative; overflow: hidden;
}
.card::before, .stat::before, .channel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247,0) 0%, rgba(168, 85, 247,0.05) 50%, rgba(168,85,247,0) 100%);
  opacity: 0; transition: opacity var(--t-med);
  pointer-events: none;
}
.card:hover::before, .stat:hover::before, .channel:hover::before { opacity: 1; }
.stat__value {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: shimmer 5s ease infinite;
}

.btn--primary { animation: pulse-glow 3s ease-in-out infinite; }

/* ---------- 8. Hero Showcase (used in dashboard) ---------- */
.show-hero {
  position: relative;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(800px circle at 85% 10%, rgba(168, 85, 247,0.18), transparent 60%),
    radial-gradient(700px circle at 15% 90%, rgba(168,85,247,0.18), transparent 60%),
    linear-gradient(135deg, rgba(13,21,38,0.7), rgba(7,16,30,0.85));
  border: 1px solid var(--border-strong);
  padding: 28px 32px 22px;
  margin-bottom: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  gap: 22px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
}
.show-hero__bg { position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(168, 85, 247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.show-hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(168, 85, 247,0.10);
  border: 1px solid rgba(168, 85, 247,0.25);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  margin-bottom: 14px;
  animation: pulse-glow 3s ease-in-out infinite;
}
.show-hero__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink-dot 2s ease-in-out infinite; }

.show-hero h1 {
  font-size: 32px; font-weight: 900; line-height: 1.2;
  margin: 0 0 10px;
}
.show-hero h1 .grad {
  background: linear-gradient(135deg, #ddd5ff, var(--accent), var(--purple));
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease infinite;
}
.show-hero p { color: var(--text-secondary); font-size: 14px; line-height: 1.85; max-width: 540px; margin: 0 0 18px; }

.show-hero__typing {
  font-size: 16px; font-weight: 700; min-height: 1.6em;
  color: var(--text-primary); margin-bottom: 16px;
}
.show-hero__typing .typed { color: var(--accent); }
.show-hero__typing .cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--accent); vertical-align: text-bottom;
  margin-right: 3px;
  animation: typingBlink 1s step-end infinite;
}

.show-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

.show-hero__art {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: auto;
  gap: 10px;
  padding: 6px 0 0;
}
.show-hero__art::before {
  content: '';
  position: absolute;
  top: 47%; left: 50%;
  width: 320px; height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247,0.16);
  box-shadow:
    0 0 0 28px rgba(168, 85, 247,0.09),
    0 0 0 62px rgba(168, 85, 247,0.05);
  animation: ringPulse 4.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.show-hero__logo {
  width: 390px; height: 390px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 80px rgba(143, 118, 255,0.34)) drop-shadow(0 0 160px rgba(111,88,255,0.2));
  animation: float-y 5s ease-in-out infinite;
  position: relative; z-index: 3;
}
.show-hero__logo::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(111, 88, 255,0.14);
  animation: ringPulse 5.2s ease-in-out infinite;
  pointer-events: none;
}
.show-hero__logo img { width: 100%; height: 100%; object-fit: contain; }

.show-hero__brand {
  position: relative;
  z-index: 4;
  width: min(100%, 420px);
  text-align: center;
}
.show-hero__brand-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-shadow: 0 10px 28px rgba(3, 8, 18, 0.4);
}
.show-hero__brand-title .brand {
  background: linear-gradient(135deg, #c084fc, #d8b4fe, #e040fb);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease infinite;
}
.show-hero__brand-subtitle {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(230, 237, 247, 0.72);
}

.show-hero__ring {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid rgba(168, 85, 247,0.18);
  border-radius: 50%; pointer-events: none;
  z-index: 1;
}
.show-hero__ring--1 { width: 240px; height: 240px; transform: translate(-50%,-50%); animation: ringPulse 3s ease-in-out infinite; }
.show-hero__ring--2 { width: 290px; height: 290px; transform: translate(-50%,-50%); animation: ringPulse 3.5s ease-in-out infinite -0.8s; border-color: rgba(168,85,247,0.12); }
.show-hero__ring--3 { width: 350px; height: 350px; transform: translate(-50%,-50%); animation: ringPulse 4s ease-in-out infinite -1.6s; border-color: rgba(168, 85, 247,0.08); }

.show-hero__chip {
  position: absolute;
  background: rgba(13,21,38,0.85);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-primary);
  z-index: 4;
  animation: float-y 4s ease-in-out infinite;
}
.show-hero__chip i { color: var(--accent); }
.show-hero__chip--1 { top: 12%; right: -8px; }
.show-hero__chip--2 { bottom: 18%; left: -10px; animation-delay: -1.5s; }
.show-hero__chip--3 { top: 50%; right: -22px; animation-delay: -2.5s; }

.show-hero__stats { display: flex; gap: 28px; margin-top: 20px; }
.show-hero__stat { text-align: right; }
.show-hero__stat b {
  display: block;
  font-size: 24px; font-weight: 900;
  background: linear-gradient(135deg, #dcd3ff, var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.show-hero__stat span { font-size: 11px; color: var(--text-muted); font-weight: 600; }

@media (max-width: 980px) {
  .show-hero { grid-template-columns: 1fr; padding: 24px 20px; width: 100%; }
  .show-hero h1 { font-size: 24px; }
  .show-hero__art { min-height: auto; padding: 8px 0 0; gap: 12px; }
  .show-hero__logo { width: 240px; height: 240px; }
  .show-hero__brand {
    width: 100%;
  }
  .show-hero__brand-title { font-size: 30px; }
  .show-hero__brand-subtitle { font-size: 11px; }
  .show-hero__art::before {
    width: 190px; height: 190px;
    box-shadow:
      0 0 0 24px rgba(168, 85, 247,0.08),
      0 0 0 54px rgba(168, 85, 247,0.04);
  }
  .show-hero__chip { display: none; }
}
