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

/* ===== CSS Variables ===== */
:root {
  --bg: var(--hex-030c0f);
  --bg2: var(--hex-041014);
  --surface: var(--hex-071318);
  --surface2: var(--hex-0a1a20);
  --surface3: var(--hex-0d2028);
  --surface4: var(--hex-112630);
  --border: var(--rgba-6-182-212-0-10);
  --border-light: var(--rgba-6-182-212-0-20);
  --border-bright: var(--rgba-6-182-212-0-38);
  --primary: var(--hex-06b6d4);
  --primary-dim: var(--hex-0891b2);
  --primary-glow: var(--rgba-6-182-212-0-28);
  --primary-glow-sm: var(--rgba-6-182-212-0-13);
  --accent: var(--hex-22d3ee);
  --accent2: var(--hex-67e8f9);
  --success: var(--hex-34d399);
  --success-bg: var(--rgba-52-211-153-0-09);
  --success-border: var(--rgba-52-211-153-0-22);
  --warning: var(--hex-fbbf24);
  --warning-bg: var(--rgba-251-191-36-0-09);
  --warning-border: var(--rgba-251-191-36-0-22);
  --danger: var(--hex-f87171);
  --danger-bg: var(--rgba-248-113-113-0-09);
  --danger-border: var(--rgba-248-113-113-0-22);
  --info: var(--hex-22d3ee);
  --info-bg: var(--rgba-34-211-238-0-09);
  --info-border: var(--rgba-34-211-238-0-22);
  --text: var(--hex-e0f7fa);
  --text-secondary: var(--hex-6b9ea8);
  --text-muted: var(--hex-2e5a66);
  --sidebar-width: 252px;
  --header-height: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 32px var(--rgba-0-0-0-0-55);
  --shadow-lg: 0 8px 64px var(--rgba-0-0-0-0-75);
  --shadow-glow: 0 0 40px var(--rgba-6-182-212-0-18);
}


html[data-theme="light"] {
  --bg: var(--hex-f0fafd);
  --bg2: var(--hex-e4f5fb);
  --surface: var(--hex-ffffff);
  --surface2: var(--hex-f5fcff);
  --surface3: var(--hex-eaf8fd);
  --surface4: var(--hex-dff2fa);
  --border: var(--rgba-8-145-178-0-13);
  --border-light: var(--rgba-8-145-178-0-24);
  --border-bright: var(--rgba-8-145-178-0-38);
  --primary: var(--hex-0891b2);
  --primary-dim: var(--hex-0e7490);
  --primary-glow: var(--rgba-8-145-178-0-18);
  --primary-glow-sm: var(--rgba-8-145-178-0-11);
  --accent: var(--hex-0891b2);
  --accent2: var(--hex-06b6d4);
  --success: var(--hex-059669);
  --success-bg: var(--rgba-5-150-105-0-10);
  --success-border: var(--rgba-5-150-105-0-22);
  --warning: var(--hex-d97706);
  --warning-bg: var(--rgba-217-119-6-0-10);
  --warning-border: var(--rgba-217-119-6-0-22);
  --danger: var(--hex-dc2626);
  --danger-bg: var(--rgba-220-38-38-0-09);
  --danger-border: var(--rgba-220-38-38-0-22);
  --info: var(--hex-0891b2);
  --info-bg: var(--rgba-8-145-178-0-09);
  --info-border: var(--rgba-8-145-178-0-22);
  --text: var(--hex-083344);
  --text-secondary: var(--hex-2e6a7a);
  --text-muted: var(--hex-5a8a96);
  --shadow: 0 4px 24px var(--rgba-8-51-68-0-07);
  --shadow-lg: 0 12px 48px var(--rgba-8-51-68-0-11);
  --shadow-glow: 0 0 30px var(--rgba-8-145-178-0-10);
}


html[data-theme="light"] .page-header {
  background: var(--rgba-240-250-253-0-95);
  border-bottom: 1px solid var(--rgba-8-145-178-0-13);
  backdrop-filter: blur(20px);
}

html[data-theme="light"] .landing-nav {
  background: var(--rgba-240-250-253-0-92);
  border-bottom: 1px solid var(--rgba-8-145-178-0-13);
}

/* Light mode sidebar */
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, var(--hex-f0fafd) 0%, var(--hex-e4f5fb) 100%);
  border-right: 1px solid var(--rgba-8-145-178-0-15);
  box-shadow: 4px 0 40px var(--rgba-8-145-178-0-07);
}

html[data-theme="light"] .sidebar-logo {
  background: var(--rgba-8-145-178-0-04);
  border-bottom: 1px solid var(--rgba-8-145-178-0-12);
}

