/* ========================================
   Organograma Energinova - Styles
   Professional Edition
   ======================================== */

/* ========================================
   Theme Variables
   ======================================== */
:root,
[data-theme="light"] {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: rgba(37,99,235,0.08);
  --color-success: #16a34a;
  --color-success-hover: #15803d;
  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-outline: #6b7280;
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-surface-alt: #f8fafc;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --toolbar-height: 110px;
  --stats-height: 36px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
  --transition: 0.2s ease;
  --chart-bg: #f0f2f5;
  --avatar-bg: #ffffff;
  --avatar-border: rgba(255,255,255,0.9);
}

[data-theme="dark"] {
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: rgba(59,130,246,0.12);
  --color-success: #22c55e;
  --color-success-hover: #16a34a;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-outline: #9ca3af;
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-alt: #1a2332;
  --color-text: #f1f5f9;
  --color-text-light: #94a3b8;
  --color-border: #334155;
  --color-border-light: #283548;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.5);
  --chart-bg: #0f172a;
  --avatar-bg: #1e293b;
  --avatar-border: rgba(255,255,255,0.15);
}

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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}

/* ========================================
   Toolbar
   ======================================== */
.toolbar {
  flex-shrink: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  padding: 8px 16px;
  transition: background 0.3s, border-color 0.3s;
}

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

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  flex-shrink: 0;
}

.toolbar-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.toolbar-subtitle {
  font-size: 10px;
  color: var(--color-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.toolbar-sep {
  width: 1px;
  height: 24px;
  background: var(--color-border);
  margin: 0 2px;
}

.toolbar-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-export {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
}

.btn-icon {
  padding: 6px;
  background: transparent;
  color: var(--color-text-light);
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.btn-icon:hover:not(:disabled) {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: var(--color-success-hover);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-outline);
  border: 1px solid var(--color-border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.upload-btn {
  cursor: pointer;
}

/* ========================================
   Search & Filters
   ======================================== */
.search-box {
  position: relative;
}

.search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
}

.search-box input {
  padding: 6px 12px 6px 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 12px;
  width: 210px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--color-surface);
  color: var(--color-text);
}

.search-box input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

#deptFilter,
#layoutSelect {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 12px;
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition);
}

#deptFilter:focus,
#layoutSelect:focus {
  border-color: var(--color-primary);
}

.regime-filter {
  display: flex;
  gap: 2px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 2px;
}

.filter-btn {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-light);
  transition: all var(--transition);
}

.filter-btn:disabled {
  cursor: not-allowed;
}

.filter-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.filter-btn:hover:not(.active):not(:disabled) {
  background: var(--color-border);
}

/* ========================================
   Chart Container
   ======================================== */
#chart-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--chart-bg);
  transition: background 0.3s;
}

#orgChart {
  width: 100%;
  height: 100%;
  display: none;
}

#orgChart.visible {
  display: block;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-light);
  text-align: center;
  padding: 40px;
}

.empty-state.hidden {
  display: none;
}

.empty-state-icon {
  margin-bottom: 20px;
  opacity: 0.8;
}

.empty-state h2 {
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 8px;
  font-weight: 800;
}

.empty-state p {
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 400px;
}

.empty-state-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ========================================
   Legend
   ======================================== */
.legend {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 50;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 11px;
  max-height: calc(100% - 20px);
  overflow-y: auto;
  display: none;
  border: 1px solid var(--color-border-light);
  transition: background 0.3s, border-color 0.3s;
}

.legend.visible {
  display: block;
}

.legend-title {
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 8px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  color: var(--color-text);
  font-size: 11px;
}

/* ========================================
   Zoom Controls
   ======================================== */
.zoom-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 3px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 6px;
  border: 1px solid var(--color-border-light);
  transition: background 0.3s;
}

.zoom-controls.visible {
  display: flex;
}

.zoom-controls button {
  width: 36px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-text);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-controls button:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

#btnZoomReset,
#btnExpandAll,
#btnCollapseAll,
#btnResetLayout {
  width: auto;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 600;
}

.zoom-separator {
  height: 1px;
  background: var(--color-border);
  margin: 2px 0;
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  flex-shrink: 0;
  height: var(--stats-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  font-size: 11px;
  color: var(--color-text-light);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.stats-bar strong {
  color: var(--color-text);
  font-weight: 700;
}

.modified-indicator {
  margin-left: auto;
  color: var(--color-danger);
  font-weight: 600;
  animation: pulse 2s infinite;
}

.autosave-indicator {
  margin-left: auto;
  color: var(--color-success);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   Dashboard Panel
   ======================================== */
.dashboard-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--color-surface);
  box-shadow: var(--shadow-xl);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
  border-left: 1px solid var(--color-border);
}

.dashboard-panel.active {
  right: 0;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.dashboard-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text);
}

.dashboard-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.dash-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.dash-cards-sm {
  margin-top: 20px;
}

.dash-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--color-border-light);
  transition: background 0.3s;
}

.dash-card-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.1;
}

.dash-card-label {
  font-size: 10px;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 600;
}

.dash-card-pj .dash-card-value { color: #2563eb; }
.dash-card-clt .dash-card-value { color: #16a34a; }

.dash-section {
  margin-bottom: 20px;
}

.dash-section h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.dash-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donut-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-light);
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Department bar chart */
.dash-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dept-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  gap: 8px;
  align-items: center;
}

