/* ============================================
   DESIGN TOKENS & SYSTEM THEMING
   ============================================ */
:root {
  /* Default (Dark Theme - Executive Slate) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-input: #0f172a;

  --border-color: #334155;
  --border-light: #1e293b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  --paper-cream: #f8fafc;
  --paper-line: #cbd5e1;

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

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

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

select option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}


/* ============================================
   TOPBAR & HEADER
   ============================================ */
.dash-topbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

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

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

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-year {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: var(--font-mono);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.top-nav {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.4);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .top-nav {
  background: rgba(241, 245, 249, 0.6);
}

.top-nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.top-nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .top-nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.top-nav-item.active {
  color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.top-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 15%;
  width: 70%;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 10px rgba(59, 130, 246, 0.5);
}

/* Buttons & Inputs */
.btn-icon-text {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-icon-text:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-secondary {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

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

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 5px 14px 5px 6px;
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent-amber) 0%, #d97706 100%);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-nim {
  font-size: 10.5px;
  color: var(--text-muted);
}

.user-nim code {
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.btn-logout {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--accent-rose);
  color: #fff;
}

/* ============================================
   MAIN DASHBOARD BODY
   ============================================ */
.dash-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* Header Section */
.dash-header-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-subtitle code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

/* Segmented Control */
.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.segmented-control {
  display: flex;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.seg-btn:hover {
  color: var(--text-main);
}

.seg-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   EXECUTIVE KPI CARDS
   ============================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.icon-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.icon-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.kpi-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin: 2px 0 4px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar-wrap {
  height: 6px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-emerald) 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CHARTS SECTION
   ============================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.charts-grid > .chart-card:first-child {
  grid-column: span 2;
}

.chart-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 280px;
}

.scrollable-bar {
  min-width: 800px;
  height: 100%;
}

@media (max-width: 992px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .charts-grid > .chart-card:first-child {
    grid-column: span 1;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

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

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

.chart-title-wrap h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.text-accent {
  color: var(--accent-primary);
}

.text-amber {
  color: var(--accent-amber);
}

.select-sm {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.select-sm:focus {
  outline: none;
  border-color: var(--accent-primary);
}

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

/* ============================================
   SHEET TABS & TABS BAR
   ============================================ */
.tabs-container {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tabs-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tab-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  border-color: var(--accent-primary) var(--border-color) transparent var(--border-color);
  border-top: 3px solid var(--accent-primary);
  font-weight: 700;
}

.tab-badge {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.tab-btn.active .tab-badge {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

/* ============================================
   MAIN PANEL & DYNAMIC MULTI-FILTERS
   ============================================ */
.sheet-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.dynamic-filters-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
}

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

}

.filters-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.active-filter-badge {
  background: var(--accent-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--accent-rose);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-reset:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

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

.filter-box label {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-box select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.filter-box select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.filter-box select.has-value {
  border-color: var(--accent-primary);
  background-color: rgba(59, 130, 246, 0.1);
  font-weight: 700;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.filter-group,
.pagination-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-group select,
.pagination-limit select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

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

.btn-action {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

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

.result-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* ============================================
   DATA TABLE STYLING
   ============================================ */
.table-scroll {
  overflow-x: auto;
  max-height: 520px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

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

table.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

table.data-table thead th:hover {
  color: var(--accent-primary);
  background-color: var(--bg-card-hover);
}

table.data-table thead th .sort-icon {
  margin-left: 6px;
  font-size: 10px;
  color: var(--text-dim);
}

table.data-table thead th.sort-asc .sort-icon,
table.data-table thead th.sort-desc .sort-icon {
  color: var(--accent-primary);
}

table.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
  cursor: pointer;
}

table.data-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

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

table.data-table tbody td {
  padding: 11px 16px;
  color: var(--text-main);
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.data-table tbody td.num-cell {
  font-family: var(--font-mono);
  text-align: right;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 14px;
}

.pagination-info {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.page-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.page-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

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

/* Loading & Empty State */
.loading-state,
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state .big,
.loading-state .big {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--accent-rose);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.detail-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.detail-key {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.detail-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

/* ============================================
   GATE / LOGIN COMPATIBILITY (index & mahasiswa)
   ============================================ */
.gate-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  background: var(--bg-primary);
}

.gate-frame {
  width: 100%;
  max-width: 420px;
}

.gate-eyebrow {
  text-align: center;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gate-title {
  text-align: center;
  color: var(--text-main);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 28px;
}

.card-handle {
  width: 64px;
  height: 8px;
  margin: 0 auto -1px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  z-index: 2;
}

.catalog-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px 32px;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-main);
  padding: 6px 2px 10px;
  transition: border-color 0.2s ease;
}

.field input:focus {
  border-bottom-color: var(--accent-primary);
  outline: none;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.error-msg {
  color: var(--accent-rose);
  font-size: 13px;
  margin-top: 14px;
  min-height: 18px;
  font-family: var(--font-mono);
}

.gate-footer {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 24px;
}

.stamp {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 84px;
  height: 84px;
  border: 2px solid var(--accent-rose);
  border-radius: 50%;
  color: var(--accent-rose);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(12deg);
  opacity: 0.55;
}

.stamp.stamped {
  opacity: 1;
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.chart-nav-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: var(--radius-md);
}

.chart-nav-wrap .btn-nav {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.chart-nav-wrap .btn-nav:hover:not(:disabled) {
  background-color: var(--bg-card-hover);
  color: var(--accent-primary);
}

.chart-nav-wrap .btn-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chart-nav-wrap span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

.chart-filter-dropdown {
  position: relative;
  display: inline-block;
}

.btn-select-sm {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-select-sm:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.chart-filter-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  width: 220px;
  padding: 12px;
}

.chart-filter-menu.show {
  display: block;
}

.chart-filter-menu-actions {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.btn-text-xs {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-text-xs:hover {
  text-decoration: underline;
}

.chart-filter-menu-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.chart-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.chart-filter-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Premium Footer Styling */
.dash-footer {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transition: all 0.3s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr;
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}

.footer-logo i {
  font-size: 20px;
  color: var(--accent-primary);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  background: var(--bg-card-hover);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-sm);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-list li i {
  color: var(--accent-primary);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.media-placeholder-card {
  aspect-ratio: 1.6 / 1;
  background: var(--bg-input);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
}

.media-placeholder-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}

.media-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.placeholder-icon {
  font-size: 32px;
  color: var(--text-muted);
  opacity: 0.6;
}

.media-placeholder-content span {
  font-size: 12px;
  font-weight: 500;
}

.media-placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 12px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-bottom-links a:hover {
  color: var(--accent-primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .dash-body {
    padding: 18px 16px 36px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dash-footer {
    padding: 32px 24px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ============================================
   LIBRARIAN LANDING PAGE SLIDER / CAROUSEL
   ============================================ */
.slider-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 16px 32px;
  overflow: hidden;
  user-select: none;
}

.slider-container {
  position: relative;
  width: 100%;
  padding: 0 44px;
  box-sizing: border-box;
}

.slider-viewport {
  overflow: hidden;
  position: relative;
  width: 100%;
  cursor: grab;
}

.slider-viewport:active {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  width: 500%;
  /* 5 slides */
}

.slide-item {
  width: 20%;
  /* 1/5 of track width */
  flex-shrink: 0;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.slide-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

.slide-item:hover .slide-icon {
  transform: scale(1.06) translateY(-3px);
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.2);
}

.slide-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.slide-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  z-index: 10;
}

.nav-arrow.prev {
  left: 0;
}

.nav-arrow.next {
  right: 0;
}

.nav-arrow:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
}

.pagination-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: var(--text-muted);
}

.dot.active {
  background: var(--accent-primary);
  width: 20px;
}

.slider-action {
  margin-top: 28px;
  text-align: center;
}

.slider-action .btn-primary {
  max-width: 260px;
  margin: 0 auto;
}

/* ============================================
   LANDING PAGE (HERO & NAVBAR)
   ============================================ */

/* Navbar Atas */
.landing-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.landing-brand {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.btn-sign-in {
  background-color: var(--accent-primary);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sign-in:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: var(--shadow-glow);
}

/* Hero Section (Area Gambar Utama) */
.hero-section {
  position: relative;
  height: calc(100vh - 70px);
  /* BARIS BACKGROUND-IMAGE DIHAPUS DARI SINI */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 0 5%;
}

/* Overlay gelap transparan agar teks terbaca */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  color: #ffffff;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  color: #e2e8f0;
}

.btn-lihat-data {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent-primary);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-lihat-data:hover {
  background-color: var(--accent-primary-hover);
}

/* Indikator Slider Bawah */
.hero-indicators {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hero-dot.active {
  background-color: var(--accent-amber);
}

/* Floating Navigation Arrows (Unhide on Hover) */
.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  opacity: 0;
  /* Hide by default */
}

.hero-nav-arrow.next {
  right: 32px;
  transform: translateY(-50%) translateX(24px);
}

.hero-nav-arrow.prev {
  left: 32px;
  transform: translateY(-50%) translateX(-24px);
}

/* Unhide when cursor is on the hero-section (hover) */
.hero-section:hover .hero-nav-arrow.next {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hero-section:hover .hero-nav-arrow.prev {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.hero-nav-arrow:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-50%) scale(1.1) !important;
}

.hero-nav-arrow:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  color: #ffffff;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-content.fade-leave {
  opacity: 0;
  transform: translateY(-20px);
}

.hero-content.fade-enter {
  opacity: 0;
  transform: translateY(20px);
  transition: none;
  /* Instant reset to bottom */
}

/* Page Transition Overlay */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.page-transition-overlay.loaded {
  opacity: 0;
}

.page-transition-overlay.exit {
  opacity: 1;
  pointer-events: auto;
}

/* Responsif untuk layar kecil (Landing Page) */
@media (max-width: 768px) {
  .hero-title {
    font-size: 40px;
  }

  .landing-navbar {
    padding: 16px 20px;
  }

  .hero-section {
    background-position: left center;
  }

  /* Make arrows visible on mobile since hover is not available */
  .hero-nav-arrow {
    opacity: 0.8;
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .hero-nav-arrow.next {
    right: 12px;
    transform: translateY(-50%) translateX(0);
  }

  .hero-nav-arrow.prev {
    left: 12px;
    transform: translateY(-50%) translateX(0);
  }
}

/* Pembungkus Elemen Kontak */
.contact-pop-wrapper {
  position: relative;
  display: inline-block;
}

.contact-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--accent-primary, #2563eb);
}

/* Pop-up Bubble (DISEMBUNYIKAN SECARA DEFAULT) */
.pop-bubble {
  position: absolute;
  bottom: 125%;
  /* Melayang tepat di atas teks */
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  background-color: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;

  /* Sifat Tersembunyi */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  /* Efek Animasi Membal (Pop Up) */
  transition: opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    visibility 0.2s;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 99;
}

/* Segitiga Kecil di Bawah Pop-up */
.pop-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

/* REAKSI: MUNCULKAN POP-UP HANYA SAAT KURSOR DIGESER KE TEKS/LINK */
.contact-pop-wrapper:hover .pop-bubble {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Untuk browser Chrome, Safari, Edge, dan Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Untuk browser Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}