html[data-theme="light"] .sidebar-logo-text {
  background: linear-gradient(135deg, var(--hex-083344), var(--hex-0891b2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-theme="light"] .sidebar-logo-sub { color: var(--rgba-8-145-178-0-55); }

html[data-theme="light"] .nav-section-label { color: var(--rgba-8-145-178-0-5); }
html[data-theme="light"] .nav-section-label::after { background: var(--rgba-8-145-178-0-12); }

html[data-theme="light"] .nav-item { color: var(--rgba-8-51-68-0-65); }
html[data-theme="light"] .nav-item:hover { background: var(--rgba-8-145-178-0-07); color: var(--hex-083344); }

html[data-theme="light"] .nav-item.active {
  background: linear-gradient(135deg, var(--rgba-8-145-178-0-14) 0%, var(--rgba-8-145-178-0-07) 100%);
  color: var(--hex-0891b2);
  border-color: var(--rgba-8-145-178-0-22);
}

html[data-theme="light"] .nav-item.active::before {
  background: linear-gradient(180deg, var(--hex-0891b2), var(--hex-0e7490));
}

html[data-theme="light"] .nav-item .nav-icon {
  background: var(--rgba-8-145-178-0-06);
  border-color: var(--rgba-8-145-178-0-12);
  color: var(--rgba-8-51-68-0-55);
}

html[data-theme="light"] .nav-item:hover .nav-icon,
html[data-theme="light"] .nav-item.active .nav-icon {
  background: var(--rgba-8-145-178-0-12);
  border-color: var(--rgba-8-145-178-0-28);
  color: var(--hex-0891b2);
}

html[data-theme="light"] .sidebar-footer {
  background: var(--rgba-8-145-178-0-03);
  border-top: 1px solid var(--rgba-8-145-178-0-12);
}

html[data-theme="light"] .user-info {
  background: var(--rgba-8-145-178-0-06);
  border-color: var(--rgba-8-145-178-0-15);
}

html[data-theme="light"] .user-info:hover {
  background: var(--rgba-8-145-178-0-10);
  border-color: var(--rgba-8-145-178-0-28);
}

html[data-theme="light"] .user-name { color: var(--hex-083344); }
html[data-theme="light"] .user-role { color: var(--rgba-8-145-178-0-55); }
html[data-theme="light"] .user-logout { color: var(--rgba-8-51-68-0-4); }
html[data-theme="light"] .user-logout:hover { color: var(--hex-dc2626); background: var(--rgba-220-38-38-0-08); }

/* Light mode stat cards */
html[data-theme="light"] .stat-card {
  background: linear-gradient(135deg, var(--hex-ffffff) 0%, var(--hex-f5fcff) 100%);
  border-color: var(--rgba-8-145-178-0-14);
}

html[data-theme="light"] .stat-card::before {
  background: linear-gradient(90deg, transparent, var(--rgba-8-145-178-0-3), transparent);
}

html[data-theme="light"] .stat-card:hover {
  border-color: var(--rgba-8-145-178-0-28);
  box-shadow: 0 12px 40px var(--rgba-8-51-68-0-1), 0 0 30px var(--rgba-8-145-178-0-06);
}

/* Light mode cards */
html[data-theme="light"] .card {
  background: linear-gradient(135deg, var(--hex-ffffff) 0%, var(--hex-f8fdff) 100%);
  border-color: var(--rgba-8-145-178-0-12);
}

html[data-theme="light"] .card::before {
  background: linear-gradient(90deg, transparent, var(--rgba-8-145-178-0-2), transparent);
}

/* Light mode table */
html[data-theme="light"] .table-wrapper {
  background: var(--rgba-255-255-255-0-85);
  border-color: var(--rgba-8-145-178-0-12);
}

html[data-theme="light"] thead { background: var(--rgba-8-145-178-0-05); }
html[data-theme="light"] thead th { color: var(--rgba-8-145-178-0-6); border-bottom-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] tbody tr { border-top-color: var(--rgba-8-145-178-0-06); }
html[data-theme="light"] tbody tr:hover { background: var(--rgba-8-145-178-0-04); }
html[data-theme="light"] tbody td { color: var(--hex-2e6a7a); }

/* Light mode inputs */
html[data-theme="light"] .form-input {
  background: var(--rgba-8-145-178-0-04);
  border-color: var(--rgba-8-145-178-0-18);
  color: var(--hex-083344);
  box-shadow: inset 0 1px 3px var(--rgba-8-51-68-0-04);
}

html[data-theme="light"] .form-input:focus {
  border-color: var(--rgba-8-145-178-0-5);
  background: var(--rgba-8-145-178-0-07);
  box-shadow: 0 0 0 3px var(--rgba-8-145-178-0-1), inset 0 1px 3px var(--rgba-8-51-68-0-04);
}

html[data-theme="light"] .form-input::placeholder { color: var(--rgba-8-145-178-0-38); }

html[data-theme="light"] select.form-input option { background: var(--hex-fff); color: var(--hex-083344); }

html[data-theme="light"] .search-input {
  background: var(--rgba-8-145-178-0-04);
  border-color: var(--rgba-8-145-178-0-18);
  color: var(--hex-083344);
}

html[data-theme="light"] .search-input::placeholder { color: var(--rgba-8-145-178-0-38); }
html[data-theme="light"] .search-input:focus { border-color: var(--rgba-8-145-178-0-5); background: var(--rgba-8-145-178-0-07); }

html[data-theme="light"] .filter-select {
  background: var(--rgba-8-145-178-0-04);
  border-color: var(--rgba-8-145-178-0-18);
  color: var(--hex-083344);
}

html[data-theme="light"] .filter-select option { background: var(--hex-fff); color: var(--hex-083344); }

/* Light mode modal */
html[data-theme="light"] .modal {
  background: linear-gradient(135deg, var(--hex-ffffff) 0%, var(--hex-f5fcff) 100%);
  border-color: var(--rgba-8-145-178-0-2);
  box-shadow: 0 24px 80px var(--rgba-8-51-68-0-14), 0 0 60px var(--rgba-8-145-178-0-06);
}

html[data-theme="light"] .modal::before {
  background: linear-gradient(90deg, transparent, var(--rgba-8-145-178-0-5), transparent);
}

html[data-theme="light"] .modal-title { color: var(--hex-083344); }

html[data-theme="light"] .modal-close {
  background: var(--rgba-8-145-178-0-06);
  border-color: var(--rgba-8-145-178-0-18);
  color: var(--rgba-8-145-178-0-6);
}

html[data-theme="light"] .modal-close:hover {
  background: var(--rgba-8-145-178-0-12);
  color: var(--hex-083344);
  border-color: var(--rgba-8-145-178-0-35);
}

html[data-theme="light"] .modal-footer { border-top-color: var(--rgba-8-145-178-0-12); }

/* Light mode confirm dialog */
html[data-theme="light"] .confirm-dialog {
  background: linear-gradient(135deg, var(--hex-ffffff) 0%, var(--hex-f5fcff) 100%);
  border-color: var(--rgba-8-145-178-0-2);
}

/* Light mode toast */
html[data-theme="light"] .toast {
  background: var(--rgba-255-255-255-0-97);
  border-color: var(--rgba-8-145-178-0-18);
  box-shadow: 0 8px 40px var(--rgba-8-51-68-0-12);
}

html[data-theme="light"] .toast-message { color: var(--hex-083344); }

/* Light mode license key */
html[data-theme="light"] .license-key {
  background: var(--rgba-8-145-178-0-07);
  border-color: var(--rgba-8-145-178-0-2);
  color: var(--hex-0891b2);
}

html[data-theme="light"] .license-key:hover {
  border-color: var(--rgba-8-145-178-0-45);
  background: var(--rgba-8-145-178-0-13);
}

/* Light mode page btn */
html[data-theme="light"] .page-btn {
  background: var(--rgba-8-145-178-0-06);
  border-color: var(--rgba-8-145-178-0-16);
  color: var(--rgba-8-145-178-0-7);
}

/* Light mode mobile menu btn */
html[data-theme="light"] .mobile-menu-btn {
  background: var(--rgba-8-145-178-0-07);
  border-color: var(--rgba-8-145-178-0-18);
  color: var(--hex-0891b2);
}

/* Light mode nav badge */
html[data-theme="light"] .nav-badge {
  background: linear-gradient(135deg, var(--hex-0891b2), var(--hex-0e7490));
}

/* Light mode empty state */
html[data-theme="light"] .empty-state { color: var(--rgba-8-145-178-0-5); }
html[data-theme="light"] .empty-title { color: var(--rgba-8-51-68-0-75); }
html[data-theme="light"] .empty-desc  { color: var(--rgba-8-145-178-0-5); }

/* Light mode td-muted */
html[data-theme="light"] .td-muted { color: var(--rgba-8-145-178-0-55); }

/* Light mode spinner */
html[data-theme="light"] .spinner {
  border-color: var(--rgba-8-145-178-0-18);
  border-top-color: var(--hex-0891b2);
}

/* Light mode chart card */
html[data-theme="light"] .chart-card:hover {
  border-color: var(--rgba-8-145-178-0-22);
  box-shadow: 0 8px 40px var(--rgba-8-51-68-0-1), 0 0 30px var(--rgba-8-145-178-0-06);
}

/* Light mode support split */
html[data-theme="light"] .support-split, html[data-theme="light"] .support-split-admin-client {
  background: var(--hex-ffffff);
  border-color: var(--rgba-8-145-178-0-13);
}

html[data-theme="light"] .support-ticket-list { border-right-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .support-ticket-list-header { background: var(--rgba-8-145-178-0-04); border-bottom-color: var(--rgba-8-145-178-0-12); }

html[data-theme="light"] .admin-ticket-item:hover { background: var(--rgba-8-145-178-0-05); border-color: var(--rgba-8-145-178-0-15); }
html[data-theme="light"] .admin-ticket-item.active { background: var(--rgba-8-145-178-0-08); border-color: var(--rgba-8-145-178-0-25); }
html[data-theme="light"] .admin-ticket-item.has-unread { border-left-color: var(--hex-0891b2); }

html[data-theme="light"] .admin-ticket-title { color: var(--hex-083344); }
html[data-theme="light"] .admin-ticket-meta { color: var(--rgba-8-145-178-0-55); }

/* Light mode chat */
html[data-theme="light"] .chat-layout { background: var(--hex-ffffff); border-color: var(--rgba-8-145-178-0-13); }
html[data-theme="light"] .chat-header { background: var(--rgba-8-145-178-0-04); border-bottom-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .chat-title { color: var(--hex-083344); }
html[data-theme="light"] .chat-input-area { background: var(--rgba-8-145-178-0-04); border-top-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .chat-textarea { background: var(--hex-fff); border-color: var(--rgba-8-145-178-0-18); color: var(--hex-083344); }
html[data-theme="light"] .chat-textarea:focus { border-color: var(--rgba-8-145-178-0-5); }
html[data-theme="light"] .chat-textarea::placeholder { color: var(--rgba-8-145-178-0-38); }
html[data-theme="light"] .msg-bubble-theirs { background: var(--rgba-8-145-178-0-06); border-color: var(--rgba-8-145-178-0-15); color: var(--hex-083344); }
html[data-theme="light"] .chat-attach-btn { background: var(--rgba-8-145-178-0-06); border-color: var(--rgba-8-145-178-0-15); color: var(--rgba-8-51-68-0-6); }
html[data-theme="light"] .chat-attach-btn:hover { background: var(--rgba-8-145-178-0-12); color: var(--hex-0891b2); }

/* Light mode editor */
html[data-theme="light"] .editor-sidebar { background: var(--rgba-8-145-178-0-03); border-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .editor-main { background: var(--hex-fff); border-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .editor-folder-name { background: var(--rgba-8-145-178-0-05); border-color: var(--rgba-8-145-178-0-14); color: var(--hex-0891b2); }
html[data-theme="light"] .editor-textarea { background: var(--rgba-8-145-178-0-03); border-color: var(--rgba-8-145-178-0-14); color: var(--hex-083344); }

/* Light mode announcement banners */
html[data-theme="light"] .announcement-banner { box-shadow: 0 4px 24px var(--rgba-8-51-68-0-08); }

/* Light mode obfuscator */
html[data-theme="light"] .obf-check-label { background: var(--rgba-8-145-178-0-04); border-color: var(--rgba-8-145-178-0-14); color: var(--rgba-8-51-68-0-7); }
html[data-theme="light"] .obf-check-label:hover { background: var(--rgba-8-145-178-0-08); color: var(--hex-083344); }
html[data-theme="light"] .obf-check-label:has(input:checked) { border-color: var(--rgba-8-145-178-0-45); background: var(--rgba-8-145-178-0-1); color: var(--hex-0891b2); }
html[data-theme="light"] .obf-js-options-grid { background: var(--rgba-8-145-178-0-04); border-color: var(--rgba-8-145-178-0-12); }
html[data-theme="light"] .obf-js-opt-label { color: var(--rgba-8-51-68-0-65); }

/* Light mode requests */
html[data-theme="light"] .requests-type-select { background: var(--rgba-8-145-178-0-04); border-color: var(--rgba-8-145-178-0-18); color: var(--hex-083344); }
html[data-theme="light"] .requests-type-select option { background: var(--hex-fff); color: var(--hex-083344); }
html[data-theme="light"] .requests-panel-title { color: var(--hex-083344); }
html[data-theme="light"] .requests-count-badge { background: var(--rgba-8-145-178-0-08); border-color: var(--rgba-8-145-178-0-22); color: var(--hex-0891b2); }

/* Light mode theme toggle */
html[data-theme="light"] .theme-toggle { background: var(--rgba-8-145-178-0-06); border-color: var(--rgba-8-145-178-0-18); color: var(--hex-0891b2); }
html[data-theme="light"] .theme-toggle:hover { background: var(--rgba-8-145-178-0-12); border-color: var(--rgba-8-145-178-0-35); color: var(--hex-083344); }

/* Light mode bc announcement cards */
html[data-theme="light"] .bc-announcement-card { background: var(--rgba-8-145-178-0-04); border-color: var(--rgba-8-145-178-0-13); }
html[data-theme="light"] .bc-announcement-card:hover { border-color: var(--rgba-8-145-178-0-25); }
html[data-theme="light"] .bc-announcement-card-title { color: var(--hex-083344); }
html[data-theme="light"] .bc-announcement-card-msg { color: var(--hex-2e6a7a); }
html[data-theme="light"] .bc-announcement-card-meta { color: var(--rgba-8-145-178-0-55); }

/* Light mode delete client modal */
html[data-theme="light"] #delete-client-content > div:first-child { background: var(--rgba-8-145-178-0-04) !important; border-bottom-color: var(--rgba-8-145-178-0-12) !important; }
html[data-theme="light"] #discord-preview { background: var(--rgba-8-145-178-0-05) !important; border-color: var(--rgba-8-145-178-0-15) !important; }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--rgba-6-182-212-0-07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--rgba-34-211-238-0-03) 0%, transparent 50%);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rgba-6-182-212-0-25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rgba-6-182-212-0-45); }

/* ===== Typography ===== */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); }
code, .mono { font-family: 'JetBrains Mono', monospace; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; border: none;
  transition: all var(--transition); white-space: nowrap;
  text-decoration: none; cursor: pointer; position: relative;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
  color: var(--hex-fff);
  box-shadow: 0 4px 16px var(--rgba-6-182-212-0-28), inset 0 1px 0 var(--rgba-255-255-255-0-12);
}
.btn-primary:hover {
  color: var(--hex-fff);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--rgba-6-182-212-0-42), inset 0 1px 0 var(--rgba-255-255-255-0-18);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-light);
  box-shadow: inset 0 1px 0 var(--rgba-255-255-255-0-03);
}
.btn-secondary:hover {
  background: var(--surface3);
  border-color: var(--border-bright);
  color: var(--text);
  transform: translateY(-1px);
}
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.btn-danger:hover { background: var(--danger); color: var(--hex-fff); transform: translateY(-1px); }
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.btn-success:hover { background: var(--success); color: var(--hex-fff); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg { padding: 14px 32px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-icon { padding: 8px; border-radius: var(--radius-xs); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.w-full { width: 100%; }

/* ===== Forms ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.form-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text); padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 14px; transition: all var(--transition);
  outline: none; width: 100%;
  box-shadow: inset 0 2px 4px var(--rgba-0-0-0-0-2);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow-sm), inset 0 2px 4px var(--rgba-0-0-0-0-2);
  background: var(--surface3);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:disabled { opacity: 0.45; cursor: not-allowed; }
select.form-input { cursor: pointer; }
select.form-input option { background: var(--surface3); color: var(--text); }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rgba-6-182-212-0-3), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.card:hover::before { opacity: 1; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.badge-cyan { background: var(--rgba-6-182-212-0-1); color: var(--primary); border: 1px solid var(--rgba-6-182-212-0-22); }
.badge-amber { background: var(--rgba-6-182-212-0-1); color: var(--primary); border: 1px solid var(--rgba-6-182-212-0-22); }
.badge-muted { background: var(--surface3); color: var(--text-secondary); border: 1px solid var(--border); }

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface2); }
thead th {
  padding: 12px 16px; text-align: left; font-size: 11px;
  font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-top: 1px solid var(--rgba-6-182-212-0-05); transition: background var(--transition); }
tbody tr:hover { background: var(--rgba-6-182-212-0-04); }
tbody td { padding: 13px 16px; font-size: 14px; color: var(--text); }
.td-muted { color: var(--text-secondary); font-size: 13px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--rgba-7-9-15-0-88);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: inherit; padding: 28px; width: 100%;
  max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg), 0 0 60px var(--rgba-6-182-212-0-08);
  position: relative;
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 16px; padding: 6px 10px;
  border-radius: var(--radius-xs); transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface3); border-color: var(--border-light); }
.modal-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* ===== Toast ===== */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 14px 18px;
  min-width: 280px; max-width: 380px;
  box-shadow: var(--shadow), 0 0 30px var(--rgba-0-0-0-0-4);
  animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
  pointer-events: all;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }
.toast-icon { font-size: 17px; flex-shrink: 0; }
.toast-message { font-size: 14px; color: var(--text); flex: 1; font-weight: 500; }
@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===== Sidebar Layout ===== */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
  box-shadow: 0 4px 12px var(--rgba-6-182-212-0-35);
}
.sidebar-logo-text { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.sidebar-logo-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }
.sidebar-nav { flex: 1; padding: 14px 10px; overflow: hidden; }
.nav-section { margin-bottom: 22px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0 10px; margin-bottom: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-xs);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all var(--transition); cursor: pointer;
  text-decoration: none; margin-bottom: 2px; position: relative;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, var(--rgba-6-182-212-0-15), var(--rgba-6-182-212-0-08));
  color: var(--primary);
  border: 1px solid var(--rgba-6-182-212-0-2);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--hex-fff); font-size: 10px; padding: 2px 7px;
  border-radius: 100px; font-weight: 700;
  box-shadow: 0 2px 8px var(--rgba-6-182-212-0-35);
}
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.user-info:hover { background: var(--surface3); border-color: var(--border-light); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--hex-fff);
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 8px var(--rgba-6-182-212-0-35);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.user-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.user-logout {
  margin-left: auto; color: var(--text-muted); font-size: 15px;
  border: none; outline: none; background: none;
  padding: 4px; border-radius: 4px; transition: color var(--transition); flex-shrink: 0;
}
.user-logout:hover { color: var(--danger); }

/* ===== Main Content ===== */
.main-content {
  flex: 1; margin-left: var(--sidebar-width);
  min-height: 100vh; display: flex; flex-direction: column;
}
.page-header {
    background: none;
  border-bottom: 1px solid var(--border);
  padding: 0 28px; height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px);
  gap: 12px;
}
.page-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.page-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.page-body { padding: 24px 28px; flex: 1; }

