/* ===== CSS Variables (Light Theme) ===== */
:root {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --bg-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --accent: #667eea;
  --accent-hover: #5a6fd6;
  --accent-light: rgba(102, 126, 234, 0.1);
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 260px;
  --header-height: 60px;
  --transition: 0.3s ease;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --text-primary: #e0e0e0;
  --text-secondary: #aaa;
  --text-muted: #666;
  --border: #2a2a4a;
  --border-light: #1f1f3a;
  --accent: #7c8cf8;
  --accent-hover: #6b7ce8;
  --accent-light: rgba(124, 140, 248, 0.15);
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
body.rtl { direction: rtl; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
body.rtl .sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
.sidebar-header {
  padding: 20px;
  background: var(--bg-accent);
  color: white;
  text-align: center;
}
.sidebar-header h2 { font-size: 1.2rem; margin-bottom: 4px; }
.sidebar-header small { opacity: 0.8; font-size: 0.75rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; cursor: pointer;
  color: var(--text-secondary); transition: all var(--transition);
  border-left: 3px solid transparent; font-size: 0.93rem;
}
body.rtl .nav-item { border-left: none; border-right: 3px solid transparent; }
.nav-item:hover { background: var(--accent-light); color: var(--accent); }
.nav-item.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
body.rtl .nav-item.active { border-left-color: transparent; border-right-color: var(--accent); }
.nav-item .icon { font-size: 1.2em; width: 24px; text-align: center; }
/* Auth state for account nav item */
.nav-item--authed { background: rgba(40, 167, 69, 0.08); border-left-color: #28a745 !important; color: #28a745; font-weight: 600; }
.nav-item--authed:hover { background: rgba(40, 167, 69, 0.15); color: #1e7e34; }
.nav-auth-dot { width: 8px; height: 8px; border-radius: 50%; background: #28a745; margin-left: auto; box-shadow: 0 0 6px rgba(40, 167, 69, 0.6); animation: authDotPulse 2s ease-in-out infinite; }
@keyframes authDotPulse { 0%, 100% { box-shadow: 0 0 4px rgba(40, 167, 69, 0.4); } 50% { box-shadow: 0 0 10px rgba(40, 167, 69, 0.8); } }
.nav-logout-btn { color: #dc3545 !important; font-size: 0.85rem !important; padding: 8px 20px !important; opacity: 0.7; }
.nav-logout-btn:hover { opacity: 1; background: rgba(220, 53, 69, 0.08) !important; color: #dc3545 !important; }
body.rtl .nav-item--authed { border-left-color: transparent !important; border-right-color: #28a745 !important; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 20px; }
.nav-group-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; color: var(--text-secondary); transition: all var(--transition); border-left: 3px solid transparent; font-size: 0.93rem; }
body.rtl .nav-group-toggle { border-left: none; border-right: 3px solid transparent; }
.nav-group-toggle:hover { background: var(--accent-light); color: var(--accent); }
.nav-group-toggle .icon { font-size: 1.2em; width: 24px; text-align: center; }
.nav-group-arrow { margin-left: auto; font-size: 0.8rem; transition: transform 0.3s ease; color: var(--text-muted); }
body.rtl .nav-group-arrow { margin-left: 0; margin-right: auto; }
.nav-group.open .nav-group-arrow { transform: rotate(90deg); }
.nav-group.open .nav-group-toggle { color: var(--accent); font-weight: 600; }
.nav-group-items { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.nav-group.open .nav-group-items { max-height: 400px; }
.nav-sub-item { padding-left: 40px !important; font-size: 0.87rem !important; }
body.rtl .nav-sub-item { padding-left: 20px !important; padding-right: 40px !important; }
.nav-sub-item .icon { font-size: 1em; }
.sidebar-footer {
  padding: 15px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}
body.rtl .main-content { margin-left: 0; margin-right: var(--sidebar-width); }

/* ===== Top Bar ===== */
.top-bar {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.top-bar-left { display: flex; align-items: center; gap: 16px; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: none; font-size: 1.5em; cursor: pointer; color: var(--text-primary); }
.page-title { font-size: 1.1rem; font-weight: 600; }

/* ===== Page Sections ===== */
.page-section { display: none; padding: 24px; max-width: 1400px; margin: 0 auto; }
.page-section.active { display: block; }

/* ===== Cards ===== */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h3 { font-size: 1.1rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); text-decoration: none; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.88rem; color: var(--text-secondary); }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.93rem; transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
select.form-control { cursor: pointer; }
input[type="color"].form-control { padding: 4px; height: 42px; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 120px; }

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

/* ===== Size Buttons ===== */
.size-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  padding: 8px 14px; background: var(--bg-tertiary); border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 0.82rem;
  font-weight: 500; transition: all var(--transition); color: var(--text-primary);
}
.size-btn:hover { border-color: var(--accent); }
.size-btn.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }

/* ===== Format Checkboxes ===== */
.format-group { display: flex; gap: 16px; flex-wrap: wrap; }
.format-label {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--bg-tertiary); border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
}
.format-label:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.format-label input { accent-color: var(--accent); }

/* ===== Results ===== */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.result-card {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; text-align: center;
}
.result-card img, .result-card video { max-width: 100%; height: auto; display: block; }
.result-card .result-info { padding: 12px; display: flex; justify-content: space-between; align-items: center; }
.result-card .result-info .format-badge {
  padding: 3px 10px; background: var(--accent); color: white;
  border-radius: 20px; font-size: 0.75rem; text-transform: uppercase; font-weight: 600;
}

/* ===== Templates Gallery ===== */
.template-card {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: all var(--transition);
}
.template-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.template-preview { height: 120px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.template-info { padding: 12px; }
.template-info h4 { font-size: 0.9rem; margin-bottom: 4px; }
.template-info .category-badge {
  display: inline-block; padding: 2px 8px; background: var(--accent-light);
  color: var(--accent); border-radius: 10px; font-size: 0.72rem; font-weight: 600;
}

/* ===== History Table ===== */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex; align-items: center; gap: 16px; padding: 12px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: background var(--transition);
}
.history-item:hover { background: var(--accent-light); }
.history-thumb { width: 80px; height: 50px; border-radius: 6px; object-fit: cover; background: #333; }
.history-details { flex: 1; }
.history-details h4 { font-size: 0.88rem; margin-bottom: 2px; }
.history-details small { color: var(--text-muted); }
.history-actions { display: flex; gap: 8px; }

/* ===== Auth Forms ===== */
.auth-container { max-width: 400px; margin: 40px auto; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 12px; text-align: center; cursor: pointer;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  font-weight: 600; transition: all var(--transition);
}
.auth-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.auth-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.auth-tab.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== Analytics Charts ===== */
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.chart-container { position: relative; height: 300px; width: 100%; }

/* ===== API Keys ===== */
.key-card {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 10px;
}
.key-prefix { font-family: monospace; font-size: 0.9rem; color: var(--accent); }
.key-new {
  background: var(--success); color: white; padding: 12px 16px;
  border-radius: var(--radius-sm); font-family: monospace; word-break: break-all;
  margin-bottom: 16px;
}

/* ===== Batch Mode ===== */
.batch-table { width: 100%; border-collapse: collapse; }
.batch-table th, .batch-table td {
  padding: 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.batch-table th { font-weight: 600; color: var(--text-muted); }
.batch-progress { display: flex; align-items: center; gap: 12px; }
.progress-bar {
  flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s ease; }

/* ===== Logo Manager ===== */
/* ===== Logo Manager ===== */
.lm-stats-bar { display: flex; gap: 12px; margin-bottom: 16px; }
.lm-stat { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-align: center; }
.lm-stat-val { display: block; font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.lm-stat-lbl { font-size: 0.78rem; color: var(--text-muted); }

/* Upload zone */
.lm-upload-zone { border: 2px dashed var(--border); border-radius: 16px; padding: 32px 20px; text-align: center; cursor: pointer; transition: all 0.25s; background: var(--bg-secondary); margin-bottom: 16px; }
.lm-upload-zone:hover, .lm-upload-zone.lm-drag-over { border-color: var(--accent); background: var(--accent-light); }
.lm-upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.lm-upload-text { font-size: 0.95rem; color: var(--text-primary); line-height: 1.6; }
.lm-upload-text strong { font-weight: 700; }
.lm-upload-text span { color: var(--text-muted); font-size: 0.85rem; }
.lm-upload-formats { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }

/* Upload preview */
.lm-upload-preview { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.lm-upload-preview-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lm-preview-item { display: flex; align-items: center; gap: 10px; background: var(--bg-tertiary); border-radius: 10px; padding: 8px 12px; position: relative; }
.lm-preview-item img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); }
.lm-preview-info { display: flex; flex-direction: column; }
.lm-preview-info strong { font-size: 0.82rem; color: var(--text-primary); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-preview-info span { font-size: 0.72rem; color: var(--text-muted); }
.lm-preview-rm { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: 2px 6px; margin-left: auto; }
.lm-preview-rm:hover { color: var(--danger); }
.lm-upload-preview-actions { display: flex; gap: 8px; }

/* Logo grid */
.lm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.lm-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: all 0.2s; }
.lm-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(102,126,234,0.12); transform: translateY(-2px); }
.lm-card-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.lm-card-img { position: relative; height: 140px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); cursor: pointer; overflow: hidden; }
.lm-card-img::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(var(--border) 0% 25%, transparent 0% 50%) 50% / 16px 16px; opacity: 0.4; }
.lm-card-img img { position: relative; max-width: 80%; max-height: 80%; object-fit: contain; z-index: 1; }
.lm-card-badge { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #28a745, #20c997); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; z-index: 2; }
.lm-card-format { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; z-index: 2; letter-spacing: 0.5px; }
.lm-card-body { padding: 10px 14px 6px; }
.lm-card-name { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.lm-card-actions { display: flex; border-top: 1px solid var(--border); }
.lm-act-btn { flex: 1; padding: 9px 0; background: none; border: none; border-right: 1px solid var(--border); cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); transition: all 0.15s; }
.lm-act-btn:last-child { border-right: none; }
.lm-act-btn:hover { background: var(--accent-light); color: var(--accent); }
.lm-act-btn.lm-act-danger:hover { background: rgba(220,53,69,0.1); color: var(--danger); }

/* Empty state */
.lm-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.lm-empty-icon { font-size: 3rem; margin-bottom: 8px; }
.lm-empty p { font-size: 0.9rem; }

/* Logo Position Editor */
.lm-editor-overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lm-editor { background: var(--bg-secondary); border-radius: 20px; max-width: 720px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,0.3); overflow: hidden; }
.lm-editor-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.lm-editor-header h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.lm-editor-close { background: none; border: none; font-size: 1.6rem; color: var(--text-muted); cursor: pointer; padding: 0 4px; }
.lm-editor-close:hover { color: var(--text-primary); }
.lm-editor-body { padding: 20px; }
.lm-editor-canvas-wrap { position: relative; margin-bottom: 16px; }
.lm-editor-canvas-wrap canvas { width: 100%; border-radius: 12px; cursor: grab; border: 1px solid var(--border); }
.lm-editor-canvas-wrap canvas:active { cursor: grabbing; }
.lm-editor-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); color: #fff; font-size: 0.72rem; padding: 4px 12px; border-radius: 20px; pointer-events: none; }
.lm-editor-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.lm-editor-presets-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-right: 4px; }
.lm-preset-btn { padding: 5px 12px; border: 1px solid var(--border); background: var(--bg-tertiary); border-radius: 8px; font-size: 0.78rem; cursor: pointer; color: var(--text-primary); transition: all 0.15s; }
.lm-preset-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.lm-editor-sliders { display: flex; gap: 20px; margin-bottom: 16px; }
.lm-editor-sliders label { flex: 1; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; }
.lm-editor-sliders label span { color: var(--accent); font-weight: 700; }
.lm-editor-sliders input[type=range] { width: 100%; accent-color: var(--accent); }
.lm-editor-actions { display: flex; gap: 10px; }

@media (max-width: 600px) {
  .lm-stats-bar { flex-direction: column; gap: 8px; }
  .lm-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lm-editor-sliders { flex-direction: column; gap: 10px; }
  .lm-editor-presets { gap: 4px; }
  .lm-preset-btn { padding: 4px 8px; font-size: 0.72rem; }
  .lm-toolbar-row { flex-direction: column; }
  .lm-toolbar-btns { width: 100%; }
  .lm-info-body { flex-direction: column; }
  .lm-info-preview { max-height: 160px; }
}

/* Logo Manager — Toolbar */
.lm-toolbar { margin-bottom: 14px; }
.lm-toolbar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lm-search-wrap { flex: 1; min-width: 180px; }
.lm-search { width: 100%; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); color: var(--text-primary); font-size: 0.88rem; outline: none; transition: border-color 0.2s; }
.lm-search:focus { border-color: var(--accent); }
.lm-toolbar-btns { display: flex; gap: 6px; align-items: center; }
.lm-select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); font-size: 0.8rem; cursor: pointer; }
.lm-tb-btn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.lm-tb-btn:hover, .lm-tb-btn-active { border-color: var(--accent); background: var(--accent-light); }

/* Logo Manager — Bulk bar */
.lm-bulk-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 14px; background: var(--accent-light); border-radius: 10px; font-size: 0.85rem; font-weight: 600; color: var(--accent); flex-wrap: wrap; }

/* Logo Manager — Quota bar */
.lm-quota-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lm-quota-track { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.lm-quota-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.lm-quota-fill.lm-quota-warn { background: var(--warning); }
.lm-quota-label { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* Logo Manager — Card extras */
.lm-card-check { position: absolute; top: 8px; left: 8px; z-index: 3; cursor: pointer; font-size: 1.1rem; }
.lm-card-checked { outline: 2px solid var(--accent); outline-offset: -2px; }
.lm-card-fav-badge { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 0.9rem; }
.lm-card-usage { font-size: 0.72rem; color: var(--accent); margin-top: 2px; }
.lm-card-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.lm-tag { background: var(--accent-light); color: var(--accent); font-size: 0.65rem; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Logo Manager — Info Modal */
.lm-info-overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lm-info-modal { background: var(--bg-secondary); border-radius: 20px; max-width: 600px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,0.3); overflow: hidden; }
.lm-info-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.lm-info-header h3 { margin: 0; font-size: 1.1rem; }
.lm-info-body { padding: 20px; display: flex; gap: 20px; }
.lm-info-preview { flex-shrink: 0; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; position: relative; }
.lm-info-preview::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(var(--border) 0% 25%, transparent 0% 50%) 50% / 14px 14px; opacity: 0.4; }
.lm-info-preview img { max-width: 85%; max-height: 85%; object-fit: contain; position: relative; z-index: 1; }
.lm-info-table { flex: 1; }
.lm-info-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 0.85rem; }
.lm-info-row:last-child { border-bottom: none; }
.lm-info-row span { color: var(--text-muted); }
.lm-info-row strong { color: var(--text-primary); }
.lm-info-link { flex-direction: column; gap: 4px; }
.lm-info-link input { width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-tertiary); color: var(--accent); font-size: 0.78rem; cursor: pointer; }
.lm-info-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 12px; cursor: pointer;
  font-size: 1.1em; display: flex; align-items: center;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--accent-light); }

/* ===== Language Select ===== */
.lang-select {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 12px; font-size: 0.82rem;
  color: var(--text-primary); cursor: pointer;
}

/* ===== Promo Banner (traffic2gift) ===== */
.promo-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(135deg, #1a0a2e, #3d1a78);
  border-top: 2px solid #ffd700;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  z-index: 1000;
  animation: slideUp 0.5s ease;
}
.promo-banner a { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.promo-banner .promo-text {
  font-size: 0.9rem; font-weight: 600; color: #ffd700;
}
.promo-banner .promo-cta {
  padding: 8px 20px; background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a0a2e; border-radius: 20px; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; white-space: nowrap;
}
.promo-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 1.3rem; cursor: pointer; padding: 5px; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
}
.promo-close:hover { color: white; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ===== Generation Progress Overlay ===== */
.gen-progress-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 9999;
}
.gen-progress-overlay.active { display: flex; }
.gen-progress-card {
  background: var(--bg-secondary); border-radius: var(--radius);
  padding: 40px 48px; text-align: center; max-width: 420px; width: 90%;
  box-shadow: var(--shadow-lg); animation: fadeInUp 0.3s ease;
}
.gen-progress-icon { margin-bottom: 20px; }
.gen-spinner {
  width: 56px; height: 56px; margin: 0 auto;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.gen-progress-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); }
