/* =============================================================
   Catatan Kueku — Mobile-First Design System
   Theme: Warm Orange + Clean White
   Font: Plus Jakarta Sans
   ============================================================= */

:root {
  /* Primary Palette */
  --primary: #E65100;
  --primary-dark: #BF360C;
  --primary-light: #FF8A65;
  --primary-bg: #FFF3E0;
  --primary-border: #FFCCBC;

  /* Semantic Colors */
  --success: #2E7D32;
  --success-bg: #E8F5E9;
  --success-light: #81C784;
  --warning: #F57F17;
  --warning-bg: #FFFDE7;
  --danger: #C62828;
  --danger-bg: #FFEBEE;
  --danger-light: #EF9A9A;
  --info: #0277BD;
  --info-bg: #E1F5FE;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-primary: 0 4px 16px rgba(230,81,0,0.25);

  /* Layout */
  --header-height: 56px;
  --bottom-nav-height: 64px;
  --sidebar-width: 280px;
}

/* =============================================================
   Base Reset
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--gray-100);
  color: var(--gray-900);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =============================================================
   Header
   ============================================================= */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(230,81,0,0.3);
}

.header-title .store-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.9);
  font-size: var(--font-size-sm);
}

.role-badge {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-badge.role-owner { background: rgba(255,215,0,0.3); color: #FFF59D; }
.role-badge.role-admin { background: rgba(100,181,246,0.3); color: #BBDEFB; }
.role-badge.role-kasir { background: rgba(165,214,167,0.3); color: #C8E6C9; }

/* =============================================================
   Button Icon
   ============================================================= */
.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover { background: rgba(255,255,255,0.25); }
.btn-icon:active { background: rgba(255,255,255,0.1); transform: scale(0.95); }

/* =============================================================
   Sidebar
   ============================================================= */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: white;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.sidebar-drawer.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.logo-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  line-height: 1.2;
}
.logo-subtitle {
  font-size: var(--font-size-xs);
  opacity: 0.8;
}

.sidebar-close {
  background: rgba(255,255,255,0.15);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.user-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary-bg);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
}
.user-name {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--gray-900);
}
.user-role {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  text-transform: capitalize;
}

.sidebar-nav {
  padding: var(--space-3) 0;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-5);
  color: var(--gray-700);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  min-height: 48px;
}
.nav-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
}
.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-divider {
  padding: var(--space-2) var(--space-5) var(--space-1);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-top: var(--space-2);
}
.nav-logout {
  color: var(--danger) !important;
}
.nav-logout:hover {
  background: var(--danger-bg) !important;
}

/* =============================================================
   Main Content
   ============================================================= */
.main-content {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  min-height: 100vh;
}

/* =============================================================
   Bottom Navigation
   ============================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  text-decoration: none;
  color: var(--gray-500);
  font-size: 0.65rem;
  font-weight: 500;
  min-height: 48px;
  transition: color 0.15s;
  padding: 4px 0;
}
.bottom-nav-item i {
  font-size: 1.3rem;
  transition: transform 0.15s;
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-nav-item.active i {
  transform: scale(1.1);
}

.bottom-nav-center {
  position: relative;
}
.center-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  margin-top: -20px;
  box-shadow: var(--shadow-primary);
}
.bottom-nav-center.active .center-btn {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #7F0000 100%);
}

/* =============================================================
   Toast Messages
   ============================================================= */
.toast-message {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 16px;
  right: 16px;
  background: var(--gray-900);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  z-index: 500;
  animation: slideDown 0.3s ease, fadeOut 0.5s ease 3s forwards;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

/* =============================================================
   Cards
   ============================================================= */
.card-kueku {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card-kueku:hover {
  box-shadow: var(--shadow-md);
}

.card-stat {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.card-stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.card-stat-body {
  flex: 1;
  min-width: 0;
}
.card-stat-label {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.card-stat-value {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-stat-value.rupiah {
  font-size: var(--font-size-lg);
}
.card-stat-sub {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: 2px;
}

/* Stat icon colors */
.icon-orange { background: var(--primary-bg); color: var(--primary); }
.icon-green { background: var(--success-bg); color: var(--success); }
.icon-red { background: var(--danger-bg); color: var(--danger); }
.icon-blue { background: var(--info-bg); color: var(--info); }
.icon-yellow { background: var(--warning-bg); color: var(--warning); }
.icon-purple { background: #F3E5F5; color: #7B1FA2; }

/* =============================================================
   Page Header
   ============================================================= */
.page-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-4);
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}
.page-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.2;
}
.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-top: 2px;
}

/* =============================================================
   Buttons
   ============================================================= */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  box-shadow: var(--shadow-primary);
}
.btn-primary-custom:hover {
  box-shadow: 0 6px 20px rgba(230,81,0,0.35);
  transform: translateY(-1px);
}
.btn-primary-custom:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: 16px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  text-decoration: none;
  z-index: 90;
  transition: all 0.2s;
}
.btn-fab:hover {
  transform: scale(1.05);
  color: white;
}
.btn-fab:active { transform: scale(0.95); }