/* ===== Stats Grid ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: 0 8px 32px var(--rgba-0-0-0-0-3); }
.stat-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.purple { background: var(--rgba-6-182-212-0-10); border: 1px solid var(--rgba-6-182-212-0-18); }
.stat-icon.green  { background: var(--rgba-52-211-153-0-09); border: 1px solid var(--rgba-52-211-153-0-18); }
.stat-icon.blue   { background: var(--rgba-240-160-96-0-09); border: 1px solid var(--rgba-240-160-96-0-18); }
.stat-icon.orange { background: var(--rgba-251-191-36-0-09); border: 1px solid var(--rgba-251-191-36-0-18); }
.stat-icon.red    { background: var(--rgba-248-113-113-0-09); border: 1px solid var(--rgba-248-113-113-0-18); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.03em; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== License Key ===== */
.license-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; background: var(--surface2);
  padding: 5px 11px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); color: var(--primary);
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: all var(--transition);
  user-select: none;
}
.license-key:hover { border-color: var(--primary); background: var(--rgba-6-182-212-0-1); box-shadow: 0 0 12px var(--rgba-6-182-212-0-15); }
.license-key:active { transform: scale(0.97); }
.copy-icon { font-size: 11px; color: var(--text-muted); }

/* ===== Search & Filter Bar ===== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-input {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 14px 9px 38px;
  border-radius: var(--radius-sm); font-size: 13px;
  outline: none; transition: all var(--transition); width: 240px;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow-sm); background: var(--surface3); }
.search-wrapper { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.filter-select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 13px; outline: none; cursor: pointer; transition: all var(--transition);
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow-sm); }
.filter-select option { background: var(--surface3); }
.toolbar-right { margin-left: auto; display: flex; gap: 10px; }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px; border-radius: var(--radius-xs);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--transition); font-weight: 600;
}
.page-btn:hover, .page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--hex-fff); border-color: var(--primary);
  box-shadow: 0 4px 12px var(--rgba-6-182-212-0-3);
}

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.25; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-desc { font-size: 14px; color: var(--text-secondary); }

/* ===== Loading ===== */
.spinner {
  width: 17px; height: 17px;
  border: 2px solid var(--rgba-6-182-212-0-22);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.65s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 20px;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, var(--rgba-6-182-212-0-10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 90%, var(--rgba-34-211-238-0-04) 0%, transparent 50%);
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2306b6d4' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow-lg), 0 0 60px var(--rgba-6-182-212-0-07);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 28px; margin: 0 auto 16px;
  box-shadow: 0 8px 32px var(--rgba-6-182-212-0-35), 0 0 60px var(--rgba-6-182-212-0-15);
}
.auth-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 8px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 32px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-muted); }