.gen-progress-bar-wrap {
  width: 100%; height: 10px; background: var(--bg-tertiary);
  border-radius: 5px; overflow: hidden; margin-bottom: 14px;
}
.gen-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--accent), #764ba2);
  border-radius: 5px; transition: width 0.5s ease;
  background-size: 200% 100%; animation: shimmer 2s ease infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.gen-progress-info {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem; margin-bottom: 12px;
}
.gen-progress-stage { color: var(--accent); font-weight: 600; }
.gen-progress-time { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; font-weight: 600; }
.gen-progress-hint { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

/* ===== Results Section (Improved) ===== */
.results-section { margin-top: 20px; animation: fadeInUp 0.4s ease; }
.results-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(40,167,69,0.1), rgba(40,167,69,0.05));
  border: 1px solid rgba(40,167,69,0.3); border-radius: var(--radius);
}
.results-check {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--success); color: white; border-radius: 50%;
  font-size: 1.3rem; font-weight: 700; flex-shrink: 0;
}
.results-header h3 { font-size: 1.05rem; margin-bottom: 2px; color: var(--success); }
.results-meta { font-size: 0.82rem; color: var(--text-muted); }
.results-grid-new { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.result-card-new {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all var(--transition);
}
.result-card-new:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.result-card-preview {
  position: relative; background: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; padding: 12px;
}
.result-card-preview img, .result-card-preview video {
  max-width: 100%; max-height: 250px; border-radius: 4px;
  display: block; margin: 0 auto;
}
.result-card-format {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 10px; background: var(--accent); color: white;
  border-radius: 20px; font-size: 0.72rem; text-transform: uppercase; font-weight: 700;
}
.result-card-body { padding: 14px 16px; }
.result-card-details {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 0.82rem; color: var(--text-muted);
}
.result-card-size { font-weight: 600; color: var(--text-primary); }
.result-card-download {
  display: block; width: 100%; padding: 10px; text-align: center;
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.result-card-download:hover { background: var(--accent-hover); text-decoration: none; color: white; }
.results-actions {
  display: flex; gap: 12px; margin-top: 16px; justify-content: center;
}

/* ===== Background Image Upload ===== */
.bg-image-upload { margin-top: 4px; }
.bg-image-dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 24px; text-align: center; cursor: pointer;
  transition: all var(--transition); color: var(--text-muted); font-size: 0.88rem;
}
.bg-image-dropzone:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.bg-image-dropzone.dragover { border-color: var(--accent); background: var(--accent-light); }
.bg-image-preview {
  position: relative; display: inline-block; margin-top: 8px;
  border: 2px solid var(--accent); border-radius: var(--radius-sm); overflow: hidden;
}
.bg-image-preview img { max-width: 200px; max-height: 100px; display: block; }
.bg-image-remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  background: var(--danger); color: white; border: none; border-radius: 50%;
  cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ===== Preview Canvas ===== */
.preview-wrap {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
  position: sticky; top: calc(var(--header-height) + 24px);
}
.preview-wrap canvas { max-width: 100%; height: auto; border-radius: 8px; }

/* ===== Toast / Notifications ===== */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm); color: white;
  font-size: 0.88rem; font-weight: 500;
  animation: fadeInRight 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* ===== Projects Grid ===== */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; margin-top: 20px;
}
.project-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition); display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-card-header {
  padding: 20px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--border);
}
.project-card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0;
}
.project-card-title { font-weight: 700; font-size: 1.05rem; }
.project-card-category {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin-top: 2px;
}
.project-card-body { padding: 16px 20px; flex: 1; }
.project-card-body p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.project-card-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-card-features li {
  background: var(--accent-light); color: var(--accent);
  padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 500;
}
.project-card-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.project-card-footer .btn { font-size: 0.82rem; }

/* ===== Referral Links in Profile ===== */
.ref-links-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.ref-link-row {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--bg-tertiary); border-radius: var(--radius-sm);
}
.ref-link-row .ref-link-icon { font-size: 1.3rem; width: 32px; text-align: center; flex-shrink: 0; }
.ref-link-row .ref-link-name { font-size: 0.82rem; font-weight: 600; min-width: 100px; flex-shrink: 0; }
.ref-link-row input { flex: 1; font-size: 0.82rem; min-width: 0; }

/* ===== Referral Statistics ===== */
.stat-period { padding: 4px 10px; font-size: 0.78rem; border-radius: 6px; cursor: pointer; transition: all .2s; }
.stat-period.active { background: var(--accent-primary); color: #fff; }
.stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-card { text-align: center; padding: 16px 8px; background: var(--bg-tertiary); border-radius: var(--radius); border: 1px solid var(--border-color); }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--accent-primary); line-height: 1.1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.stat-source-row { margin-bottom: 10px; }
.stat-source-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.stat-source-name { font-size: 0.85rem; font-weight: 500; }
.stat-source-count { font-size: 0.85rem; font-weight: 700; }
.stat-bar-bg { height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), #764ba2); border-radius: 3px; transition: width .4s ease; }
.stat-daily-chart { display: flex; align-items: flex-end; gap: 8px; justify-content: space-between; height: 120px; padding: 10px 0; }
.stat-day-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.stat-day-val { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }
.stat-day-bar { width: 100%; max-width: 32px; background: linear-gradient(180deg, var(--accent-primary), #764ba2); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .4s ease; }
.stat-day-label { font-size: 0.7rem; color: var(--text-muted); }
.stat-recent-table { font-size: 0.82rem; }
.stat-recent-header { display: grid; grid-template-columns: 1.2fr 1.5fr 0.8fr; gap: 8px; padding: 8px 0; border-bottom: 2px solid var(--border-color); font-weight: 600; color: var(--text-muted); }
.stat-recent-row { display: grid; grid-template-columns: 1.2fr 1.5fr 0.8fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.stat-recent-row:last-child { border-bottom: none; }
.sponsor-banner { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }

/* ===== Embed Code Modal ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; animation: fadeIn 0.2s ease;
}
.modal-dialog {
  background: var(--bg-secondary); border-radius: var(--radius);
  max-width: 600px; width: 90%; max-height: 80vh;
  box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease;
  display: flex; flex-direction: column;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 1.15rem; }
.modal-close {
  background: none; border: none; font-size: 1.8rem; color: var(--text-muted);
  cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.modal-body { padding: 20px 24px; flex: 1; overflow-y: auto; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}
.embed-code-textarea {
  width: 100%; min-height: 120px; padding: 12px;
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace; font-size: 0.88rem;
  resize: vertical; outline: none;
}
.embed-code-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Saved Banners Page ===== */
.saved-banners-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.saved-banner-card {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.saved-banner-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.saved-banner-preview {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
}
.saved-banner-preview img,
.saved-banner-preview video {
  width: 100%; height: 100%; object-fit: cover;
}
.saved-banner-preview a { display: block; width: 100%; height: 100%; }
.saved-banner-info {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.saved-banner-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.saved-banner-meta strong { font-size: 0.9rem; color: var(--text-primary); }
.format-badge-small {
  padding: 2px 8px; background: var(--accent); color: white;
  border-radius: 12px; font-size: 0.7rem; text-transform: uppercase;
  font-weight: 700;
}
.saved-banner-link {
  margin: 6px 0; font-size: 0.82rem;
}
.saved-banner-link a {
  color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.saved-banner-link a:hover { text-decoration: underline; }
.saved-banner-date {
  font-size: 0.78rem; color: var(--text-muted); margin-top: 6px;
}
.saved-banner-actions {
  padding: 12px 16px; display: flex; gap: 8px;
}
.saved-banner-actions .btn { flex: 1; justify-content: center; }

/* ===== Statistics Page ===== */
.stats-filters {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}

.stats-banner-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.stats-card-header {
  display: flex; gap: 16px; align-items: center; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}

.stats-banner-preview-small {
  flex-shrink: 0;
}

.stats-banner-meta {
  flex: 1; min-width: 0;
}
.stats-banner-meta strong {
  display: block; font-size: 0.95rem; margin-bottom: 4px;
}
.stats-banner-meta a {
  display: block; word-break: break-all; margin-top: 6px;
}

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

.stat-card {
  background: rgba(102, 126, 234, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stats-chart {
  height: 250px;
  margin: 24px 0;
  position: relative;
}

.top-referrers {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.top-referrers h4 {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.top-referrers ul {
  list-style: none;
  padding: 0;
}

.top-referrers li {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.top-referrers li:last-child {
  border-bottom: none;
}

.top-referrers li span:first-child {
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  margin-right: 12px;
}

.top-referrers li span:last-child {
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  body.rtl .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; margin-right: 0 !important; }
  .hamburger { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .saved-banners-grid { grid-template-columns: 1fr; }
  .page-section { padding: 16px; }
  .form-row { flex-direction: column; }
  .promo-banner { flex-direction: column; padding: 12px 40px 12px 12px; }
}
@media (max-width: 480px) {
  html { font-size: 14px; }
  .sidebar { width: 100%; }
}

/* ===== Help Icons (Tooltips) ===== */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-light, rgba(102,126,234,0.12));
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  margin-left: 5px;
  border: 1px solid var(--accent);
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}
.help-icon:hover { background: var(--accent); color: #fff; }
.help-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--bg-secondary);
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  white-space: normal;
  width: 240px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  line-height: 1.5;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.help-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999;
}
.help-icon:hover::after,
.help-icon:hover::before { opacity: 1; }

/* ===== Help Page ===== */
#page-help .help-header {
  text-align: center;
  padding: 28px 24px 20px;
  margin-bottom: 20px;
}
#page-help .help-header h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#page-help .help-header p { color: var(--text-secondary); font-size: 14px; margin: 0; }

.help-accordion { max-width: 780px; margin: 0 auto; }
.help-accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.help-accordion-header {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom: 1px solid transparent;
  user-select: none;
  transition: background 0.15s;
}
.help-accordion-header:hover { background: var(--bg-tertiary); }
.help-accordion-item.open .help-accordion-header {
  border-bottom-color: var(--border);
  color: var(--accent);
  background: var(--bg-tertiary);
}
.help-accordion-header .acc-icon { font-size: 18px; }
.help-accordion-header .acc-arrow { margin-left: auto; font-size: 12px; transition: transform 0.2s; color: var(--text-muted); }
.help-accordion-item.open .acc-arrow { transform: rotate(90deg); }
.help-accordion-body { display: none; padding: 22px 20px; background: var(--bg-tertiary); }
.help-accordion-item.open .help-accordion-body { display: block; }
.help-accordion-body p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin: 0 0 14px; }
.help-accordion-body h4 { color: var(--text-primary); font-size: 14px; margin: 16px 0 8px; }

.help-step { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.help-step-n {
  background: linear-gradient(135deg, var(--accent), #764ba2);
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.help-step-t strong { display: block; margin-bottom: 3px; color: var(--text-primary); font-size: 14px; }
.help-step-t span { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

.help-tip {
  background: rgba(102,126,234,0.08);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
[data-theme="dark"] .help-tip { background: rgba(124,140,248,0.1); }

.help-warning {
  background: rgba(255,152,0,0.08);
  border-left: 3px solid #ff9800;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  margin: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.help-code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  margin: 10px 0;
  overflow-x: auto;
  color: #667eea;
  white-space: pre;
}
[data-theme="dark"] .help-code { color: #9eb3ff; }

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.help-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.help-card h4 { color: var(--accent); margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.help-card p { color: var(--text-secondary); font-size: 12px; margin: 0; line-height: 1.5; }

.help-badge {
  display: inline-block;
  background: var(--accent-light, rgba(102,126,234,0.12));
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px;
}

@media (max-width: 600px) {
  .help-icon::after { width: 200px; left: 0; transform: none; }
  .help-accordion-header { font-size: 14px; padding: 12px 14px; }
}

/* Custom size input row */
.custom-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.custom-size-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.custom-size-input {
  width: 72px !important;
  text-align: center;
  padding: 6px 8px !important;
  font-size: 0.88rem;
}
.custom-size-sep {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.1rem;
}
.custom-size-px {
  color: var(--text-muted);
  font-size: 0.82rem;
}
/* Hide spinners from number inputs */
.custom-size-input::-webkit-inner-spin-button,
.custom-size-input::-webkit-outer-spin-button { opacity: 0.4; }

/* ===== CAPTCHA ===== */
.captcha-group { margin-bottom: 16px; }
.captcha-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.03em; text-transform: uppercase; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-question { font-size: 1.1rem; font-weight: 700; color: var(--accent); background: var(--accent-light); padding: 8px 14px; border-radius: var(--radius-sm); min-width: 90px; text-align: center; white-space: nowrap; letter-spacing: 1px; }
.captcha-input { width: 80px !important; text-align: center; font-size: 1.1rem; font-weight: 700; }
.captcha-input::-webkit-inner-spin-button, .captcha-input::-webkit-outer-spin-button { opacity: 0.4; }
.captcha-refresh { background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm); width: 32px; height: 32px; cursor: pointer; font-size: 1rem; transition: all 0.2s; flex-shrink: 0; }
.captcha-refresh:hover { color: var(--accent); border-color: var(--accent); transform: rotate(180deg); }

/* ===== GROWTH PAGE ===== */
/* Level Card */
.growth-level-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.08)); border: 1px solid rgba(102,126,234,0.25); }
.level-left { display: flex; align-items: center; gap: 16px; }
.level-badge { font-size: 3rem; line-height: 1; filter: drop-shadow(0 0 12px currentColor); }
.level-name { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.level-sub { color: var(--text-muted); font-size: 0.88rem; }
.level-right { flex: 1; min-width: 200px; }
.level-progress-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.level-progress-bar { background: var(--bg-tertiary); border-radius: 99px; height: 8px; overflow: hidden; }
.level-progress-fill { height: 100%; border-radius: 99px; transition: width 0.6s ease; background: var(--accent); }
.level-progress-text { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; text-align: right; }
/* Stats Row */
.growth-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin-bottom: 16px; }
.gstat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; transition: transform 0.15s; }
.gstat-card:hover { transform: translateY(-2px); }
.gstat-cta { cursor: pointer; background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.06)); border-color: var(--accent); }
.gstat-cta:hover { background: var(--accent-light); }
.gstat-icon { font-size: 1.5rem; margin-bottom: 6px; }
.gstat-val { font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
.gstat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
/* Levels Roadmap */
.levels-roadmap { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 8px 0; flex-wrap: nowrap; }
.level-road-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 16px; border-radius: var(--radius-sm); position: relative; min-width: 80px; flex-shrink: 0; }
.level-road-item.active { background: var(--accent-light); border: 1px solid var(--accent); }
.level-road-item.done { opacity: 0.6; }
.level-road-icon { font-size: 1.8rem; }
.level-road-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.level-road-req { font-size: 0.72rem; color: var(--text-muted); }
.level-road-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.65rem; padding: 2px 6px; border-radius: 99px; white-space: nowrap; }
.level-road-arrow { color: var(--text-muted); font-size: 1.2rem; flex-shrink: 0; padding: 0 4px; }
/* Share Links */
.share-link-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.share-link-label { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.share-link-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-link-input { flex: 1; min-width: 180px; font-size: 0.82rem; color: var(--text-muted); }
.qr-block { display: flex; align-items: center; gap: 10px; }
.qr-img { border-radius: 8px; border: 2px solid var(--border); width: 80px; height: 80px; }
.qr-hint { font-size: 0.75rem; color: var(--text-muted); }
/* Post Tabs */
.posts-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.post-tab { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 14px; font-size: 0.85rem; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
.post-tab.active, .post-tab:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.post-content-box { display: flex; flex-direction: column; gap: 10px; }
.post-textarea { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-size: 0.88rem; color: var(--text-primary); line-height: 1.6; height: 180px; resize: vertical; width: 100%; font-family: inherit; }
.post-actions { display: flex; align-items: center; justify-content: space-between; }
.post-chars { font-size: 0.78rem; color: var(--text-muted); }
/* Banner Kit */
.banner-kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.bkit-card { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.bkit-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
/* UTM Builder */
.utm-form { display: flex; flex-direction: column; gap: 10px; }
.utm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 8px; }
.utm-output-row { display: flex; gap: 8px; align-items: center; }
.utm-output-row .form-control { flex: 1; font-size: 0.82rem; color: var(--text-muted); }
/* Team Table */
.team-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.team-table th { color: var(--text-muted); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.78rem; text-transform: uppercase; }
.team-table td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.team-table tr:last-child td { border-bottom: none; }
.team-count { background: var(--accent-light); color: var(--accent); padding: 2px 8px; border-radius: 99px; font-weight: 700; font-size: 0.82rem; }
.team-source { background: var(--bg-tertiary); color: var(--text-muted); padding: 2px 8px; border-radius: 99px; font-size: 0.78rem; }
.team-project-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 1px; font-size: 13px; background: var(--bg-tertiary); border-radius: 4px; cursor: default; border: 1px solid var(--border); }
.team-email-ok { font-size: 0.85rem; }
.team-email-no { font-size: 0.85rem; opacity: 0.6; }
.team-email-btn { padding: 2px 6px !important; font-size: 0.75rem !important; min-width: auto !important; }
.btn-xs { padding: 2px 8px; font-size: 0.75rem; border-radius: 4px; }
.btn-accent { background: var(--accent); color: #fff; border: none; cursor: pointer; }
.btn-accent:hover { opacity: 0.85; }
/* Sponsor info */
.sponsor-info { margin-top: 8px; }
.sponsor-name { font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.sponsor-contacts { display: flex; flex-wrap: wrap; gap: 10px; }
.sponsor-link { color: var(--text-primary); text-decoration: none; background: var(--bg-tertiary); padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; border: 1px solid var(--border); transition: 0.2s; }
.sponsor-link:hover { border-color: var(--accent); color: var(--accent); }
/* Modal overlay */
.modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); width: 100%; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }
.team-empty { text-align: center; padding: 32px 20px; color: var(--text-muted); }
.team-empty p { margin-bottom: 16px; }
/* Growth Nudge Popup */
.growth-nudge { position: fixed; bottom: 80px; right: 20px; z-index: 9998; animation: slideUpFade 0.4s ease; }
.nudge-inner { background: var(--bg-secondary); border: 1px solid var(--accent); border-radius: 14px; padding: 20px; max-width: 280px; box-shadow: var(--shadow-lg); position: relative; }
.nudge-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.nudge-close:hover { color: var(--text-primary); }
.nudge-icon { font-size: 2rem; margin-bottom: 8px; }
.nudge-title { font-weight: 800; font-size: 1rem; color: var(--text-primary); margin-bottom: 6px; }
.nudge-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.nudge-inner .btn { width: 100%; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* Nag Banner — persistent notification bar */
.nag-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; animation: nagSlideUp 0.5s ease; }
.nag-banner-inner { display: flex; align-items: center; gap: 14px; padding: 14px 20px; margin: 0; }
.nag-banner--verify .nag-banner-inner { background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%); }
.nag-banner--register .nag-banner-inner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.nag-banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.nag-banner-body { flex: 1; color: #fff; }
.nag-banner-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 2px; }
.nag-banner-text { font-size: 0.82rem; opacity: 0.92; line-height: 1.4; }
.nag-banner-btn { background: #fff; color: #333; border: none; border-radius: 8px; padding: 8px 20px; font-weight: 700; font-size: 0.85rem; cursor: pointer; white-space: nowrap; transition: transform 0.15s, box-shadow 0.15s; }
.nag-banner-btn:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.nag-banner--verify .nag-banner-btn { color: #e65100; }
.nag-banner--persistent .nag-banner-inner { background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #dc2626 100%); background-size: 200% 200%; animation: nagGradientShift 3s ease infinite; }
.nag-banner-btn--pulse { animation: nagBtnPulse 2s ease-in-out infinite; }
@keyframes nagBtnPulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.5); } 50% { transform: scale(1.06); box-shadow: 0 0 20px 4px rgba(255,255,255,0.3); } }
@keyframes nagGradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.nag-banner--register .nag-banner-btn { color: #5c3dba; }
.nag-banner-close { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; line-height: 1; flex-shrink: 0; }
.nag-banner-close:hover { color: #fff; }
@keyframes nagSlideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 600px) {
  .nag-banner-inner { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .nag-banner-btn { width: 100%; text-align: center; }
}
/* ===== Donate Page — Premium Design ===== */
#page-donate.page-section { padding: 0; max-width: 100%; }
#donateContent { max-width: 900px; margin: 0 auto; padding: 0 20px 40px; }
.donate-hero { position: relative; text-align: center; padding: 48px 24px 40px; background: linear-gradient(135deg, #1a0533 0%, #2d1b69 30%, #667eea 70%, #764ba2 100%); color: #fff; margin: 0 -20px 28px; overflow: hidden; }
.donate-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 50%, rgba(255,215,0,0.12) 0%, transparent 50%), radial-gradient(circle at 80% 30%, rgba(102,126,234,0.2) 0%, transparent 50%); pointer-events: none; }
.donate-hero::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 32px; background: var(--bg-primary); border-radius: 24px 24px 0 0; }
.donate-hero h2 { font-size: 2rem; font-weight: 900; margin: 0 0 10px; position: relative; z-index: 1; letter-spacing: -0.5px; text-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.donate-hero p { opacity: 0.92; font-size: 1.05rem; margin: 0; position: relative; z-index: 1; max-width: 560px; margin: 0 auto; line-height: 1.6; }
.donate-hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; padding: 6px 16px; font-size: 0.82rem; font-weight: 600; margin-bottom: 14px; position: relative; z-index: 1; }
.donate-step { display: none; }
.donate-step.active { display: block; animation: donateFadeIn 0.35s ease; }
@keyframes donateFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
/* Action Cards */
.donate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.donate-action-card { position: relative; background: var(--bg-secondary); border: 2px solid var(--border); border-radius: 16px; padding: 28px 20px; text-align: center; cursor: pointer; transition: all 0.3s cubic-bezier(.4,0,.2,1); overflow: hidden; }
.donate-action-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%); opacity: 0; transition: opacity 0.3s; }
.donate-action-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(102,126,234,0.18); }
.donate-action-card:hover::before { opacity: 1; }
.dac-icon { font-size: 2.8rem; margin-bottom: 12px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1)); }
.dac-title { font-weight: 800; font-size: 1.15rem; color: var(--text-primary); margin-bottom: 8px; position: relative; }
.dac-text { font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; position: relative; }
.dac-badge { display: inline-block; background: linear-gradient(135deg, var(--accent), #764ba2); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; margin-top: 10px; position: relative; }
/* Crypto Wallets */
.crypto-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 12px; }
.crypto-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 20px; }
.crypto-row { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.crypto-row:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(102,126,234,0.1); }
.cr-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 900; flex-shrink: 0; }
.cr-icon-bnb { background: linear-gradient(135deg, #f3ba2f, #e8a90a); color: #fff; }
.cr-icon-eth { background: linear-gradient(135deg, #627eea, #3c3c3d); color: #fff; }
.cr-icon-poly { background: linear-gradient(135deg, #8247e5, #6f42c1); color: #fff; }
.cr-icon-arb { background: linear-gradient(135deg, #2d374b, #28a0f0); color: #fff; }
.cr-icon-avax { background: linear-gradient(135deg, #e84142, #c0392b); color: #fff; }
.cr-icon-other { background: linear-gradient(135deg, #555, #888); color: #fff; }
.cr-icon-btc { background: linear-gradient(135deg, #f7931a, #e2820a); color: #fff; }
.cr-icon-sol { background: linear-gradient(135deg, #9945ff, #14f195); color: #fff; }
.cr-icon-trx { background: linear-gradient(135deg, #ff0013, #eb0029); color: #fff; }
.crypto-row-top { border: 2px solid #f3ba2f; background: linear-gradient(135deg, var(--bg-secondary), rgba(243,186,47,0.06)); box-shadow: 0 2px 16px rgba(243,186,47,0.1); }
.crypto-row-top .cr-name { color: #f3ba2f; font-size: 0.95rem; }
.cr-info { flex: 1; min-width: 0; }
.cr-name { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.cr-nets { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.cr-tokens { font-size: 0.73rem; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.cr-addr { font-family: 'Courier New', monospace; font-size: 0.7rem; color: var(--accent); word-break: break-all; margin-top: 5px; background: var(--bg-tertiary); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); }
.cr-copy { background: linear-gradient(135deg, var(--accent), #764ba2); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: transform 0.15s, box-shadow 0.15s; }
.cr-copy:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(102,126,234,0.3); }
/* Donate Form */
.donate-form-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-top: 20px; }
.donate-form-card h4 { margin: 0 0 4px; color: var(--text-primary); font-size: 1.1rem; }
.donate-form-card .form-group { margin-bottom: 14px; }
.donate-form-card label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.donate-form-card textarea { width: 100%; min-height: 80px; resize: vertical; }
.donate-submit-btn { width: 100%; font-size: 1.05rem; padding: 14px; font-weight: 700; background: linear-gradient(135deg, #28a745, #20c997); color: #fff; border: none; border-radius: 10px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.donate-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(40,167,69,0.3); }
.donate-back-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; padding: 8px 0; margin-bottom: 14px; font-weight: 600; }
.donate-back-btn:hover { text-decoration: underline; }
.donate-highlight { background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.06)); border: 1px solid rgba(102,126,234,0.2); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.donate-highlight p { margin: 0; line-height: 1.6; font-size: 0.9rem; color: var(--text-secondary); }
.donate-highlight strong { color: var(--text-primary); }
/* Donor Leaderboard */
.donor-board { margin-top: 0; }
.donor-board-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.donor-board-header h3 { margin: 0; font-size: 1.15rem; }
.donor-stats-row { display: flex; gap: 14px; margin-bottom: 18px; }
.donor-stat-box { flex: 1; background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary)); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.donor-stat-val { font-size: 1.6rem; font-weight: 900; background: linear-gradient(135deg, var(--accent), #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.donor-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; font-weight: 500; }
.donor-list { display: flex; flex-direction: column; gap: 8px; }
.donor-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; transition: all 0.2s; }
.donor-item:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(102,126,234,0.08); }
.donor-rank { font-weight: 900; font-size: 1.1rem; width: 36px; text-align: center; color: var(--text-muted); flex-shrink: 0; }
.donor-item:nth-child(1) .donor-rank { color: #ffd700; font-size: 1.4rem; }
.donor-item:nth-child(2) .donor-rank { color: #c0c0c0; font-size: 1.3rem; }
.donor-item:nth-child(3) .donor-rank { color: #cd7f32; font-size: 1.2rem; }
.donor-item:nth-child(1) { border-color: rgba(255,215,0,0.25); background: linear-gradient(135deg, var(--bg-secondary), rgba(255,215,0,0.04)); }
.donor-item:nth-child(2) { border-color: rgba(192,192,192,0.25); }
.donor-item:nth-child(3) { border-color: rgba(205,127,50,0.2); }
.donor-body { flex: 1; min-width: 0; }
.donor-name { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.donor-idea { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 350px; }
.donor-ad { margin-top: 5px; }
.donor-ad a { font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.donor-ad a:hover { text-decoration: underline; }
.donor-ad-clicks { font-size: 0.7rem; color: var(--text-muted); margin-left: 6px; }
.donor-amount { font-weight: 900; font-size: 1.1rem; color: var(--success); white-space: nowrap; flex-shrink: 0; }
.donor-date { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.donor-empty { text-align: center; padding: 30px 20px; }
.donor-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.donor-empty p { color: var(--text-muted); font-size: 0.9rem; }
/* Thank you step */
.donate-thanks { text-align: center; padding: 50px 24px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px; }
.donate-thanks-icon { font-size: 4rem; margin-bottom: 16px; animation: thanksBounce 0.6s ease; }
@keyframes thanksBounce { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.donate-thanks h3 { font-size: 1.4rem; background: linear-gradient(135deg, var(--accent), #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin: 0 0 10px; }
@media (max-width: 600px) {
  .donate-hero { padding: 32px 16px 28px; }
  .donate-hero h2 { font-size: 1.5rem; }
  .donate-actions { grid-template-columns: 1fr; gap: 12px; }
  .donate-action-card { padding: 20px 16px; }
  .donor-stats-row { flex-direction: column; gap: 8px; }
  .donor-idea { max-width: 160px; }
  .crypto-row { flex-wrap: wrap; }
  .cr-copy { width: 100%; text-align: center; }
  #donateContent { padding: 0 12px 30px; }
}
/* ===== Top Donors Full Page ===== */
#page-donors.page-section { padding: 0; max-width: 100%; }
#donorsPageContent { max-width: 800px; margin: 0 auto; padding: 0 20px 40px; }
.donors-page-hero { text-align: center; padding: 44px 20px 36px; background: linear-gradient(135deg, #0d0d2b 0%, #1a1a4e 30%, #2d1b69 60%, #4a2480 100%); color: #fff; margin: 0 -20px 24px; position: relative; overflow: hidden; }
.donors-page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(255,215,0,0.1) 0%, transparent 60%), radial-gradient(ellipse at 70% 20%, rgba(192,192,192,0.08) 0%, transparent 50%); }
.donors-page-hero::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 28px; background: var(--bg-primary); border-radius: 20px 20px 0 0; }
.donors-page-badge { display: inline-block; background: rgba(255,215,0,0.15); border: 1px solid rgba(255,215,0,0.3); color: #ffd700; border-radius: 50px; padding: 5px 16px; font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; position: relative; z-index: 1; }
.donors-page-hero h2 { font-size: 1.8rem; font-weight: 900; margin: 0 0 10px; position: relative; z-index: 1; }
.donors-page-hero p { font-size: 0.95rem; opacity: 0.88; max-width: 520px; margin: 0 auto; line-height: 1.6; position: relative; z-index: 1; }
.donors-page-stats { display: flex; gap: 14px; margin-bottom: 24px; }
.donors-pg-stat { flex: 1; text-align: center; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; padding: 18px 12px; }
.donors-pg-stat-val { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, #ffd700, #ff8c00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.donors-pg-stat-lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.donors-page-list { display: flex; flex-direction: column; gap: 10px; }
.donors-pg-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; transition: all 0.2s; }
.donors-pg-item:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(102,126,234,0.1); transform: translateX(3px); }
.donors-pg-item-top1 { border: 2px solid rgba(255,215,0,0.4); background: linear-gradient(135deg, var(--bg-secondary), rgba(255,215,0,0.05)); }
.donors-pg-item-top2 { border: 2px solid rgba(192,192,192,0.35); background: linear-gradient(135deg, var(--bg-secondary), rgba(192,192,192,0.04)); }
.donors-pg-item-top3 { border: 2px solid rgba(205,127,50,0.3); background: linear-gradient(135deg, var(--bg-secondary), rgba(205,127,50,0.04)); }
.donors-pg-rank { font-weight: 900; font-size: 1.2rem; width: 40px; text-align: center; flex-shrink: 0; color: var(--text-muted); }
.donors-pg-item-top1 .donors-pg-rank { color: #ffd700; font-size: 1.5rem; }
.donors-pg-item-top2 .donors-pg-rank { color: #c0c0c0; font-size: 1.4rem; }
.donors-pg-item-top3 .donors-pg-rank { color: #cd7f32; font-size: 1.3rem; }
.donors-pg-body { flex: 1; min-width: 0; }
.donors-pg-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.donors-pg-idea { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.donors-pg-ad { margin-top: 6px; background: rgba(102,126,234,0.06); border-radius: 8px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 8px; }
.donors-pg-ad a { font-size: 0.85rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.donors-pg-ad a:hover { text-decoration: underline; }
.donors-pg-clicks { font-size: 0.72rem; color: var(--text-muted); }
.donors-pg-right { text-align: right; flex-shrink: 0; }
.donors-pg-amount { font-weight: 900; font-size: 1.15rem; color: var(--success); }
.donors-pg-date { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 600px) {
  .donors-page-hero { padding: 32px 14px 28px; }
  .donors-page-hero h2 { font-size: 1.4rem; }
  .donors-page-stats { flex-direction: column; gap: 8px; }
  .donors-pg-idea { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #donorsPageContent { padding: 0 12px 30px; }
}
/* Donors Embed Block (for landing pages) */
.donors-embed-block { margin-top: 32px; padding: 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; }
.donors-embed-title { margin: 0 0 14px; font-size: 1.1rem; text-align: center; }
.donors-embed-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.donors-embed-item:last-of-type { border-bottom: none; }
.donors-embed-rank { font-weight: 900; width: 30px; text-align: center; flex-shrink: 0; }
.donors-embed-name { font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donors-embed-ad { font-size: 0.8rem; color: var(--accent); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.donors-embed-ad:hover { text-decoration: underline; }
.donors-embed-amt { font-weight: 800; color: var(--success); flex-shrink: 0; }

/* ===== Auth Gate (login prompt for restricted pages) ===== */
.auth-gate { text-align: center; padding: 48px 24px; }
.auth-gate-icon { font-size: 3.5rem; margin-bottom: 12px; }
.auth-gate h3 { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.auth-gate-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.5; max-width: 400px; margin-left: auto; margin-right: auto; }
.auth-gate-btn { padding: 14px 36px !important; font-size: 1rem !important; font-weight: 700 !important; border-radius: 12px !important; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; border: none !important; color: #fff !important; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; display: inline-flex; align-items: center; gap: 8px; }
.auth-gate-btn:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(102,126,234,0.35); }
.auth-gate-card { border: 2px dashed var(--border); }

/* ===== Email Verification Modal ===== */
.verify-modal-overlay { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: vmFadeIn 0.4s ease; }
@keyframes vmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vmSlideUp { from { opacity: 0; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.verify-modal { background: var(--bg-secondary); border-radius: 20px; max-width: 480px; width: 100%; padding: 36px 32px 28px; box-shadow: 0 24px 64px rgba(0,0,0,0.3); animation: vmSlideUp 0.5s ease; position: relative; max-height: 90vh; overflow-y: auto; }
.verify-modal-icon { text-align: center; font-size: 3.5rem; margin-bottom: 8px; }
.verify-modal h2 { text-align: center; font-size: 1.4rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.verify-modal > p { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }
.verify-modal-email { display: block; text-align: center; font-weight: 700; font-size: 1.05rem; color: var(--accent); background: var(--accent-light); padding: 8px 16px; border-radius: 10px; margin: 0 auto 18px; max-width: 320px; word-break: break-all; }
.verify-modal-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.verify-modal-step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; background: var(--bg-tertiary); border-radius: 12px; border: 1px solid var(--border); }
.verify-modal-step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0; }
.verify-modal-step div { flex: 1; }
.verify-modal-step strong { display: block; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 2px; }
.verify-modal-step span { font-size: 0.8rem; color: var(--text-secondary); }
.verify-modal-spam { background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); border-left: 4px solid #ff9800; border-radius: 0 10px 10px 0; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #e65100; font-weight: 600; }
[data-theme="dark"] .verify-modal-spam { background: linear-gradient(135deg, rgba(255,152,0,0.15) 0%, rgba(255,152,0,0.08) 100%); color: #ffb74d; }
.verify-modal-otp { margin-bottom: 20px; }
.verify-modal-otp label { display: block; font-weight: 700; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 8px; }
.verify-modal-otp-row { display: flex; gap: 10px; }
.verify-modal-otp-input { flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-radius: 12px; font-size: 1.1rem; font-weight: 700; letter-spacing: 4px; text-align: center; background: var(--bg-tertiary); color: var(--text-primary); outline: none; transition: border-color 0.2s; }
.verify-modal-otp-input:focus { border-color: var(--accent); }
.verify-modal-otp-input::placeholder { letter-spacing: 2px; font-weight: 400; color: var(--text-muted); font-size: 0.9rem; }
.verify-modal-otp-btn { padding: 12px 24px; background: linear-gradient(135deg, #28a745, #20c997); color: #fff; border: none; border-radius: 12px; font-weight: 700; font-size: 0.95rem; cursor: pointer; white-space: nowrap; transition: transform 0.15s, box-shadow 0.15s; }
.verify-modal-otp-btn:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(40,167,69,0.3); }
.verify-modal-limits { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; }
.verify-modal-limits-title { font-weight: 700; font-size: 0.88rem; color: var(--danger); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.verify-modal-limits-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.verify-modal-limits-list li { font-size: 0.82rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.verify-modal-limits-list li::before { content: '🔒'; font-size: 0.75rem; }
.verify-modal-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.verify-modal-resend { background: none; border: 2px solid var(--accent); color: var(--accent); border-radius: 12px; padding: 10px 28px; font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: all 0.2s; width: 100%; }
.verify-modal-resend:hover:not(:disabled) { background: var(--accent-light); }
.verify-modal-resend:disabled { opacity: 0.5; cursor: not-allowed; }
.verify-modal-later { background: none; border: none; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; padding: 6px 12px; text-decoration: underline; }
.verify-modal-later:hover { color: var(--text-secondary); }
@media (max-width: 600px) {
  .verify-modal { padding: 24px 18px 20px; border-radius: 16px; }
  .verify-modal-otp-row { flex-direction: column; }
  .verify-modal-limits-list { grid-template-columns: 1fr; }
  .verify-modal h2 { font-size: 1.2rem; }
}

/* ===== Nav Label (Tools divider) ===== */
.nav-label { padding: 18px 20px 6px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }

/* ===== Tools Hero (shared) ===== */
.tools-hero { text-align: center; padding: 32px 20px 24px; }
.tools-hero-icon { font-size: 3rem; margin-bottom: 8px; }
.tools-hero h2 { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.tools-hero p { color: var(--text-secondary); font-size: 0.92rem; max-width: 500px; margin: 0 auto; }
.tools-hero { position: relative; }

/* ===== Guide Panel ===== */
.guide-btn { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; color: var(--accent); font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; z-index: 5; }
.guide-btn:hover { background: var(--accent); color: #fff; transform: scale(1.1); box-shadow: 0 4px 12px rgba(124,58,237,0.3); }
.guide-btn.active { background: var(--accent); color: #fff; }
.guide-panel { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease; opacity: 0; margin: 0 auto; max-width: 640px; }
.guide-panel.open { max-height: 2000px; opacity: 1; padding: 0 0 20px; }
.guide-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; animation: shrFadeSlideDown 0.4s ease both; }
.guide-card:nth-child(2) { animation-delay: 0.1s; }
.guide-card:nth-child(3) { animation-delay: 0.2s; }
.guide-card-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.guide-card-title span { font-size: 1.2rem; }
.guide-card-body { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.guide-card-body .guide-step { display: flex; gap: 10px; margin-bottom: 6px; }
.guide-card-body .guide-step-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.guide-card-body .guide-step-text { flex: 1; }
.guide-card-body .guide-use { padding: 5px 0 5px 8px; border-left: 3px solid var(--accent); margin-bottom: 6px; }
[data-theme="dark"] .guide-card { background: var(--bg-tertiary); border-color: var(--border); }

/* ===== Dashboard / Control Panel ===== */
.dash-loading { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.dash-loading .spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.dash-login-prompt { text-align: center; padding: 80px 20px; }
.dash-login-icon { font-size: 3.5rem; margin-bottom: 16px; }
.dash-login-prompt h2 { margin: 0 0 8px; color: var(--text-primary); }
.dash-login-prompt p { color: var(--text-muted); margin-bottom: 24px; }
.dash-error { text-align: center; padding: 40px; color: var(--danger); }

.dash-header { margin-bottom: 24px; }
.dash-welcome h2 { margin: 0; font-size: 1.5rem; color: var(--text-primary); }
.dash-since { margin: 4px 0 0; font-size: 0.85rem; color: var(--text-muted); }

.dash-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.dash-stat-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
.dash-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: var(--accent); }
.dash-stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left; }
.dash-stat-card:hover::before { transform: scaleX(1); }
.dash-stat-banners::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.dash-stat-links::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.dash-stat-clicks::before { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.dash-stat-referrals::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.dash-stat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.dash-stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.dash-stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.dash-stat-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; opacity: 0.8; }

.dash-section { margin-bottom: 28px; }
.dash-section-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin: 0 0 16px; }

.dash-mini-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 16px 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.dash-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.dash-bar { width: 100%; max-width: 48px; background: linear-gradient(180deg, var(--accent), #764ba2); border-radius: 4px 4px 0 0; position: relative; transition: height 0.5s ease; min-height: 4px; }
.dash-bar-val { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 0.7rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.dash-bar-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }

.dash-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dash-service-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.25s ease; }
.dash-service-card:hover { border-color: var(--accent); background: var(--accent-light); transform: translateX(4px); }
.dash-service-icon { font-size: 1.6rem; flex-shrink: 0; }
.dash-service-info { flex: 1; min-width: 0; }
.dash-service-name { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; }
.dash-service-stat { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.dash-service-arrow { color: var(--text-muted); font-size: 1.2rem; transition: transform 0.2s; }
.dash-service-card:hover .dash-service-arrow { transform: translateX(4px); color: var(--accent); }

.dash-activity-list { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dash-activity-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); transition: background 0.2s; }
.dash-activity-item:last-child { border-bottom: none; }
.dash-activity-item:hover { background: var(--accent-light); }
.dash-activity-icon { font-size: 1.2rem; flex-shrink: 0; }
.dash-activity-info { flex: 1; min-width: 0; }
.dash-activity-title { display: block; font-weight: 500; color: var(--text-primary); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-activity-code { font-size: 0.78rem; color: var(--accent); font-family: monospace; }
.dash-activity-format { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; }
.dash-activity-time { font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.dash-activity-empty { padding: 30px; text-align: center; color: var(--text-muted); }

[data-theme="dark"] .dash-stat-card { background: var(--bg-tertiary); }
[data-theme="dark"] .dash-service-card { background: var(--bg-tertiary); }
[data-theme="dark"] .dash-mini-chart { background: var(--bg-tertiary); }
[data-theme="dark"] .dash-activity-list { background: var(--bg-tertiary); }
[data-theme="dark"] .dash-stat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

@media (max-width: 768px) {
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-services-grid { grid-template-columns: 1fr; }
  .dash-stat-value { font-size: 1.5rem; }
}

/* ===== Social Media Kit ===== */
.smk-upload { border: 2px dashed var(--border); border-radius: var(--radius); transition: border-color 0.2s; }
.smk-upload.drag-over { border-color: var(--accent); background: var(--accent-light); }
.smk-upload-inner { padding: 40px 20px; text-align: center; cursor: pointer; }
.smk-upload-inner:hover { background: var(--accent-light); border-radius: var(--radius); }
.smk-upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.smk-upload-inner strong { display: block; color: var(--text-primary); margin-bottom: 4px; }
.smk-upload-inner span { font-size: 0.82rem; color: var(--text-muted); }
.smk-source { display: flex; align-items: center; gap: 16px; padding: 12px 16px; margin-bottom: 16px; }
.smk-source-img img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.smk-source-info { flex: 1; }
.smk-source-info strong { display: block; font-size: 0.92rem; color: var(--text-primary); }
.smk-source-info span { font-size: 0.8rem; color: var(--text-muted); }
.smk-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; background: var(--bg-tertiary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.smk-controls label { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.smk-controls select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-secondary); color: var(--text-primary); font-size: 0.82rem; }
.smk-controls input[type="color"] { width: 32px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.smk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.smk-cat-title { grid-column: 1 / -1; font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; padding: 12px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.smk-card { background: var(--bg-secondary); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 10px; cursor: pointer; transition: all 0.2s; position: relative; text-align: center; }
.smk-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.smk-card-active { border-color: var(--accent); background: var(--accent-light); }
.smk-thumb { width: 100%; border-radius: 6px; background: var(--bg-tertiary); display: block; }
.smk-card-info { margin-top: 8px; }
.smk-card-info .smk-card-icon { font-size: 1.1rem; }
.smk-card-info strong { display: block; font-size: 0.78rem; color: var(--text-primary); margin: 2px 0; }
.smk-card-info span { font-size: 0.72rem; color: var(--text-muted); }
.smk-dl-btn { position: absolute; top: 6px; right: 6px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.75rem; opacity: 0; transition: opacity 0.2s; }
.smk-card:hover .smk-dl-btn { opacity: 1; }
.smk-dl-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== QR Code Generator ===== */
.qr-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .qr-layout { grid-template-columns: 1fr; } }
.qr-form { padding: 20px; }
.qr-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.qr-tab { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-tertiary); color: var(--text-secondary); font-size: 0.82rem; cursor: pointer; transition: all 0.2s; }
.qr-tab:hover { border-color: var(--accent); color: var(--accent); }
.qr-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.qr-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.qr-preview { padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qr-preview-area { width: 100%; max-width: 320px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; }
.qr-preview-area img { max-width: 100%; max-height: 100%; }
.qr-placeholder { color: var(--text-muted); font-size: 0.88rem; text-align: center; padding: 20px; }
.qr-download-btns { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }

/* ===== Image Tools ===== */
.it-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.it-tool-card { background: var(--bg-secondary); border: 2px solid var(--border); border-radius: var(--radius); padding: 24px 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.it-tool-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.it-tool-icon { font-size: 2.2rem; margin-bottom: 10px; }
.it-tool-card h3 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; }
.it-tool-card p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.it-workspace { padding: 20px; }
.it-ws-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.it-ws-header h3 { flex: 1; font-size: 1.1rem; color: var(--text-primary); }
.it-ws-upload { border: 2px dashed var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; transition: border-color 0.2s; }
.it-preview { text-align: center; margin-bottom: 14px; }
.it-preview img { max-width: 100%; }
.it-ctrl-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.it-ctrl-row .form-group { flex: 1; min-width: 80px; }
.it-ctrl-row label { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.it-ctrl-row input[type="range"] { width: 100%; }
.it-result-info { background: var(--accent-light); color: var(--accent); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.88rem; margin-bottom: 12px; text-align: center; }
.it-result-preview { text-align: center; margin-bottom: 12px; }
.it-result-actions { display: flex; gap: 10px; justify-content: center; }
.it-colors-area { text-align: center; }
.it-colors-area canvas { max-width: 100%; }
.it-picked-color { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 14px 0; font-size: 0.9rem; flex-wrap: wrap; }
.it-color-swatch { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--border); flex-shrink: 0; }
.it-palette { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.it-palette-item { width: 40px; height: 40px; border-radius: 8px; cursor: pointer; border: 2px solid var(--border); transition: transform 0.15s; }
.it-palette-item:hover { transform: scale(1.15); border-color: var(--text-primary); }
.it-fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.it-fav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; background: var(--bg-tertiary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.it-fav-item span { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Brand Kit ===== */
.bk-section { margin-bottom: 24px; }
.bk-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bk-section-header h3 { font-size: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.bk-colors-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.bk-color-item { position: relative; cursor: pointer; }
.bk-color-swatch { width: 56px; height: 56px; border-radius: 10px; border: 2px solid var(--border); transition: transform 0.15s, box-shadow 0.15s; }
.bk-color-swatch:hover { transform: scale(1.1); box-shadow: var(--shadow); }
.bk-color-label { display: block; text-align: center; font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
.bk-color-add { width: 56px; height: 56px; border-radius: 10px; border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: all 0.2s; background: var(--bg-tertiary); }
.bk-color-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.bk-fonts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.bk-font-item { padding: 14px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; }
.bk-font-item:hover { border-color: var(--accent); }
.bk-font-item.active { border-color: var(--accent); background: var(--accent-light); }
.bk-font-preview { font-size: 1.3rem; margin-bottom: 4px; color: var(--text-primary); }
.bk-font-name { font-size: 0.75rem; color: var(--text-muted); }
.bk-logo-preview { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.bk-logo-thumb { width: 80px; height: 80px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-tertiary); padding: 8px; }
.bk-export-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.bk-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.bk-preset-card { padding: 16px; background: var(--bg-secondary); border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; text-align: center; }
.bk-preset-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bk-preset-card.active { border-color: var(--accent); background: var(--accent-light); }
.bk-preset-colors { display: flex; gap: 4px; justify-content: center; margin: 8px 0; }
.bk-preset-colors span { width: 20px; height: 20px; border-radius: 4px; }

/* ===== OG-Image Generator ===== */
.og-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
@media (max-width: 900px) { .og-layout { grid-template-columns: 1fr; } }
.og-form { padding: 20px; }
.og-form .form-group { margin-bottom: 14px; }
.og-preview-wrap { padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.og-canvas-wrap { width: 100%; max-width: 600px; aspect-ratio: 1200/630; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg-tertiary); }
.og-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.og-templates-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.og-template-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-tertiary); color: var(--text-secondary); font-size: 0.78rem; cursor: pointer; transition: all 0.2s; }
.og-template-btn:hover { border-color: var(--accent); color: var(--accent); }
.og-template-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.og-download-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Mockup Generator ===== */
.mk-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .mk-layout { grid-template-columns: 1fr; } }
.mk-devices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mk-device-card { padding: 16px 12px; background: var(--bg-secondary); border: 2px solid var(--border); border-radius: var(--radius-sm); text-align: center; cursor: pointer; transition: all 0.2s; }
.mk-device-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.mk-device-card.active { border-color: var(--accent); background: var(--accent-light); }
.mk-device-icon { font-size: 2rem; margin-bottom: 6px; }
.mk-device-card strong { display: block; font-size: 0.82rem; color: var(--text-primary); }
.mk-device-card span { font-size: 0.72rem; color: var(--text-muted); }
.mk-upload-zone { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 30px 20px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 16px; }
.mk-upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }
.mk-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.mk-controls .form-group { flex: 1; min-width: 100px; }
.mk-preview-wrap { padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mk-canvas-area { width: 100%; max-width: 500px; background: var(--bg-tertiary); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; padding: 20px; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.mk-canvas-area canvas { max-width: 100%; max-height: 400px; }
.mk-download-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== A/B Test Tracker ===== */
.ab-create-form { padding: 20px; margin-bottom: 20px; }
.ab-variants-list { margin: 14px 0; }
.ab-variant-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 10px 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ab-variant-row .form-control { flex: 1; }
.ab-variant-letter { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.82rem; flex-shrink: 0; }
.ab-remove-variant { background: none; border: none; color: var(--danger); font-size: 1.2rem; cursor: pointer; padding: 4px; }
.ab-tests-list { margin-top: 20px; }
.ab-test-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.ab-test-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.ab-test-header h3 { font-size: 1rem; color: var(--text-primary); }
.ab-status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.ab-status-active { background: rgba(40,167,69,0.12); color: var(--success); }
.ab-status-ended { background: rgba(220,53,69,0.12); color: var(--danger); }
.ab-variants-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.ab-variants-table th { text-align: left; padding: 8px 12px; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.ab-variants-table td { padding: 10px 12px; font-size: 0.88rem; border-bottom: 1px solid var(--border-light); }
.ab-variants-table tr:last-child td { border-bottom: none; }
.ab-bar-wrap { height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; min-width: 80px; }
.ab-bar { height: 100%; border-radius: 4px; transition: width 0.3s; }
.ab-winner { background: rgba(40,167,69,0.08); }
.ab-winner td { font-weight: 700; }
.ab-test-actions { display: flex; gap: 8px; }
.ab-no-tests { text-align: center; color: var(--text-muted); padding: 40px 20px; }

/* ===== URL Shortener v2.0 ===== */

/* --- Container & Quick Form --- */
.shr-container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.shr-quick { max-width: 900px; margin: 0 auto 28px; padding: 24px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
.shr-quick-row { display: flex; gap: 10px; margin-bottom: 12px; }
.shr-quick-row input { flex: 1; }
.shr-quick-opts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.shr-quick-opts input { max-width: 200px; }
.shr-quick-opts select { max-width: 200px; }
.shr-input {
  width: 100%; padding: 10px 14px; font-size: 0.9rem;
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shr-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.shr-input-sm { padding: 7px 10px; font-size: 0.82rem; }

/* --- Tags --- */
.shr-tags-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 6px 10px; min-height: 40px;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: text; transition: border-color 0.2s;
}
.shr-tags-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.shr-tags-input input { border: none; outline: none; background: transparent; color: var(--text-primary); flex: 1; min-width: 80px; font-size: 0.85rem; padding: 2px 0; }
.shr-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--accent-light); color: var(--accent);
  white-space: nowrap; line-height: 1.6;
}
.shr-tag-chip .remove { cursor: pointer; font-size: 0.85rem; opacity: 0.7; margin-left: 2px; }
.shr-tag-chip .remove:hover { opacity: 1; }

/* --- UTM --- */
.shr-utm-section { margin-top: 12px; }
.shr-utm-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 0.82rem; font-weight: 600;
  color: var(--accent); background: transparent;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.shr-utm-toggle:hover { background: var(--accent-light); }
.shr-utm-toggle .arrow { transition: transform 0.2s; display: inline-block; }
.shr-utm-toggle.open .arrow { transform: rotate(180deg); }
.shr-utm-fields {
  display: none; margin-top: 10px; padding: 14px;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.shr-utm-fields.show { display: block; }
.shr-utm-fields .shr-utm-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.shr-utm-fields .shr-utm-row:last-child { margin-bottom: 0; }
.shr-utm-fields .shr-utm-row input { flex: 1; min-width: 140px; }

/* --- Format Toggle --- */
.shr-format-toggle { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shr-format-toggle b { font-weight: 700; font-size: 0.85rem; }
.shr-fmt-btn {
  padding: 5px 14px; font-size: 0.82rem; font-weight: 600;
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.shr-fmt-btn:hover { border-color: var(--accent); color: var(--accent); }
.shr-fmt-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Result --- */
.shr-result {
  margin-top: 14px; padding: 14px 16px;
  background: rgba(102,126,234,0.08); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); display: none;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
.shr-result.show { display: flex; }
.shr-result-url {
  font-family: monospace; font-size: 15px; font-weight: 700;
  color: var(--accent); word-break: break-all; flex: 1;
  cursor: pointer; transition: opacity 0.2s;
}
.shr-result-url:hover { opacity: 0.8; }
.shr-result-actions { display: flex; gap: 8px; }

/* --- Tabs --- */
.shr-tabs {
  display: flex; gap: 0; margin: 0 auto 24px; max-width: 900px;
  border-bottom: 2px solid var(--border); overflow-x: auto;
}
.shr-tab {
  padding: 12px 20px; text-align: center; cursor: pointer;
  background: transparent; font-weight: 600; font-size: 0.88rem;
  color: var(--text-secondary); border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s; white-space: nowrap;
}
.shr-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.shr-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.shr-panel { max-width: 900px; margin: 0 auto; min-height: 100px; }

/* --- Filters / Search --- */
.shr-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.shr-filters input { flex: 1; min-width: 200px; }
.shr-filters select { max-width: 200px; }
.shr-filters .btn { white-space: nowrap; }

/* --- Bulk Actions Bar --- */
.shr-bulk-bar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  position: sticky; top: var(--header-height, 60px); z-index: 100;
  padding: 10px 16px; margin-bottom: 12px;
  background: var(--accent-light); border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
}
.shr-bulk-bar.show { display: flex; }
.shr-bulk-count { font-weight: 700; font-size: 0.88rem; color: var(--accent); }
.shr-bulk-bar .btn { font-size: 0.82rem; }

/* --- Links List --- */
.shr-links-list { margin-top: 8px; }
.shr-links-toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.shr-links-toolbar input { flex: 1; min-width: 200px; }
.shr-links-toolbar select { max-width: 200px; }
.shr-link-row {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shr-link-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(102,126,234,0.08); }
.shr-link-row.selected { border-color: var(--accent); background: var(--accent-light); }
.shr-link-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.shr-link-checkbox { display: flex; align-items: center; }
.shr-link-checkbox input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.shr-link-info { flex: 1; min-width: 0; }
.shr-link-short { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shr-link-short a, .shr-link-code { font-family: monospace; font-weight: 700; color: var(--accent); font-size: 0.95rem; text-decoration: none; }
.shr-link-short a:hover { text-decoration: underline; }
.shr-link-title { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.shr-link-arrow { color: var(--text-muted); font-size: 0.85rem; }
.shr-link-dest {
  color: var(--text-secondary); font-size: 0.85rem;
  max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shr-link-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.shr-link-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.shr-link-clicks { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.shr-link-clicks span { color: var(--accent); }
.shr-link-time { font-size: 0.78rem; color: var(--text-muted); }
.shr-link-meta { display: flex; gap: 14px; font-size: 0.78rem; color: var(--text-muted); align-items: center; }
.shr-link-actions { display: flex; gap: 6px; align-items: center; }
.shr-link-actions button { padding: 5px 10px; font-size: 0.78rem; }
.shr-no-links { text-align: center; color: var(--text-muted); padding: 50px 20px; }
.shr-campaign-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* --- Badges --- */
.shr-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; line-height: 1.6; }
.shr-badge-active { background: rgba(40,167,69,0.12); color: var(--success); }
.shr-badge-inactive { background: rgba(108,117,125,0.12); color: var(--text-muted); }
.shr-badge-expired { background: rgba(255,193,7,0.15); color: #b38600; }
[data-theme="dark"] .shr-badge-expired { color: #e6ac00; }

/* --- Buttons: Extra Small & Danger --- */
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; }
.btn-danger {
  background: var(--danger); color: #fff; border: none;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-danger:hover { opacity: 0.85; }

/* --- Modals --- */
.shr-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
[data-theme="dark"] .shr-modal-overlay { background: rgba(0,0,0,0.7); }
.shr-modal {
  background: var(--bg-secondary); border-radius: var(--radius);
  max-width: 720px; width: 100%; max-height: 85vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.shr-modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg-secondary); z-index: 1;
}
.shr-modal-header h3 { margin: 0; font-size: 1.05rem; }
.shr-modal-close {
  background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--text-muted); padding: 4px 8px;
  border-radius: 6px; transition: all 0.2s;
}
.shr-modal-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.shr-modal-body { padding: 22px; }

/* --- Edit Form --- */
.shr-edit-form { display: flex; flex-direction: column; gap: 14px; }
.shr-edit-form .form-group { margin-bottom: 0; }
.shr-edit-form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.88rem; }

/* --- Stats (Enhanced) --- */
.shr-stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.shr-stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
  transition: border-color 0.2s;
}
.shr-stat-card:hover { border-color: var(--accent); }
.shr-stat-card .num { font-size: 1.6rem; font-weight: 800; color: var(--accent); display: block; line-height: 1.2; }
.shr-stat-card .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.shr-chart-wrap {
  margin-bottom: 20px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px;
  position: relative;
}
.shr-chart-wrap canvas { max-height: 250px; width: 100%; }
.shr-chart-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.shr-chart-toggle button {
  padding: 4px 12px; font-size: 0.78rem; font-weight: 600;
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.shr-chart-toggle button:hover { border-color: var(--accent); }
.shr-chart-toggle button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.shr-period-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.shr-period-tab {
  flex: 1; padding: 8px 12px; text-align: center; cursor: pointer;
  background: var(--bg-secondary); font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary); border: none; transition: all 0.2s;
}
.shr-period-tab:not(:last-child) { border-right: 1px solid var(--border); }
.shr-period-tab:hover { background: var(--bg-tertiary); }
.shr-period-tab.active { background: var(--accent); color: #fff; }

/* --- Heatmap (7x24 grid) --- */
.shr-heatmap { margin-bottom: 20px; overflow-x: auto; }
.shr-heatmap-grid {
  display: grid; grid-template-columns: auto repeat(24, 1fr);
  gap: 2px; min-width: 400px;
}
.shr-heatmap-row { display: contents; }
.shr-heatmap-label { font-size: 0.68rem; color: var(--text-muted); padding: 1px 6px 1px 0; display: flex; align-items: center; white-space: nowrap; }
.shr-heatmap-cell {
  width: 12px; height: 12px; border-radius: 2px;
  transition: opacity 0.2s; cursor: default;
}
.shr-heatmap-cell:hover { opacity: 0.8; }
.shr-heatmap-cell[title] { cursor: help; }
.shr-heat-0 { background: var(--bg-tertiary); }
.shr-heat-1 { background: rgba(102,126,234,0.2); }
.shr-heat-2 { background: rgba(102,126,234,0.4); }
.shr-heat-3 { background: rgba(102,126,234,0.65); }
.shr-heat-4 { background: rgba(102,126,234,0.9); }
[data-theme="dark"] .shr-heat-1 { background: rgba(124,140,248,0.2); }
[data-theme="dark"] .shr-heat-2 { background: rgba(124,140,248,0.4); }
[data-theme="dark"] .shr-heat-3 { background: rgba(124,140,248,0.65); }
[data-theme="dark"] .shr-heat-4 { background: rgba(124,140,248,0.9); }

/* --- Breakdown --- */
.shr-breakdown { margin-top: 16px; }
.shr-breakdown h4 { font-size: 0.88rem; margin: 0 0 10px; color: var(--text-primary); }
.shr-breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.shr-breakdown-section {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.shr-breakdown-section h4, .shr-breakdown-section h5 { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 10px; }
.shr-bd-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.82rem; }
.shr-bd-name { flex-shrink: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.shr-bd-count { font-weight: 700; color: var(--text-primary); min-width: 40px; text-align: right; flex-shrink: 0; }
.shr-bd-bar { height: 6px; background: var(--bg-tertiary); border-radius: 3px; flex: 1; overflow: hidden; }
.shr-bd-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s ease; }
/* Legacy .name/.count classes */
.shr-bd-row .name { flex: 1; color: var(--text-secondary); }
.shr-bd-row .count { font-weight: 700; color: var(--text-primary); min-width: 40px; text-align: right; }

/* --- Comparison --- */
.shr-compare-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem; margin-top: 12px;
}
.shr-compare-table th, .shr-compare-table td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.shr-compare-table th { font-weight: 700; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
.shr-compare-table td { color: var(--text-primary); }
.shr-compare-table tr:last-child td { border-bottom: none; }
.shr-compare-winner {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700;
  background: rgba(40,167,69,0.12); color: var(--success);
}

/* --- Campaigns --- */
.shr-campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.shr-campaign-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.shr-campaign-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.shr-campaign-card .shr-cc-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.shr-campaign-card h4 { font-size: 0.95rem; color: var(--text-primary); margin: 0 0 8px; display: flex; align-items: center; }
.shr-campaign-card .shr-cc-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 12px; }
.shr-campaign-card .shr-cc-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.shr-campaign-card:hover .shr-cc-actions { opacity: 1; }
.shr-cc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.shr-cc-meta { font-size: 0.78rem; color: var(--text-muted); }
.shr-cc-actions { display: flex; gap: 4px; }
.shr-cc-actions button { background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px; color: var(--text-muted); }
.shr-cc-actions button:hover { color: var(--text-primary); }
.shr-new-campaign {
  border: 2px dashed var(--border); display: flex; align-items: center;
  justify-content: center; flex-direction: column; gap: 8px;
  color: var(--text-muted); font-size: 0.88rem; min-height: 90px;
  cursor: pointer; transition: all 0.2s;
}
.shr-new-campaign:hover { border-color: var(--accent); color: var(--accent); }

/* --- QR --- */
.shr-qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
.shr-qr-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.shr-qr-card img { max-width: 140px; margin: 0 auto 10px; display: block; border-radius: 4px; }
.shr-qr-card .shr-qr-label { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 4px; }
.shr-qr-card .shr-qr-clicks { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; }
.shr-qr-card .shr-qr-actions { display: flex; gap: 6px; justify-content: center; }
.shr-qr-new {
  border: 2px dashed var(--border); display: flex; align-items: center;
  justify-content: center; flex-direction: column; gap: 8px;
  color: var(--text-muted); cursor: pointer; min-height: 180px; transition: all 0.2s;
}
.shr-qr-new:hover { border-color: var(--accent); color: var(--accent); }
.shr-qr-form { padding: 16px; background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: 16px; }
.shr-qr-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
.shr-qr-form-row .form-group { flex: 1; min-width: 120px; margin-bottom: 0; }

/* --- Dashboard --- */
.shr-dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.shr-dash-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.shr-dash-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.shr-dash-card .num { font-size: 2rem; font-weight: 800; color: var(--accent); display: block; line-height: 1.2; }
.shr-dash-card .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.shr-dash-card .arrow-up { color: var(--success); font-size: 0.78rem; font-weight: 700; }
.shr-dash-card .arrow-down { color: var(--danger); font-size: 0.78rem; font-weight: 700; }

/* --- Calendar Heatmap (GitHub-style) --- */
.shr-calendar { margin-bottom: 20px; overflow-x: auto; }
.shr-cal-grid { display: flex; gap: 0; align-items: flex-start; }
.shr-cal-labels { display: flex; flex-direction: column; gap: 2px; padding-right: 6px; padding-top: 0; }
.shr-cal-day-label { font-size: 0.62rem; color: var(--text-muted); height: 12px; line-height: 12px; }
.shr-cal-weeks { display: flex; gap: 2px; }
.shr-cal-week { display: flex; flex-direction: column; gap: 2px; }
.shr-cal-cell {
  width: 12px; height: 12px; border-radius: 2px;
  cursor: default; transition: opacity 0.2s;
}
.shr-cal-cell:hover { opacity: 0.75; }
.shr-cal-cell[title] { cursor: help; }
.shr-cal-empty { background: transparent; }
.shr-cal-level-0 { background: var(--bg-tertiary); }
.shr-cal-level-1 { background: rgba(102,126,234,0.2); }
.shr-cal-level-2 { background: rgba(102,126,234,0.4); }
.shr-cal-level-3 { background: rgba(102,126,234,0.65); }
.shr-cal-level-4 { background: rgba(102,126,234,0.9); }
[data-theme="dark"] .shr-cal-level-1 { background: rgba(124,140,248,0.2); }
[data-theme="dark"] .shr-cal-level-2 { background: rgba(124,140,248,0.4); }
[data-theme="dark"] .shr-cal-level-3 { background: rgba(124,140,248,0.65); }
[data-theme="dark"] .shr-cal-level-4 { background: rgba(124,140,248,0.9); }
.shr-cal-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 0.68rem; color: var(--text-muted); }
.shr-cal-legend .shr-cal-cell { cursor: default; }
.shr-cal-legend .shr-cal-cell:hover { opacity: 1; }

/* --- Campaign Form Modal --- */
.shr-campaign-form { padding: 0; }
.shr-campaign-form .form-group { margin-bottom: 14px; }
.shr-campaign-form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.88rem; }
.shr-color-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.shr-color-opt {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
}
.shr-color-opt:hover, .shr-color-opt.selected { border-color: var(--text-primary); transform: scale(1.15); }

/* --- Rules Editor --- */
.shr-rules-list { margin-top: 12px; }
.shr-rule-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.shr-rule-row:last-child { border-bottom: none; }
.shr-rule-row .rule-condition { flex: 1; color: var(--text-secondary); }
.shr-rule-row .rule-action { font-weight: 600; color: var(--text-primary); }
.shr-rule-form {
  margin-top: 12px; padding: 14px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.shr-rule-form .form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.shr-rule-form .form-row:last-child { margin-bottom: 0; }

/* --- Responsive (URL Shortener) --- */
@media (max-width: 768px) {
  .shr-container { padding: 0 10px; }
  .shr-quick { padding: 16px; }
  .shr-quick-row { flex-direction: column; }
  .shr-quick-opts { flex-direction: column; }
  .shr-quick-opts input, .shr-quick-opts select { max-width: 100%; }
  .shr-tabs { overflow-x: auto; }
  .shr-tab { padding: 10px 14px; font-size: 0.82rem; }
  .shr-link-row { padding: 12px; }
  .shr-link-top { flex-direction: column; align-items: flex-start; }
  .shr-link-dest { max-width: 100%; }
  .shr-link-bottom { flex-direction: column; align-items: flex-start; }
  .shr-link-actions { width: 100%; justify-content: flex-end; }
  .shr-stats-summary { grid-template-columns: 1fr; }
  .shr-modal { margin: 10px; max-height: 90vh; max-width: calc(100vw - 20px); }
  .shr-modal-body { padding: 16px; }
  .shr-breakdown-grid { grid-template-columns: 1fr; }
  .shr-dash-cards { grid-template-columns: repeat(2, 1fr); }
  .shr-campaigns-grid { grid-template-columns: 1fr; }
  .shr-qr-grid { grid-template-columns: repeat(2, 1fr); }
  .shr-filters { flex-direction: column; }
  .shr-filters input, .shr-filters select { max-width: 100%; width: 100%; }
  .shr-bulk-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .shr-heatmap-grid { min-width: 300px; }
  .shr-utm-fields .shr-utm-row { flex-direction: column; }
  .shr-compare-table { font-size: 0.78rem; }
  .shr-compare-table th, .shr-compare-table td { padding: 8px 10px; }
}

/* === SHORTENER v3.0 ANIMATIONS === */
@keyframes shrFadeSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shrFadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shrScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shrConfetti {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-80px) rotate(720deg); }
}
@keyframes shrPulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
}
@keyframes shrRipple {
  to { transform: scale(2.5); opacity: 0; }
}
@keyframes shrCountUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Result box animation */
.shr-result { animation: shrFadeSlideDown 0.4s ease; }

/* Link rows staggered animation */
.shr-link-row { animation: shrFadeSlideUp 0.35s ease both; }
.shr-link-row:nth-child(1) { animation-delay: 0s; }
.shr-link-row:nth-child(2) { animation-delay: 0.04s; }
.shr-link-row:nth-child(3) { animation-delay: 0.08s; }
.shr-link-row:nth-child(4) { animation-delay: 0.12s; }
.shr-link-row:nth-child(5) { animation-delay: 0.16s; }
.shr-link-row:nth-child(6) { animation-delay: 0.2s; }
.shr-link-row:nth-child(7) { animation-delay: 0.24s; }
.shr-link-row:nth-child(8) { animation-delay: 0.28s; }
.shr-link-row:nth-child(9) { animation-delay: 0.32s; }
.shr-link-row:nth-child(10) { animation-delay: 0.36s; }

/* Tag chips fade-in */
.shr-tag-chip { animation: shrScaleIn 0.25s ease; }

/* Modal animation */
.shr-modal-overlay { animation: fadeIn 0.2s ease; }
.shr-modal { animation: shrScaleIn 0.3s ease; }

/* Hover effects */
.shr-link-row:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.shr-btn:hover { transform: translateY(-1px); }
.shr-btn:active { transform: translateY(0); }

/* Confetti container */
.shr-confetti-container { position: absolute; top: 0; left: 50%; pointer-events: none; z-index: 10; }
.shr-confetti-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: shrConfetti 1.2s ease-out forwards;
}

/* Pin/Star styles */
.shr-pin-btn {
  background: none; border: none; cursor: pointer; font-size: 18px;
  color: #d1d5db; transition: all 0.3s ease; padding: 4px; line-height: 1;
}
.shr-pin-btn:hover { color: #fbbf24; transform: scale(1.2); }
.shr-pin-btn.pinned { color: #f59e0b; text-shadow: 0 0 8px rgba(245,158,11,0.4); }
.shr-link-row.pinned {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(90deg, rgba(245,158,11,0.04), transparent);
}
[data-theme="dark"] .shr-link-row.pinned {
  background: linear-gradient(90deg, rgba(245,158,11,0.08), transparent);
}

/* URL Preview card */
.shr-preview-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-top: 8px;
  background: var(--card-bg, #f9fafb); border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; animation: shrFadeSlideDown 0.3s ease;
}
.shr-preview-favicon { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.shr-preview-info { flex: 1; min-width: 0; }
.shr-preview-title { font-weight: 600; font-size: 14px; color: var(--text, #1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shr-preview-desc { font-size: 12px; color: var(--text-secondary, #6b7280); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shr-preview-actions { display: flex; gap: 6px; }
.shr-preview-actions button { padding: 4px 10px; font-size: 11px; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); background: var(--bg, #fff); cursor: pointer; transition: all 0.2s; }
.shr-preview-actions button:hover { background: var(--primary, #7c3aed); color: #fff; border-color: var(--primary, #7c3aed); }
.shr-preview-loading { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-top: 8px; color: var(--text-secondary, #6b7280); font-size: 13px; }
.shr-preview-loading::before { content: ''; width: 16px; height: 16px; border: 2px solid var(--border, #e5e7eb); border-top-color: var(--primary, #7c3aed); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Clipboard paste tooltip */
.shr-paste-tooltip {
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%);
  background: var(--primary, #7c3aed); color: #fff;
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer; animation: shrFadeSlideDown 0.3s ease;
  box-shadow: 0 4px 12px rgba(124,58,237,0.3); z-index: 5;
}
.shr-paste-tooltip::after {
  content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid var(--primary, #7c3aed);
}

/* Social OG Preview section */
.shr-og-section {
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 16px; margin-top: 12px; background: var(--card-bg, #f9fafb);
}
.shr-og-section summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text, #1f2937);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.shr-og-section summary::before { content: '\25B6'; font-size: 10px; transition: transform 0.2s; }
.shr-og-section[open] summary::before { transform: rotate(90deg); }
.shr-og-preview-card {
  margin-top: 12px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; overflow: hidden; background: #fff; max-width: 400px;
}
.shr-og-preview-image { width: 100%; height: 160px; object-fit: cover; background: #e5e7eb; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; }
.shr-og-preview-body { padding: 12px; }
.shr-og-preview-title { font-weight: 700; font-size: 14px; color: #1f2937; }
.shr-og-preview-desc { font-size: 12px; color: #6b7280; margin-top: 4px; }
.shr-og-preview-url { font-size: 11px; color: #9ca3af; margin-top: 4px; text-transform: uppercase; }

/* Bio page editor styles */
.shr-bio-editor {
  padding: 20px; background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
}
.shr-bio-preview-frame {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  overflow: hidden; margin-top: 16px; height: 500px;
}
.shr-bio-preview-frame iframe { width: 100%; height: 100%; border: none; }
.shr-bio-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px;
  color: var(--text-secondary, #6b7280);
}
.shr-bio-toggle input[type="checkbox"] { display: none; }
.shr-bio-toggle .toggle-track {
  width: 36px; height: 20px; border-radius: 10px; background: #d1d5db;
  position: relative; transition: background 0.3s;
}
.shr-bio-toggle input:checked + .toggle-track { background: var(--primary, #7c3aed); }
.shr-bio-toggle .toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.shr-bio-toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.shr-color-swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.shr-color-swatch {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s;
}
.shr-color-swatch:hover { transform: scale(1.15); }
.shr-color-swatch.active { border-color: var(--text, #1f2937); box-shadow: 0 0 0 2px var(--bg, #fff), 0 0 0 4px var(--text, #1f2937); }

/* Bulk bar slide-up animation */
.shr-bulk-bar { animation: shrFadeSlideUp 0.3s ease; }

/* Stats cards count-up */
.shr-stat-value { animation: shrCountUp 0.4s ease; }

/* Skeleton shimmer for preview */
.shr-skeleton {
  background: linear-gradient(90deg, var(--card-bg, #f3f4f6) 25%, #e5e7eb 50%, var(--card-bg, #f3f4f6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* Pinned filter active state */
.shr-filter-pinned.active { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
[data-theme="dark"] .shr-filter-pinned.active { background: rgba(251,191,36,0.15); color: #fbbf24; }

/* === Shortener v4 — Premium Polish === */

/* Enhanced tab bar */
.shr-tabs { background: var(--bg-secondary); border-radius: 12px 12px 0 0; padding: 4px 4px 0; border-bottom: 2px solid var(--border); }
.shr-tab { border-radius: 8px 8px 0 0; padding: 12px 24px; font-size: 0.9rem; gap: 6px; position: relative; }
.shr-tab.active { background: var(--bg-primary, #fff); color: var(--accent); border-bottom-color: transparent; box-shadow: 0 -2px 8px rgba(102,126,234,0.08); }
[data-theme="dark"] .shr-tab.active { background: var(--bg-secondary); }

/* Panel content animations */
.shr-panel { animation: shrFadeSlideUp 0.3s ease; }

/* Campaign card missing styles */
.shr-campaign-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.shr-campaign-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.4; }
.shr-campaign-stats { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.shr-campaign-actions { display: flex; gap: 6px; }

/* Dashboard stat cards — values */
.shr-dash-card-value { font-size: 1.8rem; font-weight: 800; display: block; line-height: 1.2; animation: shrCountUp 0.5s ease; }
.shr-dash-card-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }

/* Empty states */
.shr-empty-state { text-align: center; padding: 60px 20px; }
.shr-empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.shr-empty-state-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.shr-empty-state-text { font-size: 0.88rem; color: var(--text-muted); max-width: 400px; margin: 0 auto; }

/* Quick form — gradient accent border */
.shr-quick { border: none; box-shadow: 0 1px 4px rgba(0,0,0,0.06); position: relative; overflow: hidden; }
.shr-quick::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #667eea, #764ba2, #f5576c); }

/* Bio editor label */
.shr-bio-editor label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; color: var(--text-primary); }

/* No campaigns pretty */
.shr-no-campaigns { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.shr-no-campaigns::before { content: '\1F4C2'; font-size: 2.5rem; display: block; margin-bottom: 12px; opacity: 0.4; }

/* ===== Ref Links CTA Button ===== */
.ref-links-cta {
  margin-bottom: 20px;
}
.ref-links-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(102,126,234,0.35);
}
.ref-links-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102,126,234,0.5);
}
.ref-links-cta-btn:active { transform: translateY(0); }
.ref-links-cta-icon { font-size: 1.8rem; flex-shrink: 0; }
.ref-links-cta-text { flex: 1; }
.ref-links-cta-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.ref-links-cta-text small { display: block; font-size: 0.82rem; opacity: 0.85; }
.ref-links-cta-arrow { font-size: 1.4rem; opacity: 0.7; transition: transform 0.2s; }
.ref-links-cta-btn:hover .ref-links-cta-arrow { transform: translateX(4px); opacity: 1; }

/* ===== Ref Links Modal ===== */
.ref-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 20px;
}
.ref-modal-overlay.active { opacity: 1; }
.ref-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s ease;
}
.ref-modal-overlay.active .ref-modal { transform: scale(1) translateY(0); }
.ref-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.ref-modal-header h3 { margin: 0; font-size: 1.1rem; }
.ref-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.ref-modal-close:hover { color: var(--danger); }
.ref-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.ref-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.ref-modal-footer .btn { min-width: 140px; }
.ref-modal-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.ref-modal-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* Sponsor block inside modal */
.ref-modal-sponsor {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(59,130,246,0.05));
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.ref-modal-sponsor-title { font-size: 0.92rem; margin-bottom: 6px; }
.ref-modal-sponsor-contacts { display: flex; gap: 12px; flex-wrap: wrap; }
.ref-modal-sponsor-contacts a {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.ref-modal-sponsor-contacts a:hover { opacity: 0.7; }

/* Project rows inside modal */
.ref-modal-row {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.ref-modal-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ref-modal-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ref-modal-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ref-modal-name { font-weight: 600; font-size: 0.92rem; flex: 1; }
.ref-modal-register-btn {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}
.ref-modal-register-btn:hover {
  background: var(--accent);
  color: #fff;
}
.ref-modal-input {
  font-size: 0.88rem !important;
}

/* Mobile */
@media (max-width: 600px) {
  .ref-modal { max-height: 92vh; }
  .ref-modal-body { padding: 14px 16px; }
  .ref-modal-header { padding: 14px 16px; }
  .ref-modal-row-head { flex-wrap: wrap; }
}

/* ===== Growth Ref Hero ===== */
.growth-ref-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 50%, #7c3aed 100%);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.growth-ref-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.ref-hero-top { text-align: center; margin-bottom: 20px; position: relative; z-index: 1; }
.ref-hero-top h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; color: #fff; }
.ref-hero-sub { font-size: 0.95rem; opacity: 0.85; margin: 0; }
.ref-hero-links { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.ref-hero-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 10px 14px;
}
.ref-hero-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.9;
  min-width: 80px;
}
.ref-hero-link-input {
  flex: 1;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
}
.ref-hero-link-input::placeholder { color: rgba(255,255,255,0.5); }
.ref-hero-copy-btn {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ref-hero-copy-btn:hover { background: rgba(255,255,255,0.4); }
.ref-hero-share {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.ref-hero-share-label { font-size: 0.85rem; opacity: 0.8; font-weight: 600; }
.ref-hero-share-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ref-hero-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.ref-hero-share-btn:hover { transform: scale(1.05); filter: brightness(1.1); }
.share-tg { background: #0088cc; }
.share-wa { background: #25d366; }
.share-vk { background: #4c75a3; }
.share-tw { background: #1da1f2; }
.share-fb { background: #1877f2; }
.share-ln { background: #0a66c2; }
.share-copy { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); }

/* ===== Promo Materials ===== */
.promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.promo-header:hover { opacity: 0.85; }
.promo-toggle {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}
.promo-toggle.open { transform: rotate(180deg); }
.promo-filters {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
  flex-wrap: wrap;
  align-items: center;
}
.promo-filter-select {
  max-width: 200px;
  font-size: 0.85rem;
}
.promo-list { display: flex; flex-direction: column; gap: 10px; }
.promo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: var(--transition);
}
.promo-card:hover { border-color: var(--primary); }
.promo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.promo-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-transform: uppercase;
}
.promo-card-tag.short { background: #f59e0b; }
.promo-card-tag.medium { background: #3b82f6; }
.promo-card-tag.long { background: #8b5cf6; }
.promo-card-tag.stories { background: #ec4899; }
.promo-card-tag.professional { background: #10b981; }
.promo-card-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.promo-card-text {
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-line;
  color: var(--text);
  max-height: 120px;
  overflow: hidden;
  position: relative;
}
.promo-card-text.expanded { max-height: none; }
.promo-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.promo-card-actions .btn { font-size: 0.78rem; padding: 4px 12px; }
.promo-expand-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 0;
  font-weight: 600;
}

@media (max-width: 600px) {
  .growth-ref-hero { padding: 16px; }
  .ref-hero-top h2 { font-size: 1.3rem; }
  .ref-hero-link-row { flex-wrap: wrap; }
  .ref-hero-link-input { width: 100%; }
  .ref-hero-share-btns { gap: 4px; }
  .ref-hero-share-btn { padding: 5px 8px; font-size: 0.72rem; }
  .promo-filters { flex-direction: column; }
  .promo-filter-select { max-width: 100%; }
}
/* ==========================================================================
   3D EPIC NAVIGATION - ProArsenal Premium Design
   v1.0.0 | Appended to main.css - High specificity overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */

/* Slow shifting gradient background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 100% 0%;
  }
  75% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Shimmer / shine sweep across text */
@keyframes textShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Pulsing glow on borders and accents */
@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 40px rgba(118, 75, 162, 0.3);
  }
}

/* Floating particle movement */
@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) translateX(30px) scale(0.3);
    opacity: 0;
  }
}

@keyframes floatParticleAlt {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-80px) translateX(-25px) rotate(180deg) scale(1);
    opacity: 0;
  }
}

/* Animated gradient border */
@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Holographic color shift */
@keyframes holoShift {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  25% {
    filter: hue-rotate(30deg) brightness(1.1);
  }
  50% {
    filter: hue-rotate(60deg) brightness(1.05);
  }
  75% {
    filter: hue-rotate(30deg) brightness(1.1);
  }
  100% {
    filter: hue-rotate(0deg) brightness(1);
  }
}

/* Subtle breathing scale */
@keyframes subtleBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Active nav item left-border pulse */
@keyframes activeBorderPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.5), inset 3px 0 0 #667eea;
  }
  50% {
    box-shadow: 0 0 14px rgba(102, 126, 234, 0.8), 0 0 28px rgba(118, 75, 162, 0.2), inset 3px 0 0 #764ba2;
  }
}

/* RTL active border pulse */
@keyframes activeBorderPulseRTL {
  0%, 100% {
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.5), inset -3px 0 0 #667eea;
  }
  50% {
    box-shadow: 0 0 14px rgba(102, 126, 234, 0.8), 0 0 28px rgba(118, 75, 162, 0.2), inset -3px 0 0 #764ba2;
  }
}

/* Separator line glow */
@keyframes separatorGlow {
  0%, 100% {
    opacity: 0.3;
    background-size: 100% 1px;
  }
  50% {
    opacity: 0.7;
    background-size: 100% 2px;
  }
}


/* ==========================================================================
   SIDEBAR HEADER - 3D Perspective + Particles + Holographic
   ========================================================================== */

.sidebar .sidebar-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    #667eea 0%,
    #764ba2 25%,
    #6B73E8 50%,
    #8B5CF6 75%,
    #667eea 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  perspective: 800px;
  transform-style: preserve-3d;
  border-bottom: 2px solid transparent;
  z-index: 2;
  will-change: background-position;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glowing bottom border with pulse */
.sidebar .sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #667eea 20%,
    #a78bfa 40%,
    #f472b6 60%,
    #667eea 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: borderGlow 3s linear infinite, glowPulse 2s ease-in-out infinite;
  z-index: 3;
}

/* Floating particles - first set */
.sidebar .sidebar-header::before {
  content: '';
  position: absolute;
  top: 60%;
  left: 15%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: floatParticle 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    40px 10px 0 -1px rgba(255, 255, 255, 0.4),
    80px -5px 0 -2px rgba(255, 255, 255, 0.3),
    120px 15px 0 0px rgba(255, 255, 255, 0.5),
    160px -10px 0 -1px rgba(255, 255, 255, 0.35),
    200px 5px 0 -2px rgba(255, 255, 255, 0.25);
}

/* Holographic hover effect */
.sidebar .sidebar-header:hover {
  animation: gradientShift 4s ease infinite, holoShift 3s ease infinite;
}

/* 3D text effect on h2 */
.sidebar .sidebar-header h2 {
  position: relative;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 3px 0 rgba(0, 0, 0, 0.06),
    0 4px 0 rgba(0, 0, 0, 0.04),
    0 5px 10px rgba(0, 0, 0, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateZ(20px);
  will-change: transform;
  /* Shimmer effect via background-clip */
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 35%,
    rgba(255, 255, 255, 0.5) 48%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(255, 255, 255, 1) 65%,
    rgba(255, 255, 255, 1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
}

/* Version badge with glow */
.sidebar .sidebar-header small,
.sidebar .sidebar-header .version-badge,
.sidebar .sidebar-header span {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3), 0 0 20px rgba(118, 75, 162, 0.1);
  transition: all 0.3s ease;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
  background-clip: padding-box;
}

.sidebar .sidebar-header small:hover,
.sidebar .sidebar-header .version-badge:hover,
.sidebar .sidebar-header span:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.5), 0 0 30px rgba(118, 75, 162, 0.2);
  transform: translateY(-1px);
}


/* ==========================================================================
   TOP BAR - Glassmorphism + Animated Border + 3D Float
   ========================================================================== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: none !important;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04);
  will-change: box-shadow;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

/* Animated gradient border-bottom via pseudo */
.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    #667eea,
    #764ba2,
    #f472b6,
    #fbbf24,
    #34d399,
    #667eea);
  background-size: 300% 100%;
  animation: borderGlow 4s linear infinite;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.top-bar:hover::after {
  opacity: 1;
}

/* Page title 3D text effect */
.top-bar h1,
.top-bar .page-title,
.top-bar [class*="title"] {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), text-shadow 0.3s ease;
  cursor: default;
}

.top-bar h1:hover,
.top-bar .page-title:hover,
.top-bar [class*="title"]:hover {
  transform: scale(1.03);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(102, 126, 234, 0.08);
}

/* Hamburger button enhancement */
.top-bar .hamburger,
.top-bar .menu-toggle,
.top-bar [class*="hamburger"],
.top-bar [class*="toggle"] {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
  border-radius: 8px;
}

.top-bar .hamburger:hover,
.top-bar .menu-toggle:hover,
.top-bar [class*="hamburger"]:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}


/* ==========================================================================
   SIDEBAR NAVIGATION ITEMS - 3D Lift + Glow + Active Pulse
   ========================================================================== */

.sidebar .sidebar-nav .nav-item {
  position: relative;
  transition:
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
  border-radius: 8px;
  margin: 2px 8px;
  will-change: transform, box-shadow;
  border-left: 3px solid transparent;
}

body.rtl .sidebar .sidebar-nav .nav-item {
  border-left: none;
  border-right: 3px solid transparent;
}

/* Hover: 3D lift effect */
.sidebar .sidebar-nav .nav-item:hover {
  transform: translateY(-1px) translateX(2px);
  box-shadow:
    0 2px 6px rgba(102, 126, 234, 0.12),
    0 4px 12px rgba(102, 126, 234, 0.06);
  background: rgba(102, 126, 234, 0.06);
}

body.rtl .sidebar .sidebar-nav .nav-item:hover {
  transform: translateY(-1px) translateX(-2px);
}

/* Active state: glowing left border + gradient bg + pulse */
.sidebar .sidebar-nav .nav-item.active,
.sidebar .sidebar-nav .nav-item[class*="active"],
.sidebar .sidebar-nav .nav-item.current {
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.06) 100%) !important;
  border-left-color: #667eea;
  animation: activeBorderPulse 2.5s ease-in-out infinite;
  transform: translateX(2px);
}

body.rtl .sidebar .sidebar-nav .nav-item.active,
body.rtl .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl .sidebar .sidebar-nav .nav-item.current {
  border-left-color: transparent;
  border-right-color: #667eea;
  animation: activeBorderPulseRTL 2.5s ease-in-out infinite;
  transform: translateX(-2px);
}

/* Active item icon glow */
.sidebar .sidebar-nav .nav-item.active i,
.sidebar .sidebar-nav .nav-item.active .nav-icon,
.sidebar .sidebar-nav .nav-item[class*="active"] i {
  filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.5));
  transition: filter 0.3s ease;
}

/* Nav item click ripple */
.sidebar .sidebar-nav .nav-item:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition-duration: 0.1s;
}

/* Nav group toggle (collapsible headers) */
.sidebar .sidebar-nav .nav-group-toggle {
  position: relative;
  transition:
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.25s ease,
    color 0.25s ease;
  border-radius: 8px;
  margin: 2px 8px;
}

.sidebar .sidebar-nav .nav-group-toggle:hover {
  transform: translateY(-1px);
  background: rgba(102, 126, 234, 0.05);
}

/* Chevron/arrow icon rotation enhancement */
.sidebar .sidebar-nav .nav-group-toggle::after,
.sidebar .sidebar-nav .nav-group-toggle .chevron,
.sidebar .sidebar-nav .nav-group-toggle [class*="arrow"] {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ==========================================================================
   SIDEBAR FOOTER - Glassmorphism + Glowing Separator
   ========================================================================== */

.sidebar .sidebar-footer {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  transition: background 0.3s ease;
}

/* Glowing separator line above footer */
.sidebar .sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(102, 126, 234, 0.4) 30%,
    rgba(118, 75, 162, 0.5) 50%,
    rgba(102, 126, 234, 0.4) 70%,
    transparent 100%);
  animation: separatorGlow 3s ease-in-out infinite;
}

/* Footer buttons/toggles enhancement */
.sidebar .sidebar-footer button,
.sidebar .sidebar-footer select,
.sidebar .sidebar-footer .theme-toggle,
.sidebar .sidebar-footer [class*="toggle"],
.sidebar .sidebar-footer [class*="selector"] {
  transition:
    transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.2s ease,
    background 0.2s ease;
  border-radius: 8px;
}

.sidebar .sidebar-footer button:hover,
.sidebar .sidebar-footer select:hover,
.sidebar .sidebar-footer .theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}


/* ==========================================================================
   SIDEBAR BODY - Subtle Enhancements
   ========================================================================== */

/* Sidebar overall subtle depth */
.sidebar {
  box-shadow:
    2px 0 8px rgba(0, 0, 0, 0.04),
    4px 0 16px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body.rtl .sidebar {
  box-shadow:
    -2px 0 8px rgba(0, 0, 0, 0.04),
    -4px 0 16px rgba(0, 0, 0, 0.02);
}

/* Scrollbar styling within sidebar nav */
.sidebar .sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}


/* ==========================================================================
   DARK THEME - Neon Glow Edition
   ========================================================================== */

/* --- Sidebar Header Dark --- */
[data-theme="dark"] .sidebar .sidebar-header {
  background: linear-gradient(135deg,
    #1a1040 0%,
    #2d1b69 25%,
    #1e3a5f 50%,
    #4c1d95 75%,
    #1a1040 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

[data-theme="dark"] .sidebar .sidebar-header::after {
  background: linear-gradient(90deg,
    transparent 0%,
    #818cf8 15%,
    #c084fc 30%,
    #f472b6 50%,
    #c084fc 70%,
    #818cf8 85%,
    transparent 100%);
  background-size: 200% 100%;
  animation: borderGlow 3s linear infinite;
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] .sidebar .sidebar-header::before {
  background: rgba(129, 140, 248, 0.8);
  box-shadow:
    40px 10px 0 -1px rgba(192, 132, 252, 0.6),
    80px -5px 0 -2px rgba(244, 114, 182, 0.5),
    120px 15px 0 0px rgba(129, 140, 248, 0.7),
    160px -10px 0 -1px rgba(192, 132, 252, 0.4),
    200px 5px 0 -2px rgba(244, 114, 182, 0.3);
}

[data-theme="dark"] .sidebar .sidebar-header h2 {
  text-shadow:
    0 0 10px rgba(129, 140, 248, 0.6),
    0 0 20px rgba(192, 132, 252, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 4px 0 rgba(0, 0, 0, 0.2),
    0 6px 15px rgba(0, 0, 0, 0.4);
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 30%,
    rgba(192, 132, 252, 0.7) 48%,
    rgba(129, 140, 248, 1) 50%,
    rgba(192, 132, 252, 0.7) 52%,
    rgba(255, 255, 255, 1) 70%,
    rgba(255, 255, 255, 1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s linear infinite;
}

[data-theme="dark"] .sidebar .sidebar-header:hover {
  animation: gradientShift 4s ease infinite, holoShift 2s ease infinite;
}

/* Version badge dark neon */
[data-theme="dark"] .sidebar .sidebar-header small,
[data-theme="dark"] .sidebar .sidebar-header .version-badge,
[data-theme="dark"] .sidebar .sidebar-header span {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow:
    0 0 10px rgba(129, 140, 248, 0.3),
    0 0 20px rgba(192, 132, 252, 0.15),
    inset 0 0 6px rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .sidebar .sidebar-header small:hover,
[data-theme="dark"] .sidebar .sidebar-header .version-badge:hover,
[data-theme="dark"] .sidebar .sidebar-header span:hover {
  background: rgba(129, 140, 248, 0.25);
  box-shadow:
    0 0 15px rgba(129, 140, 248, 0.5),
    0 0 30px rgba(192, 132, 252, 0.25),
    inset 0 0 8px rgba(129, 140, 248, 0.15);
}

/* --- Top Bar Dark --- */
[data-theme="dark"] .top-bar {
  background: rgba(15, 15, 26, 0.78) !important;
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  box-shadow:
    0 1px 0 rgba(129, 140, 248, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .top-bar::after {
  background: linear-gradient(90deg,
    #818cf8,
    #c084fc,
    #f472b6,
    #fb923c,
    #34d399,
    #818cf8);
  background-size: 300% 100%;
  opacity: 0.85;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .top-bar h1,
[data-theme="dark"] .top-bar .page-title,
[data-theme="dark"] .top-bar [class*="title"] {
  text-shadow:
    0 0 8px rgba(129, 140, 248, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .top-bar h1:hover,
[data-theme="dark"] .top-bar .page-title:hover,
[data-theme="dark"] .top-bar [class*="title"]:hover {
  text-shadow:
    0 0 12px rgba(129, 140, 248, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Navigation Items Dark Neon --- */
[data-theme="dark"] .sidebar .sidebar-nav .nav-item:hover {
  background: rgba(129, 140, 248, 0.08);
  box-shadow:
    0 2px 8px rgba(129, 140, 248, 0.15),
    0 4px 16px rgba(192, 132, 252, 0.06);
}

[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  background: linear-gradient(135deg,
    rgba(129, 140, 248, 0.12) 0%,
    rgba(192, 132, 252, 0.06) 100%) !important;
  border-left-color: #818cf8;
}

body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  border-left-color: transparent;
  border-right-color: #818cf8;
}

/* Dark active neon glow pulse override */
@keyframes activeBorderPulseDark {
  0%, 100% {
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.4), inset 3px 0 0 #818cf8;
  }
  50% {
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.7), 0 0 36px rgba(192, 132, 252, 0.2), inset 3px 0 0 #c084fc;
  }
}

@keyframes activeBorderPulseDarkRTL {
  0%, 100% {
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.4), inset -3px 0 0 #818cf8;
  }
  50% {
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.7), 0 0 36px rgba(192, 132, 252, 0.2), inset -3px 0 0 #c084fc;
  }
}

[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  animation: activeBorderPulseDark 2.5s ease-in-out infinite;
}

body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  animation: activeBorderPulseDarkRTL 2.5s ease-in-out infinite;
}

/* Dark active icon neon glow */
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active i,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active .nav-icon,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"] i {
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6)) drop-shadow(0 0 12px rgba(192, 132, 252, 0.3));
}

/* Dark nav group toggle */
[data-theme="dark"] .sidebar .sidebar-nav .nav-group-toggle:hover {
  background: rgba(129, 140, 248, 0.06);
}

/* --- Sidebar Footer Dark --- */
[data-theme="dark"] .sidebar .sidebar-footer {
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

[data-theme="dark"] .sidebar .sidebar-footer::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(129, 140, 248, 0.5) 25%,
    rgba(192, 132, 252, 0.6) 50%,
    rgba(129, 140, 248, 0.5) 75%,
    transparent 100%);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.2);
}

[data-theme="dark"] .sidebar .sidebar-footer button:hover,
[data-theme="dark"] .sidebar .sidebar-footer select:hover,
[data-theme="dark"] .sidebar .sidebar-footer .theme-toggle:hover {
  box-shadow: 0 2px 10px rgba(129, 140, 248, 0.2), 0 0 20px rgba(192, 132, 252, 0.08);
}

/* --- Sidebar Body Dark --- */
[data-theme="dark"] .sidebar {
  box-shadow:
    2px 0 12px rgba(0, 0, 0, 0.3),
    4px 0 24px rgba(0, 0, 0, 0.15),
    1px 0 0 rgba(129, 140, 248, 0.06);
}

body.rtl[data-theme="dark"] .sidebar {
  box-shadow:
    -2px 0 12px rgba(0, 0, 0, 0.3),
    -4px 0 24px rgba(0, 0, 0, 0.15),
    -1px 0 0 rgba(129, 140, 248, 0.06);
}

/* Dark scrollbar neon */
[data-theme="dark"] .sidebar .sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #818cf8 0%, #c084fc 100%);
}

[data-theme="dark"] .sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c084fc 0%, #818cf8 100%);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}


/* ==========================================================================
   REDUCED MOTION - Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .sidebar .sidebar-header,
  .sidebar .sidebar-header h2,
  .sidebar .sidebar-header::before,
  .sidebar .sidebar-header::after,
  .top-bar::after,
  .sidebar .sidebar-footer::before,
  .sidebar .sidebar-nav .nav-item.active,
  .sidebar .sidebar-nav .nav-item[class*="active"],
  .sidebar .sidebar-nav .nav-item.current {
    animation: none !important;
  }

  .sidebar .sidebar-nav .nav-item,
  .sidebar .sidebar-nav .nav-group-toggle,
  .top-bar h1,
  .top-bar .page-title {
    transition: none !important;
  }
}


/* ==========================================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Reduce particle complexity on mobile */
  .sidebar .sidebar-header::before {
    box-shadow:
      40px 10px 0 -1px rgba(255, 255, 255, 0.4),
      120px 15px 0 0px rgba(255, 255, 255, 0.3);
  }

  /* Simplify shadows on mobile for performance */
  .sidebar .sidebar-nav .nav-item:hover {
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
  }

  .top-bar {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
}
/* ==========================================================================
   3D EXTRA - Styles for additional HTML elements added by _3d_html.js
   ========================================================================== */

/* Particles overlay layer */
.sidebar-header-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Animated particles via multiple box-shadows */
.sidebar-header-particles::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  top: 70%;
  left: 10%;
  animation: floatParticle 5s ease-in-out infinite;
  box-shadow:
    30px -5px 0 0 rgba(255, 255, 255, 0.5),
    65px 8px 0 -1px rgba(255, 255, 255, 0.6),
    100px -3px 0 1px rgba(255, 255, 255, 0.4),
    140px 6px 0 -1px rgba(255, 255, 255, 0.5),
    180px -8px 0 0 rgba(255, 255, 255, 0.3),
    210px 4px 0 -1px rgba(255, 255, 255, 0.4);
}

.sidebar-header-particles::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  top: 40%;
  left: 25%;
  animation: floatParticleAlt 6s ease-in-out infinite 1s;
  box-shadow:
    25px 12px 0 0 rgba(255, 255, 255, 0.4),
    55px -7px 0 -1px rgba(255, 255, 255, 0.5),
    90px 10px 0 0 rgba(255, 255, 255, 0.3),
    130px -4px 0 1px rgba(255, 255, 255, 0.4),
    170px 8px 0 -1px rgba(255, 255, 255, 0.3);
}

/* Content wrapper */
.sidebar-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4px 0;
}

/* Version badge - glass pill */
.sidebar-version-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
  animation: subtleBreathe 4s ease-in-out infinite;
}

.sidebar-version-badge:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px) scale(1.05);
}

/* Tagline text */
.sidebar-tagline {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.85;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
}

.sidebar-header:hover .sidebar-tagline {
  opacity: 1;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.95);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
}

/* Glow layer at bottom */
.sidebar-header-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(102, 126, 234, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
  animation: glowPulse 3s ease-in-out infinite;
  box-shadow: none !important;
  border: none !important;
}

/* Top bar gradient line */
.top-bar-gradient-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #667eea, #764ba2, #f472b6, #fbbf24, #34d399, #667eea);
  background-size: 300% 100%;
  animation: borderGlow 3s linear infinite;
  z-index: 200;
  opacity: 0.8;
}

/* ===== DARK THEME extras ===== */
[data-theme="dark"] .sidebar-header-particles::before {
  background: rgba(129, 140, 248, 0.9);
  box-shadow:
    30px -5px 0 0 rgba(192, 132, 252, 0.6),
    65px 8px 0 -1px rgba(129, 140, 248, 0.7),
    100px -3px 0 1px rgba(244, 114, 182, 0.5),
    140px 6px 0 -1px rgba(192, 132, 252, 0.5),
    180px -8px 0 0 rgba(129, 140, 248, 0.4),
    210px 4px 0 -1px rgba(244, 114, 182, 0.4);
}

[data-theme="dark"] .sidebar-header-particles::after {
  background: rgba(192, 132, 252, 0.7);
  box-shadow:
    25px 12px 0 0 rgba(129, 140, 248, 0.5),
    55px -7px 0 -1px rgba(244, 114, 182, 0.6),
    90px 10px 0 0 rgba(192, 132, 252, 0.4),
    130px -4px 0 1px rgba(129, 140, 248, 0.5),
    170px 8px 0 -1px rgba(244, 114, 182, 0.3);
}

[data-theme="dark"] .sidebar-version-badge {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.4), 0 0 30px rgba(192, 132, 252, 0.15);
}

[data-theme="dark"] .sidebar-version-badge:hover {
  background: rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 25px rgba(129, 140, 248, 0.6), 0 0 40px rgba(192, 132, 252, 0.25);
}

[data-theme="dark"] .sidebar-tagline {
  color: rgba(192, 132, 252, 0.7);
  -webkit-text-fill-color: rgba(192, 132, 252, 0.7);
  text-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .sidebar-header:hover .sidebar-tagline {
  color: rgba(192, 132, 252, 0.95);
  -webkit-text-fill-color: rgba(192, 132, 252, 0.95);
  text-shadow: 0 0 12px rgba(129, 140, 248, 0.5);
}

[data-theme="dark"] .sidebar-header-glow {
  background: linear-gradient(to top, rgba(129, 140, 248, 0.2), transparent);
}

[data-theme="dark"] .top-bar-gradient-line {
  background: linear-gradient(90deg,
    #818cf8, #c084fc, #f472b6, #fb923c, #34d399, #818cf8);
  background-size: 300% 100%;
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

/* ===== Mobile adjustments ===== */
@media (max-width: 768px) {
  .sidebar-header-particles::before {
    box-shadow:
      65px 8px 0 -1px rgba(255, 255, 255, 0.5),
      140px 6px 0 -1px rgba(255, 255, 255, 0.4);
  }
  .sidebar-header-particles::after {
    display: none;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .sidebar-header-particles::before,
  .sidebar-header-particles::after,
  .sidebar-header-glow,
  .sidebar-version-badge,
  .top-bar-gradient-line {
    animation: none !important;
  }
}
/* ==========================================================================
   3D EPIC NAVIGATION - ProArsenal Premium Design
   v1.0.0 | Appended to main.css - High specificity overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */

/* Slow shifting gradient background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 100% 0%;
  }
  75% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Shimmer / shine sweep across text */
@keyframes textShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Pulsing glow on borders and accents */
@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 40px rgba(118, 75, 162, 0.3);
  }
}

/* Floating particle movement */
@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) translateX(30px) scale(0.3);
    opacity: 0;
  }
}

@keyframes floatParticleAlt {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-80px) translateX(-25px) rotate(180deg) scale(1);
    opacity: 0;
  }
}

/* Animated gradient border */
@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Holographic color shift */
@keyframes holoShift {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  25% {
    filter: hue-rotate(30deg) brightness(1.1);
  }
  50% {
    filter: hue-rotate(60deg) brightness(1.05);
  }
  75% {
    filter: hue-rotate(30deg) brightness(1.1);
  }
  100% {
    filter: hue-rotate(0deg) brightness(1);
  }
}

/* Subtle breathing scale */
@keyframes subtleBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Active nav item left-border pulse */
@keyframes activeBorderPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.5), inset 3px 0 0 #667eea;
  }
  50% {
    box-shadow: 0 0 14px rgba(102, 126, 234, 0.8), 0 0 28px rgba(118, 75, 162, 0.2), inset 3px 0 0 #764ba2;
  }
}

/* RTL active border pulse */
@keyframes activeBorderPulseRTL {
  0%, 100% {
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.5), inset -3px 0 0 #667eea;
  }
  50% {
    box-shadow: 0 0 14px rgba(102, 126, 234, 0.8), 0 0 28px rgba(118, 75, 162, 0.2), inset -3px 0 0 #764ba2;
  }
}

/* Separator line glow */
@keyframes separatorGlow {
  0%, 100% {
    opacity: 0.3;
    background-size: 100% 1px;
  }
  50% {
    opacity: 0.7;
    background-size: 100% 2px;
  }
}


/* ==========================================================================
   SIDEBAR HEADER - 3D Perspective + Particles + Holographic
   ========================================================================== */

.sidebar .sidebar-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    #667eea 0%,
    #764ba2 25%,
    #6B73E8 50%,
    #8B5CF6 75%,
    #667eea 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  perspective: 800px;
  transform-style: preserve-3d;
  border-bottom: 2px solid transparent;
  z-index: 2;
  will-change: background-position;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glowing bottom border with pulse */
.sidebar .sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #667eea 20%,
    #a78bfa 40%,
    #f472b6 60%,
    #667eea 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: borderGlow 3s linear infinite, glowPulse 2s ease-in-out infinite;
  z-index: 3;
}

/* Floating particles - first set */
.sidebar .sidebar-header::before {
  content: '';
  position: absolute;
  top: 60%;
  left: 15%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: floatParticle 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    40px 10px 0 -1px rgba(255, 255, 255, 0.4),
    80px -5px 0 -2px rgba(255, 255, 255, 0.3),
    120px 15px 0 0px rgba(255, 255, 255, 0.5),
    160px -10px 0 -1px rgba(255, 255, 255, 0.35),
    200px 5px 0 -2px rgba(255, 255, 255, 0.25);
}

/* Holographic hover effect */
.sidebar .sidebar-header:hover {
  animation: gradientShift 4s ease infinite, holoShift 3s ease infinite;
}

/* 3D text effect on h2 */
.sidebar .sidebar-header h2 {
  position: relative;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.08),
    0 3px 0 rgba(0, 0, 0, 0.06),
    0 4px 0 rgba(0, 0, 0, 0.04),
    0 5px 10px rgba(0, 0, 0, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateZ(20px);
  will-change: transform;
  /* Shimmer effect via background-clip */
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 35%,
    rgba(255, 255, 255, 0.5) 48%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(255, 255, 255, 1) 65%,
    rgba(255, 255, 255, 1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
}

/* Version badge with glow */
.sidebar .sidebar-header small,
.sidebar .sidebar-header .version-badge,
.sidebar .sidebar-header span {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3), 0 0 20px rgba(118, 75, 162, 0.1);
  transition: all 0.3s ease;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
  background-clip: padding-box;
}

.sidebar .sidebar-header small:hover,
.sidebar .sidebar-header .version-badge:hover,
.sidebar .sidebar-header span:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.5), 0 0 30px rgba(118, 75, 162, 0.2);
  transform: translateY(-1px);
}


/* ==========================================================================
   TOP BAR - Glassmorphism + Animated Border + 3D Float
   ========================================================================== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: none !important;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04);
  will-change: box-shadow;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}

/* Animated gradient border-bottom via pseudo */
.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    #667eea,
    #764ba2,
    #f472b6,
    #fbbf24,
    #34d399,
    #667eea);
  background-size: 300% 100%;
  animation: borderGlow 4s linear infinite;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.top-bar:hover::after {
  opacity: 1;
}

/* Page title 3D text effect */
.top-bar h1,
.top-bar .page-title,
.top-bar [class*="title"] {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), text-shadow 0.3s ease;
  cursor: default;
}

.top-bar h1:hover,
.top-bar .page-title:hover,
.top-bar [class*="title"]:hover {
  transform: scale(1.03);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(102, 126, 234, 0.08);
}

/* Hamburger button enhancement */
.top-bar .hamburger,
.top-bar .menu-toggle,
.top-bar [class*="hamburger"],
.top-bar [class*="toggle"] {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
  border-radius: 8px;
}

.top-bar .hamburger:hover,
.top-bar .menu-toggle:hover,
.top-bar [class*="hamburger"]:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}


/* ==========================================================================
   SIDEBAR NAVIGATION ITEMS - 3D Lift + Glow + Active Pulse
   ========================================================================== */

.sidebar .sidebar-nav .nav-item {
  position: relative;
  transition:
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
  border-radius: 8px;
  margin: 2px 8px;
  will-change: transform, box-shadow;
  border-left: 3px solid transparent;
}

body.rtl .sidebar .sidebar-nav .nav-item {
  border-left: none;
  border-right: 3px solid transparent;
}

/* Hover: 3D lift effect */
.sidebar .sidebar-nav .nav-item:hover {
  transform: translateY(-1px) translateX(2px);
  box-shadow:
    0 2px 6px rgba(102, 126, 234, 0.12),
    0 4px 12px rgba(102, 126, 234, 0.06);
  background: rgba(102, 126, 234, 0.06);
}

body.rtl .sidebar .sidebar-nav .nav-item:hover {
  transform: translateY(-1px) translateX(-2px);
}

/* Active state: glowing left border + gradient bg + pulse */
.sidebar .sidebar-nav .nav-item.active,
.sidebar .sidebar-nav .nav-item[class*="active"],
.sidebar .sidebar-nav .nav-item.current {
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.06) 100%) !important;
  border-left-color: #667eea;
  animation: activeBorderPulse 2.5s ease-in-out infinite;
  transform: translateX(2px);
}

body.rtl .sidebar .sidebar-nav .nav-item.active,
body.rtl .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl .sidebar .sidebar-nav .nav-item.current {
  border-left-color: transparent;
  border-right-color: #667eea;
  animation: activeBorderPulseRTL 2.5s ease-in-out infinite;
  transform: translateX(-2px);
}

/* Active item icon glow */
.sidebar .sidebar-nav .nav-item.active i,
.sidebar .sidebar-nav .nav-item.active .nav-icon,
.sidebar .sidebar-nav .nav-item[class*="active"] i {
  filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.5));
  transition: filter 0.3s ease;
}

/* Nav item click ripple */
.sidebar .sidebar-nav .nav-item:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition-duration: 0.1s;
}

/* Nav group toggle (collapsible headers) */
.sidebar .sidebar-nav .nav-group-toggle {
  position: relative;
  transition:
    transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.25s ease,
    color 0.25s ease;
  border-radius: 8px;
  margin: 2px 8px;
}

.sidebar .sidebar-nav .nav-group-toggle:hover {
  transform: translateY(-1px);
  background: rgba(102, 126, 234, 0.05);
}

/* Chevron/arrow icon rotation enhancement */
.sidebar .sidebar-nav .nav-group-toggle::after,
.sidebar .sidebar-nav .nav-group-toggle .chevron,
.sidebar .sidebar-nav .nav-group-toggle [class*="arrow"] {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ==========================================================================
   SIDEBAR FOOTER - Glassmorphism + Glowing Separator
   ========================================================================== */

.sidebar .sidebar-footer {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  transition: background 0.3s ease;
}

/* Glowing separator line above footer */
.sidebar .sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(102, 126, 234, 0.4) 30%,
    rgba(118, 75, 162, 0.5) 50%,
    rgba(102, 126, 234, 0.4) 70%,
    transparent 100%);
  animation: separatorGlow 3s ease-in-out infinite;
}

/* Footer buttons/toggles enhancement */
.sidebar .sidebar-footer button,
.sidebar .sidebar-footer select,
.sidebar .sidebar-footer .theme-toggle,
.sidebar .sidebar-footer [class*="toggle"],
.sidebar .sidebar-footer [class*="selector"] {
  transition:
    transform 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.2s ease,
    background 0.2s ease;
  border-radius: 8px;
}

.sidebar .sidebar-footer button:hover,
.sidebar .sidebar-footer select:hover,
.sidebar .sidebar-footer .theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}


/* ==========================================================================
   SIDEBAR BODY - Subtle Enhancements
   ========================================================================== */

/* Sidebar overall subtle depth */
.sidebar {
  box-shadow:
    2px 0 8px rgba(0, 0, 0, 0.04),
    4px 0 16px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body.rtl .sidebar {
  box-shadow:
    -2px 0 8px rgba(0, 0, 0, 0.04),
    -4px 0 16px rgba(0, 0, 0, 0.02);
}

/* Scrollbar styling within sidebar nav */
.sidebar .sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}


/* ==========================================================================
   DARK THEME - Neon Glow Edition
   ========================================================================== */

/* --- Sidebar Header Dark --- */
[data-theme="dark"] .sidebar .sidebar-header {
  background: linear-gradient(135deg,
    #1a1040 0%,
    #2d1b69 25%,
    #1e3a5f 50%,
    #4c1d95 75%,
    #1a1040 100%);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

[data-theme="dark"] .sidebar .sidebar-header::after {
  background: linear-gradient(90deg,
    transparent 0%,
    #818cf8 15%,
    #c084fc 30%,
    #f472b6 50%,
    #c084fc 70%,
    #818cf8 85%,
    transparent 100%);
  background-size: 200% 100%;
  animation: borderGlow 3s linear infinite;
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] .sidebar .sidebar-header::before {
  background: rgba(129, 140, 248, 0.8);
  box-shadow:
    40px 10px 0 -1px rgba(192, 132, 252, 0.6),
    80px -5px 0 -2px rgba(244, 114, 182, 0.5),
    120px 15px 0 0px rgba(129, 140, 248, 0.7),
    160px -10px 0 -1px rgba(192, 132, 252, 0.4),
    200px 5px 0 -2px rgba(244, 114, 182, 0.3);
}

[data-theme="dark"] .sidebar .sidebar-header h2 {
  text-shadow:
    0 0 10px rgba(129, 140, 248, 0.6),
    0 0 20px rgba(192, 132, 252, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 4px 0 rgba(0, 0, 0, 0.2),
    0 6px 15px rgba(0, 0, 0, 0.4);
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 30%,
    rgba(192, 132, 252, 0.7) 48%,
    rgba(129, 140, 248, 1) 50%,
    rgba(192, 132, 252, 0.7) 52%,
    rgba(255, 255, 255, 1) 70%,
    rgba(255, 255, 255, 1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s linear infinite;
}

[data-theme="dark"] .sidebar .sidebar-header:hover {
  animation: gradientShift 4s ease infinite, holoShift 2s ease infinite;
}

/* Version badge dark neon */
[data-theme="dark"] .sidebar .sidebar-header small,
[data-theme="dark"] .sidebar .sidebar-header .version-badge,
[data-theme="dark"] .sidebar .sidebar-header span {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow:
    0 0 10px rgba(129, 140, 248, 0.3),
    0 0 20px rgba(192, 132, 252, 0.15),
    inset 0 0 6px rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .sidebar .sidebar-header small:hover,
[data-theme="dark"] .sidebar .sidebar-header .version-badge:hover,
[data-theme="dark"] .sidebar .sidebar-header span:hover {
  background: rgba(129, 140, 248, 0.25);
  box-shadow:
    0 0 15px rgba(129, 140, 248, 0.5),
    0 0 30px rgba(192, 132, 252, 0.25),
    inset 0 0 8px rgba(129, 140, 248, 0.15);
}

/* --- Top Bar Dark --- */
[data-theme="dark"] .top-bar {
  background: rgba(15, 15, 26, 0.78) !important;
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  box-shadow:
    0 1px 0 rgba(129, 140, 248, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .top-bar::after {
  background: linear-gradient(90deg,
    #818cf8,
    #c084fc,
    #f472b6,
    #fb923c,
    #34d399,
    #818cf8);
  background-size: 300% 100%;
  opacity: 0.85;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .top-bar h1,
[data-theme="dark"] .top-bar .page-title,
[data-theme="dark"] .top-bar [class*="title"] {
  text-shadow:
    0 0 8px rgba(129, 140, 248, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .top-bar h1:hover,
[data-theme="dark"] .top-bar .page-title:hover,
[data-theme="dark"] .top-bar [class*="title"]:hover {
  text-shadow:
    0 0 12px rgba(129, 140, 248, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Navigation Items Dark Neon --- */
[data-theme="dark"] .sidebar .sidebar-nav .nav-item:hover {
  background: rgba(129, 140, 248, 0.08);
  box-shadow:
    0 2px 8px rgba(129, 140, 248, 0.15),
    0 4px 16px rgba(192, 132, 252, 0.06);
}

[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  background: linear-gradient(135deg,
    rgba(129, 140, 248, 0.12) 0%,
    rgba(192, 132, 252, 0.06) 100%) !important;
  border-left-color: #818cf8;
}

body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  border-left-color: transparent;
  border-right-color: #818cf8;
}

/* Dark active neon glow pulse override */
@keyframes activeBorderPulseDark {
  0%, 100% {
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.4), inset 3px 0 0 #818cf8;
  }
  50% {
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.7), 0 0 36px rgba(192, 132, 252, 0.2), inset 3px 0 0 #c084fc;
  }
}

@keyframes activeBorderPulseDarkRTL {
  0%, 100% {
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.4), inset -3px 0 0 #818cf8;
  }
  50% {
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.7), 0 0 36px rgba(192, 132, 252, 0.2), inset -3px 0 0 #c084fc;
  }
}

[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  animation: activeBorderPulseDark 2.5s ease-in-out infinite;
}

body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active,
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"],
body.rtl[data-theme="dark"] .sidebar .sidebar-nav .nav-item.current {
  animation: activeBorderPulseDarkRTL 2.5s ease-in-out infinite;
}

/* Dark active icon neon glow */
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active i,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item.active .nav-icon,
[data-theme="dark"] .sidebar .sidebar-nav .nav-item[class*="active"] i {
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6)) drop-shadow(0 0 12px rgba(192, 132, 252, 0.3));
}

/* Dark nav group toggle */
[data-theme="dark"] .sidebar .sidebar-nav .nav-group-toggle:hover {
  background: rgba(129, 140, 248, 0.06);
}

/* --- Sidebar Footer Dark --- */
[data-theme="dark"] .sidebar .sidebar-footer {
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

[data-theme="dark"] .sidebar .sidebar-footer::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(129, 140, 248, 0.5) 25%,
    rgba(192, 132, 252, 0.6) 50%,
    rgba(129, 140, 248, 0.5) 75%,
    transparent 100%);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.2);
}

[data-theme="dark"] .sidebar .sidebar-footer button:hover,
[data-theme="dark"] .sidebar .sidebar-footer select:hover,
[data-theme="dark"] .sidebar .sidebar-footer .theme-toggle:hover {
  box-shadow: 0 2px 10px rgba(129, 140, 248, 0.2), 0 0 20px rgba(192, 132, 252, 0.08);
}

/* --- Sidebar Body Dark --- */
[data-theme="dark"] .sidebar {
  box-shadow:
    2px 0 12px rgba(0, 0, 0, 0.3),
    4px 0 24px rgba(0, 0, 0, 0.15),
    1px 0 0 rgba(129, 140, 248, 0.06);
}

body.rtl[data-theme="dark"] .sidebar {
  box-shadow:
    -2px 0 12px rgba(0, 0, 0, 0.3),
    -4px 0 24px rgba(0, 0, 0, 0.15),
    -1px 0 0 rgba(129, 140, 248, 0.06);
}

/* Dark scrollbar neon */
[data-theme="dark"] .sidebar .sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #818cf8 0%, #c084fc 100%);
}

[data-theme="dark"] .sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c084fc 0%, #818cf8 100%);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}


/* ==========================================================================
   REDUCED MOTION - Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .sidebar .sidebar-header,
  .sidebar .sidebar-header h2,
  .sidebar .sidebar-header::before,
  .sidebar .sidebar-header::after,
  .top-bar::after,
  .sidebar .sidebar-footer::before,
  .sidebar .sidebar-nav .nav-item.active,
  .sidebar .sidebar-nav .nav-item[class*="active"],
  .sidebar .sidebar-nav .nav-item.current {
    animation: none !important;
  }

  .sidebar .sidebar-nav .nav-item,
  .sidebar .sidebar-nav .nav-group-toggle,
  .top-bar h1,
  .top-bar .page-title {
    transition: none !important;
  }
}


/* ==========================================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Reduce particle complexity on mobile */
  .sidebar .sidebar-header::before {
    box-shadow:
      40px 10px 0 -1px rgba(255, 255, 255, 0.4),
      120px 15px 0 0px rgba(255, 255, 255, 0.3);
  }

  /* Simplify shadows on mobile for performance */
  .sidebar .sidebar-nav .nav-item:hover {
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
  }

  .top-bar {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
}
/* ==========================================================================
   3D EXTRA - Styles for additional HTML elements added by _3d_html.js
   ========================================================================== */

/* Particles overlay layer */
.sidebar-header-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Animated particles via multiple box-shadows */
.sidebar-header-particles::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  top: 70%;
  left: 10%;
  animation: floatParticle 5s ease-in-out infinite;
  box-shadow:
    30px -5px 0 0 rgba(255, 255, 255, 0.5),
    65px 8px 0 -1px rgba(255, 255, 255, 0.6),
    100px -3px 0 1px rgba(255, 255, 255, 0.4),
    140px 6px 0 -1px rgba(255, 255, 255, 0.5),
    180px -8px 0 0 rgba(255, 255, 255, 0.3),
    210px 4px 0 -1px rgba(255, 255, 255, 0.4);
}

.sidebar-header-particles::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  top: 40%;
  left: 25%;
  animation: floatParticleAlt 6s ease-in-out infinite 1s;
  box-shadow:
    25px 12px 0 0 rgba(255, 255, 255, 0.4),
    55px -7px 0 -1px rgba(255, 255, 255, 0.5),
    90px 10px 0 0 rgba(255, 255, 255, 0.3),
    130px -4px 0 1px rgba(255, 255, 255, 0.4),
    170px 8px 0 -1px rgba(255, 255, 255, 0.3);
}

/* Content wrapper */
.sidebar-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4px 0;
}

/* Version badge - glass pill */
.sidebar-version-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
  animation: subtleBreathe 4s ease-in-out infinite;
}

.sidebar-version-badge:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px) scale(1.05);
}

/* Tagline text */
.sidebar-tagline {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.85;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
}

.sidebar-header:hover .sidebar-tagline {
  opacity: 1;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.95);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
}

/* Glow layer at bottom */
.sidebar-header-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(102, 126, 234, 0.15), transparent);
  pointer-events: none;
  z-index: 1;
  animation: glowPulse 3s ease-in-out infinite;
  box-shadow: none !important;
  border: none !important;
}

/* Top bar gradient line */
.top-bar-gradient-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    #667eea, #764ba2, #f472b6, #fbbf24, #34d399, #667eea);
  background-size: 300% 100%;
  animation: borderGlow 3s linear infinite;
  z-index: 200;
  opacity: 0.8;
}

/* ===== DARK THEME extras ===== */
[data-theme="dark"] .sidebar-header-particles::before {
  background: rgba(129, 140, 248, 0.9);
  box-shadow:
    30px -5px 0 0 rgba(192, 132, 252, 0.6),
    65px 8px 0 -1px rgba(129, 140, 248, 0.7),
    100px -3px 0 1px rgba(244, 114, 182, 0.5),
    140px 6px 0 -1px rgba(192, 132, 252, 0.5),
    180px -8px 0 0 rgba(129, 140, 248, 0.4),
    210px 4px 0 -1px rgba(244, 114, 182, 0.4);
}

[data-theme="dark"] .sidebar-header-particles::after {
  background: rgba(192, 132, 252, 0.7);
  box-shadow:
    25px 12px 0 0 rgba(129, 140, 248, 0.5),
    55px -7px 0 -1px rgba(244, 114, 182, 0.6),
    90px 10px 0 0 rgba(192, 132, 252, 0.4),
    130px -4px 0 1px rgba(129, 140, 248, 0.5),
    170px 8px 0 -1px rgba(244, 114, 182, 0.3);
}

[data-theme="dark"] .sidebar-version-badge {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.4), 0 0 30px rgba(192, 132, 252, 0.15);
}

[data-theme="dark"] .sidebar-version-badge:hover {
  background: rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 25px rgba(129, 140, 248, 0.6), 0 0 40px rgba(192, 132, 252, 0.25);
}

[data-theme="dark"] .sidebar-tagline {
  color: rgba(192, 132, 252, 0.7);
  -webkit-text-fill-color: rgba(192, 132, 252, 0.7);
  text-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .sidebar-header:hover .sidebar-tagline {
  color: rgba(192, 132, 252, 0.95);
  -webkit-text-fill-color: rgba(192, 132, 252, 0.95);
  text-shadow: 0 0 12px rgba(129, 140, 248, 0.5);
}

[data-theme="dark"] .sidebar-header-glow {
  background: linear-gradient(to top, rgba(129, 140, 248, 0.2), transparent);
}

[data-theme="dark"] .top-bar-gradient-line {
  background: linear-gradient(90deg,
    #818cf8, #c084fc, #f472b6, #fb923c, #34d399, #818cf8);
  background-size: 300% 100%;
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.3);
}

/* ===== Mobile adjustments ===== */
@media (max-width: 768px) {
  .sidebar-header-particles::before {
    box-shadow:
      65px 8px 0 -1px rgba(255, 255, 255, 0.5),
      140px 6px 0 -1px rgba(255, 255, 255, 0.4);
  }
  .sidebar-header-particles::after {
    display: none;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .sidebar-header-particles::before,
  .sidebar-header-particles::after,
  .sidebar-header-glow,
  .sidebar-version-badge,
  .top-bar-gradient-line {
    animation: none !important;
  }
}
