/* ============================================================
   Dialog Admix — Global Stylesheet
   Dark theme design system
   ============================================================ */

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

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg: #080B10;
  --surface: #0E1318;
  --card: #131920;
  --card-hover: #161E27;
  --input-bg: #0E1318;

  /* Borders */
  --border: #1E2733;
  --border-light: #253040;

  /* Brand */
  --accent: #7C3AED;
  --accent-dim: rgba(124, 58, 237, 0.15);
  --accent-glow: rgba(124, 58, 237, 0.25);
  --accent2: #A78BFA;
  --accent3: #4F46E5;

  /* Status */
  --green: #22C55E;
  --green-dim: rgba(34, 197, 94, 0.12);
  --yellow: #EAB308;
  --yellow-dim: rgba(234, 179, 8, 0.12);
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --blue: #3B82F6;
  --blue-dim: rgba(59, 130, 246, 0.12);

  /* Text */
  --text: #E2E8F0;
  --text-sub: #94A3B8;
  --muted: #64748B;
  --faint: #1E2733;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.2s var(--ease);
}

/* ── Light Mode Tokens ──────────────────────────────────────── */
[data-theme="light"] {
  /* Backgrounds */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #F1F5F9;
  --input-bg: #FFFFFF;

  /* Borders */
  --border: #E2E8F0;
  --border-light: #CBD5E1;

  /* Brand */
  --accent: #6D28D9;
  --accent-dim: rgba(109, 40, 217, 0.08);
  /* Lighter dim for contrast */
  --accent-glow: rgba(109, 40, 217, 0.15);
  --accent2: #8B5CF6;
  --accent3: #4C1D95;

  /* Status */
  --green: #16A34A;
  --green-dim: rgba(22, 163, 74, 0.1);
  --yellow: #CA8A04;
  --yellow-dim: rgba(202, 138, 4, 0.1);
  --red: #DC2626;
  --red-dim: rgba(220, 38, 38, 0.1);
  --blue: #2563EB;
  --blue-dim: rgba(37, 99, 235, 0.1);

  /* Text */
  --text: #0F172A;
  --text-sub: #334155;
  --muted: #64748B;
  --faint: #E2E8F0;
}

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

html,
body {
  height: 100%;
}

/* ── Custom Scrollbars ──────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 28px;
  font-weight: 800;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
}

h4 {
  font-size: 14px;
}

p {
  color: var(--text-sub);
  line-height: 1.7;
}

a {
  color: var(--accent2);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 12px;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ── Grid Background ────────────────────────────────────────── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout Shell ───────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
}

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

.logo-mark {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent3), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: white;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid var(--accent-glow);
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px var(--accent-glow);
}

.active-row {
  background: rgba(124, 58, 237, 0.05) !important;
}

.active-row td {
  border-left: 3px solid var(--accent);
}

/* ── Sidebar Navigation ───────────────────────────────────────── */
.sidebar-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  margin-right: 8px;
  border-radius: var(--radius-md);
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-toggle-inner {
  color: var(--text-sub);
  transition: var(--transition);
}

.sidebar-toggle-inner:hover {
  background: var(--accent-dim);
  color: var(--accent2);
}

.sidebar-nav.collapsed .sidebar-toggle-inner {
  width: 100%;
  border-radius: 0;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.sidebar-nav {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.3s var(--ease);
  flex-shrink: 0;
  z-index: 101;
}

.sidebar-nav.collapsed {
  width: 60px;
}

/* Ensure icons are centered when collapsed */
.sidebar-nav.collapsed .sidebar-icon {
  margin-right: 0;
  width: 100%;
}

.sidebar-nav.collapsed .sidebar-label,
.sidebar-nav.collapsed .sidebar-workspace,
.sidebar-nav.collapsed .sidebar-group-label,
.sidebar-nav.collapsed .sidebar-footer .sidebar-label {
  display: none;
}

.sidebar-workspace {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-ws-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  white-space: nowrap;
}

.sidebar-ws-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.sidebar-nav.collapsed .sidebar-ws-label,
.sidebar-nav.collapsed .sidebar-ws-select {
  display: none;
}

.sidebar-items {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-group-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding: 18px 12px 8px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sidebar-nav.collapsed .sidebar-group-label {
  opacity: 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-sub);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent2);
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 12px;
  transition: margin 0.3s;
}

.sidebar-nav.collapsed .sidebar-icon {
  margin-right: 0;
  width: 100%;
}