/* ===== Landing Nav ===== */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 48px; display: flex; align-items: center;
  justify-content: space-between;
  background: none;
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.landing-logo { display: flex; align-items: center; gap: 12px; }
.landing-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
  box-shadow: 0 4px 12px var(--rgba-6-182-212-0-35);
}
.landing-logo-text { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.landing-nav-links { display: flex; align-items: center; gap: 4px; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 120px 20px 80px;
  position: relative; overflow: hidden;
}
.hero-bg-gradient {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -5%, var(--rgba-6-182-212-0-14) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 20% 60%, var(--rgba-34-211-238-0-04) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 80% 70%, var(--rgba-6-182-212-0-03) 0%, transparent 50%);
}
#shared-downloads-list {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
    padding-right: 8px;
}
#notifications-list {
  display: flex;
  flex-direction: column;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 8px;
}
#validation-activity {
    display: flex;
  flex-direction: column;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}
#admin-own-notifications {
  display: flex;
  flex-direction: column;
  max-height: 1060px;
  overflow-y: auto;
  padding-right: 8px;
}
#admin-own-validations {
  display: flex;
  flex-direction: column;
  max-height: 1080px;
  overflow-y: auto;
  padding-right: 8px;
}
#bc-announcements-list {
   display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px; 
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--rgba-6-182-212-0-04) 1px, transparent 1px),
    linear-gradient(90deg, var(--rgba-6-182-212-0-04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rgba-6-182-212-0-09);
  border: 1px solid var(--rgba-6-182-212-0-28);
  color: var(--accent); padding: 6px 18px; border-radius: 100px;
  font-size: 12px; font-weight: 600; margin-bottom: 28px;
  backdrop-filter: blur(10px); letter-spacing: 0.03em; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 20px; letter-spacing: -0.04em;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Features Section ===== */
.features-section { padding: 100px 40px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
  font-size: 11px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 14px;
  display: inline-block;
  background: var(--rgba-6-182-212-0-09);
  border: 1px solid var(--rgba-6-182-212-0-2);
  padding: 4px 14px; border-radius: 100px;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition-slow); position: relative; overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0; transition: opacity var(--transition-slow);
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-6px); box-shadow: 0 20px 60px var(--rgba-0-0-0-0-4), 0 0 40px var(--rgba-6-182-212-0-06); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px;
  background: var(--rgba-6-182-212-0-09); border: 1px solid var(--rgba-6-182-212-0-18);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 21px; margin-bottom: 18px;
  transition: all var(--transition); color: var(--primary);
}
.feature-card:hover .feature-icon { background: var(--rgba-6-182-212-0-16); box-shadow: 0 0 20px var(--rgba-6-182-212-0-18); }
.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.feature-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ===== CTA Section ===== */
.cta-section {
  padding: 100px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, var(--rgba-6-182-212-0-07) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== Landing Footer ===== */
.landing-footer {
  padding: 28px 48px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 13px;
  background: var(--bg2); flex-wrap: wrap; gap: 16px;
}

/* ===== Code Block ===== */
.code-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--text); overflow-x: auto; position: relative; line-height: 1.75;
}
.code-block .comment  { color: var(--text-muted); font-style: italic; }
.code-block .keyword  { color: var(--hex-22d3ee); font-weight: 600; }
.code-block .string   { color: var(--hex-67e8f9); }
.code-block .number   { color: var(--hex-a5f3fc); }
.code-block .function { color: var(--hex-06b6d4); }
.code-copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface3); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 4px 12px; border-radius: 5px;
  font-size: 11px; cursor: pointer; transition: all var(--transition);
  font-weight: 600; letter-spacing: 0.03em;
}
.code-copy-btn:hover { background: var(--primary); color: var(--hex-fff); border-color: var(--primary); }

