/* ===================================================================
   HONLAPSZERKESZTO.HU - MODERN DESIGN SYSTEM & TOKEN ENGINE
   Light & Dark Theme | Anti-AI-Slop Craft Standard (Linear/Stripe)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===================================================================
   1. DESIGN TOKENS (LIGHT & DARK THEMES)
   =================================================================== */

:root,
[data-theme="dark"] {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Surfaces & Backgrounds (Dark Mode - Tinted Rich Slate) */
  --bg-base: #0b0f19;
  --bg-sidebar: #090d16;
  --bg-surface: #111827;
  --bg-surface-raised: #1e293b;
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --bg-input: #090d16;
  --header-bg: rgba(11, 15, 25, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;

  /* Typography / Text Roles (High WCAG AA Contrast) */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Brand Accents */
  --accent-primary: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-subtle: rgba(56, 189, 248, 0.12);
  --accent-glow: rgba(56, 189, 248, 0.2);

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --primary-text: #ffffff;

  /* Semantic Status Roles */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-text: #34d399;
  --success-border: rgba(16, 185, 129, 0.25);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-text: #fbbf24;
  --warning-border: rgba(245, 158, 11, 0.25);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-text: #f87171;
  --danger-border: rgba(239, 68, 68, 0.25);

  /* Shadows & Depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Backwards Compatibility Aliases */
  --bg-main: var(--bg-base);
  --bg-card: var(--bg-surface);
  --bg-card-hover: var(--bg-surface-raised);
  --border-color: var(--border-subtle);
  --text-main: var(--text-primary);
  --accent: var(--accent-primary);
}

[data-theme="light"] {
  /* Surfaces & Backgrounds (Light Mode - Crisp Clean Craft) */
  --bg-base: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-raised: #f1f5f9;
  --bg-subtle: #f8fafc;
  --bg-input: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.88);

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0284c7;

  /* Typography / Text Roles (High WCAG AA Contrast) */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Brand Accents */
  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --accent-subtle: rgba(2, 132, 199, 0.08);
  --accent-glow: rgba(2, 132, 199, 0.15);

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --primary-text: #ffffff;

  /* Semantic Status Roles */
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.08);
  --success-text: #065f46;
  --success-border: rgba(5, 150, 105, 0.2);

  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --warning-text: #92400e;
  --warning-border: rgba(217, 119, 6, 0.2);

  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --danger-text: #991b1b;
  --danger-border: rgba(220, 38, 38, 0.2);

  /* Shadows & Depth */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Backwards Compatibility Aliases */
  --bg-main: var(--bg-base);
  --bg-card: var(--bg-surface);
  --bg-card-hover: var(--bg-surface-raised);
  --border-color: var(--border-subtle);
  --text-main: var(--text-primary);
  --accent: var(--accent-primary);
}

/* ===================================================================
   2. GLOBAL RESETS & BASE TYPOGRAPHY
   =================================================================== */

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  color: var(--text-secondary);
}

/* ===================================================================
   3. LAYOUT CONTAINERS & SIDEBAR
   =================================================================== */

.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-brand {
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand .brand-logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.brand-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-menu-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 14px 12px 6px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-item a:hover {
  background-color: var(--bg-surface-raised);
  color: var(--text-primary);
}

.sidebar-item.active a {
  background-color: var(--accent-subtle);
  color: var(--accent-primary);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.3;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-tier {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===================================================================
   4. MAIN WORKSPACE & HEADER
   =================================================================== */

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

.app-header {
  height: 60px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.page-title-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Theme Switcher Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Declarative Zero-FOIC Theme Icon Visibility */
[data-theme="dark"] #themeIconMoon,
:root:not([data-theme="light"]) #themeIconMoon {
  display: none !important;
}

[data-theme="dark"] #themeIconSun,
:root:not([data-theme="light"]) #themeIconSun {
  display: inline-flex !important;
}

[data-theme="light"] #themeIconMoon {
  display: inline-flex !important;
}

[data-theme="light"] #themeIconSun {
  display: none !important;
}

.token-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
}
.token-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.token-pill .token-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent-primary);
}

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

/* ===================================================================
   5. CARDS & PANELS (CRAFT ANTI-SLOP ELEVATION)
   =================================================================== */

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Banner / Page Intro Card */
.page-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.page-header-card h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-header-card p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 750px;
  line-height: 1.55;
}

/* ===================================================================
   6. METRIC STAT CARDS (STRIPE/LINEAR COMPACT DENSITY)
   =================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===================================================================
   7. BUTTONS & ACTIONS
   =================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-raised);
  border-color: var(--text-muted);
}

.btn-accent {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}
.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

/* ===================================================================
   8. FORM CONTROLS
   =================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.form-help {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===================================================================
   9. DATA TABLES (SPARSE & READABLE RHYTHM)
   =================================================================== */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background-color: var(--bg-subtle);
  padding: 11px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: var(--bg-subtle);
}

/* ===================================================================
   10. BADGES & PILLS
   =================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  line-height: 1.3;
}

.badge-neutral {
  background-color: var(--bg-surface-raised);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.badge-primary {
  background-color: var(--accent-subtle);
  color: var(--accent-primary);
  border-color: var(--accent-glow);
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning-border);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

/* ===================================================================
   11. ALERTS & NOTIFICATIONS
   =================================================================== */

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert-info {
  background-color: var(--accent-subtle);
  border-color: var(--accent-glow);
  color: var(--text-primary);
}

.alert-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert-warning {
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.alert-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* ===================================================================
   12. TABS & SEGMENTED CONTROLS
   =================================================================== */

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

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

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ===================================================================
   13. RESULT / COPY CARDS
   =================================================================== */

.copy-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.15s ease;
}

.copy-card:hover {
  border-color: var(--accent-primary);
}

.copy-card p {
  padding-right: 48px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-primary);
}

.btn-copy {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 10px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* ===================================================================
   14. VECTOR ICONS & NAVIGATION HOVERS
   =================================================================== */

.lucide-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.15s ease, stroke 0.15s ease;
}

.nav-icon {
  color: var(--text-dim);
  transition: color 0.15s ease, transform 0.15s ease;
}

.sidebar-item a:hover .nav-icon {
  color: var(--text-primary);
  transform: scale(1.05);
}

.sidebar-item.active a .nav-icon {
  color: var(--accent-primary);
}

/* ===================================================================
   15. SUPER ADMIN UI
   =================================================================== */

.admin-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  text-decoration: none;
}

.admin-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
}

.admin-tab.active {
  color: #ffffff;
  background: var(--primary);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-badge-default {
  background: var(--bg-surface-raised);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.admin-badge-custom {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--accent-glow);
}

.code-editor-textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  width: 100%;
  resize: vertical;
  tab-size: 2;
}

.code-editor-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.var-tag {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--accent-glow);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: all;
  margin: 3px 4px 3px 0;
}

.var-tag:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* ===================================================================
   16. EMPTY STATES & HELPERS
   =================================================================== */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.empty-state-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
  line-height: 1.55;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ===================================================================
   17. RESPONSIVE MEDIA QUERIES
   =================================================================== */

@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }
  .app-header {
    padding: 0 16px;
  }
  .app-content {
    padding: 20px 16px 40px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}
