/* ============== Brand dark surfaces ============== */
/* Carries the Login V1 dark/green aesthetic into the app shell. */
/* Activated by .brand-dark on a root ancestor. Sidebar stays dark in */
/* both light and dark theme — it's a brand element, not a mode. */

.brand-dark .sidebar {
  background: #15151B;
  border-right: 1px solid #25252C;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.brand-dark .sidebar::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 50% at 30% 18%, #000 20%, transparent 90%);
          mask-image: radial-gradient(70% 50% at 30% 18%, #000 20%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}
.brand-dark .sidebar > *:not(.lava-orb) { position: relative; z-index: 1; }

.brand-dark .sidebar .brand-name { color: #fff; }
.brand-dark .sidebar .brand-sub { color: rgba(255,255,255,0.5); }
.brand-dark .sidebar .brand-mark {
  background: #fff;
  color: #000;
}
.brand-dark .sidebar .brand-mark::after {
  border-color: #15151B;
}

.brand-dark .sidebar .search .input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
}
.brand-dark .sidebar .search .input::placeholder { color: rgba(255,255,255,0.4); }
.brand-dark .sidebar .search .input:focus {
  border-color: rgba(97,201,77,0.5);
  box-shadow: 0 0 0 3px rgba(97,201,77,0.18);
}
.brand-dark .sidebar .search-icon { color: rgba(255,255,255,0.4); }
.brand-dark .sidebar .kbd {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
}

.brand-dark .sidebar .nav-section h4 { color: rgba(255,255,255,0.32); }
.brand-dark .sidebar .nav-item {
  color: rgba(255,255,255,0.65);
}
.brand-dark .sidebar .nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.brand-dark .sidebar .nav-item.active {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.brand-dark .sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  margin-left: -8px;
}
.brand-dark .sidebar .nav-item { position: relative; }
.brand-dark .sidebar .nav-item .count { color: rgba(255,255,255,0.4); }
.brand-dark .sidebar .nav-item.active .count { color: rgba(255,255,255,0.65); }

.brand-dark .sidebar > div:last-child {
  border-top-color: rgba(255,255,255,0.08) !important;
}
.brand-dark .sidebar .avatar { border-color: #15151B; }

/* Topbar gets a subtle treatment — keeps light but tightens the seam */
.brand-dark .topbar {
  border-bottom-color: var(--border);
}
.brand-dark .topbar .crumbs { color: var(--fg-muted); }

/* ============== Dark hero card (dashboard) ============== */

.hero-dark {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(140% 100% at 75% 25%, #2A2A32 0%, #18181E 60%);
  color: #fff;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid #25252C;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.hero-dark::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(80% 70% at 80% 20%, #000 20%, transparent 80%);
          mask-image: radial-gradient(80% 70% at 80% 20%, #000 20%, transparent 80%);
  pointer-events: none;
}
.hero-dark::after {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent) 0%, var(--accent-hover) 45%, transparent 70%);
  filter: blur(8px);
  top: -110px; right: -90px;
  opacity: 0.55;
  pointer-events: none;
  animation: orbFloat 16s ease-in-out infinite, orbBreathe 11s ease-in-out infinite;
  will-change: transform, opacity;
}
.hero-dark > *:not(.lava-orb) { position: relative; z-index: 1; }

.hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  margin-bottom: 14px;
}
.hero-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  line-height: 1.1;
}
.hero-sub {
  color: rgba(255,255,255,0.6);
  margin: 0;
  font-size: 14px;
}
.hero-stats {
  display: flex;
  gap: 36px;
  padding-left: 28px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-n {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hero-stat-l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

.hero-search {
  margin-top: 24px;
  max-width: 480px;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: border var(--t), box-shadow var(--t);
}
.hero-search input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search input:focus {
  outline: none;
  border-color: rgba(97,201,77,0.6);
  box-shadow: 0 0 0 3px rgba(97,201,77,0.2);
}
.hero-search > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
}
.hero-search .hero-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
}

/* ============== Dark editor head (manage) ============== */

.brand-dark .m3-edit-head {
  position: relative;
  overflow: hidden;
  margin: -28px -28px 24px;
  padding: 28px 28px 24px;
  border-bottom: 1px solid #25252C;
  background: radial-gradient(120% 100% at 80% 30%, #2A2A32 0%, #18181E 60%);
  color: #fff;
  border-radius: 0;
}
.brand-dark .m3-edit-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 20%, #000 20%, transparent 80%);
          mask-image: radial-gradient(80% 70% at 70% 20%, #000 20%, transparent 80%);
  pointer-events: none;
}
.brand-dark .m3-edit-head > *:not(.lava-orb) { position: relative; z-index: 1; }
.brand-dark .m3-edit-head .m3-edit-h { color: #fff; }
.brand-dark .m3-edit-head .m3-edit-slug { color: rgba(255,255,255,0.55); }
.brand-dark .m3-edit-head .btn.danger {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
}
.brand-dark .m3-edit-head .btn.danger:hover {
  background: rgba(229,57,53,0.18);
  color: #fff;
  border-color: rgba(229,57,53,0.5);
}
.brand-dark .m3-edit-inner { padding-top: 28px; }
.brand-dark .m3-list { background: var(--bg-subtle); }