/* ===== Alerts ===== */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; font-weight: 500; line-height: 1.5;
}
.alert-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }
.alert-danger  { background: var(--danger-bg);  border: 1px solid var(--danger-border);  color: var(--danger); }
.alert-warning { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning); }
.alert-info    { background: var(--info-bg);    border: 1px solid var(--info-border);    color: var(--info); }

/* ===== Tabs ===== */
.tab-panel { display: block; }
.tab-panel.hidden { display: none !important; }

/* ===== Confirm Dialog ===== */
.confirm-dialog {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 32px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.confirm-dialog::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.confirm-icon { font-size: 42px; text-align: center; margin-bottom: 16px; }
.confirm-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 8px; letter-spacing: -0.01em; }
.confirm-desc { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-actions .btn { flex: 1; justify-content: center; }

/* ===== Toggle Switch ===== */
.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  width: 42px; height: 24px; background: var(--surface4);
  border-radius: 12px; position: relative; transition: all var(--transition);
  border: 1px solid var(--border);
}
.toggle-slider::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  background: var(--text-muted); border-radius: 50%;
  top: 2px; left: 2px; transition: all var(--transition);
  box-shadow: 0 2px 4px var(--rgba-0-0-0-0-3);
}
.toggle-input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-color: var(--primary); box-shadow: 0 0 12px var(--rgba-6-182-212-0-28);
}
.toggle-input:checked + .toggle-slider::after { transform: translateX(18px); background: var(--hex-fff); }
.toggle-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ===== Misc Utilities ===== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ===== Brand Logo ===== */
.brand-logo-wrap {
  overflow: hidden; padding: 0;
  background: var(--rgba-6-182-212-0-09) !important;
  border: 1px solid var(--rgba-6-182-212-0-18) !important;
  box-shadow: 0 4px 16px var(--rgba-6-182-212-0-2);
}
.brand-logo-img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ===== Pricing Cards ===== */
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center;
  transition: all var(--transition-slow); position: relative; overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.pricing-card:hover { border-color: var(--border-light); transform: translateY(-6px); box-shadow: 0 20px 60px var(--rgba-0-0-0-0-4); }
.pricing-card:hover::before { opacity: 1; }
.pricing-card.featured {
  border-color: var(--rgba-6-182-212-0-38);
  background: linear-gradient(135deg, var(--rgba-6-182-212-0-06), var(--surface));
  transform: scale(1.03);
  box-shadow: 0 0 40px var(--rgba-6-182-212-0-12);
}
.pricing-card.featured::before { opacity: 1; }
.pricing-card.featured:hover { transform: scale(1.03) translateY(-6px); }
.pricing-name { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 2.6rem; font-weight: 900; color: var(--primary); margin: 16px 0; letter-spacing: -0.04em; }
.pricing-price span { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }
.pricing-features { list-style: none; margin: 24px 0; text-align: left; }
.pricing-features li {
  padding: 8px 0; font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--rgba-255-255-255-0-04);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ===== Stats Row (landing) ===== */
.stats-row { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 60px; }
.stat-item { text-align: center; }
.stat-num { font-size: 2.4rem; font-weight: 900; color: var(--text); letter-spacing: -0.04em; }
.stat-num span { color: var(--primary); }
.stat-desc { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

/* ===== Validation Demo ===== */
.validation-demo {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 24px;
  max-width: 520px; margin: 40px auto 0; text-align: left;
  box-shadow: 0 0 40px var(--rgba-6-182-212-0-06); position: relative; overflow: hidden;
}
.validation-demo::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.validation-demo-title {
  font-size: 11px; color: var(--text-muted); margin-bottom: 14px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}

/* ===== How It Works Steps ===== */
.how-section { padding: 100px 40px; max-width: 1000px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 48px; }
.step {
  text-align: center; padding: 32px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
}
.step:hover { border-color: var(--border-light); transform: translateY(-4px); }
.step-num {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 20px; font-weight: 900;
  margin: 0 auto 18px; color: var(--hex-fff);
  box-shadow: 0 8px 24px var(--rgba-6-182-212-0-35);
}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.step-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ===== Grid helpers ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ===== Chart Cards ===== */
.chart-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.chart-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 40px var(--rgba-0-0-0-0-35), 0 0 30px var(--rgba-6-182-212-0-06);
  transform: translateY(-2px);
}
.charts-row canvas {
  display: block;
}
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  .charts-row > .card > div[style*="display:flex"] {
    flex-direction: column;
    height: auto !important;
  }
  .charts-row > .card > div[style*="display:flex"] > div[style*="height:200px"] {
    width: 100% !important;
    height: 180px !important;
  }
}