.sidebar-label {
  transition: opacity 0.2s, transform 0.2s;
}

.sidebar-nav.collapsed .sidebar-label {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

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

.sidebar-footer-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-sub);
  font-size: 13px;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-footer-item:hover {
  background: var(--card-hover);
  color: var(--text);
}

.sidebar-superadmin {
  color: #FCA5A5;
}

.sidebar-superadmin:hover {
  color: #F87171;
  background: rgba(239, 68, 68, 0.1);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Mobile Responsive Sidebar ── */
@media (max-width: 768px) {
  .sidebar-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
  }

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

  .sidebar-overlay.show {
    display: block;
  }

  .sidebar-nav.collapsed {
    width: 220px; /* Force full width on mobile if open */
  }

  .mobile-sidebar-toggle {
    display: flex !important;
  }
}

/* ── Tab Panels ─────────────────────────────────────────────── */
.tab-panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-panel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.tab-panel.active {
  display: flex;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  color: white;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9, var(--accent));
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(124, 58, 237, 0.08);
  color: var(--accent2);
  border-color: rgba(124, 58, 237, 0.2);
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.15);
  color: #C4B5FD;
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border-color: var(--border-light);
}

.btn-ghost:hover {
  color: var(--accent2);
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.06);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.03em;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* ── Toggle Switch ──────────────────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.toggle-desc {
  font-size: 11px;
  color: var(--muted);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #1E2733;
  border-radius: 99px;
  border: 1px solid var(--border-light);
  transition: all 0.3s var(--ease);
}

.toggle:hover .toggle-track {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-sub);
  border-radius: 99px;
  transition: all 0.3s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle input:checked+.toggle-track {
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.25);
}

.toggle:hover input:checked+.toggle-track {
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.toggle input:checked~.toggle-thumb {
  transform: translateX(20px);
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Compact toggle for table rows */
.toggle-sm {
  width: 36px;
  height: 20px;
}

.toggle-sm .toggle-thumb {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.toggle-sm input:checked~.toggle-thumb {
  transform: translateX(16px);
}

/* ── Badges / Tags ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid;
}

.badge-purple {
  background: var(--accent-dim);
  color: var(--accent2);
  border-color: var(--accent-glow);
}

.badge-green {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.25);
}

.badge-yellow {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: rgba(234, 179, 8, 0.25);
}

.badge-red {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.badge-blue {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.25);
}

.badge-muted {
  background: var(--faint);
  color: var(--muted);
  border-color: var(--border);
}

/* ── Section Labels ─────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 10px;
}

.empty-icon {
  font-size: 32px;
  opacity: 0.4;
}

.empty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-sub);
}

.empty-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
}

/* ── Alert / Toast ──────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 1px solid;
}

.alert-success {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.25);
}

.alert-warning {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: rgba(234, 179, 8, 0.25);
}

.alert-error {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.alert-info {
  background: var(--accent-dim);
  color: var(--accent2);
  border-color: var(--accent-glow);
}

/* ── Loading Spinner ─────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ── Typing Dots ─────────────────────────────────────────────── */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: dot-pulse 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.0);
    opacity: 1;
  }
}

/* ── Page Panel Content Wrapper ─────────────────────────────── */
.panel-content {
  padding: 24px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Analytics Range Buttons ────────────────────────────────── */
.range-btn {
  background: transparent;
  color: var(--text-sub);
  border-color: var(--border-light);
}

.range-btn:hover {
  color: var(--accent2);
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.06);
}

.range-btn.active {
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  color: white;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.2);
}

/* ── Media Dropzone ─────────────────────────────────────────── */
.media-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  background: var(--faint);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
}

.media-dropzone:hover,
.media-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.04);
}

.media-dropzone.is-uploading {
  pointer-events: none;
  opacity: 0.7;
}

.media-dropzone-icon {
  font-size: 28px;
  color: var(--muted);
  margin-bottom: 4px;
}

.media-dropzone-text {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}

.media-dropzone-hint {
  font-size: 11px;
  color: var(--muted);
}

.upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  z-index: 10;
  backdrop-filter: blur(2px);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .app-header {
    padding: 0 16px;
  }

  .tab-nav {
    padding: 0 16px;
    gap: 0;
    overflow-x: auto;
  }

  .tab-btn {
    padding: 14px 12px;
    font-size: 12px;
  }

  .panel-content {
    padding: 16px;
  }
}

@media (max-width: 900px) {
  #panel-analytics .panel-content>div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #panel-analytics .panel-content>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}