/* =============================================================
   Qty Stepper (big for mobile)
   ============================================================= */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.qty-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gray-300);
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-700);
  flex-shrink: 0;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-btn:active { background: var(--primary-bg); transform: scale(0.95); }
.qty-input {
  width: 64px;
  height: 44px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  text-align: center;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gray-900);
  padding: 0;
}
.qty-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,81,0,0.15);
}

/* =============================================================
   Forms
   ============================================================= */
.form-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.form-section-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-label-custom {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
  display: block;
}
.form-control-custom {
  width: 100%;
  height: 48px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}
.form-control-custom:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,81,0,0.12);
}
.form-control-custom.is-invalid {
  border-color: var(--danger);
}

/* =============================================================
   Status Badges
   ============================================================= */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-lunas { background: var(--success-bg); color: var(--success); }
.badge-sebagian { background: var(--warning-bg); color: var(--warning); }
.badge-belum { background: var(--danger-bg); color: var(--danger); }
.badge-open { background: var(--info-bg); color: var(--info); }
.badge-closed { background: var(--success-bg); color: var(--success); }
.badge-aktif { background: var(--success-bg); color: var(--success); }
.badge-nonaktif { background: var(--gray-200); color: var(--gray-600); }

/* =============================================================
   List Items
   ============================================================= */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: white;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.list-item:hover { background: var(--gray-50); }
.list-item:last-child { border-bottom: none; }

.list-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.list-avatar img { width: 100%; height: 100%; object-fit: cover; }

.list-body { flex: 1; min-width: 0; }
.list-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-subtitle {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}
.list-meta {
  text-align: right;
  flex-shrink: 0;
}
.list-amount {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--gray-900);
}
.list-amount.text-danger-custom { color: var(--danger); }
.list-amount.text-success-custom { color: var(--success); }

/* =============================================================
   Summary Bar
   ============================================================= */
.summary-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}
.summary-bar-title {
  font-size: var(--font-size-xs);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.summary-bar-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  line-height: 1;
}

/* =============================================================
   Search Bar
   ============================================================= */
.search-bar {
  position: relative;
  margin-bottom: var(--space-3);
}
.search-bar input {
  width: 100%;
  height: 44px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4) 0 44px;
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  background: white;
  transition: border-color 0.15s;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
}
.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.1rem;
}

/* =============================================================
   Section Headers
   ============================================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.section-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.section-link {
  font-size: var(--font-size-sm);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* =============================================================
   Charts
   ============================================================= */
.chart-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-4);
}
.chart-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--space-4);
}

/* =============================================================
   Empty State
   ============================================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--gray-400);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}
.empty-state-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}
.empty-state-desc {
  font-size: var(--font-size-sm);
  color: var(--gray-400);
}

/* =============================================================
   Progress Bar
   ============================================================= */
.progress-bar-custom {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-2);
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  transition: width 0.5s ease;
}
.progress-fill.green { background: linear-gradient(90deg, var(--success-light), var(--success)); }
.progress-fill.red { background: linear-gradient(90deg, var(--danger-light), var(--danger)); }

/* =============================================================
   PWA Install Prompt
   ============================================================= */
.pwa-prompt {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  left: 16px;
  right: 16px;
  z-index: 150;
}
.pwa-prompt-content {
  background: var(--gray-900);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
}
.pwa-prompt-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.pwa-prompt-text {
  flex: 1;
  font-size: var(--font-size-sm);
  line-height: 1.4;
}
.pwa-prompt-text strong { display: block; }
.pwa-prompt-text small { opacity: 0.7; }

/* =============================================================
   Tables (mobile-scroll)
   ============================================================= */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: white;
}
.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.table-custom th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--gray-600);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table-custom td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  vertical-align: middle;
}
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: var(--gray-50); }
.table-custom tfoot td {
  font-weight: 700;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-top: 2px solid var(--primary-border);
}

/* =============================================================
   Login Page
   ============================================================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 40%, #4A0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}
.login-logo-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-primary);
}
.login-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

/* =============================================================
   Tren Indicators
   ============================================================= */
.tren-naik { color: var(--success); }
.tren-turun { color: var(--danger); }
.tren-stabil { color: var(--gray-500); }
.tren-new { color: var(--info); }

/* =============================================================
   Utility
   ============================================================= */
.p-page { padding: var(--space-4); }
.gap-3 { gap: var(--space-3) !important; }
.rupiah-display {
  font-family: var(--font-family);
  font-variant-numeric: tabular-nums;
}
.fw-bold-custom { font-weight: 700; }
.text-muted-custom { color: var(--gray-500); font-size: var(--font-size-sm); }

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* =============================================================
   Responsive Adjustments
   ============================================================= */
@media (min-width: 768px) {
  .main-content {
    max-width: 600px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 600px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
  }
  .app-header {
    max-width: 600px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
  }
  .toast-message {
    max-width: 568px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

@media (min-width: 992px) {
  .main-content { max-width: 800px; }
}