/* ===== API Docs ===== */
.api-layout { display: flex; min-height: 100vh; }
.api-sidebar {
  width: 260px; background: var(--bg2); border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; padding: 24px 14px;
}
.api-content { margin-left: 260px; padding: 40px; max-width: 900px; }
.api-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.api-nav-section { margin-bottom: 24px; }
.api-nav-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; padding: 0 8px;
}
.api-nav-item {
  display: block; padding: 8px 12px; border-radius: var(--radius-xs);
  font-size: 13px; color: var(--text-secondary);
  text-decoration: none; transition: all var(--transition); margin-bottom: 2px;
}
.api-nav-item:hover { background: var(--surface2); color: var(--text); }
.api-nav-item.active { background: var(--rgba-6-182-212-0-1); color: var(--primary); border: 1px solid var(--rgba-6-182-212-0-18); }
.method-badge {
  display: inline-block; padding: 3px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  margin-right: 10px; letter-spacing: 0.03em;
}
.method-get    { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.method-post   { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.method-put    { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.method-delete { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.method-patch  { background: var(--primary-glow-sm); color: var(--primary); border: 1px solid var(--rgba-6-182-212-0-22); }
.endpoint-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  transition: border-color var(--transition);
}
.endpoint-card:hover { border-color: var(--border-light); }
.endpoint-header { display: flex; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: var(--text); }
.endpoint-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.section-anchor { scroll-margin-top: 80px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 13px; margin-bottom: 24px;
  text-decoration: none; font-weight: 500; transition: color var(--transition);
}
.back-btn:hover { color: var(--primary); }

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
  display: none; background: none; border: none;
  color: var(--text); font-size: 22px; padding: 6px;
  border-radius: var(--radius-xs); cursor: pointer;
  transition: background var(--transition);
}
.mobile-menu-btn:hover { background: var(--surface2); }

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--rgba-0-0-0-0-75); z-index: 99; backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px var(--rgba-0-0-0-0-6);
  }
  .mobile-menu-btn { display: flex; }
  .page-header { padding: 0 16px; gap: 8px; }
  .page-body   { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .landing-nav {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  .landing-nav-links {
    display: flex;
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .landing-nav-links .btn {
    flex: 1 1 0;
    min-width: max-content;
    justify-content: center;
    white-space: nowrap;
  }
  .landing-nav-actions {
    margin-left: auto;
    flex-shrink: 0;
    gap: 8px;
  }
  .landing-nav-actions .btn {
    padding-left: 12px;
    padding-right: 12px;
  }
  .hero { padding: 132px 16px 60px; }
  .hero h1 { font-size: 2.1rem; }
  .hero p  { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .features-section { padding: 60px 16px; }
  .how-section { padding: 60px 16px; }
  .cta-section { padding: 60px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-row  { gap: 24px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-wrapper { width: 100%; }
  .search-input { width: 100%; }
  .filter-select { width: 100%; }
  .toolbar-right { margin-left: 0; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  thead th, tbody td { white-space: nowrap; }
  .landing-footer { flex-direction: column; text-align: center; padding: 24px 16px; }
  .api-sidebar { display: none; }
  .api-content { margin-left: 0; padding: 20px 16px; }
  .validation-demo { margin: 28px 0 0; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; width: 100%; }
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; }

  /* ── Settings page mobile ── */
  .card-header { flex-wrap: wrap; gap: 10px; }
  .card-header .btn { align-self: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* ── Auth page mobile ── */
  .auth-page { padding: 12px; align-items: flex-start; padding-top: 24px; }
}

@media (max-width: 480px) {
  .landing-nav-links .btn { font-size: 12px; padding: 10px 12px; }
  .landing-nav-actions .btn { padding-left: 10px; padding-right: 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card  { padding: 24px 16px; }
  .auth-title { font-size: 20px; }
  .page-header { height: 56px; }
  .stat-card  { padding: 16px; }
  .stat-value { font-size: 22px; }
  .hero h1    { font-size: 1.9rem; }
  .btn-lg     { padding: 12px 24px; font-size: 14px; }
  .pricing-card { padding: 24px 16px; }
  .step { padding: 24px 16px; }
  .confirm-actions { flex-direction: column; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 1.7rem; }
  .landing-logo-text { display: none; }
}

/* ===== Announcement Banners ===== */
#announcement-banners {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 28px 0;
}

.announcement-banner {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid;
  position: relative;
  animation: announcementSlideIn 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px var(--rgba-0-0-0-0-35), 0 1px 0 var(--rgba-255-255-255-0-04) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.announcement-banner:hover {
  transform: translateY(-1px);
}

/* Glowing left accent stripe */
.announcement-stripe {
  width: 4px;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Top shimmer line */
.announcement-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--rgba-255-255-255-0-18) 50%, transparent 100%);
  pointer-events: none;
}

@keyframes announcementSlideIn {
  from { transform: translateY(-20px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1);        opacity: 1; }
}

/* ── Type themes ── */
.announcement-info {
  background: linear-gradient(135deg, var(--rgba-34-211-238-0-08) 0%, var(--rgba-34-211-238-0-04) 100%);
  border-color: var(--rgba-34-211-238-0-22);
  color: var(--info);
}
.announcement-info .announcement-stripe { background: var(--info); box-shadow: 0 0 12px var(--rgba-34-211-238-0-6); }
.announcement-info .announcement-icon-col { background: var(--rgba-34-211-238-0-10); }

.announcement-success {
  background: linear-gradient(135deg, var(--rgba-52-211-153-0-08) 0%, var(--rgba-52-211-153-0-04) 100%);
  border-color: var(--rgba-52-211-153-0-22);
  color: var(--success);
}
.announcement-success .announcement-stripe { background: var(--success); box-shadow: 0 0 12px var(--rgba-52-211-153-0-6); }
.announcement-success .announcement-icon-col { background: var(--rgba-52-211-153-0-10); }

.announcement-warning {
  background: linear-gradient(135deg, var(--rgba-251-191-36-0-08) 0%, var(--rgba-251-191-36-0-04) 100%);
  border-color: var(--rgba-251-191-36-0-22);
  color: var(--warning);
}
.announcement-warning .announcement-stripe { background: var(--warning); box-shadow: 0 0 12px var(--rgba-251-191-36-0-6); }
.announcement-warning .announcement-icon-col { background: var(--rgba-251-191-36-0-10); }

.announcement-error {
  background: linear-gradient(135deg, var(--rgba-248-113-113-0-08) 0%, var(--rgba-248-113-113-0-04) 100%);
  border-color: var(--rgba-248-113-113-0-22);
  color: var(--danger);
}
.announcement-error .announcement-stripe { background: var(--danger); box-shadow: 0 0 12px var(--rgba-248-113-113-0-6); }
.announcement-error .announcement-icon-col { background: var(--rgba-248-113-113-0-10); }

.announcement-maintenance {
  background: linear-gradient(135deg, var(--rgba-139-92-246-0-08) 0%, var(--rgba-139-92-246-0-04) 100%);
  border-color: var(--rgba-139-92-246-0-28);
  color: var(--hex-a78bfa);
}
.announcement-maintenance .announcement-stripe { background: var(--hex-a78bfa); box-shadow: 0 0 12px var(--rgba-167-139-250-0-6); }
.announcement-maintenance .announcement-icon-col { background: var(--rgba-139-92-246-0-10); }

/* ── Icon column ── */
.announcement-icon-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  align-self: stretch;
  flex-shrink: 0;
  border-right: 1px solid var(--rgba-255-255-255-0-06);
}
.announcement-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rgba-255-255-255-0-07);
  border: 1px solid var(--rgba-255-255-255-0-10);
  flex-shrink: 0;
  margin-left:15px
}

.announcement-icon-banner {
    font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rgba-255-255-255-0-07);
  border: 1px solid var(--rgba-255-255-255-0-10);
  flex-shrink: 0;
}

/* ── Body ── */
.announcement-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}
.announcement-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.announcement-pin-badge {
  font-size: 10px;
  background: var(--rgba-255-255-255-0-10);
  border: 1px solid var(--rgba-255-255-255-0-14);
  border-radius: 100px;
  padding: 2px 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.announcement-message {
  font-size: 13px;
  color: var(--text);
  opacity: 0.82;
  line-height: 1.6;
  margin-bottom: 8px;
}
.announcement-meta {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.announcement-meta-sep {
  opacity: 0.4;
  margin: 0 2px;
}

/* ── Dismiss column ── */
.announcement-dismiss-col {
  display: flex;
  align-items: flex-start;
  padding: 10px 12px 0 0;
  flex-shrink: 0;
}
.announcement-dismiss {
  background: var(--rgba-255-255-255-0-05);
  border: 1px solid var(--rgba-255-255-255-0-08);
  color: inherit;
  opacity: 0.45;
  font-size: 13px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity var(--transition), background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.announcement-dismiss:hover {
  opacity: 1;
  background: var(--rgba-255-255-255-0-14);
  transform: scale(1.1);
}

/* Pinned banner gets a subtle extra glow */
.announcement-banner.is-pinned {
  box-shadow: 0 4px 32px var(--rgba-0-0-0-0-4), 0 0 0 1px var(--rgba-255-255-255-0-04) inset;
}

/* Admin broadcast list cards */
.bc-announcement-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--transition);
  margin-bottom: 10px;
}
.bc-announcement-card:hover { border-color: var(--border-light); }
.bc-announcement-card:last-child { margin-bottom: 0; }
.bc-announcement-card-body { flex: 1; min-width: 0; }
.bc-announcement-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bc-announcement-card-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
  word-break: break-word;
}
.bc-announcement-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.bc-announcement-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.bc-type-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}
.bc-type-dot.info        { background: var(--info); box-shadow: 0 0 6px var(--info); }
.bc-type-dot.success     { background: var(--success); box-shadow: 0 0 6px var(--success); }
.bc-type-dot.warning     { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.bc-type-dot.error       { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.bc-type-dot.maintenance { background: var(--hex-a78bfa); box-shadow: 0 0 6px var(--hex-a78bfa); }

.bc-inactive-overlay {
  opacity: 0.45;
  pointer-events: none;
}
.bc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.bc-empty i { font-size: 32px; display: block; margin-bottom: 10px; opacity: 0.3; }

@media (max-width: 900px) {
  #tab-broadcast > div { grid-template-columns: 1fr !important; }
}
.expiry-date {
  display: block;
}

.expiry-countdown {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.expiry-countdown.expired {
  color: var(--danger);
  font-weight: 600;
}


.editor-layout{display:grid;grid-template-columns:320px 1fr;gap:20px;}
.editor-sidebar{border:1px solid var(--border);border-radius:var(--radius);padding:16px;background:var(--surface2);min-height:640px;}
.editor-main{border:1px solid var(--border);border-radius:var(--radius);padding:16px;background:var(--surface);min-height:640px;}
.editor-folder-name{padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font-weight:600;word-break:break-word;}
.editor-file-list{max-height:320px;overflow:auto;display:grid;gap:8px;}
.editor-history-list {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: 5px;
    padding-right: 8px;
}
#sessions-list {
    max-height: 310px;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: 5px;
    padding-right: 8px;
}
.editor-file-btn{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 14px;border:1px solid var(--rgba-255-255-255-0-08);background:linear-gradient(180deg,var(--rgba-255-255-255-0-02),var(--rgba-255-255-255-0-01));border-radius:14px;cursor:pointer;color:var(--text);transition:all .18s ease;min-width:0;}
.editor-file-btn:hover{border-color:var(--rgba-6-182-212-28);transform:translateY(-1px);}
.editor-file-btn.active{border-color:var(--primary);box-shadow:0 0 0 1px var(--rgba-6-182-212-45),0 12px 28px var(--rgba-0-0-0-18);background:var(--rgba-6-182-212-08);}
.editor-file-main{min-width:0;display:grid;gap:6px;}
.editor-file-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.editor-file-name{font-weight:600;color:var(--text);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.editor-file-ext{display:inline-flex;align-items:center;justify-content:center;min-width:38px;padding:3px 8px;border-radius:999px;background:var(--rgba-6-182-212-12);border:1px solid var(--rgba-6-182-212-22);font-size:11px;font-weight:700;color:var(--primary);text-transform:uppercase;letter-spacing:.04em;}
.editor-file-path{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.editor-file-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.editor-file-tag{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:var(--surface2);font-size:11px;color:var(--text-muted);}
.editor-file-tag.warn{color:var(--warning);border-color:var(--rgba-251-191-36-22);background:var(--rgba-251-191-36-08);}
.editor-textarea{width:100%;min-height:560px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface2);color:var(--text);padding:14px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;resize:vertical;}
.editor-history-card{padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface);display:grid;gap:6px;}
.editor-history-meta{font-size:12px;color:var(--text-muted);line-height:1.5;word-break:break-word;}
.download-link-stack{display:flex;flex-direction:column;gap:6px;}
.client-license-edit-card{padding:16px;border:1px solid var(--border-light);border-radius:14px;background:var(--surface2);display:grid;gap:14px;box-shadow:inset 0 1px 0 var(--rgba-255-255-255-0-03);}
.client-license-edit-help{font-size:12px;color:var(--text-muted);line-height:1.6;margin-top:4px;}
.client-license-edit-inline{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.client-license-edit-status{font-size:12px;color:var(--text-muted);display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:10px 12px;background:var(--surface3);border-radius:var(--radius-xs);border:1px solid var(--border);}
.client-license-edit-status .badge{flex-shrink:0;}
#client-license-edit-value[readonly]{background:var(--surface3);color:var(--primary);font-family:'JetBrains Mono',monospace;letter-spacing:0.05em;cursor:default;}
@media (max-width: 900px){.editor-layout{grid-template-columns:1fr}.editor-sidebar,.editor-main{min-height:auto}.editor-textarea{min-height:360px;}}
@media (max-width: 600px){.client-license-edit-inline{flex-direction:column;align-items:stretch;}.client-license-edit-inline .form-input{min-width:0;width:100%;}}

/* ===== Change Requests Select UI ===== */
.requests-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.requests-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.requests-type-select {
  background: var(--surface2);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 280px;
  box-shadow: inset 0 2px 4px var(--rgba-0-0-0-0-15);
}
.requests-type-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow-sm), inset 0 2px 4px var(--rgba-0-0-0-0-15);
  background: var(--surface3);
}
.requests-type-select option { background: var(--surface3); color: var(--text); }
.requests-panel { display: none; }
.requests-panel.active { display: block; }
.requests-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.requests-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.requests-count-badge {
  background: var(--primary-glow-sm);
  border: 1px solid var(--rgba-6-182-212-0-25);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

/* ===== Obfuscator Modal ===== */
.obf-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
  min-width: 130px;
}
.obf-check-label:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--surface3);
}
.obf-check-label input[type="checkbox"] {
  display: none;
}
.obf-check-label input[type="checkbox"]:checked ~ span:not(.obf-check-box):not(.obf-file-count) {
  color: var(--text);
}
.obf-check-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--rgba-6-182-212-0-08);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--rgba-6-182-212-0-18);
}
.obf-check-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.obf-check-label:has(input:checked) .obf-check-box {
  background: var(--rgba-6-182-212-0-15);
  border-color: var(--primary);
  color: var(--primary);
}
.obf-file-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 1px 7px;
  color: var(--text-muted);
  margin-left: 4px;
}
.obf-check-label:has(input:checked) .obf-file-count {
  background: var(--rgba-6-182-212-0-12);
  border-color: var(--rgba-6-182-212-0-3);
  color: var(--primary);
}
.obf-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
}
.obf-type-chip.js  { background: var(--rgba-247-223-30-0-09); color: var(--hex-f7df1e); border-color: var(--rgba-247-223-30-0-25); }
.obf-type-chip.css { background: var(--rgba-38-77-228-0-12);  color: var(--hex-6fa8f5); border-color: var(--rgba-38-77-228-0-3); }
.obf-type-chip.html{ background: var(--rgba-227-76-38-0-10);  color: var(--hex-e34c26); border-color: var(--rgba-227-76-38-0-28); }
.obf-type-chip.none{ background: var(--surface3); color: var(--text-muted); border-color: var(--border); }
.obf-progress-bar-wrap {
  height: 6px;
  border-radius: 100px;
  background: var(--surface3);
  overflow: hidden;
  border: 1px solid var(--border);
}
.obf-progress-bar {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s ease;
  box-shadow: 0 0 10px var(--rgba-6-182-212-0-4);
}
.obf-result-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.obf-result-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.obf-js-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.obf-js-opt-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.obf-js-opt-label:hover { color: var(--text); }
.obf-js-opt-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--surface2);
  color: var(--text);
  box-shadow: var(--shadow);
}
.theme-toggle:hover {
  background: var(--surface3);
  border-color: var(--border-bright);
  color: var(--text);
}
.theme-toggle i { font-size: 13px; }
.theme-toggle-label { font-size: 12px; font-weight: 700; }
.theme-toggle-floating {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
}
.page-header .theme-toggle-floating {
  position: static;
  top: auto;
  right: auto;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.page-header-actions .theme-toggle {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .theme-toggle {
    padding: 8px 12px;
    min-width: 42px;
    justify-content: center;
  }
  .theme-toggle-label { display: none; }
  .theme-toggle-floating {
    top: 12px;
    right: 12px;
  }
}

.landing-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== COLLAPSIBLE SIDEBAR ===== */

/* Collapse toggle button inside sidebar */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--rgba-6-182-212-0-08);
  border: 1px solid var(--rgba-6-182-212-0-18);
  color: var(--rgba-6-182-212-0-7);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 12px;
  margin-left: auto;
}
.sidebar-collapse-btn:hover {
  background: var(--rgba-6-182-212-0-18);
  border-color: var(--rgba-6-182-212-0-4);
  color: var(--hex-22d3ee);
}

/* Collapsed sidebar state */
.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-logo-sub {
  display: none;
}


.sidebar.collapsed .sidebar-logo {
  padding: 16px 8px;
  justify-content: center;
   display:flex;
  flex-direction:column;
  gap: 5px;
}

.sidebar.collapsed .sidebar-logo .sidebar-collapse-btn {
  margin-left: 0;
}


.sidebar.collapsed .nav-section-label {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
}

.sidebar.collapsed .user-avatar{
    width: 20px;
    height: 20px;
}
/* Hide text labels in nav items when collapsed */
.sidebar.collapsed .nav-item .nav-label {
  display: none;
}


.sidebar.collapsed .user-tier-badge-inline {
    display: none;
}

/* Hide badges when collapsed */
.sidebar.collapsed .nav-badge {
  display: none !important;
}

/* Hide user info text when collapsed */
.sidebar.collapsed .user-name,
.sidebar.collapsed .user-role,
.sidebar.collapsed .user-logout {
  display: none;
}

.sidebar.collapsed .sidebar-footer {
  padding: 14px 8px;
}

/* Tooltip on hover for collapsed items */
.sidebar.collapsed .nav-item {
  position: relative;
}
.sidebar.collapsed .nav-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--rgba-7-19-24-0-97);
  border: 1px solid var(--rgba-6-182-212-0-25);
  color: var(--hex-e0f7fa);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 300;
  box-shadow: 0 4px 20px var(--rgba-0-0-0-0-5);
}
.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Adjust main content margin when sidebar is collapsed */
.sidebar.collapsed ~ .main-content,
.sidebar.collapsed + .sidebar-overlay + .main-content {
  margin-left: 64px;
}

