/* controlp.io — shared theme + full-screen mobile nav */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s;
  transform: translateY(-4px);
  z-index: 50;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --border: 240 5.9% 90%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --radius: 0.625rem;
}

html.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 8%;
  --muted: 240 3.7% 12%;
  --muted-foreground: 240 5% 64.9%;
  --border: 240 3.7% 15.9%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
}

html.dark body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

html.dark .card:not(.no-dark-card) {
  background: hsl(var(--card));
  border-color: hsl(var(--border));
}

html.dark .site-header {
  background: rgba(9, 9, 11, 0.88) !important;
  border-color: hsl(240 3.7% 18%) !important;
}

html.dark .site-announcement {
  background: #09090b !important;
  color: #fafafa !important;
  border-color: hsl(240 3.7% 18%);
}

html.dark .hero-bg {
  background: linear-gradient(180deg, hsl(240 6% 8%) 0%, hsl(var(--background)) 100%) !important;
}

html.dark .bg-zinc-50 {
  background-color: hsl(240 6% 10%) !important;
}

html.dark .bg-zinc-100 {
  background-color: hsl(240 5% 14%) !important;
}

html.dark .border-zinc-200 {
  border-color: hsl(240 4% 22%) !important;
}

html.dark .text-zinc-900,
html.dark .text-zinc-800 {
  color: #fafafa !important;
}

html.dark .text-zinc-700,
html.dark .text-zinc-600,
html.dark .text-zinc-500 {
  color: #a1a1aa !important;
}

html.dark .btn-outline {
  border-color: hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
}

html.dark .btn-outline:hover {
  background: hsl(var(--muted));
}

html.dark .btn-ghost:hover {
  background: hsl(var(--muted));
}

html.dark .btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

html.dark .btn-primary:hover {
  background: hsl(0 0% 90%);
}

html.dark .input,
html.dark input.input {
  background: hsl(var(--card));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

html.dark .label {
  color: #d4d4d8 !important;
}

html.dark kbd {
  background: hsl(240 5% 18%) !important;
  border-color: hsl(240 4% 26%) !important;
  color: #e4e4e7 !important;
}

html.cp-mobile-nav-open,
html.cp-mobile-nav-open body {
  overflow: hidden;
  touch-action: none;
}

/* Full viewport mobile menu */
#cp-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

#cp-mobile-nav.cp-mobile-nav--open {
  pointer-events: auto;
  visibility: visible;
}

#cp-mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#cp-mobile-nav.cp-mobile-nav--open #cp-mobile-nav-backdrop {
  opacity: 1;
}

#cp-mobile-nav-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
}

html.dark #cp-mobile-nav-panel {
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

#cp-mobile-nav.cp-mobile-nav--open #cp-mobile-nav-panel {
  transform: translateX(0);
}

.cp-mobile-track {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.cp-mobile-pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: hsl(var(--background));
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.cp-mobile-pane--root {
  transform: translateX(0);
}

.cp-mobile-pane--sub {
  transform: translateX(100%);
}

#cp-mobile-nav.cp-mobile-nav--sub .cp-mobile-pane--root {
  transform: translateX(-28%);
}

#cp-mobile-nav.cp-mobile-nav--sub .cp-mobile-pane--sub {
  transform: translateX(0);
}

.cp-mobile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.25rem 1.5rem;
}

.cp-mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.95rem 0;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
  color: inherit;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  cursor: pointer;
  text-decoration: none;
}

a.cp-mobile-row:hover,
button.cp-mobile-row:hover {
  color: hsl(var(--muted-foreground));
}

.cp-mobile-row svg.chevron {
  width: 18px;
  height: 18px;
  opacity: 0.45;
  flex-shrink: 0;
}

.cp-mobile-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: none;
  border: 0;
  cursor: pointer;
}

.cp-mobile-back:hover {
  color: hsl(var(--foreground));
}

.cp-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cp-theme-btn:hover {
  background: hsl(var(--muted));
}

.cp-theme-btn .icon-sun,
.cp-theme-btn .icon-moon {
  width: 18px;
  height: 18px;
}

html.dark .cp-theme-btn .icon-sun {
  display: block;
}

html.dark .cp-theme-btn .icon-moon {
  display: none;
}

html:not(.dark) .cp-theme-btn .icon-sun {
  display: none;
}

html:not(.dark) .cp-theme-btn .icon-moon {
  display: block;
}

/* Dashboard / account areas */
html.dark .dash-header {
  background: hsl(var(--card)) !important;
  border-color: hsl(var(--border)) !important;
}

html.dark .dash-sidebar,
html.dark aside.dash-sidebar {
  background: hsl(var(--card)) !important;
  border-color: hsl(var(--border)) !important;
}

html.dark .dash-main-bg {
  background: hsl(240 6% 8%) !important;
}

html.dark .dashboard-app {
  background: hsl(240 6% 7%);
}
