/* ====================================================================
   DISDUKCAPIL KOTA CIMAHI - PREMIUM DASHBOARD CSS
   Versi: 2.0 - Mobile Responsive + Premium Design
   ==================================================================== */

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

/* ────────────────────────────────────────────────────────────────────
   ROOT DESIGN TOKENS
   ──────────────────────────────────────────────────────────────────── */
:root {
  --color-primary:      #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-light:#ccfbf1;
  --color-accent:       #6366f1;
  --color-rose:         #f43f5e;
  --color-amber:        #f59e0b;
  --sidebar-width:      260px;
  --header-height:      56px;
  --radius-card:        14px;
  --shadow-card:        0 1px 3px 0 rgba(0,0,0,.08), 0 1px 2px -1px rgba(0,0,0,.06);
  --shadow-elevated:    0 4px 16px 0 rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --transition-fast:    150ms cubic-bezier(.4,0,.2,1);
  --transition-smooth:  300ms cubic-bezier(.4,0,.2,1);
}

/* ────────────────────────────────────────────────────────────────────
   BASE RESET & GLOBAL
   ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ────────────────────────────────────────────────────────────────────
   SCROLLBAR KUSTOM
   ──────────────────────────────────────────────────────────────────── */
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ────────────────────────────────────────────────────────────────────
   SIDEBAR – BASE DESKTOP
   ──────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 30;
  transition: transform var(--transition-smooth);
  height: 100vh;
  overflow: hidden;
}

.sidebar-brand {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.sidebar-brand-text span {
  color: #99f6e4;
  font-weight: 900;
  letter-spacing: 0.05em;
}

/* ────────────────────────────────────────────────────────────────────
   SIDEBAR SECTION HEADERS
   ──────────────────────────────────────────────────────────────────── */
.sidebar-section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 4px 12px 6px;
}

/* ────────────────────────────────────────────────────────────────────
   SIDEBAR NAV BUTTONS
   ──────────────────────────────────────────────────────────────────── */
.btn-tab {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  cursor: pointer;
}

.btn-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.btn-tab.active-tab {
  background: linear-gradient(135deg, #ccfbf1 0%, #d1fae5 100%);
  color: #0f766e;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(13,148,136,.15);
}

/* ────────────────────────────────────────────────────────────────────
   SIDEBAR ACCORDION
   ──────────────────────────────────────────────────────────────────── */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.accordion-open {
  max-height: 600px;
}

/* ────────────────────────────────────────────────────────────────────
   MOBILE SIDEBAR OVERLAY & DRAWER
   ──────────────────────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 29;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 200ms ease;
}

.sidebar-overlay.active { display: block; }

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ────────────────────────────────────────────────────────────────────
   TAB CONTENT (VIEWS)
   ──────────────────────────────────────────────────────────────────── */
.tab-content {
  display: none;
  animation: fadeSlideUp 250ms ease both;
}

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

/* ────────────────────────────────────────────────────────────────────
   KPI CARDS – PREMIUM
   ──────────────────────────────────────────────────────────────────── */
.kpi-card {
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

/* ────────────────────────────────────────────────────────────────────
   TABLE PREMIUM STYLES
   ──────────────────────────────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.data-table thead tr {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
}

.data-table thead th {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:nth-child(even) { background: #fafafa; }
.data-table tbody tr:nth-child(even):hover { background: #f1f5f9; }

.data-table .row-kecamatan {
  background: linear-gradient(90deg, #f0fdf4 0%, #ecfdf5 100%) !important;
  border-top: 2px solid #86efac;
  border-bottom: 2px solid #86efac;
}

.data-table .row-total {
  background: linear-gradient(90deg, #0f766e 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  font-weight: 800;
}

/* ────────────────────────────────────────────────────────────────────
   BADGE & STATUS
   ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.03em;
}

.badge-live {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ────────────────────────────────────────────────────────────────────
   MODAL – PREMIUM GLASSMORPHISM
   ──────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 200ms ease;
}

.modal-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.8);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-card-wide { max-width: 640px; }
.modal-card-xl   { max-width: 800px; }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 10px;
}

/* ────────────────────────────────────────────────────────────────────
   FORM ELEMENTS – PREMIUM
   ──────────────────────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  transition: all var(--transition-fast);
  outline: none;
  font-family: 'Inter', sans-serif;
}

.form-input:focus {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

.form-input::placeholder { color: #94a3b8; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 32px;
}

/* ────────────────────────────────────────────────────────────────────
   BUTTONS – PREMIUM
   ──────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

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

.btn-primary {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(13,148,136,0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d6860 0%, #0b8074 100%);
  box-shadow: 0 4px 12px rgba(13,148,136,0.4);
  transform: translateY(-1px);
}

.btn-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}

.btn-amber:hover:not(:disabled) {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  transform: translateY(-1px);
}

.btn-rose {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244,63,94,0.35);
}

.btn-rose:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-indigo {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}

.btn-indigo:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-ghost {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-ghost:hover:not(:disabled) {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-sm { padding: 5px 10px; font-size: 10.5px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 10px; border-radius: 6px; }

/* ────────────────────────────────────────────────────────────────────
   ICON BUTTONS
   ──────────────────────────────────────────────────────────────────── */
.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 12px;
}

.icon-btn-amber {
  background: #fef3c7;
  color: #d97706;
}

.icon-btn-amber:hover {
  background: #fde68a;
  color: #b45309;
}

/* ────────────────────────────────────────────────────────────────────
   LOGS TABLE – SPECIAL STYLES
   ──────────────────────────────────────────────────────────────────── */
.log-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-badge-edit     { background: #fef3c7; color: #92400e; }
.log-badge-tambah   { background: #dcfce7; color: #14532d; }
.log-badge-impor    { background: #dbeafe; color: #1e3a8a; }
.log-badge-system   { background: #f3e8ff; color: #581c87; }
.log-badge-user     { background: #ffe4e6; color: #9f1239; }
.log-badge-tahun    { background: #ccfbf1; color: #134e4a; }

/* ────────────────────────────────────────────────────────────────────
   FILE UPLOAD DROP ZONE
   ──────────────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  background: #f8fafc;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #0d9488;
  background: #f0fdfa;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ────────────────────────────────────────────────────────────────────
   IMPORT PREVIEW TABLE
   ──────────────────────────────────────────────────────────────────── */
.preview-table-wrapper {
  max-height: 240px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.preview-table thead {
  background: #0f766e;
  color: #fff;
  position: sticky;
  top: 0;
}

.preview-table th,
.preview-table td {
  padding: 6px 10px;
  border-right: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}

.preview-table tbody tr:nth-child(even) { background: #f8fafc; }
.preview-table tbody tr:hover { background: #f0fdfa; }

/* ────────────────────────────────────────────────────────────────────
   GLASS CARD (Login page)
   ──────────────────────────────────────────────────────────────────── */
.glass-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  color: #f8fafc;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  animation: slideInRight 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-left: 4px solid #0d9488;
}

.toast.toast-success { border-left-color: #22c55e; }
.toast.toast-error   { border-left-color: #f43f5e; }
.toast.toast-warning { border-left-color: #f59e0b; }
.toast.toast-info    { border-left-color: #6366f1; }

.toast.toast-exit { animation: slideOutRight 300ms ease forwards; }

/* ────────────────────────────────────────────────────────────────────
   YEAR SELECTOR PILL
   ──────────────────────────────────────────────────────────────────── */
.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1.5px solid #0d9488;
  color: #0f766e;
  background: #f0fdfa;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.year-pill:hover {
  background: #ccfbf1;
  box-shadow: 0 2px 8px rgba(13,148,136,0.2);
}

/* ────────────────────────────────────────────────────────────────────
   TABLE HEADER ACTION AREA
   ──────────────────────────────────────────────────────────────────── */
.table-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ────────────────────────────────────────────────────────────────────
   EMPTY STATE
   ──────────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.empty-state i { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.empty-state p { font-size: 12px; font-weight: 500; }

/* ────────────────────────────────────────────────────────────────────
   USER MANAGEMENT
   ──────────────────────────────────────────────────────────────────── */
.user-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.user-card:hover {
  border-color: #94a3b8;
  box-shadow: var(--shadow-card);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────────────
   HEADER MOBILE COMPACT
   ──────────────────────────────────────────────────────────────────── */
.header-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ────────────────────────────────────────────────────────────────────
   SIDEBAR TOOL BUTTONS
   ──────────────────────────────────────────────────────────────────── */
.sidebar-tool-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

/* ────────────────────────────────────────────────────────────────────
   YEAR ACCORDION ITEM
   ──────────────────────────────────────────────────────────────────── */
.year-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.year-item-header {
  width: 100%;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f766e;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.year-item-header:hover { background: #f0fdfa; }

.year-item.active-year {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13,148,136,.12);
}

.year-item.active-year .year-item-header {
  background: linear-gradient(90deg, #f0fdfa 0%, #ecfdf5 100%);
}

/* ────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ──────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

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

.animate-spin-fast { animation: spin 0.7s linear infinite; }
.animate-modal-pop { animation: modalPop 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.animate-shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ────────────────────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 40;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .hamburger-btn {
    display: flex;
  }

  .main-layout {
    flex-direction: column;
  }

  .main-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .modal-card {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    animation: slideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

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

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .table-header-actions .btn-sm span { display: none; }

  .toast-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
  }

  .toast { min-width: auto; }

  .header-title-text {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ────────────────────────────────────────────────────────────────────
   SCROLLABLE TABLE MOBILE (STICKY FIRST COL)
   ──────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: inherit;
  }
}

/* ────────────────────────────────────────────────────────────────────
   PRELOADER
   ──────────────────────────────────────────────────────────────────── */
#preloader {
  transition: opacity 400ms ease;
}