/* Smooth transition for sidebar width */
.sidebar {
  transition: width 0.28s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
}
.main-content {
  transition: margin-left 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* Rotate arrow icon when collapsed */
.sidebar.collapsed .sidebar-collapse-btn i {
  transform: rotate(180deg);
}
.sidebar-collapse-btn i {
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* On mobile, never show the collapse button */
@media (max-width: 768px) {
  .sidebar.collapsed {
    width: 60px;
  }
}

/* Light mode adjustments for collapse button */
html[data-theme="light"] .sidebar-collapse-btn {
  background: var(--rgba-8-145-178-0-07);
  border-color: var(--rgba-8-145-178-0-2);
  color: var(--rgba-8-145-178-0-7);
}
html[data-theme="light"] .sidebar-collapse-btn:hover {
  background: var(--rgba-8-145-178-0-14);
  border-color: var(--rgba-8-145-178-0-4);
  color: var(--hex-0891b2);
}
html[data-theme="light"] .sidebar.collapsed .nav-item::after {
  background: var(--rgba-255-255-255-0-98);
  border-color: var(--rgba-8-145-178-0-22);
  color: var(--hex-083344);
}
.landing-nav .theme-toggle-floating {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .landing-nav .theme-toggle-label { display: none; }
  .landing-nav .theme-toggle { min-width: 42px; justify-content: center; }
}
