/* ==========================================================================
   SMK NEGERI 1 PUNGGELAN - ADMINISTRASI PKL
   Flat Modern & Fresh UI: Clean Crisp Slate & Vibrant Modern Accents
   ========================================================================== */

:root {
  /* Brand Palette - Flat Modern Vibrant Blue */
  --primary: #2563eb;        /* Fresh Modern Royal Blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;  /* Crisp Pastel Tint */
  --primary-border: #bfdbfe;
  
  --secondary: #0ea5e9;      /* Fresh Sky Blue */
  --secondary-hover: #0284c7;
  --secondary-light: #f0f9ff;

  --accent: #06b6d4;         /* Fresh Cyan / Electric Teal */
  --accent-glow: rgba(37, 99, 235, 0.12);

  /* Status Colors - Fresh, Clean & High Readability */
  --success: #10b981;        /* Fresh Emerald Mint */
  --success-light: #ecfdf5;
  --warning: #f59e0b;        /* Fresh Warm Amber */
  --warning-light: #fffbeb;
  --danger: #ef4444;         /* Fresh Coral Red */
  --danger-light: #fef2f2;
  --info: #3b82f6;           /* Fresh Blue */
  --info-light: #eff6ff;

  /* Neutrals - Flat Modern Crisp & Clean Slate */
  --bg-main: #f8fafc;        /* Crisp Slate 50 (Airy & Clean) */
  --bg-surface: #ffffff;     /* Flat Pure White Card */
  --bg-subtle: #f1f5f9;      /* Flat Slate 100 (Table Headers, Inset) */
  
  --text-main: #0f172a;      /* Sharp Slate 900 (High Contrast & Clear) */
  --text-muted: #64748b;     /* Balanced Neutral (Slate 500) */
  --text-light: #94a3b8;     /* Subdued Slate (Slate 400) */
  
  --border: #e2e8f0;         /* Crisp Minimal Border (Slate 200) */
  --border-focus: #3b82f6;

  /* Shadows - Minimal & Flat Modern */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-blue: 0 4px 12px rgba(37, 99, 235, 0.12);

  /* Radii - Clean Flat Modern */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   FLAT MODERN DARK THEME PALETTE
   Deep Clean Slate, Crisp Contrast & Modern Glow
   ========================================================================== */
[data-theme="dark"] {
  --primary: #38bdf8;          /* Vibrant Sky Cyan */
  --primary-hover: #7dd3fc;
  --primary-light: rgba(56, 189, 248, 0.12);
  --primary-border: rgba(56, 189, 248, 0.25);
  
  --secondary: #0ea5e9;
  --secondary-hover: #38bdf8;
  --secondary-light: rgba(14, 165, 233, 0.12);

  --accent: #818cf8;           /* Modern Iris */
  --accent-glow: rgba(56, 189, 248, 0.18);

  /* Status Colors Dark Mode */
  --success: #34d399;          /* Fresh Mint */
  --success-light: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;          /* Warm Sun Yellow */
  --warning-light: rgba(251, 191, 36, 0.14);
  --danger: #f87171;           /* Crisp Rose Red */
  --danger-light: rgba(248, 113, 113, 0.14);
  --info: #38bdf8;
  --info-light: rgba(56, 189, 248, 0.12);

  /* Flat Modern Dark Slate Neutrals */
  --bg-main: #0b1120;          /* Deep Clean Midnight Slate */
  --bg-surface: #1e293b;       /* Elevated Flat Surface */
  --bg-subtle: #172236;        /* Flat Inset / Header Background */
  
  --text-main: #f8fafc;        /* Crisp Pure White (Slate 50) */
  --text-muted: #94a3b8;       /* Balanced Neutral (Slate 400) */
  --text-light: #64748b;       /* Subdued Slate (Slate 500) */
  
  --border: #334155;           /* Clean Modern Border (Slate 700) */
  --border-focus: #38bdf8;

  /* Shadows Flat Dark */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-blue: 0 6px 16px -4px rgba(56, 189, 248, 0.18);
}

/* ==========================================================================
   DEPARTMENT ACCENT COLOR THEMES (4 KOMPETENSI KEAHLIAN)
   TBKR (Kuning/Amber), TKR (Biru), AKL (Pink), SIJA (Hijau)
   ========================================================================== */

/* 1. TBKR (Teknik Bodi Kendaraan Ringan) - KUNING / AMBER */
[data-jurusan="tbkr"] {
  --primary: #d97706;          /* Vibrant Amber / Warm Yellow */
  --primary-hover: #b45309;
  --primary-light: #fef3c7;
  --primary-border: #fde68a;
  --secondary: #f59e0b;
  --secondary-hover: #d97706;
  --secondary-light: rgba(245, 158, 11, 0.15);
  --accent: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(217, 119, 6, 0.25);
  --border-focus: #fbbf24;
}
[data-theme="dark"][data-jurusan="tbkr"] {
  --primary: #fbbf24;
  --primary-hover: #fcd34d;
  --primary-light: rgba(251, 191, 36, 0.15);
  --primary-border: rgba(251, 191, 36, 0.35);
  --secondary: #f59e0b;
  --accent: #fde68a;
  --accent-glow: rgba(251, 191, 36, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(251, 191, 36, 0.3);
}

/* 2. TKR (Teknik Kendaraan Ringan) - BIRU */
[data-jurusan="tkr"] {
  --primary: #1e40af;          /* Deep Royal Blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --secondary: #0284c7;
  --secondary-hover: #0369a1;
  --secondary-light: #e0f2fe;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --shadow-blue: 0 10px 25px -5px rgba(30, 64, 175, 0.2);
  --border-focus: #93c5fd;
}
[data-theme="dark"][data-jurusan="tkr"] {
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-light: rgba(56, 189, 248, 0.12);
  --primary-border: rgba(56, 189, 248, 0.28);
  --secondary: #0ea5e9;
  --accent: #7dd3fc;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(56, 189, 248, 0.3);
}

/* 3. AKL (Akuntansi dan Keuangan Lembaga) - PINK */
[data-jurusan="akl"] {
  --primary: #db2777;          /* Vibrant Rose / Pink */
  --primary-hover: #be185d;
  --primary-light: #fdf2f8;
  --primary-border: #fbcfe8;
  --secondary: #ec4899;
  --secondary-hover: #db2777;
  --secondary-light: rgba(236, 72, 153, 0.15);
  --accent: #f472b6;
  --accent-glow: rgba(236, 72, 153, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(219, 39, 119, 0.25);
  --border-focus: #f472b6;
}
[data-theme="dark"][data-jurusan="akl"] {
  --primary: #f472b6;
  --primary-hover: #f9a8d4;
  --primary-light: rgba(244, 114, 182, 0.15);
  --primary-border: rgba(244, 114, 182, 0.35);
  --secondary: #ec4899;
  --accent: #fbcfe8;
  --accent-glow: rgba(244, 114, 182, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(244, 114, 182, 0.3);
}

/* 4. SIJA (Sistem Informasi Jaringan & Aplikasi) - HIJAU */
[data-jurusan="sija"] {
  --primary: #059669;          /* Emerald Green */
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --secondary: #10b981;
  --secondary-hover: #059669;
  --secondary-light: rgba(16, 185, 129, 0.15);
  --accent: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(5, 150, 105, 0.25);
  --border-focus: #34d399;
}
[data-theme="dark"][data-jurusan="sija"] {
  --primary: #34d399;
  --primary-hover: #6ee7b7;
  --primary-light: rgba(52, 211, 153, 0.15);
  --primary-border: rgba(52, 211, 153, 0.35);
  --secondary: #10b981;
  --accent: #a7f3d0;
  --accent-glow: rgba(52, 211, 153, 0.35);
  --shadow-blue: 0 10px 25px -5px rgba(52, 211, 153, 0.3);
}

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

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Header */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Cloud Status Pill */
.cloud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.cloud-status-badge:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* User Pill & Profile */
.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-info {
  line-height: 1.1;
  text-align: left;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Main Container & Layout */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem 1.25rem;
}

/* Navigation Tabs Bar */
.nav-tab-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.tab-btn .tab-icon {
  width: 18px;
  height: 18px;
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

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

/* Footer */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Theme Switcher Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.theme-toggle-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: rotate(15deg);
}

/* Dark mode tweaks for Leaflet map & components */
[data-theme="dark"] .leaflet-tile {
  filter: brightness(0.65) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) !important;
}

[data-theme="dark"] .leaflet-container {
  background: #0f172a !important;
}

[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}

[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Responsive tweaks for Mobile & Tablet */
@media (max-width: 768px) {
  .app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .header-container {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }
  .brand-logo-img {
    width: 34px;
    height: 34px;
  }
  .brand-text h1 {
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }
  .brand-text p {
    display: none;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }
  .cloud-status-badge {
    padding: 0.35rem 0.55rem;
    font-size: 0.7rem;
  }
  .user-pill {
    padding: 0.25rem 0.45rem;
    gap: 0.35rem;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .user-name {
    max-width: 80px;
    font-size: 0.75rem;
  }
  .user-role-badge {
    display: none;
  }

  /* Nav Tabs: Smooth Touch Horizontal Scroll on Mobile */
  .nav-tab-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: var(--radius-md);
    padding: 0.35rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
  }
  .nav-tab-container::-webkit-scrollbar {
    display: none;
  }
  .nav-tabs {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    gap: 0.35rem;
  }
  .tab-btn {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .main-content {
    padding: 0.75rem 0.5rem 4rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .brand-text h1 {
    max-width: 130px;
    font-size: 0.88rem;
  }
  .cloud-status-badge .status-text {
    display: none;
  }
  .cloud-status-badge {
    padding: 0.45rem;
    border-radius: var(--radius-full);
  }
  .cloud-status-badge i {
    display: none;
  }
}

/* =============================================================
   PAGINATION STYLES
   ============================================================= */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-info b {
  color: var(--text-main);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
}

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

.page-btn-nav {
  padding: 0 0.75rem;
  font-size: 0.8rem;
  gap: 0.25rem;
}

/* =============================================================
   DUDIKA AUTOCOMPLETE DROPDOWN
   ============================================================= */
.autocomplete-container {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1050;
  padding: 0.4rem;
}

.autocomplete-item {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--bg-subtle);
}

.autocomplete-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.autocomplete-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-highlight {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 800;
}

.autocomplete-empty {
  padding: 0.8rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =============================================================
   PWA & MOBILE RESPONSIVE ENHANCEMENTS
   ============================================================= */
/* 1. Safe Area Insets for Mobile PWA (Notch, Dynamic Island, Gesture Bar) */
@supports (padding-top: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .app-header {
    padding-top: max(0px, env(safe-area-inset-top));
  }
  .app-footer {
    padding-bottom: max(1.25rem, calc(1.25rem + env(safe-area-inset-bottom)));
  }
}

/* 2. Standalone Mode / PWA App Behavior */
@media (display-mode: standalone) {
  /* Prevent pull-to-refresh reload flicker on installed PWA */
  html {
    height: 100%;
    height: 100dvh;
  }
  body {
    min-height: 100%;
    min-height: 100dvh;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  
  /* Make header feel like native mobile app header */
  .app-header {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  /* Sticky Tab navigation bar on PWA */
  .nav-tab-container {
    position: sticky;
    top: 65px;
    z-index: 99;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.94);
  }
  [data-theme="dark"] .nav-tab-container {
    background: rgba(30, 41, 59, 0.94);
  }
}

/* 3. Mobile Touch & Responsive Improvements (< 768px) */
@media (max-width: 768px) {
  /* Prevent auto-zooming on input focus in iOS/Android Safari & Chrome */
  input[type="text"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Prevent horizontal card overflow */
  .card, .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Header Brand Responsiveness */
  .header-container {
    padding: 0.6rem 0.85rem;
  }
  .brand-text h1 {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .brand-text p {
    font-size: 0.7rem;
  }

  /* Make tab container horizontally scrollable like native mobile app tabs */
  .nav-tab-container {
    padding: 0.4rem 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
  }
  .nav-tab-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .nav-tabs {
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: max-content;
  }

  .tab-btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Mobile Content Spacing */
  .main-content {
    padding: 0.85rem 0.65rem 3rem 0.65rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Touch buttons optimization */
  .btn {
    min-height: 42px;
    touch-action: manipulation;
  }

  /* Table horizontal momentum scroll */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
}