.dept-bar-label {
  font-size: 10px;
  color: var(--color-text-light);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dept-bar-wrap {
  height: 18px;
  background: var(--color-bg);
  border-radius: 4px;
  overflow: hidden;
}

.dept-bar {
  height: 100%;
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.5s ease;
}

.dept-bar-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
  text-align: right;
}

/* ========================================
   Presentation Mode
   ======================================== */
body.presentation-mode .toolbar,
body.presentation-mode .stats-bar,
body.presentation-mode .legend,
body.presentation-mode .zoom-controls,
body.presentation-mode .dashboard-panel {
  display: none !important;
}

body.presentation-mode #chart-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

body.presentation-mode .presentation-exit-btn {
  display: block !important;
}

.presentation-exit-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.presentation-exit-btn:hover {
  opacity: 1;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,0.7);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
  border: 1px solid var(--color-border);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-sm {
  max-width: 360px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--color-text);
  background: var(--color-bg);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
}

.modal-footer-right {
  display: flex;
  gap: 8px;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 0;
}

.form-group-wide {
  grid-column: span 2;
}

.form-group + .form-group:not(.form-row .form-group) {
  margin-top: 12px;
}

.form-group label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--color-surface);
  color: var(--color-text);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.radio-group {
  display: flex;
  gap: 16px;
  padding-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text);
}

/* ========================================
   Tooltip
   ======================================== */
.tooltip {
  position: fixed;
  z-index: 300;
  background: #1e293b;
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  max-width: 320px;
  line-height: 1.6;
  box-shadow: var(--shadow-xl);
}

[data-theme="dark"] .tooltip {
  background: #0f172a;
  border: 1px solid #334155;
}

.tooltip.visible {
  opacity: 1;
}

.tooltip-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tooltip-info {
  color: #d1d5db;
}

.tooltip-info strong {
  color: white;
  font-weight: 600;
}

/* ========================================
   D3 Chart Nodes
   ======================================== */
.node-group {
  cursor: grab;
}

.node-group:active {
  cursor: grabbing;
}

.node-group:hover .node-rect {
  filter: brightness(1.08);
}

.node-rect {
  rx: 10;
  ry: 10;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1;
  transition: filter 0.15s;
  will-change: transform;
}

.node-name {
  fill: white;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.node-cargo {
  fill: rgba(255,255,255,0.65);
  font-size: 8px;
  font-weight: 500;
  text-anchor: middle;
  pointer-events: none;
  font-style: italic;
}

.node-dept {
  fill: rgba(255,255,255,0.75);
  font-size: 9px;
  text-anchor: middle;
  pointer-events: none;
}

.node-badge {
  rx: 4;
  ry: 4;
}

.node-badge-text {
  fill: white;
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

/* Avatar circle on top of node */
.node-avatar circle {
  fill: var(--avatar-bg);
  stroke-width: 2.5;
}

.node-avatar text {
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.node-toggle {
  cursor: pointer;
}

.node-toggle circle {
  fill: var(--color-surface);
  stroke: rgba(0,0,0,0.15);
  stroke-width: 1;
}

[data-theme="dark"] .node-toggle circle {
  fill: #334155;
  stroke: rgba(255,255,255,0.1);
}

.node-toggle text {
  fill: var(--color-text);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

.link-path {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1.5;
}

[data-theme="dark"] .link-path {
  stroke: #475569;
}

/* Search highlighting */
.node-group.highlighted .node-rect {
  stroke: #fbbf24;
  stroke-width: 3;
  filter: brightness(1.15);
}

.node-group.dimmed {
  opacity: 0.12;
}

.node-group.dimmed .node-rect {
  filter: grayscale(0.8);
}

/* Multi-select */
.node-group.selected .node-rect {
  stroke: var(--color-primary);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(37,99,235,0.4));
}

/* Drag state */
.node-group.dragging {
  opacity: 0.85;
  cursor: grabbing;
}

.node-group.dragging .node-rect {
  stroke: var(--color-primary);
  stroke-width: 2;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  transition: none;
}

/* Drop target highlight */
.node-group.drop-target .node-rect {
  stroke: #16a34a;
  stroke-width: 3;
  stroke-dasharray: 6 3;
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(22,163,74,0.5));
}

/* Disable transitions on links during drag */
.link-path {
  transition: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .toolbar-bottom {
    gap: 6px;
  }

  .search-box input {
    width: 160px;
  }

  .toolbar-export {
    margin-left: 0;
  }

  .toolbar-subtitle {
    display: none;
  }

  .dashboard-panel {
    width: 300px;
    right: -320px;
  }
}

@media (max-width: 600px) {
  .toolbar {
    padding: 6px 10px;
  }

  .toolbar-title {
    font-size: 14px;
  }

  .toolbar-bottom {
    flex-wrap: wrap;
  }

  .search-box input {
    width: 100%;
  }

  .toolbar-export .btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .legend {
    max-width: 120px;
    font-size: 10px;
  }

  .dashboard-panel {
    width: 100%;
    right: -100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group-wide {
    grid-column: span 1;
  }
}

/* ========================================
   Print
   ======================================== */
@media print {
  .toolbar,
  .zoom-controls,
  .stats-bar,
  .legend,
  .dashboard-panel,
  .presentation-exit-btn {
    display: none !important;
  }

  #chart-container {
    position: static;
    height: auto;
    overflow: visible;
  }

  #orgChart {
    display: block !important;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ========================================
   Theme Toggle Animation
   ======================================== */
[data-theme="dark"] .icon-sun { display: none !important; }
[data-theme="dark"] .icon-moon { display: block !important; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }
