/* ==========================================================================
   TRADEX - PREMIUM TRADING JOURNAL DESIGN SYSTEM
   Dark Glassmorphism, Fintech Cyber Neon, Pixel-Perfect Layout
   ========================================================================== */

:root {
  --bg-app: #0c101d;
  --bg-sidebar: #0f1526;
  --bg-card: #151d30;
  --bg-card-hover: #1c273f;
  --bg-card-glass: rgba(21, 29, 48, 0.95);
  --bg-input: #0f1526;
  --bg-dropdown: #151d30;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #f97316;
  --border-card: rgba(255, 255, 255, 0.13);

  /* Financial Palette (High-Contrast Eye-Comfort Luxury Velvet) */
  --profit-color: #10b981;
  --profit-glow: rgba(16, 185, 129, 0.25);
  --profit-bg: rgba(16, 185, 129, 0.14);

  --loss-color: #f43f5e;
  --loss-glow: rgba(244, 63, 94, 0.25);
  --loss-bg: rgba(244, 63, 94, 0.14);

  --neutral-color: #cbd5e1;
  --neutral-bg: rgba(203, 213, 225, 0.12);

  /* Primary Brand Accents (Sunset Amber Gold) */
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.3);
  --primary-bg: rgba(249, 115, 22, 0.14);

  --cyan-accent: #06b6d4;
  --purple-accent: #a855f7;
  --gold-accent: #f59e0b;

  /* Typography (High Contrast Silk Off-White & Crisp Slate - Crystal Clear & Zero Glare) */
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dark: #94a3b8;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Layout */
  --sidebar-width: 270px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-card: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide Browser Number Input Spinners Globally */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ==========================================================================
   THEME SYSTEMS (LIGHT CLEAN & DEEP MIDNIGHT)
   ========================================================================== */

[data-theme="light"] {
  --bg-app: #f4f6fb;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-glass: rgba(255, 255, 255, 0.95);
  --bg-input: #f8fafc;
  --bg-dropdown: #ffffff;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --border-card: rgba(0, 0, 0, 0.09);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dark: #94a3b8;

  --shadow-card: 0 4px 18px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] body {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .logo-text {
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .nav-item {
  color: #475569;
}
[data-theme="light"] .nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .custom-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .custom-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #1e293b;
}

[data-theme="light"] .form-control,
[data-theme="light"] select.form-control,
[data-theme="light"] .currency-select,
[data-theme="light"] .filter-select {
  background-color: #f8fafc;
  border-color: rgba(0, 0, 0, 0.14);
  color: #0f172a;
}

[data-theme="light"] .form-control:focus {
  background-color: #ffffff;
}

[data-theme="light"] .search-input-group {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .search-input-group input {
  color: #0f172a;
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}
[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0;
}

[data-theme="light"] .note-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .note-card-title {
  color: #0f172a;
}
[data-theme="light"] .note-card-body {
  color: #475569;
}
[data-theme="light"] .note-bullet-line {
  color: #1e293b;
}

[data-theme="light"] .notes-control-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .notes-search-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .notes-search-box input {
  color: #0f172a;
}
[data-theme="light"] .notes-priority-pills {
  background: #f1f5f9;
}
[data-theme="light"] .notes-view-switcher {
  background: #f1f5f9;
}
[data-theme="light"] .kanban-column {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .kanban-col-title {
  color: #0f172a;
}
[data-theme="light"] .kanban-col-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .notes-list-table-card {
  background: #ffffff;
}
[data-theme="light"] .notes-compact-table th {
  background: #f8fafc;
  color: #475569;
}
[data-theme="light"] .notes-compact-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal-box {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] .modal-title {
  color: #0f172a;
}
[data-theme="light"] .modal-header,
[data-theme="light"] .modal-footer {
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .badge-tag {
  background: #f1f5f9;
  color: #475569;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="midnight"] {
  --bg-app: #030712;
  --bg-sidebar: #060a17;
  --bg-card: #090e1c;
  --bg-card-hover: #0f172a;
  --bg-card-glass: rgba(9, 14, 28, 0.9);
  --bg-input: #040814;
  --bg-dropdown: #0c1224;

  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-card: rgba(255, 255, 255, 0.06);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dark: #4b5563;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Typography Helpers */
.font-mono { font-family: var(--font-mono); }
.text-profit { color: var(--profit-color) !important; }
.text-loss { color: var(--loss-color) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.font-bold { font-weight: 700; }

/* ==========================================================================
   AUTH SCREEN (LOGIN / REGISTER)
   ========================================================================== */
.auth-screen-overlay {
  position: fixed;
  inset: 0;
  background: #090d16;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.15);
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo-header {
  text-align: center;
  margin-bottom: 26px;
}

.auth-logo-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
  margin-bottom: 12px;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.demo-login-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.demo-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Main Application Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   SIDEBAR (ULTRA-PREMIUM FINTECH TERMINAL NAVIGATION)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #090d16 0%, #05080f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: var(--transition);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #ff6800 0%, #ff8c00 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 104, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -0.4px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo-text span.brand-x {
  color: #ff6800;
  text-shadow: 0 0 14px rgba(255, 104, 0, 0.5);
}

.logo-text span.brand-pro {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.22), rgba(255, 140, 0, 0.1));
  color: #ff8533;
  border: 1px solid rgba(255, 104, 0, 0.4);
  border-radius: 5px;
  margin-left: 3px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.nav-section-title {
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #7d8ea5;
  padding: 15px 12px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.nav-section-title i {
  font-size: 0.85rem;
  opacity: 0.9;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10.5px 13px;
  border-radius: 9px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  box-sizing: border-box;
  width: 100%;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(3px);
}

.nav-item.active {
  color: #ffffff !important;
  background: linear-gradient(90deg, rgba(255, 104, 0, 0.18) 0%, rgba(255, 104, 0, 0.03) 100%) !important;
  border-left: 4px solid #ff6800 !important;
  border-radius: 3px 9px 9px 3px !important;
  box-shadow: inset 0 0 16px rgba(255, 104, 0, 0.08);
  font-weight: 800;
}

.nav-item.active i {
  color: #ff6800 !important;
  filter: drop-shadow(0 0 8px rgba(255, 104, 0, 0.55));
}

.nav-item i {
  font-size: 1.18rem;
  width: 22px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-item:hover i {
  color: #ffffff;
}

/* Sidebar Submenu Dropdown System */
.nav-item-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
}

.nav-item-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
}

.nav-item-parent .nav-parent-label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.nav-item-parent .nav-parent-label span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-arrow {
  font-size: 0.78rem;
  color: #7d8ea5;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-item-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: #ff8533;
}

.nav-submenu {
  display: none;
  flex-direction: column;
  gap: 3px;
  padding: 5px 0 5px 10px;
  margin-left: 18px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  animation: submenuFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-width: calc(100% - 18px);
}

.nav-item-dropdown.open .nav-submenu {
  display: flex;
}

@keyframes submenuFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 7px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.nav-subitem span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.nav-subitem i {
  font-size: 1.05rem;
  width: 18px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-subitem:hover {
  color: #ffffff;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.nav-subitem.active {
  color: #ff8533;
  background: rgba(255, 104, 0, 0.14);
  border-color: rgba(255, 104, 0, 0.25);
  font-weight: 750;
}

.nav-subitem.active {
  color: #ff6800 !important;
  background: rgba(255, 104, 0, 0.14) !important;
  border-color: rgba(255, 104, 0, 0.3) !important;
  box-shadow: 0 0 12px rgba(255, 104, 0, 0.15);
  font-weight: 600;
}

.nav-subitem.active i {
  color: #ff6800 !important;
}

.nav-subitem i {
  font-size: 0.9rem;
  width: 16px;
  min-width: 16px;
  flex-shrink: 0;
  text-align: center;
}

/* User Filter Pills */
.user-filter-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}
.user-filter-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.user-filter-pill.active {
  background: rgba(192, 132, 252, 0.18) !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
  color: #c084fc !important;
  font-weight: 600;
}

/* Selectable Plan Cards for Trader Creation Page */
.plan-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.plan-select-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-select-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(30, 41, 59, 0.75);
  transform: translateY(-2px);
}

.plan-select-card.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.28);
}

.plan-select-card .plan-check-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.15rem;
  color: #6366f1;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-select-card.selected .plan-check-icon {
  opacity: 1;
  transform: scale(1);
}

.plan-select-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-select-price {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ff6800;
  margin-top: 4px;
}

.plan-select-price span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-select-features {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-select-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-select-features li i {
  font-size: 0.8rem;
  color: var(--profit-color);
}

/* Account Preview Box */
.account-preview-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.account-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #6366f1);
}

.admin-preview-card::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.privilege-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.privilege-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.privilege-item i {
  font-size: 1rem;
}

/* Modern Fintech Toggle Switch Component */
.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 21, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: var(--transition);
  margin-bottom: 10px;
}
.toggle-switch-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(15, 21, 38, 0.85);
}
.toggle-switch-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-switch-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle-switch-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.25s;
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.switch-control input:checked + .switch-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}
.switch-control input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Sidebar Footer & User Profile Card */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 12, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 20;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
}

.account-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.account-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(255, 104, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 0.9rem;
  color: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.avatar-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #090d16;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.account-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

/* Compact Luxury Role Pills */
.badge-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.5px;
  border-radius: 5px;
  text-transform: uppercase;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  line-height: 1.2;
}

.badge-super-pill {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.18);
}

.badge-admin-pill {
  background: rgba(192, 132, 252, 0.16);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.badge-trader-pill {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.btn-logout-trigger {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  padding: 0;
  margin-left: 2px;
}

.btn-logout-trigger:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
  transform: scale(1.06);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ==========================================================================
   TOP NAVBAR (ULTRA-MODERN FINTECH TERMINAL HEADER)
   ========================================================================== */
.topbar {
  height: 68px;
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.page-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.topbar-live-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #00E599;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00E599;
  box-shadow: 0 0 8px #00E599;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #00E599; }
  50% { transform: scale(1.35); opacity: 0.7; box-shadow: 0 0 14px #00E599; }
}

.page-title {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Live Fintech Portfolio HUD Widget */
.topbar-fintech-hud {
  background: linear-gradient(135deg, rgba(20, 27, 44, 0.95) 0%, rgba(14, 20, 33, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.topbar-fintech-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6800, #38bdf8, #00E599);
  border-radius: 12px 12px 0 0;
  opacity: 0.8;
}

.hud-item-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hud-item-label {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.6px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-item-label i {
  color: #ff6800;
  font-size: 0.72rem;
}

.hud-item-balance {
  font-size: 0.95rem;
  font-weight: 750;
  color: #f8fafc;
}

.hud-item-pnl {
  font-size: 0.95rem;
  font-weight: 750;
}

.hud-item-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.1);
}

/* Modern Currency Selector Capsule */
.topbar-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(18, 25, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 10px 0 32px;
  height: 38px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.topbar-currency-wrapper:hover,
.topbar-currency-wrapper:focus-within {
  border-color: rgba(255, 104, 0, 0.5);
  box-shadow: 0 0 14px rgba(255, 104, 0, 0.2);
}

.topbar-currency-wrapper .currency-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  color: #ff6800;
  pointer-events: none;
}

.currency-select-modern {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 750;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
  padding-right: 18px;
}

.currency-select-modern option {
  background: #101624;
  color: #ffffff;
}

.topbar-currency-wrapper .currency-chevron {
  position: absolute;
  right: 10px;
  font-size: 0.65rem;
  color: #94a3b8;
  pointer-events: none;
}

/* Topbar Action Buttons */
.btn-topbar-action {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(18, 25, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-topbar-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.btn-logout-subtle:hover {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #f43f5e !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.25) !important;
}

/* High-Impact Topbar CTA Button */
.btn-topbar-cta {
  background: linear-gradient(135deg, #ff6800 0%, #ff8533 100%);
  border: none;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 0 18px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(255, 104, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-topbar-cta:hover {
  box-shadow: 0 6px 22px rgba(255, 104, 0, 0.6);
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-topbar-cta i {
  font-size: 0.95rem;
}

/* Light Mode Overrides for Modern Topbar */
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .page-title {
  color: #0f172a;
}

[data-theme="light"] .topbar-fintech-hud {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .hud-item-balance {
  color: #0f172a;
}

[data-theme="light"] .hud-item-divider {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .topbar-currency-wrapper,
[data-theme="light"] .btn-topbar-action {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}

[data-theme="light"] .currency-select-modern {
  color: #0f172a;
}

[data-theme="light"] .currency-select-modern option {
  background: #ffffff;
  color: #0f172a;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: var(--profit-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--profit-glow);
}

.btn-danger {
  background: var(--loss-color);
  color: #fff;
  box-shadow: 0 4px 15px var(--loss-glow);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-icon:hover {
  color: #fff;
  border-color: var(--border-card);
  background: var(--bg-card-hover);
}

/* CONTENT CONTAINER */
.content-body {
  padding: 28px 32px 48px;
  flex: 1;
}

/* TAB PANELS */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   STAT CARDS GRID
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px -5px rgba(0,0,0,0.5);
}

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

.stat-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.icon-emerald { background: var(--profit-bg); color: var(--profit-color); }
.icon-rose { background: var(--loss-bg); color: var(--loss-color); }
.icon-indigo { background: var(--primary-bg); color: var(--primary); }
.icon-cyan { background: rgba(6, 182, 212, 0.12); color: var(--cyan-accent); }
.icon-gold { background: rgba(245, 158, 11, 0.12); color: var(--gold-accent); }
.icon-purple { background: rgba(168, 85, 247, 0.12); color: var(--purple-accent); }

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.stat-subtext {
  font-size: 0.78rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   CHARTS & SECTIONS
   ========================================================================== */
.charts-grid-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.charts-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
}

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

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title i {
  color: var(--primary);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Win Rate Ring Metric */
.winrate-ring-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 0;
}

.donut-chart-box {
  position: relative;
  width: 160px;
  height: 160px;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-rate {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.donut-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.winrate-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.wb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.wb-dot.green { background: var(--profit-color); }
.wb-dot.red { background: var(--loss-color); }
.wb-dot.gray { background: var(--neutral-color); }

/* ==========================================================================
   DATA TABLE & FILTERS
   ========================================================================== */
.table-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.search-input-group {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-input-group i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
}

.search-input-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 9px 12px 9px 36px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  min-width: 130px;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* Table Container */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.custom-table th {
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  white-space: nowrap;
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: var(--transition);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-long {
  background: var(--profit-bg);
  color: var(--profit-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-short {
  background: var(--loss-bg);
  color: var(--loss-color);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-win {
  background: var(--profit-bg);
  color: var(--profit-color);
  font-weight: 700;
}

.badge-loss {
  background: var(--loss-bg);
  color: var(--loss-color);
  font-weight: 700;
}

.badge-be {
  background: var(--neutral-bg);
  color: var(--neutral-color);
}

.badge-open {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.badge-admin {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-accent);
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-weight: 700;
}

.badge-user {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-accent);
  border: 1px solid rgba(6, 182, 212, 0.4);
  font-weight: 700;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 6px;
}

/* ==========================================================================
   CALENDAR HEATMAP VIEW
   ========================================================================== */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.calendar-month-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.calendar-stats-strip {
  display: flex;
  gap: 20px;
}

.cal-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  padding-bottom: 8px;
}

.calendar-day-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  min-height: 100px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.calendar-day-cell:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.calendar-day-cell.empty-day {
  opacity: 0.2;
  cursor: default;
  background: transparent;
  border-style: dashed;
}
.calendar-day-cell.empty-day:hover {
  transform: none;
  border-color: var(--border-card);
}

.day-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.calendar-day-cell.today .day-number {
  color: var(--primary);
  font-weight: 700;
}

.day-pnl-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  font-family: var(--font-mono);
}

.day-pnl-badge.profit {
  background: var(--profit-bg);
  color: var(--profit-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.day-pnl-badge.loss {
  background: var(--loss-bg);
  color: var(--loss-color);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.day-trades-count {
  font-size: 0.7rem;
  color: var(--text-dark);
  text-align: center;
}

/* ==========================================================================
   POSITION SIZE & RISK CALCULATOR
   ========================================================================== */
/* ==========================================================================
   GLOBAL FORM CONTROLS & INPUT SYSTEM (DARK FINTECH LUXURY)
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-control,
input[type="text"].form-control,
input[type="number"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  background: rgba(12, 17, 32, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.94rem;
  color: #f8fafc;
  font-family: var(--font-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  outline: none;
}

.form-control:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  border-color: #ff6800;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 104, 0, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.form-control::placeholder {
  color: #64748b;
  font-weight: 400;
}

.form-control.font-mono {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.form-control.text-loss {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3);
}

.form-control.text-loss:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-control.text-profit {
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3);
}

.form-control.text-profit:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Custom Range Slider */
input[type="range"].form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  margin: 10px 0;
}

input[type="range"].form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ff7a18, #ff5400);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 104, 0, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"].form-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   TAB 5: POSITION SIZING CALCULATOR TERMINAL
   ========================================================================== */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1080px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}

/* Asset Class Navigation Tabs */
.calc-asset-nav {
  display: inline-flex;
  background: rgba(14, 20, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.calc-asset-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-main);
}

.calc-asset-tab i {
  font-size: 0.95rem;
}

.calc-asset-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.calc-asset-tab.active {
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.2), rgba(255, 104, 0, 0.08)) !important;
  color: #ff6800 !important;
  border-color: rgba(255, 104, 0, 0.4) !important;
  box-shadow: 0 0 16px rgba(255, 104, 0, 0.25);
  font-weight: 700;
}

/* Direction Selector Pills */
.calc-direction-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-direction-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 35, 0.7);
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.calc-direction-btn i {
  font-size: 1.1rem;
}

.calc-direction-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.calc-direction-btn[data-dir="Long"].active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.06)) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}

.calc-direction-btn[data-dir="Short"].active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.06)) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.25);
}

/* Mode Switcher Pill (% vs Fixed) */
.calc-mode-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.calc-mode-pill {
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-mode-pill.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Risk Presets & Indian FNO Lot Pills */
.risk-preset-btn,
.calc-lot-btn,
.fno-lot-btn,
.calc-asset-chip {
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 20, 35, 0.8);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.risk-preset-btn:hover,
.calc-lot-btn:hover,
.fno-lot-btn:hover,
.calc-asset-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.risk-preset-btn.active {
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.22), rgba(255, 104, 0, 0.08)) !important;
  border-color: #ff6800 !important;
  color: #ff8533 !important;
  box-shadow: 0 0 10px rgba(255, 104, 0, 0.25);
}

.calc-asset-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.08)) !important;
  border-color: #38bdf8 !important;
  color: #e0f2fe !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.calc-exchange-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.calc-exchange-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 20, 35, 0.75);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  position: relative;
}

.calc-exchange-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.calc-exchange-btn.active {
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.16), rgba(15, 23, 42, 0.95)) !important;
  border-color: #ff6800 !important;
  box-shadow: 0 0 18px rgba(255, 104, 0, 0.25);
}

.calc-exchange-btn .ex-name {
  font-size: 0.82rem;
  font-weight: 750;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-exchange-btn.active .ex-name {
  color: #ff8533;
}

.calc-exchange-btn .ex-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.calc-live-price-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 20, 35, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.calc-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: calcPulse 1.8s infinite;
  display: inline-block;
}

@keyframes calcPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.calc-lot-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.calc-lot-btn.active,
.fno-lot-btn.active {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: #818cf8 !important;
  color: #c7d2fe !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* Hero Recommended Sizing Box */
.calc-hero-stat {
  background: linear-gradient(135deg, rgba(26, 36, 58, 0.95), rgba(15, 21, 38, 0.98));
  border: 1.5px solid rgba(255, 104, 0, 0.4);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.calc-hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6800, #ff8c00, #fbbf24);
}

.calc-hero-stat::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 104, 0, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.calc-hero-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ff6800;
  text-transform: uppercase;
}

.calc-hero-value {
  font-size: 2.35rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #ffffff;
  line-height: 1.15;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.calc-hero-sub {
  font-size: 0.84rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* 4-Box Metric Grid */
.calc-stats-quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calc-stat-box {
  background: rgba(14, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-stat-label {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-stat-val {
  font-size: 1.22rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f8fafc;
  margin: 2px 0;
}

.calc-stat-sub {
  font-size: 0.74rem;
  color: #64748b;
}

/* Risk Guardrail Meter */
.risk-guardrail-box {
  background: rgba(14, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.risk-meter-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 6px;
}

.risk-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

/* Visual Risk-to-Reward Segmented Bar */
.calc-rr-visual-container {
  background: rgba(14, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
}

.calc-rr-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.calc-rr-bar-risk {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.calc-rr-bar-reward {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* Multi-Tier Take Profit Table */
.rr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.rr-table th {
  padding: 8px 12px;
  background: rgba(10, 15, 28, 0.9);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.rr-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.rr-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Partial Scale-Out Strategy Box */
.partial-scale-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px dashed rgba(99, 102, 241, 0.28);
  border-radius: 10px;
  padding: 12px 14px;
}

.partial-scale-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .partial-scale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.partial-scale-item {
  background: rgba(14, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partial-scale-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.partial-scale-val {
  font-size: 0.88rem;
  font-weight: 800;
}

/* ==========================================================================
   PLAYBOOK & CHECKLIST
   ========================================================================== */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.rule-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.rule-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rule-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.rule-text {
  font-size: 0.92rem;
}

.rule-item.completed .rule-text {
  text-decoration: line-through;
  color: var(--text-dark);
}

/* ==========================================================================
   MODAL WINDOWS & POPUPS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1050;
  padding: 40px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-box {
  background: #141b2c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  margin: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.9);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.modal-box.note-modal-box,
#noteModal .modal-box {
  max-width: 1100px !important;
  width: 95% !important;
}

.modal-box.article-reader-box,
#articleReaderModal .modal-box {
  max-width: 1040px !important;
  width: 95% !important;
}

.modal-box form {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101624;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 750;
  color: #ffffff;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  max-height: calc(88vh - 140px);
  width: 100%;
  box-sizing: border-box;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #101624;
  flex-shrink: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.form-control, input, select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Dropzone Upload */
.image-upload-box {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.15);
}

.image-upload-box:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.upload-preview-img {
  max-width: 100%;
  max-height: 140px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  object-fit: cover;
}

/* TOAST NOTIFICATION */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success { border-left: 4px solid var(--profit-color); }
.toast.toast-error { border-left: 4px solid var(--loss-color); }
.toast.toast-info { border-left: 4px solid var(--primary); }

/* LIGHTBOX */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}
.lightbox-modal.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* ==========================================================================
   IMPORTANT NOTES & TRADING DISCIPLINE HUB (ULTRA-PREMIUM REDESIGN)
   ========================================================================== */

/* Hero Header Strip */
.notes-header-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.notes-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notes-main-heading {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* View Mode Switcher */
.notes-view-switcher {
  display: inline-flex;
  background: #111319;
  border: 1px solid #232734;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.note-view-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.note-view-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.note-view-btn.active {
  background: #1c1e28;
  color: #ff6800;
  border-color: rgba(255, 104, 0, 0.35);
  box-shadow: 0 0 12px rgba(255, 104, 0, 0.15);
}

.topbar-stats-pill {
  background: #161820;
  border: 1px solid #232734;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stats-sep {
  margin: 0 8px;
  color: #2a2e3d;
}

.glow-btn {
  box-shadow: 0 4px 14px rgba(255, 104, 0, 0.35);
  font-weight: 700;
  border-radius: 10px;
}
.glow-btn:hover {
  box-shadow: 0 6px 20px rgba(255, 104, 0, 0.5);
}

/* ==========================================================================
   KPI SUMMARY CARDS
   ========================================================================== */
.notes-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.note-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.note-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.note-kpi-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-kpi-total::before { background: linear-gradient(90deg, #f97316, #ea580c); }
.card-kpi-high::before { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.card-kpi-medium::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.card-kpi-low::before { background: linear-gradient(90deg, #10b981, #059669); }
.card-kpi-pin::before { background: linear-gradient(90deg, #f59e0b, #f97316); }

.card-kpi-high {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.04) 0%, var(--bg-card) 60%);
}
.card-kpi-medium {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-card) 60%);
}
.card-kpi-low {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, var(--bg-card) 60%);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #cbd5e1;
}

.kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.kpi-val {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #ffffff;
}

.kpi-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-high { background: #f43f5e; }
.bar-medium { background: #f59e0b; }
.bar-low { background: #10b981; }
.bar-pin { background: var(--primary); }

.kpi-foot {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   UNIFIED CONTROL TOOLBAR
   ========================================================================== */
.notes-control-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.notes-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 38px;
  transition: var(--transition);
}

.notes-search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

.notes-search-box i {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.notes-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  width: 100%;
}

.notes-priority-pills {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.note-priority-pill {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.note-priority-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.note-priority-pill.active {
  background: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.5);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

.note-priority-pill.pill-high.active {
  background: rgba(244, 63, 94, 0.22);
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.note-priority-pill.pill-medium.active {
  background: rgba(245, 158, 11, 0.22);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.note-priority-pill.pill-low.active {
  background: rgba(16, 185, 129, 0.22);
  color: #bbf7d0;
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.notes-cat-filter select {
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: #f1f5f9;
  padding: 0 14px;
  font-size: 0.86rem;
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   GRID CARDS VIEW
   ========================================================================== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 22px;
}

.note-card {
  background: linear-gradient(180deg, #182238 0%, #131b2c 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.note-card:hover {
  background: linear-gradient(180deg, #1d2943 0%, #172136 100%);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px -6px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.24);
}

/* Priority Card Accents */
.note-card-high {
  border-top: 3px solid #f43f5e;
}
.note-card-high:hover {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 16px 36px -6px rgba(244, 63, 94, 0.22), 0 0 20px rgba(244, 63, 94, 0.08);
}

.note-card-medium {
  border-top: 3px solid #f59e0b;
}
.note-card-medium:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 16px 36px -6px rgba(245, 158, 11, 0.2);
}

.note-card-low {
  border-top: 3px solid #10b981;
}
.note-card-low:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 16px 36px -6px rgba(16, 185, 129, 0.2);
}

/* Priority Badges & Pulsing Dots */
.prio-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.prio-pulse-dot.high { background: #f43f5e; box-shadow: 0 0 8px #f43f5e; animation: prioPulse 1.8s infinite; }
.prio-pulse-dot.medium { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.prio-pulse-dot.low { background: #10b981; box-shadow: 0 0 8px #10b981; }

@keyframes prioPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #f43f5e; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.badge-priority-high {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.5);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.badge-priority-medium {
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.badge-priority-low {
  background: rgba(16, 185, 129, 0.2);
  color: #bbf7d0;
  border: 1px solid rgba(16, 185, 129, 0.5);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.badge-pinned {
  background: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.55);
  font-weight: 800;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
}

.badge-tag {
  background: #1e283c;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 600;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Card Header */
.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.note-header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-card-actions .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.88rem;
}
.note-card-actions .btn-icon:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.note-pin-btn.pinned-active {
  color: #fb923c !important;
  background: rgba(249, 115, 22, 0.2) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
}

.note-card-title {
  font-size: 1.18rem;
  font-weight: 750;
  color: #ffffff !important;
  line-height: 1.42;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.note-card-body {
  font-size: 0.94rem;
  color: #f1f5f9 !important;
  line-height: 1.72;
  flex: 1;
  margin-bottom: 18px;
}

.note-card-body p {
  color: #f1f5f9 !important;
  margin-bottom: 8px;
  line-height: 1.72;
}

.note-card-body strong, 
.note-card-body b {
  color: #ffffff !important;
  font-weight: 700;
}

.note-para {
  margin-bottom: 8px;
  color: #f1f5f9;
}

.note-bullet-line {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #f1f5f9 !important;
  font-size: 0.93rem;
  line-height: 1.65;
}

.bullet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
  flex-shrink: 0;
  margin-top: 7px;
}

.bullet-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.25);
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.note-timestamp {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.note-priority-subtext {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.note-priority-subtext.high { color: #fda4af; }
.note-priority-subtext.medium { color: #fde68a; }
.note-priority-subtext.low { color: #86efac; }

/* ==========================================================================
   KANBAN BOARD VIEW
   ========================================================================== */
.notes-kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.kanban-column {
  background: rgba(21, 28, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.kanban-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-col-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.kanban-count-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.kanban-count-badge.high { background: rgba(244, 63, 94, 0.25); color: #fecdd3; border: 1px solid rgba(244, 63, 94, 0.4); }
.kanban-count-badge.medium { background: rgba(245, 158, 11, 0.25); color: #fef08a; border: 1px solid rgba(245, 158, 11, 0.4); }
.kanban-count-badge.low { background: rgba(16, 185, 129, 0.25); color: #bbf7d0; border: 1px solid rgba(16, 185, 129, 0.4); }

.kanban-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.kanban-empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 0.88rem;
  padding: 40px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   COMPACT LIST VIEW
   ========================================================================== */
.notes-list-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

.notes-compact-table {
  width: 100%;
  border-collapse: collapse;
}

.notes-compact-table th {
  background: #121826;
  padding: 14px 18px;
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 750;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.notes-compact-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
  color: #f1f5f9;
  font-size: 0.92rem;
}

.list-row {
  transition: background 0.18s ease;
}

.list-row:hover {
  background: #1c263c;
}

.row-pinned {
  background: rgba(249, 115, 22, 0.05);
}

/* Empty Notes State */
.empty-notes-card {
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  padding: 70px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.empty-notes-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.15));
  border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
  box-shadow: 0 0 25px var(--primary-glow);
}

/* ==========================================================================
   MICROSOFT OFFICE / WORD STYLE RICH TEXT EDITOR & CALLOUTS
   ========================================================================== */
.office-doc-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.1));
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Modal Priority Selector */
.modal-priority-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.modal-priority-opt {
  background: #131926;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f1f5f9;
  outline: none;
}

.modal-priority-opt:hover {
  background: #1a2233;
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.opt-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.bubble-high { background: rgba(244, 63, 94, 0.2); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.45); }
.bubble-medium { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.45); }
.bubble-low { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }

.opt-text-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.opt-title {
  font-size: 0.94rem;
  font-weight: 750;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 2px;
}

.opt-sub {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}

.modal-priority-opt.selected.opt-high {
  background: rgba(244, 63, 94, 0.16) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
}

.modal-priority-opt.selected.opt-medium {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.modal-priority-opt.selected.opt-low {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.pin-toggle-chip {
  background: #131926;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.pin-toggle-chip:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.45);
}

.office-editor-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #111726;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}
.office-editor-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

.office-ribbon-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #141c2c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.ribbon-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ribbon-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 5px;
}

.ribbon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}
.ribbon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}
.ribbon-btn:active {
  transform: scale(0.95);
}

.ribbon-pill-btn {
  width: auto;
  padding: 0 10px;
  height: 32px;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ribbon-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ribbon-select {
  height: 32px;
  background: #182238;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #f8fafc;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.ribbon-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.ribbon-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: #182238;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: none;
  margin-top: 4px;
}
.ribbon-dropdown-menu.show {
  display: block;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.color-dot:hover {
  transform: scale(1.2);
}

.office-editor-sheet {
  min-height: 290px;
  max-height: 460px;
  overflow-y: auto;
  padding: 20px 24px;
  outline: none;
  font-size: 0.98rem;
  line-height: 1.78;
  color: #f1f5f9;
  background: #0c121e;
  font-family: var(--font-main);
}
.office-editor-sheet:empty:before {
  content: attr(placeholder);
  color: #94a3b8;
  pointer-events: none;
}
.office-editor-sheet p {
  margin-bottom: 10px;
  color: #f1f5f9;
}
.office-editor-sheet h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 16px 0 8px;
  color: #ffffff;
}
.office-editor-sheet h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 14px 0 6px;
  color: #ffffff;
}
.office-editor-sheet h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 12px 0 4px;
  color: #38bdf8;
}
.office-editor-sheet ul, .office-editor-sheet ol {
  padding-left: 24px;
  margin-bottom: 10px;
  color: #f1f5f9;
}
.office-editor-sheet li {
  margin-bottom: 5px;
  color: #f1f5f9;
}

.office-editor-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #141c2c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #cbd5e1;
}
.office-editor-statusbar kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

/* ==========================================================================
   SMART CALLOUT BLOCKS & CHECKLIST ITEMS (EDITOR & CARDS)
   ========================================================================== */
.editor-callout {
  padding: 14px 18px;
  border-radius: 12px;
  margin: 14px 0;
  border: 1px solid transparent;
}
.callout-title {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.callout-body {
  font-size: 0.94rem;
  line-height: 1.65;
  font-weight: 450;
}

.callout-danger {
  background: rgba(244, 63, 94, 0.18) !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
  border-left: 5px solid #f43f5e !important;
}
.callout-danger .callout-title { color: #fda4af !important; font-weight: 800; }
.callout-danger .callout-body,
.callout-danger .callout-body *,
.callout-danger p,
.callout-danger strong { color: #ffffff !important; }

.callout-warning {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  border-left: 5px solid #f59e0b !important;
}
.callout-warning .callout-title { color: #fde68a !important; font-weight: 800; }
.callout-warning .callout-body,
.callout-warning .callout-body *,
.callout-warning p,
.callout-warning strong { color: #ffffff !important; }

.callout-target {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  border-left: 5px solid #10b981 !important;
}
.callout-target .callout-title { color: #6ee7b7 !important; font-weight: 800; }
.callout-target .callout-body,
.callout-target .callout-body *,
.callout-target p,
.callout-target strong { color: #ffffff !important; }

.editor-code-snippet {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #7dd3fc !important;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}

.note-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  font-size: 0.93rem;
  color: #f1f5f9;
  line-height: 1.6;
}
.note-todo-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 3px;
  cursor: pointer;
  flex-shrink: 0;
}
.note-todo-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  opacity: 0.55;
  color: #94a3b8;
}

/* ==========================================================================
   ARTICLE & LESSON RICH FORMATTING (BLOCKQUOTES, TABLES, HEADINGS, DIVIDERS)
   ========================================================================== */
.rich-content-view h1,
.rich-content-view h2,
.rich-content-view h3 {
  color: #38bdf8 !important;
  font-weight: 700;
  font-size: 1.06rem;
  margin-top: 14px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.rich-content-view h4,
.rich-content-view h5,
.rich-content-view h6 {
  color: #a5b4fc !important;
  font-weight: 700;
  font-size: 0.96rem;
  margin-top: 10px;
  margin-bottom: 4px;
}

.rich-content-view code {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #7dd3fc !important;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.editor-quote,
.rich-content-view blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(249, 115, 22, 0.12);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #ffedd5 !important;
  margin: 14px 0;
  font-size: 0.94rem;
  line-height: 1.65;
}
.editor-quote p,
.rich-content-view blockquote p {
  margin: 0;
  color: #ffedd5 !important;
}

.editor-table,
.rich-content-view table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.88rem;
}
.editor-table th,
.rich-content-view th {
  background: #1a2336;
  color: #ffffff;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  text-align: left;
}
.editor-table td,
.rich-content-view td {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.editor-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  margin: 18px 0;
}

.editor-image-wrap {
  margin: 14px 0;
  text-align: center;
}
.editor-img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.editor-caption {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin-top: 6px;
  font-style: italic;
}

/* Reading Time Pill & Clickable Title */
.reading-time-pill {
  font-size: 0.74rem;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.clickable-title {
  cursor: pointer;
  transition: color 0.2s ease;
}
.clickable-title:hover {
  color: #fb923c !important;
}

.clamped-article-preview {
  max-height: 200px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.read-more-wrapper {
  margin-top: -6px;
  margin-bottom: 14px;
}
.btn-read-more {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(234, 88, 12, 0.15));
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fed7aa;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.15);
}
.btn-read-more:hover {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.45);
}

/* Fullscreen Editor Canvas */
.modal-box.fullscreen-editor {
  max-width: 96vw !important;
  width: 96vw !important;
  height: 94vh !important;
  display: flex;
  flex-direction: column;
}
.fullscreen-editor .modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fullscreen-editor .office-editor-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fullscreen-editor .office-editor-sheet {
  flex: 1;
  min-height: 50vh !important;
  max-height: 55vh !important;
  font-size: 1.05rem;
  line-height: 1.8;
  padding: 24px 30px;
}

/* Article Reader Modal */
.article-reader-box {
  background: #111726;
  border: 1px solid #2d3b52;
  border-radius: 20px;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.9);
}
.reader-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.reader-meta-bar {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.article-reader-content {
  font-size: 1.06rem;
  line-height: 1.85;
  color: #f1f5f9;
}
.article-reader-content h1,
.article-reader-content h2,
.article-reader-content h3 {
  color: #38bdf8;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 12px;
}
.article-reader-content h4,
.article-reader-content h5 {
  color: #a5b4fc;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 8px;
}
.article-reader-content strong,
.article-reader-content b {
  color: #ffffff;
  font-weight: 700;
}
.article-reader-content p {
  margin-bottom: 14px;
  color: #f1f5f9;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES & HIGH CONTRAST REFINEMENTS
   ========================================================================== */
[data-theme="light"] .notes-main-heading {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  color: #0f172a;
}

[data-theme="light"] .office-editor-wrapper {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .office-ribbon-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ribbon-btn {
  color: #475569;
}
[data-theme="light"] .ribbon-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .ribbon-pill-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ribbon-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

[data-theme="light"] .office-editor-sheet {
  color: #0f172a;
  background: #ffffff;
}

[data-theme="light"] .office-editor-statusbar {
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .callout-danger .callout-body { color: #9f1239; }
[data-theme="light"] .callout-warning .callout-body { color: #92400e; }
[data-theme="light"] .callout-target .callout-body { color: #065f46; }

[data-theme="light"] .pin-toggle-chip {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .modal-priority-opt {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .modal-priority-opt strong {
  color: #0f172a;
}
[data-theme="light"] .modal-priority-opt:hover {
  background: #f1f5f9;
}

[data-theme="light"] .note-kpi-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .note-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .note-card-title {
  color: #0f172a;
}
[data-theme="light"] .note-card-body {
  color: #334155;
}

[data-theme="light"] .kanban-column {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .kanban-col-title {
  color: #0f172a;
}

@media (max-width: 1200px) {
  .notes-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .notes-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .notes-kanban-board {
    grid-template-columns: 1fr;
  }
  .notes-control-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .modal-priority-selector {
    grid-template-columns: 1fr;
  }
  .notes-priority-pills {
    width: 100%;
    justify-content: space-between;
  }
  .note-priority-pill {
    flex: 1;
    justify-content: center;
  }
  .trade-hud-bar {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .hud-stats-cluster {
    width: 100%;
    justify-content: space-between !important;
  }
}

/* ==========================================================================
   ULTRA-MODERN FINTECH TRADE MODAL WORKSTATION
   ========================================================================== */
.modal-box.trade-modal-box,
#tradeModal .modal-box {
  max-width: 1040px !important;
  width: 95% !important;
  background: #111624 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.95), 0 0 1px 1px rgba(255, 255, 255, 0.05) inset !important;
  border-radius: 18px !important;
}

.trade-modal-header {
  padding: 18px 24px;
  background: linear-gradient(180deg, #161e31 0%, #111624 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.2) 0%, rgba(99, 102, 241, 0.25) 100%);
  border: 1px solid rgba(255, 104, 0, 0.4);
  color: #ff7a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 16px rgba(255, 104, 0, 0.2);
}

.btn-sync-calc-header {
  background: rgba(255, 104, 0, 0.14);
  border: 1px solid rgba(255, 104, 0, 0.35);
  color: #ff8533;
  font-weight: 750;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-sync-calc-header:hover {
  background: rgba(255, 104, 0, 0.25);
  border-color: #ff6800;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 104, 0, 0.3);
}

.trade-modal-header .modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.trade-modal-header .modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.trade-modal-body {
  padding: 20px 24px;
  gap: 16px;
  display: flex;
  flex-direction: column;
}

/* Glassmorphic Fintech HUD Bar */
.trade-hud-bar {
  background: linear-gradient(135deg, rgba(22, 30, 49, 0.92) 0%, rgba(16, 23, 38, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 4px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 1.4fr 2.4fr 1fr;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.trade-hud-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6800, #38bdf8, #00E599);
  opacity: 0.9;
}

.hud-main-pnl .hud-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.hud-main-pnl .hud-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hud-sub-dual-val {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 650;
  margin-top: 3px;
}

.text-cyan-accent {
  color: #38bdf8 !important;
}

.hud-stats-cluster {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(10, 14, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 12px;
  gap: 8px;
}

.hud-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.hud-stat-label {
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.6px;
  color: #818cf8;
  margin-bottom: 2px;
}

.hud-stat-val {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.1;
}

.hud-stat-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 1px;
}

.hud-rr-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.hud-rr-cluster .hud-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.hud-rr-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-rr-badge.rr-win {
  background: rgba(0, 229, 153, 0.12);
  border-color: rgba(0, 229, 153, 0.35);
  color: #00E599;
  box-shadow: 0 0 12px rgba(0, 229, 153, 0.2);
}

.hud-rr-badge.rr-loss {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

.hud-rr-badge.rr-planned {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* Trade Form Sections */
.trade-form-section {
  background: rgba(20, 28, 44, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.2s ease;
}

.trade-form-section:focus-within {
  border-color: rgba(255, 104, 0, 0.3);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.section-badge-header {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.section-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 6px;
}

.section-badge-title i {
  color: #ff6800;
  font-size: 0.85rem;
}

/* Tactile Direction Switcher */
.direction-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
}

.dir-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dir-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.dir-btn.dir-long.active {
  background: rgba(0, 229, 153, 0.14);
  color: #00E599;
  border-color: rgba(0, 229, 153, 0.45);
  box-shadow: 0 0 14px rgba(0, 229, 153, 0.25);
}

.dir-btn.dir-short.active {
  background: rgba(244, 63, 94, 0.14);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.25);
}

/* Tactile Status Switcher */
.status-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
}

.status-toggle-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.status-toggle-btn.active {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

#btnStatusClosed.active {
  background: rgba(129, 140, 248, 0.14);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.2);
}

/* Quick RR Calculator Pills */
.label-with-addon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.quick-rr-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pill-rr-calc {
  background: rgba(0, 229, 153, 0.1);
  border: 1px solid rgba(0, 229, 153, 0.25);
  color: #00E599;
  font-size: 0.72rem;
  font-weight: 750;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-rr-calc:hover {
  background: rgba(0, 229, 153, 0.25);
  border-color: #00E599;
  box-shadow: 0 0 8px rgba(0, 229, 153, 0.35);
  transform: translateY(-1px);
}

/* Quick Asset Presets Row */
.quick-asset-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(10, 14, 23, 0.65);
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.quick-asset-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.quick-asset-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-asset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 750;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-asset-chip:hover {
  background: rgba(255, 104, 0, 0.18);
  border-color: #ff6800;
  color: #ffffff;
  transform: translateY(-1px);
}

.pill-asset-chip.active {
  background: rgba(255, 104, 0, 0.25);
  border-color: #ff6800;
  color: #ff8533;
  box-shadow: 0 0 10px rgba(255, 104, 0, 0.35);
}

/* Quick Risk Sizing Chips */
.quick-risk-sizing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(10, 14, 23, 0.65);
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.quick-risk-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.quick-risk-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-risk-calc {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.74rem;
  font-weight: 750;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-risk-calc:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: #818cf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.pill-calc-fee {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
}

.pill-calc-fee:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
  color: #ffffff;
}

.section-header-hint {
  font-size: 0.72rem;
  color: #7888a3;
  font-weight: 600;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Modern Visual Upload Zones */
.modern-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(13, 18, 28, 0.5);
  position: relative;
  overflow: hidden;
}

.modern-upload-zone:hover {
  border-color: #ff6800;
  background: rgba(255, 104, 0, 0.04);
  box-shadow: 0 0 18px rgba(255, 104, 0, 0.12);
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.upload-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 104, 0, 0.12);
  color: #ff6800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.upload-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

.upload-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modern-upload-zone .upload-preview-img {
  max-height: 120px;
  width: auto;
  margin: 10px auto 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Modal Footer & Buttons */
.trade-modal-footer {
  padding: 16px 24px;
  background: #111624;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-save-trade {
  background: linear-gradient(135deg, #ff6800 0%, #ff8533 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 750 !important;
  padding: 10px 24px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 18px rgba(255, 104, 0, 0.4) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
}

.btn-save-trade:hover {
  box-shadow: 0 6px 24px rgba(255, 104, 0, 0.6) !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   TRADE DETAILS COMPREHENSIVE VIEW MODAL STYLING
   ========================================================================== */
.trade-details-modal-box {
  max-width: 980px !important;
  width: 95% !important;
  max-height: 90vh !important;
  height: auto !important;
  background: linear-gradient(180deg, #131929 0%, #0d121e 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.95), 0 0 40px rgba(0, 210, 255, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}

.trade-details-modal-header {
  padding: 16px 24px !important;
  background: #111728 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

.trade-details-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trade-details-modal-title-wrap .modal-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-details-sub-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-details-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-details-modal-body {
  padding: 24px 28px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Custom Scrollbar for Details Body */
.trade-details-modal-body::-webkit-scrollbar {
  width: 6px;
}
.trade-details-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Hero Banner */
.td-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.td-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}
.td-hero-banner.status-win::before { background: var(--profit-color); box-shadow: 0 0 12px var(--profit-color); }
.td-hero-banner.status-loss::before { background: var(--loss-color); box-shadow: 0 0 12px var(--loss-color); }
.td-hero-banner.status-be::before { background: #94a3b8; }
.td-hero-banner.status-open::before { background: var(--primary); box-shadow: 0 0 12px var(--primary); }

.td-symbol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.td-symbol-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.td-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.td-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.td-pnl-card {
  text-align: right;
  min-width: 170px;
}

.td-pnl-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
}

.td-pnl-sub {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Metrics Grid (6 Cards) */
.td-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.td-metric-card {
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.td-metric-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

.td-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.td-metric-val {
  font-size: 1.12rem;
  font-weight: 750;
  font-family: 'JetBrains Mono', monospace;
  color: #f1f5f9;
}

.td-metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Context & Strategy Grid (3 Cards) */
.td-context-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.td-context-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
}

.td-context-card .td-context-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.td-context-card .td-context-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

/* Confluences, Mistakes, Notes */
.td-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.td-confluence-pill {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.td-mistake-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
}

.td-mistake-box .td-mistake-header {
  color: #fb7185;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.td-mistake-content {
  color: #fecdd3;
  font-size: 0.88rem;
  line-height: 1.5;
}

.td-notes-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 18px;
}

.td-notes-box .td-notes-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.td-notes-content {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Chart Visualizer & Gallery */
.td-charts-wrapper {
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}

.td-charts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.td-charts-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.td-chart-tabs {
  display: flex;
  gap: 6px;
}

.td-chart-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.td-chart-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.td-chart-display-container {
  position: relative;
  background: #070a10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  min-height: 260px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.td-chart-main-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  cursor: zoom-in;
  display: block;
}

.td-chart-overlay-bar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.td-chart-overlay-bar button {
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.td-chart-overlay-bar button:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.td-empty-chart {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Modal Footer */
.trade-details-modal-footer {
  padding: 14px 24px !important;
  background: rgba(18, 24, 38, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.td-footer-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.td-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .td-metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .td-context-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .td-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .td-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .td-pnl-card {
    text-align: left;
  }
  .td-pnl-sub {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   TRADES LOGBOOK: EXECUTIVE FINTECH TERMINAL REDESIGN
   ========================================================================== */

/* Hero Header Strip */
.trades-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.trades-title-badge {
  font-size: 0.72rem;
  font-weight: 750;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.trades-title-main {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0;
}

.trades-title-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.trades-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Executive Trades KPI HUD */
.trades-kpi-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.trade-kpi-card {
  background: linear-gradient(135deg, rgba(20, 27, 44, 0.85) 0%, rgba(13, 18, 30, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.trade-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.trade-kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
}

.trade-kpi-label {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.trade-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.trade-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Control Center & Pro Filter Toolbar */
.trades-filter-container {
  background: linear-gradient(180deg, rgba(18, 25, 40, 0.92) 0%, rgba(12, 17, 28, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.trades-filter-top-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.trades-search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.trades-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
  pointer-events: none;
}

.trades-search-input {
  width: 100%;
  background: #0b0f19 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 9px 36px 9px 40px !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.trades-search-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
  background: #0e1422 !important;
}

.trades-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.trades-search-clear:hover { color: #f43f5e; }

/* Quick Filter Chips */
.trades-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.quick-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateY(-1px);
}

.quick-chip.active {
  background: #ff6800;
  border-color: #ff6800;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 104, 0, 0.4);
}

.quick-chip.chip-win.active {
  background: var(--profit-color);
  border-color: var(--profit-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.quick-chip.chip-loss.active {
  background: var(--loss-color);
  border-color: var(--loss-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

.quick-chip.chip-open.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.quick-chip.chip-long.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--profit-color);
  color: #6ee7b7;
}

.quick-chip.chip-short.active {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--loss-color);
  color: #fda4af;
}

/* Horizontal Grid of Dropdown Selectors */
.trades-filter-dropdowns-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr) auto;
  gap: 10px;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.trades-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trades-filter-field label {
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-select-pro {
  width: 100% !important;
  background: #0b0f19 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
  height: 35px !important;
}

.filter-select-pro:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) !important;
}

.btn-reset-pro {
  padding: 0 14px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  height: 35px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}

.btn-reset-pro:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
  color: #fecdd3 !important;
}

/* Pro Table Card */
.trades-table-card {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.9) 0%, rgba(12, 17, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 20px;
}

.trades-pro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.trades-pro-table thead th {
  background: rgba(9, 13, 22, 0.9) !important;
  color: #64748b !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 13px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.trades-pro-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.trades-pro-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035) !important;
}

.trades-pro-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
}

/* Light Theme Overrides */
[data-theme="light"] .trade-kpi-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .trade-kpi-value {
  color: #0f172a;
}
[data-theme="light"] .trades-title-main {
  color: #0f172a;
}
[data-theme="light"] .trades-filter-container,
[data-theme="light"] .trades-table-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .trades-search-input,
[data-theme="light"] .filter-select-pro {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="light"] .trades-pro-table thead th {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Responsive Grid for Filter Dropdowns */
@media (max-width: 1200px) {
  .trades-filter-dropdowns-row {
    grid-template-columns: repeat(3, 1fr) repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .trades-kpi-hud {
    grid-template-columns: repeat(2, 1fr);
  }
  .trades-filter-dropdowns-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .trades-kpi-hud {
    grid-template-columns: 1fr;
  }
  .trades-filter-dropdowns-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SUBSCRIPTION & SAAS PRICING MATRIX STYLES
   ========================================================================== */
.subscription-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.subscription-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
}

.sub-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sub-hero-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.sub-hero-plan-tag {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.8px;
  color: #94a3b8;
  text-transform: uppercase;
}

.sub-hero-plan-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 4px 0;
}

.sub-hero-plan-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.sub-hero-quota-box {
  flex: 1;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
}

.sub-quota-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.sub-quota-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3-Tier SaaS Pricing Matrix */
.pricing-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.pricing-card {
  background: linear-gradient(180deg, rgba(20, 27, 45, 0.7) 0%, rgba(12, 17, 28, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.featured-pricing-card {
  background: linear-gradient(180deg, rgba(30, 41, 69, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid #6366f1;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.22);
}

.pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.pricing-card-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.pricing-card-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.pricing-card-price {
  font-size: 2.2rem;
  font-weight: 850;
  font-family: var(--font-mono);
  color: #ffffff;
  margin-bottom: 6px;
}

.pricing-period {
  font-size: 0.88rem;
  font-weight: 500;
  color: #94a3b8;
}

.pricing-card-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.pricing-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex: 1;
}

.pricing-features-list li {
  font-size: 0.85rem;
  color: #e2e8f0;
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features-list li.disabled {
  color: #64748b;
  text-decoration: line-through;
}

@media (max-width: 960px) {
  .subscription-hero-card {
    flex-direction: column;
    align-items: stretch;
  }
  .sub-hero-quota-box {
    max-width: 100%;
  }
  .pricing-matrix-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SUPER ADMIN CONTROL HUB & SYSTEM UPDATER
   ========================================================================== */
.patch-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  background: rgba(15, 21, 38, 0.6);
  border-radius: var(--radius-lg);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.patch-dropzone:hover,
.patch-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.15);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #38bdf8;
  margin-bottom: 14px;
  transition: transform 0.2s ease;
}

.patch-dropzone:hover .dropzone-icon {
  transform: scale(1.1);
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 18px;
}

.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.subtab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

@media (max-width: 900px) {
  #tab-system_update .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 600px) {
  #tab-system_update .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   SCALPING & PARTIAL TAKE-PROFIT SCALE-OUT ENGINE (LOG TRADE MODAL)
   ========================================================================== */
.tf-pills-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tf-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tf-pill-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.tf-pill-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.1));
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.setup-chips-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.setup-chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.setup-chip-btn:hover {
  background: rgba(255, 104, 0, 0.1);
  border-color: rgba(255, 104, 0, 0.3);
  color: #ff8533;
}

.setup-chip-btn.active {
  background: rgba(255, 104, 0, 0.18);
  border-color: #ff6800;
  color: #ff8533;
  font-weight: 700;
}

.partial-box-card {
  background: rgba(14, 20, 35, 0.85);
  border: 1px solid rgba(255, 104, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.partial-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 750;
  color: #ff8533;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.partial-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.partial-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partial-metric-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.partial-metric-value {
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.discipline-toggle-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.discipline-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.discipline-btn.rule-yes.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.discipline-btn.rule-no.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.discipline-btn.rule-partial.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.breakeven-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.breakeven-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

@media (max-width: 768px) {
  .partial-metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   INSTITUTIONAL LOTS / CONTRACTS SIZING & BROKERAGE FEE BREAKDOWN ENGINE
   ========================================================================== */
.lot-sizing-card {
  background: rgba(13, 18, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sizing-mode-tabs {
  display: inline-flex;
  background: #090d16;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 4px;
}

.sizing-mode-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sizing-mode-tab:hover {
  color: #f1f5f9;
}

/* ==========================================================================
   PIXEL-PERFECT ALIGNMENT & PREMIUM FINTECH DESIGN SYSTEM FOR MODALS
   ========================================================================== */

.trade-form-section {
  background: rgba(14, 20, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.section-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-badge-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Grids with strict vertical & horizontal alignment */
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* Form Groups & Labels with 100% Equal Baseline */
.form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 0;
  width: 100%;
  position: relative;
}

.form-group > label,
.label-with-addon {
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.form-group label,
.label-with-addon label {
  font-size: 0.74rem !important;
  font-weight: 750 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.4px !important;
  text-transform: uppercase !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

/* Mini Badges inside Label Addons */
.badge-mini {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.3px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Inputs with consistent height & typography */
.form-control,
select.form-control {
  height: 42px !important;
  min-height: 42px !important;
  box-sizing: border-box;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.88rem;
  padding: 0 12px;
  transition: all 0.2s ease;
  width: 100%;
}

.form-control:focus,
select.form-control:focus {
  border-color: #ff6800;
  box-shadow: 0 0 0 3px rgba(255, 104, 0, 0.2);
  outline: none;
  background: rgba(12, 18, 32, 0.95);
}

/* Merged Input Group for Contract Multiplier */
.input-group-merged {
  display: flex;
  align-items: stretch;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 22, 0.85);
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.input-group-merged:focus-within {
  border-color: #ff6800;
  box-shadow: 0 0 0 3px rgba(255, 104, 0, 0.2);
}

.input-group-merged .input-group-field {
  flex: 1.1;
  background: transparent !important;
  border: none !important;
  height: 40px !important;
  padding: 0 10px !important;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
}

.input-group-merged .input-group-select {
  flex: 1.5;
  background: rgba(255, 255, 255, 0.04) !important;
  border: none !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  height: 40px !important;
  padding: 0 8px !important;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none !important;
  cursor: pointer;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
}

.input-group-merged .input-group-select option {
  background: #0f1526;
  color: #f8fafc;
}

/* Field Subtext Helper Line */
.field-subtext {
  height: 20px;
  min-height: 20px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

/* Direction Toggles with equal height */
.direction-toggle-group {
  display: flex;
  gap: 6px;
  height: 42px;
  width: 100%;
}

.dir-btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dir-btn.dir-long.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.dir-btn.dir-short.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Status Toggles */
.status-toggle-group {
  display: flex;
  gap: 6px;
  height: 42px;
  width: 100%;
}

.status-toggle-btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-toggle-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
  color: #c7d2fe;
}

/* Timeframe Pills */
.tf-pills-wrap {
  display: flex;
  gap: 4px;
  height: 42px;
  align-items: center;
  width: 100%;
}

.tf-pill-btn {
  flex: 1;
  height: 42px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.tf-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tf-pill-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

/* Discipline Row */
.discipline-toggle-row {
  display: flex;
  gap: 8px;
  height: 42px;
  width: 100%;
}

.discipline-btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.discipline-btn.rule-yes.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.discipline-btn.rule-no.active {
  background: rgba(244, 63, 94, 0.18);
  border-color: #f43f5e;
  color: #f43f5e;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.discipline-btn.rule-partial.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* Setup Strategy Quick Chips */
.setup-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  height: 32px;
  align-items: center;
  overflow: hidden;
}

.setup-chip-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.setup-chip-btn:hover {
  background: rgba(255, 104, 0, 0.15);
  border-color: rgba(255, 104, 0, 0.4);
  color: #ff8533;
}

.setup-chip-btn.active {
  background: rgba(255, 104, 0, 0.2);
  border-color: #ff6800;
  color: #ff8533;
}

/* Discipline Reflection Hint Bar */
.discipline-hint-bar {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: #94a3b8;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Target R:R & Auto-Fee Pill Buttons in Label Addon */
.pill-rr-calc,
.pill-calc-fee {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 750;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  transition: all 0.15s ease;
}

.pill-rr-calc:hover,
.pill-calc-fee:hover {
  background: rgba(255, 104, 0, 0.2);
  border-color: #ff6800;
  color: #ff8533;
}

.pill-rr-calc.pill-sl {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.3);
}

.pill-rr-calc.pill-sl:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fb7185;
}

.lot-live-calc-badge {
  background: linear-gradient(135deg, rgba(255, 104, 0, 0.08), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(255, 104, 0, 0.25);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
}

.lot-live-calc-badge strong {
  color: #ff8533;
  font-family: var(--font-mono);
}

/* ==========================================================================
   MODERN UPLOAD ZONE & SNIPPING TOOL CLIPBOARD PASTE (CTRL+V) STYLING
   ========================================================================== */

.paste-indicator-pill {
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(255, 104, 0, 0.08);
  border: 1px solid rgba(255, 104, 0, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.btn-paste-clipboard {
  background: rgba(255, 104, 0, 0.12);
  border: 1px solid rgba(255, 104, 0, 0.35);
  color: #ff8533;
  font-size: 0.68rem;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-paste-clipboard:hover {
  background: #ff6800;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 104, 0, 0.4);
}

.modern-upload-zone {
  background: rgba(8, 12, 22, 0.75);
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  outline: none;
  box-sizing: border-box;
  width: 100%;
}

.modern-upload-zone:hover,
.modern-upload-zone:focus,
.modern-upload-zone.active-paste-target,
.modern-upload-zone.drag-over {
  border-color: #ff6800;
  background: rgba(255, 104, 0, 0.06);
  box-shadow: 0 0 16px rgba(255, 104, 0, 0.2);
}

.modern-upload-zone.active-paste-target {
  border-style: solid;
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.upload-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 104, 0, 0.12);
  border: 1px solid rgba(255, 104, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ff8533;
  margin-bottom: 2px;
}

.upload-title {
  font-size: 0.84rem;
  font-weight: 750;
  color: #f8fafc;
}

.upload-hint {
  font-size: 0.76rem;
  color: #cbd5e1;
}

.upload-hint strong {
  color: #ff8533;
  background: rgba(255, 104, 0, 0.18);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 104, 0, 0.3);
}

.upload-subtext {
  font-size: 0.68rem;
  color: #64748b;
}

.upload-preview-wrapper {
  width: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upload-preview-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-actions-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.preview-badge {
  background: rgba(12, 18, 32, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #10b981;
  font-size: 0.68rem;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

.preview-btn-action {
  pointer-events: auto;
  background: rgba(244, 63, 94, 0.9);
  border: 1px solid rgba(244, 63, 94, 0.8);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.preview-btn-action:hover {
  background: #f43f5e;
  transform: scale(1.04);
}





/* ==========================================================================
   LEARNING HUB STYLES
   ========================================================================== */

/* Articles Grid */
.learning-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

/* Article Card */
.learning-article-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.learning-article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #818cf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.learning-article-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.learning-article-card:hover::before {
  opacity: 1;
}

.learning-article-card.featured {
  border-color: rgba(167, 139, 250, 0.3);
  background: linear-gradient(135deg, var(--card-bg), rgba(167, 139, 250, 0.04));
}

.learning-article-card.featured::before {
  opacity: 1;
}

/* Card Header (badges row) */
.lac-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lac-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lac-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
}

.lac-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  animation: pulse-glow 2s infinite;
}

/* Card Title */
.lac-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text-primary);
  flex: 1;
}

/* Card Summary */
.lac-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* Card Footer */
.lac-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 8px;
}

.lac-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lac-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lac-read-btn {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: #a78bfa;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.lac-read-btn:hover {
  background: rgba(167, 139, 250, 0.22);
  border-color: #a78bfa;
  transform: translateX(2px);
}

/* Empty State */
.learning-empty-state {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

/* Category Filter Pills */
.learning-category-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.learning-category-pills::-webkit-scrollbar {
  display: none;
}

.btn-cat-pill {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cat-pill:hover {
  border-color: #a78bfa;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.08);
}

.btn-cat-pill.active {
  background: rgba(167, 139, 250, 0.15);
  border-color: #a78bfa;
  color: #a78bfa;
}

/* Editor Toolbar Buttons */
.btn-editor-fmt {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-editor-fmt:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: #a78bfa;
  color: #a78bfa;
}

/* Content Editor Area placeholder */
.article-editor-area:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

/* Article Reader Content Styles */
.article-reader-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-reader-content h1,
.article-reader-content h2,
.article-reader-content h3,
.article-reader-content h4 {
  color: var(--text-primary);
  margin: 20px 0 10px;
  font-weight: 700;
  line-height: 1.3;
}

.article-reader-content h2 { font-size: 1.25rem; }
.article-reader-content h3 { font-size: 1.08rem; }

.article-reader-content p {
  margin: 0 0 14px;
}

.article-reader-content ul,
.article-reader-content ol {
  padding-left: 22px;
  margin: 0 0 14px;
}

.article-reader-content li {
  margin-bottom: 6px;
}

.article-reader-content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid #a78bfa;
  background: rgba(167, 139, 250, 0.07);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-reader-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: #38bdf8;
}

.article-reader-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 14px 0;
}

.article-reader-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: #10b981;
}

.article-reader-content strong { color: var(--text-primary); }
.article-reader-content a { color: #60a5fa; text-decoration: underline; }

/* Skeleton Cards */
.skeleton-card { pointer-events: none; cursor: default; }
.skel-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
.skel-w90 { width: 90%; }
.skel-w80 { width: 80%; }
.skel-w60 { width: 60%; }
.skel-w50 { width: 50%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   LEARNING HUB v2.0 â€” PREMIUM STYLES
   ========================================================================== */

/* â”€â”€ HEADER HERO â”€â”€ */
.lh-header-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(99,102,241,0.04));
  border: 1px solid rgba(167,139,250,0.18);
  border-radius: var(--radius-lg);
}

.lh-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.lh-main-heading {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}

.lh-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* View Switcher */
.lh-view-switcher {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.lh-view-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lh-view-btn:hover { color: #a78bfa; background: rgba(167,139,250,0.08); }
.lh-view-btn.active { background: rgba(167,139,250,0.18); color: #a78bfa; }

/* â”€â”€ KPI GRID â”€â”€ */
.lh-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.lh-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.lh-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167,139,250,0.25);
}

/* â”€â”€ CONTROL BAR â”€â”€ */
.lh-control-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

/* â”€â”€ LIST VIEW â”€â”€ */
.lh-list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lh-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  flex-wrap: wrap;
}

.lh-list-row:hover {
  border-color: rgba(167,139,250,0.3);
  background: rgba(167,139,250,0.03);
  transform: translateX(3px);
}

.lh-list-row.featured {
  border-left: 3px solid #f59e0b;
}

.lh-list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.lh-list-info { min-width: 0; }

.lh-list-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lh-list-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.lh-list-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* â”€â”€ EMPTY STATE â”€â”€ */
.lh-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.lh-empty-state i {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 14px;
  color: rgba(167,139,250,0.4);
}

.lh-empty-title { font-size: 1.05rem; font-weight: 700; color: var(--text-muted); }
.lh-empty-sub   { font-size: 0.84rem; margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* â”€â”€ PREMIUM EDITOR TOOLBAR â”€â”€ */
.lh-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(167,139,250,0.05);
  border-bottom: 1px solid rgba(167,139,250,0.12);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.lh-editor-toolbar::-webkit-scrollbar { display: none; }

.et-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.et-sep {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
  flex-shrink: 0;
}

.et-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.et-btn:hover {
  background: rgba(167,139,250,0.14);
  border-color: rgba(167,139,250,0.3);
  color: #a78bfa;
}

.et-text-btn {
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 28px;
  justify-content: center;
}

.et-media-btn {
  background: rgba(167,139,250,0.08);
  border-color: rgba(167,139,250,0.2);
  color: #a78bfa;
  padding: 5px 10px;
}

.et-media-btn:hover {
  background: rgba(167,139,250,0.2);
  border-color: #a78bfa;
}

.et-color-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.et-color-btn:hover {
  background: rgba(167,139,250,0.14);
  border-color: rgba(167,139,250,0.3);
  color: #a78bfa;
}

/* â”€â”€ EDITOR CONTENT AREA â”€â”€ */
.lh-editor-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: rgba(0,0,0,0.15);
  font-size: 0.93rem;
  line-height: 1.75;
  outline: none;
  color: var(--text-secondary);
  min-height: 280px;
}

.lh-editor-area:empty::before,
.lh-editor-area.is-empty::before {
  content: attr(data-placeholder);
  color: rgba(148,163,184,0.5);
  pointer-events: none;
  font-style: italic;
}

.lh-editor-area h1 { font-size: 1.5rem; font-weight: 800; margin: 18px 0 10px; color: var(--text-primary); }
.lh-editor-area h2 { font-size: 1.2rem; font-weight: 700; margin: 16px 0 8px;  color: var(--text-primary); }
.lh-editor-area h3 { font-size: 1.05rem;font-weight: 700; margin: 14px 0 7px;  color: var(--text-primary); }
.lh-editor-area p  { margin: 0 0 12px; }
.lh-editor-area ul, .lh-editor-area ol { padding-left: 22px; margin: 0 0 12px; }
.lh-editor-area li { margin-bottom: 4px; }
.lh-editor-area blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 4px solid #a78bfa;
  background: rgba(167,139,250,0.07);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-muted);
}
.lh-editor-area figure { margin: 14px 0; text-align: center; }
.lh-editor-area img { max-width: 100%; border-radius: 8px; }
.lh-editor-area iframe, .lh-editor-area video { max-width: 100%; border-radius: 10px; }

/* â”€â”€ MEDIA INSERT PANEL â”€â”€ */
.lh-media-panel {
  border-top: 1px solid rgba(167,139,250,0.18);
  background: linear-gradient(135deg, rgba(167,139,250,0.06), rgba(99,102,241,0.04));
  flex-shrink: 0;
}

.lh-media-insert-form {
  padding: 16px 22px;
  max-height: 320px;
  overflow-y: auto;
}

/* ==========================================================================
   TRADEX TRADING ACADEMY â€” BESPOKE MASTERCLASS DESIGN SYSTEM
   ========================================================================== */

/* â”€â”€ 1. ACADEMY HERO BANNER â”€â”€ */
.academy-hero {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26, 20, 48, 0.92) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(20, 18, 38, 0.92) 100%);
  border: 1px solid rgba(167, 139, 250, 0.22);
  padding: 26px 30px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.academy-hero-glow {
  position: absolute;
  top: -80px;
  left: 20%;
  width: 450px;
  height: 250px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 80%);
  filter: blur(45px);
  pointer-events: none;
}

.academy-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.academy-hero-left {
  flex: 1;
  min-width: 280px;
}

.academy-badge-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.academy-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(99, 102, 241, 0.2));
  color: #c084fc;
  border: 1px solid rgba(167, 139, 250, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.2);
}

.academy-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc;
  animation: academyPulse 2s infinite;
}

@keyframes academyPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.academy-tag-secondary {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #94a3b8;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.academy-main-title {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  color: #ffffff;
  line-height: 1.25;
}

.academy-title-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.academy-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  max-width: 660px;
  line-height: 1.55;
}

.academy-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.academy-view-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.academy-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.academy-view-btn:hover {
  color: #ffffff;
}

.academy-view-btn.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(99, 102, 241, 0.2));
  color: #c084fc;
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 2px 10px rgba(167, 139, 250, 0.15);
}

.academy-write-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  padding: 9px 18px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.academy-write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.6) !important;
}

/* â”€â”€ 2. ACADEMY METRICS STRIP â”€â”€ */
.academy-metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.academy-metric-card {
  position: relative;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.88), rgba(22, 19, 41, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.academy-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, #a78bfa), transparent);
}

.academy-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 10px 25px -5px var(--accent-glow, rgba(167, 139, 250, 0.2));
}

.amc-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
  flex-shrink: 0;
}

.amc-icon-box.amc-gold    { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.amc-icon-box.amc-rose    { background: rgba(244, 63, 94, 0.12);  color: #fb7185; border-color: rgba(244, 63, 94, 0.25); }
.amc-icon-box.amc-emerald { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.amc-icon-box.amc-cyan    { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border-color: rgba(56, 189, 248, 0.25); }

.amc-body {
  flex: 1;
  min-width: 0;
}

.amc-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.amc-label {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.amc-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.amc-tag-gold    { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.amc-tag-rose    { color: #fb7185; background: rgba(244, 63, 94, 0.12); }
.amc-tag-emerald { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.amc-tag-cyan    { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }

/* â”€â”€ 3. ACADEMY CONTROL & CATEGORY HUB â”€â”€ */
.academy-control-hub {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(23, 20, 44, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
}

.academy-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.academy-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  font-size: 0.9rem;
  pointer-events: none;
}

.academy-search-input {
  width: 100%;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 11px;
  padding: 9px 14px 9px 38px;
  font-size: 0.85rem;
  color: #f1f5f9;
  outline: none;
  transition: all 0.2s ease;
}

.academy-search-input:focus {
  border-color: #a78bfa;
  background: rgba(10, 15, 30, 0.9);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.academy-category-scroll {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 0;
  scrollbar-width: none;
}

.academy-category-scroll::-webkit-scrollbar {
  display: none;
}

.academy-category-scroll .btn-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.academy-category-scroll .btn-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.academy-category-scroll .btn-cat-pill.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(99, 102, 241, 0.25));
  color: #c084fc;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 2px 10px rgba(167, 139, 250, 0.2);
}

.academy-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.academy-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* â”€â”€ 4. ACADEMY LESSON CARDS (GRID VIEW) â”€â”€ */
.learning-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.academy-lesson-card {
  position: relative;
  background: linear-gradient(160deg, rgba(20, 26, 46, 0.85) 0%, rgba(15, 20, 36, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.academy-lesson-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.6), rgba(56, 189, 248, 0.6));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.academy-lesson-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(167, 139, 250, 0.12);
}

.academy-lesson-card:hover::before {
  opacity: 1;
}

.academy-lesson-card.featured-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(160deg, rgba(28, 26, 44, 0.88) 0%, rgba(18, 19, 36, 0.94) 100%);
}

.academy-lesson-card.featured-card::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  opacity: 1;
}

.alc-top-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.alc-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.alc-badges-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.alc-featured-pill {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.alc-new-pill {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
}

.alc-time-pill {
  font-size: 0.72rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.alc-body {
  flex: 1;
  margin-bottom: 18px;
}

.alc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.alc-title:hover {
  color: #a78bfa;
}

.alc-summary {
  font-size: 0.83rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.alc-author-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.alc-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.3);
}

.alc-author-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.alc-author-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alc-views-count {
  font-size: 0.7rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.alc-read-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.12);
  color: #c084fc;
  border: 1px solid rgba(167, 139, 250, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.alc-read-action-btn:hover {
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  color: #ffffff;
  border-color: transparent;
  transform: translateX(2px);
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.4);
}

/* â”€â”€ 5. ACADEMY LIST VIEW (CURRICULUM INDEX) â”€â”€ */
.lh-list-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.academy-list-row {
  background: linear-gradient(145deg, rgba(20, 26, 46, 0.85), rgba(15, 20, 36, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s ease;
}

.academy-list-row:hover {
  transform: translateX(4px);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.academy-list-row.featured-row {
  border-left: 3px solid #f59e0b;
}

.alr-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.alr-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.alr-content {
  flex: 1;
  min-width: 0;
}

.alr-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.alr-category {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.alr-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.alr-title:hover {
  color: #a78bfa;
}

.alr-summary {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.alr-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.alr-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alr-author, .alr-stat {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   TRADING QUIZZES & SKILL ASSESSMENT SECTION
   ========================================================================== */

/* Quiz Hero Banner */
.qz-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.qz-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.qz-hero-left {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.qz-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 12px;
}

.qz-hero-title {
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qz-hero-title i {
  color: #fbbf24;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.4));
}

.qz-hero-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.qz-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Quiz Metrics Strip (5 Cards) */
.qz-metrics-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.qz-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.qz-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.qz-metric-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-qz-total::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.card-qz-completed::before { background: linear-gradient(90deg, #10b981, #059669); }
.card-qz-avg::before { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.card-qz-iq::before { background: linear-gradient(90deg, #a855f7, #7c3aed); }
.card-qz-attempts::before { background: linear-gradient(90deg, #ec4899, #db2777); }

.qmc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.qmc-label {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #cbd5e1;
}

.qmc-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-qz-total .qmc-icon-box { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.card-qz-completed .qmc-icon-box { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.card-qz-avg .qmc-icon-box { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.card-qz-iq .qmc-icon-box { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.card-qz-attempts .qmc-icon-box { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.qmc-value {
  font-size: 1.65rem;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 4px;
}

.qmc-sub {
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Quiz Control Hub & Filters */
.qz-control-hub {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.qz-control-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  flex-wrap: wrap;
}

.qz-search-wrap {
  position: relative;
  min-width: 240px;
  flex: 1;
}

.qz-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
}

.qz-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.qz-search-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.qz-select-custom {
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  min-width: 150px;
}

.qz-control-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qz-difficulty-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.5);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-diff-pill {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-diff-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-diff-pill.active {
  background: #f59e0b;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Assessment Cards Grid */
.quizzes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.qz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.qz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.qz-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.1);
}

.qz-card:hover::before {
  opacity: 1;
}

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

.qz-cat-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qz-diff-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qz-diff-tag.diff-beginner { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.qz-diff-tag.diff-intermediate { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.qz-diff-tag.diff-advanced { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.qz-diff-tag.diff-elite { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

.qz-card-body {
  margin-bottom: 20px;
}

.qz-card-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.qz-card-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qz-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qz-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.qz-meta-pill i {
  color: #fbbf24;
}

.qz-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.qz-best-score-badge {
  font-size: 0.78rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.qz-best-score-badge.passed { color: #34d399; }
.qz-best-score-badge.failed { color: #f87171; }
.qz-best-score-badge.unattempted { color: #94a3b8; }

.qz-card-btn-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-start-quiz {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a !important;
  font-weight: 750;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.btn-start-quiz:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.btn-quiz-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quiz-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-quiz-icon.btn-delete-quiz:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Empty State */
.quizzes-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: 16px;
}

.quizzes-empty-state i {
  font-size: 3rem;
  color: #fbbf24;
  margin-bottom: 14px;
  display: inline-block;
  opacity: 0.8;
}

.quizzes-empty-state h4 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.quizzes-empty-state p {
  color: #94a3b8;
  font-size: 0.9rem;
  max-width: 420px;
  margin: 0 auto 16px auto;
}

/* ==========================================================================
   QUIZ PLAYER MODAL (LIVE TIMED ASSESSMENT)
   ========================================================================== */
.qp-modal-box {
  background: #0d131f;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  position: relative;
}

.qp-modal-header {
  padding: 20px 26px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.qp-quiz-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.qp-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-family: 'JetBrains Mono', monospace, monospace;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.qp-timer-badge.timer-warning {
  border-color: #ef4444;
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
  animation: pulse-timer 1s infinite alternate;
}

@keyframes pulse-timer {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.qp-progress-wrap {
  background: rgba(255, 255, 255, 0.04);
  height: 5px;
  width: 100%;
  position: relative;
}

.qp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.qp-modal-body {
  padding: 28px 32px;
  overflow-y: auto;
  flex: 1;
}

.qp-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.qp-q-num {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fbbf24;
}

.qp-q-pts {
  font-size: 0.78rem;
  color: #94a3b8;
}

.qp-question-text {
  font-size: 1.25rem;
  font-weight: 750;
  color: #ffffff;
  line-height: 1.45;
  margin-bottom: 24px;
}

.qp-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qp-option-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.qp-option-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(4px);
}

.qp-option-card.selected {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.qp-opt-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.qp-option-card.selected .qp-opt-letter {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0f172a;
}

.qp-opt-text {
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
  flex: 1;
  line-height: 1.4;
}

.qp-modal-footer {
  padding: 18px 28px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   QUIZ RESULT SCORECARD MODAL â€” PREMIUM REDESIGN
   ========================================================================== */
.qr-modal-box {
  background: linear-gradient(160deg, #0b1120 0%, #0d1526 60%, #0a1018 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 24px;
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px -16px rgba(0, 0, 0, 0.9), 0 0 60px rgba(245, 158, 11, 0.08);
  overflow: hidden;
  position: relative;
}

.qr-modal-header {
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.qr-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.3) transparent;
}

.qr-modal-body::-webkit-scrollbar { width: 5px; }
.qr-modal-body::-webkit-scrollbar-track { background: transparent; }
.qr-modal-body::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.3); border-radius: 10px; }

.qr-modal-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* â”€â”€ Hero Layout: Ring + Details side by side â”€â”€ */
.qr-hero-layout {
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.qr-hero-layout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), rgba(16, 185, 129, 0.4), transparent);
  pointer-events: none;
}

/* Ring side */
.qr-ring-side {
  flex-shrink: 0;
}

.qr-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-svg-ring {
  position: absolute;
  top: 0; left: 0;
}

.qr-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 10;
}

.qr-ring-fill {
  fill: none;
  stroke: #10b981;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-ring-center {
  position: relative;
  z-index: 2;
  text-align: center;
}

.qr-ring-pct {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -1px;
}

.qr-ring-sub {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Details side */
.qr-details-side {
  flex: 1;
  min-width: 0;
}

.qr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.qr-status-badge.passed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.1);
}

.qr-status-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.qr-quiz-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.qr-stat-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.qr-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.qr-chip strong {
  color: #ffffff;
}

.qr-status-msg {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 3px solid rgba(245, 158, 11, 0.4);
}

/* â”€â”€ Question Breakdown â”€â”€ */
.qr-breakdown-section {
  margin-top: 4px;
}

.qr-section-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Question review items (generated by JS with class qr-q-item) */
.qr-q-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.qr-q-item.correct {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
}

.qr-q-item.incorrect {
  border-left: 3px solid #f43f5e;
  background: rgba(244, 63, 94, 0.04);
}

.qr-qi-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.qr-qi-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

.qr-qi-badge.correct {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.qr-qi-badge.incorrect {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.qr-qi-text {
  font-size: 0.92rem;
  font-weight: 650;
  color: #f1f5f9;
  line-height: 1.45;
}

.qr-qi-image-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 320px;
  cursor: pointer;
}

.qr-qi-image-preview img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.qr-qi-answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.qr-ans-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.85rem;
}

.qr-ans-lbl {
  color: #64748b;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  min-width: 90px;
}

.qr-ans-val {
  color: #cbd5e1;
}

.qr-qi-exp {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fde68a;
  line-height: 1.5;
}

.qr-qi-exp i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}


/* ==========================================================================
   ADMIN QUIZ BUILDER MODAL
   ========================================================================== */
.qb-modal-box {
  background: #0d131f;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  max-width: 900px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.qb-modal-header {
  padding: 20px 28px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qb-modal-body {
  padding: 24px 30px;
  overflow-y: auto;
  flex: 1;
}

.qb-question-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  position: relative;
}

.qb-qc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.qb-opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.qb-opt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.4);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.qb-opt-item input[type="radio"] {
  accent-color: #f59e0b;
  cursor: pointer;
}

.qb-modal-footer {
  padding: 18px 28px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Controls: Language Switcher + Sound Toggle */
.qp-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qp-lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.qp-lang-btn:hover {
  color: #ffffff;
}

.qp-lang-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.qp-sound-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qp-sound-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  transform: scale(1.06);
}

.qp-sound-btn.muted {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.5);
}

/* Question Technical Diagram / Chart Preview */
.qp-question-image-wrap {
  position: relative;
  max-width: 440px;
  margin: 0 auto 18px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: #080c16;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.qp-question-image-wrap:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15);
}

.qp-question-image-wrap img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.qp-img-zoom-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Bilingual Question Formatting */
.qp-lang-tag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-right: 6px;
  vertical-align: middle;
}

.qp-lang-tag.hi {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.qp-q-dual-en {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.5;
}

.qp-q-dual-hi {
  font-size: 1.05rem;
  font-weight: 500;
  color: #38bdf8;
  line-height: 1.5;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.qp-q-hi {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.5;
}

.qp-opt-hi-sub {
  font-size: 0.82rem;
  color: #38bdf8;
  margin-top: 3px;
  font-weight: 500;
}

/* Image Zoom Lightbox Overlay */
.qz-lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qz-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #0b0f19;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qz-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
}

.qz-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f43f5e;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.qz-lightbox-close:hover {
  transform: scale(1.15);
}

/* ==========================================================================
   ULTIMATE QUIZ ZONE (GAMIFIED ARENA STYLING)
   ========================================================================== */
.uqz-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(26, 16, 40, 0.95) 50%, rgba(13, 27, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 24px;
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.uqz-hero-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.uqz-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.uqz-brand-wrap {
  flex: 1;
  min-width: 280px;
}

.uqz-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.uqz-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: qzPulse 1.8s infinite;
}

.uqz-main-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.uqz-subtitle {
  font-size: 0.92rem;
  color: #94a3b8;
  margin: 0;
  max-width: 620px;
  line-height: 1.45;
}

.uqz-user-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.uqz-stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.uqz-stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
}

.uqz-stat-icon {
  font-size: 1.45rem;
}

.uqz-stat-meta {
  display: flex;
  flex-direction: column;
}

.uqz-stat-val {
  font-size: 1.1rem;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.1;
}

.coins-pill .uqz-stat-val { color: #fbbf24; }
.rank-pill .uqz-stat-val { color: #c084fc; }
.score-pill .uqz-stat-val { color: #34d399; }

.uqz-stat-lbl {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.uqz-create-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a !important;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 16px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

/* Metrics strip */
.uqz-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.uqz-metric-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

.uqz-metric-box:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.umb-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.umb-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.umb-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.umb-cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.umb-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

.umb-val {
  font-size: 1.35rem;
  font-weight: 850;
  color: #ffffff;
  line-height: 1.1;
}

.umb-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Control Hub */
.uqz-control-hub {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.uqz-search-wrap {
  position: relative;
  min-width: 260px;
  flex: 1;
}

.uqz-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
}

.uqz-search-input {
  width: 100%;
  height: 42px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0 16px 0 40px;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.uqz-search-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.uqz-category-scroll,
.uqz-difficulty-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.uqz-category-scroll::-webkit-scrollbar,
.uqz-difficulty-scroll::-webkit-scrollbar {
  display: none;
}

.uqz-reset-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uqz-reset-btn:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  transform: rotate(-180deg);
}

/* ==========================================================================
   ULTIMATE QUIZ ZONE CARDS GRID (EXACT SCREENSHOT LAYOUT)
   ========================================================================== */
.quizzes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

@media (min-width: 1280px) {
  .quizzes-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .quizzes-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .uqz-hero-banner {
    padding: 20px 16px;
  }
  .uqz-main-title {
    font-size: 1.6rem;
  }
  .uqz-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* THE ZONE CARD */
.uqz-zone-card {
  background: linear-gradient(155deg, #141c2e 0%, #0d131f 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 155px;
}

.uqz-zone-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 158, 11, 0.15);
  background: linear-gradient(155deg, #182238 0%, #0f1726 100%);
}

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

.uqz-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease;
}

.uqz-zone-card:hover .uqz-icon-box {
  transform: scale(1.08) rotate(3deg);
}

.uqz-coin-pill {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.uqz-coin-icon {
  font-size: 0.95rem;
}

.uqz-coin-val {
  font-size: 0.85rem;
  font-weight: 850;
  color: #fbbf24;
  font-family: var(--font-mono, monospace);
}

.uqz-card-body {
  margin-bottom: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.uqz-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.uqz-card-title-hi {
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 6px;
}

.uqz-card-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
  margin: 0;
}

.uqz-card-admin-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.9);
  padding: 3px 6px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.uqz-zone-card:hover .uqz-card-admin-bar {
  opacity: 1;
}

/* Breadcrumb & Drilldown Header */
.uqz-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 22px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.uqz-back-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 750;
  padding: 8px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uqz-back-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
  transform: translateX(-3px);
}

.uqz-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.uqz-cat-badge-icon {
  font-size: 1.6rem;
}

.uqz-cat-page-title {
  font-size: 1.3rem;
  font-weight: 850;
  color: #ffffff;
  margin: 0;
}

.uqz-cat-count-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.uqz-cat-progress-pill {
  font-size: 0.78rem;
  font-weight: 750;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   QUIZ LANGUAGE SELECTOR STRIP & BUILDER TOGGLES
   ========================================================================== */
.uqz-lang-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, rgba(20, 28, 46, 0.75) 0%, rgba(13, 19, 31, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.uqz-lang-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 750;
  color: #e2e8f0;
}

.uqz-lang-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uqz-lang-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.uqz-lang-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.uqz-lang-pill-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  font-weight: 850;
}

.uqz-lang-pill-btn .flag-icon {
  font-size: 1rem;
}


/* Builder Language Mode Switcher â€” Premium Pill Style */
.qb-lang-toggle-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 4px;
  gap: 3px;
}

.qb-lang-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.qb-lang-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.qb-lang-toggle-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 900;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   PREMIUM ASSESSMENT BUILDER â€” META SECTION
   ========================================================================== */

/* The top modal box */
.qb-modal-box {
  background: linear-gradient(160deg, #0b1120 0%, #0d1526 60%, #0a1018 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 24px;
  max-width: 860px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px -16px rgba(0, 0, 0, 0.9), 0 0 60px rgba(245, 158, 11, 0.08);
  overflow: hidden;
}

.qb-modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.3) transparent;
}

.qb-modal-body::-webkit-scrollbar { width: 5px; }
.qb-modal-body::-webkit-scrollbar-track { background: transparent; }
.qb-modal-body::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.3); border-radius: 10px; }

/* Meta card â€” sleek glass */
.qb-meta-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 4px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.qb-meta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
  pointer-events: none;
}

/* Form inputs â€” premium style */
.qb-meta-card .form-control,
.qb-meta-card .form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qb-meta-card .form-control:focus,
.qb-meta-card .form-select:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  background: rgba(245, 158, 11, 0.04);
  outline: none;
}

.qb-meta-card label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  display: block;
  margin-bottom: 6px;
}

/* ==========================================================================
   1-BY-1 STEP ASSESSMENT QUESTION BUILDER
   ========================================================================== */
.qb-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.qb-stepper-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.qb-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-step-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.qb-step-pill.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}

.qb-step-pill.filled:not(.active) {
  border-color: rgba(16, 185, 129, 0.4);
  color: #e2e8f0;
  background: rgba(16, 185, 129, 0.06);
}

.qb-step-pill.add-btn {
  background: rgba(245, 158, 11, 0.07);
  border: 1.5px dashed rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.qb-step-pill.add-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-style: solid;
  border-color: #f59e0b;
  color: #0f172a;
}

.qb-stepper-counter {
  font-size: 0.82rem;
  color: #64748b;
}

.qb-stepper-counter strong {
  color: #fbbf24;
}

/* Active question card */
.qb-question-active-card {
  background: linear-gradient(155deg, rgba(20, 28, 48, 0.7) 0%, rgba(13, 19, 33, 0.9) 100%);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.qb-question-active-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), rgba(167, 139, 250, 0.4), transparent);
  pointer-events: none;
}

/* Question card header */
.qb-qi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Inputs inside question card */
.qb-qi-body .form-control,
.qb-qi-body input[type="text"],
.qb-qi-body textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.qb-qi-body .form-control:focus,
.qb-qi-body input[type="text"]:focus,
.qb-qi-body textarea:focus {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: rgba(245, 158, 11, 0.04);
  outline: none;
}

.qb-question-step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ==========================================================================
   IMAGE DROPZONE & CLIPBOARD PASTE PREVIEWS
   ========================================================================== */
.qb-img-dropzone {
  background: rgba(15, 23, 42, 0.5);
  border: 2px dashed rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.qb-img-dropzone:hover {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.qb-dropzone-icon {
  font-size: 1.8rem;
  color: #fbbf24;
  opacity: 0.8;
}

.qb-dropzone-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
}

.qb-dropzone-title strong {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.qb-dropzone-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.qb-img-preview-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.qb-img-thumb-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.qb-img-thumb {
  max-height: 90px;
  max-width: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.qb-img-thumb:hover {
  transform: scale(1.04);
}

.qb-img-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   ULTRA-PREMIUM LIVE QUIZ PLAYER MODAL (qp-modal-box)
   ========================================================================== */
.qp-modal-box {
  background: linear-gradient(160deg, #0b1120 0%, #0d1526 60%, #0a1018 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  border-radius: 24px !important;
  max-width: 820px !important;
  width: 95% !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 40px 80px -16px rgba(0, 0, 0, 0.9), 0 0 60px rgba(245, 158, 11, 0.08) !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 0 !important;
}

.qp-modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.7), rgba(56, 189, 248, 0.5), transparent);
  pointer-events: none;
  z-index: 10;
}

/* Header */
.qp-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.4);
}

.qp-title-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.qp-question-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.qp-question-badge i {
  color: #f59e0b;
}

.qp-quiz-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Controls Right */
.qp-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qp-sound-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qp-sound-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.qp-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.08);
  transition: all 0.25s ease;
}

.qp-timer-badge.urgent {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
  animation: qp-pulse 1s infinite alternate;
}

@keyframes qp-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* Dedicated Close Button */
.qp-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.qp-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

/* Progress bar strip */
.qp-progress-strip {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.qp-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #10b981);
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.qp-timer-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(245, 158, 11, 0.3);
  transition: width 1s linear;
}

/* Player Body */
.qp-player-body {
  padding: 24px 26px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.3) transparent;
}

.qp-player-body::-webkit-scrollbar { width: 5px; }
.qp-player-body::-webkit-scrollbar-track { background: transparent; }
.qp-player-body::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.3); border-radius: 10px; }

/* Question Image Wrap */
.qp-question-image-wrap {
  margin-bottom: 18px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: zoom-in;
  max-height: 240px;
  background: #020617;
}

.qp-question-image-wrap img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.qp-img-zoom-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Question Text Card */
.qp-question-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  position: relative;
  letter-spacing: 0.15px;
}

.qp-question-text::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.qp-q-hi, .qp-q-en {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

/* Options Container */
.qp-options-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* Option Card */
.qp-option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.qp-option-card:hover {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(245, 158, 11, 0.06);
}

.qp-option-card.selected {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04)) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), inset 0 0 12px rgba(245, 158, 11, 0.05) !important;
  transform: translateY(-1px);
}

/* Option Letter Badge */
.qp-option-letter {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.qp-option-card:hover .qp-option-letter {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.qp-option-card.selected .qp-option-letter {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: transparent;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

/* Option Text */
.qp-option-text {
  flex: 1;
  font-size: 0.94rem;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.45;
}

.qp-option-card.selected .qp-option-text {
  color: #ffffff;
  font-weight: 600;
}

/* Option Radio Indicator */
.qp-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qp-option-card:hover .qp-option-radio {
  border-color: rgba(245, 158, 11, 0.4);
}

.qp-option-card.selected .qp-option-radio {
  border-color: #f59e0b;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.qp-option-card.selected .qp-option-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0f172a;
}

/* Player Footer */
.qp-player-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.5);
}

.qp-nav-btn {
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.qp-prev-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.qp-prev-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(-2px);
}

.qp-next-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.qp-next-btn:hover {
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
  transform: translateY(-1.5px);
  color: #020617;
}

.qp-submit-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.qp-submit-btn:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  transform: translateY(-1.5px);
}

/* ==========================================================================
   VIDEO MASTERCLASSES & LMS LEARNING PLATFORM STYLES
   ========================================================================== */

/* Hero Banner */
.cls-hero-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(15, 23, 42, 0.85) 60%, rgba(30, 41, 59, 0.6) 100%);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.cls-hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cls-hero-info {
  flex: 1;
  max-width: 650px;
}

.cls-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  margin-bottom: 10px;
}

.cls-hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cls-hero-desc {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.cls-hero-kpi-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cls-hero-kpi-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cls-hero-kpi-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
}

.cls-hero-kpi-lbl {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
}

/* Progress Bar on Hero */
.cls-hero-progress-wrap {
  min-width: 240px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  backdrop-filter: blur(10px);
}

.cls-hero-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.cls-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.cls-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filter Toolbar */
.cls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 18px;
}

.cls-cats-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cls-cat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cls-cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.cls-cat-pill.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.cls-lang-toggle-group {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.cls-lang-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cls-lang-btn.active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Classes Grid */
.cls-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.cls-card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
}

.cls-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 68, 68, 0.15);
}

.cls-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.cls-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0f19;
  overflow: hidden;
  cursor: pointer;
}

.cls-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cls-card:hover .cls-card-thumb {
  transform: scale(1.05);
}

.cls-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cls-card:hover .cls-card-overlay {
  opacity: 1;
}

.cls-play-glow-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding-left: 3px;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.6);
  transform: scale(0.85);
  transition: transform 0.2s ease;
}

.cls-card:hover .cls-play-glow-btn {
  transform: scale(1);
}

.cls-card-top-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.cls-prov-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cls-prov-badge.yt {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
}

.cls-prov-badge.gd {
  background: rgba(59, 130, 246, 0.85);
  color: #ffffff;
}

.cls-prov-badge.mp4 {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
}

.cls-featured-pill {
  background: rgba(245, 158, 11, 0.9);
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cls-card-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 750;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cls-card-completed-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cls-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cls-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cls-card-cat {
  font-size: 0.75rem;
  font-weight: 750;
  color: #a78bfa;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cls-lesson-pill {
  font-size: 0.7rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cls-module-tag {
  font-size: 0.73rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cls-card-title {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 6px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.cls-card-title:hover {
  color: #ef4444;
}

.cls-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.cls-card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.cls-card-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 12px;
}

.cls-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cls-watch-btn {
  flex: 1;
  font-weight: 750;
  border-radius: 10px;
}

.cls-admin-card-menu {
  display: flex;
  gap: 4px;
}

/* ==========================================================================
   LMS CINEMA VIDEO PLAYER VIEW
   ========================================================================== */
.cls-player-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cls-player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 18px;
  flex-wrap: wrap;
}

.cls-player-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}

.cls-player-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  transition: all 0.3s ease;
}

.cls-player-layout.theater-mode {
  grid-template-columns: 1fr;
}

.cls-player-layout.theater-mode .cls-playlist-panel {
  margin-top: 20px;
}

/* Stage & Embed */
.cls-player-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cls-video-stage {
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.cls-video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.cls-video-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cls-player-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #090d16;
  color: #94a3b8;
}

/* Stage Bottom Controls Bar */
.cls-stage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.cls-btn-completed {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

/* Player Content Tabs (Overview / Chapters / Resources / Notes) */
.cls-player-tabs-wrap {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
}

.cls-p-tab-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.cls-p-tab-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 750;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.cls-p-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.cls-p-tab-btn.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.cls-p-tab-pane {
  display: none;
}

.cls-p-tab-pane.active {
  display: block;
}

/* Chapters / Timestamps List */
.cls-chapters-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cls-chapter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.18s ease;
}

.cls-chapter-row:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateX(3px);
}

.cls-ch-time-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cls-ch-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* Resources List */
.cls-resources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.cls-resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.cls-resource-item:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.cls-res-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.cls-res-info {
  flex: 1;
  overflow: hidden;
}

.cls-res-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cls-res-url {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cls-res-link-icon {
  color: #38bdf8;
  font-size: 0.85rem;
}

/* Linked Quiz Banner */
.cls-quiz-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 16px;
}

.cls-quiz-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Playlist Curriculum Sidebar */
.cls-playlist-panel {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cls-playlist-header {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cls-playlist-title {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cls-playlist-list {
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cls-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cls-playlist-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.cls-playlist-item.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.cls-pl-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  font-weight: 750;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.cls-playlist-item.active .cls-pl-num {
  background: #ef4444;
  color: #ffffff;
}

.cls-pl-info {
  flex: 1;
  overflow: hidden;
}

.cls-pl-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.cls-pl-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  gap: 6px;
}

/* Super Admin Class Builder Modal */
.cls-modal-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.cls-m-tab-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cls-m-tab-btn.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.cls-m-tab-pane {
  display: none;
}

.cls-m-tab-pane.active {
  display: block;
}

.cls-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Instructor Box */
.cls-overview-instructor-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cls-inst-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* ==========================================================================
   GUEST TRADING QUIZ ONBOARDING & MODAL FLOW (NO LOGIN REQUIRED)
   ========================================================================== */
.gq-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.gq-modal-box {
  background: radial-gradient(120% 120% at 50% 0%, #151e33 0%, #0c1222 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 780px;
  margin: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(236, 72, 153, 0.12);
  overflow: hidden;
  animation: gqFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes gqFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.gq-header {
  padding: 22px 28px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.7));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gq-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gq-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
}

.gq-header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.2px;
}

.gq-header-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.gq-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.gq-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  transform: rotate(90deg);
}

/* Step Progress Indicator */
.gq-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gq-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  position: relative;
  transition: all 0.25s;
}

.gq-step-pill .gq-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.gq-step-pill.active {
  color: #38bdf8;
}

.gq-step-pill.active .gq-step-num {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.gq-step-pill.completed {
  color: #10b981;
}

.gq-step-pill.completed .gq-step-num {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.gq-step-sep {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 12px;
}

.gq-body {
  padding: 28px;
  max-height: 72vh;
  overflow-y: auto;
}

/* Step 1: Info Form */
.gq-form-group {
  margin-bottom: 18px;
}

.gq-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.gq-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gq-input-wrap i {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s;
}

.gq-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px 12px 42px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.gq-input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.gq-input:focus + i, .gq-input:focus ~ i {
  color: #ec4899;
}

/* Step 2: Language Cards */
.gq-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.gq-lang-card {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gq-lang-card:hover {
  transform: translateY(-4px);
  border-color: #ec4899;
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.1), rgba(15, 23, 42, 0.8));
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.2);
}

.gq-lang-flag {
  font-size: 2.8rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.gq-lang-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.gq-lang-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 16px;
}

.gq-lang-select-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.gq-lang-card:hover .gq-lang-select-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}

/* Step 3: Quizzes Grid */
.gq-cats-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.gq-cats-filter::-webkit-scrollbar {
  display: none;
}

.gq-cat-pill {
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.gq-cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.gq-cat-pill.active {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
}

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

.gq-quiz-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s;
}

.gq-quiz-card:hover {
  border-color: rgba(236, 72, 153, 0.5);
  transform: translateY(-2px);
  background: rgba(21, 30, 51, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gq-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gq-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.gq-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gq-diff-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gq-coin-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.gq-quiz-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.gq-quiz-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: #94a3b8;
}

.gq-start-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  border: none;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(236, 72, 153, 0.3);
}

.gq-start-btn:hover {
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.55);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .gq-lang-grid {
    grid-template-columns: 1fr;
  }
  .gq-quizzes-grid {
    grid-template-columns: 1fr;
  }
  .gq-step-pill span:last-child {
    display: none;
  }
}

/* SaaS Subscription Multi-Period Switcher */
.sub-period-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.sub-period-pill {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-period-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.sub-period-pill.active {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   IMPORTANT WEBSITES & MARKET RESOURCES DIRECTORY
   ========================================================================== */
.resources-hero-header {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  padding: 24px 28px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.resources-hero-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

.resources-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.pulse-dot-blue {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

.resources-hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.gradient-text-blue {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.resources-hero-sub {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  max-width: 820px;
}

.resources-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.resources-search-wrap {
  position: relative;
  width: 100%;
}

.resources-search-wrap i.bi-search {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1rem;
}

.resources-search-wrap input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 12px;
  padding: 13px 44px 13px 46px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.resources-search-wrap input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.resources-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.resources-cat-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.res-cat-pill {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.res-cat-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.18);
}

.res-cat-pill.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.res-cat-pill .res-pill-count {
  background: rgba(255, 255, 255, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Resources Cards Grid */
.resources-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.res-card {
  background: rgba(21, 29, 48, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.res-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.15);
  background: rgba(21, 29, 48, 0.95);
}

.res-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.res-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.res-domain-favicon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.res-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid;
}

.res-card-body {
  flex: 1;
  margin-bottom: 14px;
}

.res-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.res-card-url {
  font-size: 0.76rem;
  color: #64748b;
  font-family: var(--font-mono);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.res-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}

.res-cat-tag {
  font-size: 0.72rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.res-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-res {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-res:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-open-res {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-open-res:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}

/* User Custom Personal Links */
.res-card-personal {
  border-color: rgba(168, 85, 247, 0.28);
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.4) 0%, rgba(21, 29, 48, 0.85) 100%);
}

.res-card-personal:hover {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(168, 85, 247, 0.22);
}

.res-badge-personal {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.res-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.6);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-res-action {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.18s ease;
}

.btn-res-action:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
}

.res-title-ext {
  color: #64748b;
  font-size: 0.82rem;
  opacity: 0.7;
  transition: all 0.2s;
}

.res-title-ext:hover {
  color: #38bdf8;
  opacity: 1;
}

/* Light Theme Overrides */
[data-theme="light"] .resources-hero-header {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-color: rgba(14, 165, 233, 0.2);
}
[data-theme="light"] .resources-hero-title {
  color: #0f172a;
}
[data-theme="light"] .resources-hero-sub {
  color: #475569;
}
[data-theme="light"] .resources-search-wrap input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}
[data-theme="light"] .res-cat-pill {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}
[data-theme="light"] .res-cat-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .res-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .res-card:hover {
  background: #ffffff;
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .res-card-title {
  color: #0f172a;
}
[data-theme="light"] .res-card-desc {
  color: #475569;
}
[data-theme="light"] .btn-copy-res {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

/* View Mode Toggle Buttons */
.view-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.view-toggle-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

[data-theme="light"] .view-toggle-btn {
  color: #64748b;
}

[data-theme="light"] .view-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .view-toggle-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
}

/* Admin Grid Card Styling */
.admin-res-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.admin-res-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(56, 189, 248, 0.15);
  background: rgba(15, 23, 42, 0.95);
}

[data-theme="light"] .admin-res-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .admin-res-card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* =============================================
   RESOURCES HUB: ICON PICKER, COLOR SWATCHES,
   LIVE PREVIEW & TRASH BIN — PREMIUM STYLES
   ============================================= */

/* Icon Picker Grid */
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}
.icon-picker-grid::-webkit-scrollbar { width: 4px; }
.icon-picker-grid::-webkit-scrollbar-track { background: transparent; }
.icon-picker-grid::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 4px; }

.icon-picker-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.icon-picker-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}
.icon-picker-btn.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.1);
}

/* User Modal – Purple accent for icon picker */
.icon-picker-user .icon-picker-btn.active {
  border-color: #c084fc;
  background: rgba(192, 132, 252, 0.2);
  color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.35);
}
.icon-picker-user .icon-picker-btn:hover {
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(192, 132, 252, 0.12);
  color: #c084fc;
}

.icon-picker-section-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #475569;
  margin: 0;
  grid-column: 1 / -1;
  padding: 4px 0 2px;
}

/* Color Swatch Row */
.color-swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.color-swatch-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  position: relative;
}
.color-swatch-circle:hover { transform: scale(1.2); box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.color-swatch-circle.active {
  border-color: #ffffff !important;
  transform: scale(1.25);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4), 0 4px 14px rgba(0,0,0,0.4);
}

/* Live Preview Card */
.res-live-preview-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.res-live-preview-box .preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #475569;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.res-live-preview-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.res-preview-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.res-preview-info { flex: 1; min-width: 0; }
.res-preview-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.res-preview-url {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-preview-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Trash Bin Pill */
.trash-pill {
  background: rgba(244, 63, 94, 0.1);
  border: 1.5px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.trash-pill:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}
.trash-pill.active {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}
.trash-count-badge {
  background: #f43f5e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  animation: trashBadgePulse 2s ease-in-out infinite;
}
@keyframes trashBadgePulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(244,63,94,0.5); }
  50% { box-shadow: 0 2px 12px rgba(244,63,94,0.8); }
}
.trash-row td { opacity: 0.82; }
.trash-row:hover td { opacity: 1; }
.trash-deleted-at { font-size: 0.72rem; color: #f43f5e; font-family: monospace; }

.stat-icon-wrapper.icon-rose { background: rgba(244,63,94,0.15); color: #f43f5e; }

/* Icon Picker Tab Buttons */
.icon-picker-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.icon-picker-tab-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-picker-tab-btn:hover { background: rgba(56,189,248,0.1); border-color: rgba(56,189,248,0.3); color: #38bdf8; }
.icon-picker-tab-btn.active { background: rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.5); color: #38bdf8; }
.icon-picker-user .icon-picker-tab-btn.active { background: rgba(192,132,252,0.15); border-color: rgba(192,132,252,0.5); color: #c084fc; }

/* Light theme overrides */
[data-theme="light"] .res-live-preview-box { background: rgba(248,250,252,0.9); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .icon-picker-grid { background: rgba(248,250,252,0.9); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .icon-picker-btn { border-color: rgba(0,0,0,0.1); background: rgba(255,255,255,0.8); color: #475569; }
[data-theme="light"] .trash-pill { background: rgba(244,63,94,0.06); }