:root {
  --navy: #010050; --brand: #3b50f7; --brand-pale: #eef0ff;
  --surface: #f4f5f9; --text-main: #010050; --text-muted: #5d6185;
  --danger: #d92d3a; --success: #0f8a5f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', sans-serif; background-color: var(--surface);
  color: var(--text-main); font-size: 13px; line-height: 1.4; overflow: hidden; 
}

/* --- SCREEN: LOGIN OVERLAY --- */
#login-screen {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh; 
  background: radial-gradient(circle at center, #e2e6fe 0%, #f4f5f9 60%); 
  z-index: 999999; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.req { color: var(--danger); font-weight: bold; }
.text-bold { font-weight: 600; font-size: 14px; }
.text-brand { color: var(--brand) !important; }
.text-navy { color: var(--navy); }
.text-danger { color: #ef4444 !important; }
.text-danger:hover { background: rgba(239, 68, 68, 0.1) !important; }

/* --- BACKGROUND GLOW --- */
.bg-glow { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none; }
.glow-1 { position: absolute; width: 400px; height: 400px; background: rgba(59, 80, 247, 0.15); border-radius: 50%; filter: blur(80px); top: -100px; left: -100px; }
.glow-2 { position: absolute; width: 500px; height: 500px; background: rgba(238, 240, 255, 0.8); border-radius: 50%; filter: blur(80px); top: 30%; right: -150px; }
.glow-3 { position: absolute; width: 400px; height: 400px; background: rgba(1, 0, 80, 0.08); border-radius: 50%; filter: blur(80px); bottom: -150px; left: 30%; }

/* --- GLASSMORPHISM --- */
.glass { border: 1px solid rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.6); box-shadow: 0 8px 32px -12px rgba(1, 0, 80, 0.18); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 1.5rem;}
.glass-strong { border: 1px solid rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.85); box-shadow: 0 24px 64px -16px rgba(1, 0, 80, 0.28); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 1.5rem;}
.bg-glass { background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.6); }

/* --- LAYOUT UTAMA --- */
.app-container { display: flex; flex-direction: column; height: 100vh; width: 100vw; padding: 16px 24px; gap: 16px; }
.content-area { display: flex; flex: 1; gap: 20px; min-height: 0; }

/* --- TOPBAR --- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-radius: 99px; flex-shrink: 0; position: relative; z-index: 9999; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.logo-area { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.logo-text { font-weight: 800; font-size: 20px; color: var(--navy); letter-spacing: -0.5px; margin-left: 4px; }
.sync-pill { display: flex; align-items: center; gap: 8px; background: var(--brand-pale); color: var(--brand); padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: 12px; margin-left: 16px;}
.sync-icon { width: 14px; height: 14px; }
.spin { animation: spin 2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.user-profile { display: flex; align-items: center; gap: 10px;}
.avatar { background: linear-gradient(135deg, var(--brand), var(--navy)); color: white; font-weight: bold; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;}
.profile-info .name { font-weight: 600; color: var(--navy); }
.profile-info .role { font-size: 11px; color: var(--text-muted); }

/* --- SIDEBAR --- */
.glass-sidebar { border: 1px solid rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 4px 0 24px -10px rgba(1,0,80,0.1); border-radius: 24px;}
.sidebar { width: 240px; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; flex-shrink: 0; overflow-x: hidden; white-space: nowrap; z-index: 10; padding: 24px 12px; }
.sidebar.collapsed { width: 76px; }
.nav-text { opacity: 1; transition: opacity 0.2s ease; }
.sidebar.collapsed .nav-text { opacity: 0; }
.nav-menu { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav-menu::-webkit-scrollbar { display: none; }
.nav-label { font-size: 10px; font-weight: 700; color: var(--text-muted); padding: 0 16px 12px; letter-spacing: 1px; transition: opacity 0.2s; }
#nav-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: transparent; border: none; border-radius: 12px; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; transition: all 0.2s ease; font-family: inherit;}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; transition: color 0.2s ease;}
.nav-item:hover { background: rgba(255,255,255,0.8); color: var(--navy); }
.nav-item.active { background: var(--navy); color: white; box-shadow: 0 4px 12px rgba(1,0,80,0.2); }
.nav-item.active svg { color: white; }

.logout-btn { margin-top: auto; color: var(--danger); }
.logout-btn svg { color: var(--danger); }
.logout-btn:hover { background: rgba(217, 45, 58, 0.1) !important; color: var(--danger) !important; }

.btn-icon { background: transparent; border: none; cursor: pointer; color: var(--navy); padding: 6px; border-radius: 8px; display: grid; place-items: center;}
.btn-icon:hover { background: rgba(255,255,255,0.6); }

/* --- MAIN CONTENT & PAGE ROUTING --- */
.main-content { flex: 1; overflow-y: auto; padding-right: 8px; position: relative;}
.page-section { display: none; animation: fadeIn 0.3s ease; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; padding-top: 8px;}
.page-title { font-size: 24px; font-weight: 700; color: var(--navy); margin-top: 4px; }

/* Filter Bar Desktop */
.filter-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-bottom: 20px; border-radius: 99px; gap: 12px; flex-wrap: wrap;}
.filter-group { display: flex; gap: 4px; }
.filter-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 25px; border: none; background: transparent; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); transition: all 0.2s; font-family: inherit; white-space: nowrap; }
.filter-btn:hover { background: rgba(255,255,255,0.8); }
.filter-btn.active { background: var(--brand); color: white; box-shadow: 0 4px 12px rgba(59,80,247,0.3); }
.filter-count { display: inline-flex; align-items: center; justify-content: center; background: rgba(1, 0, 80, 0.1); color: var(--navy); border-radius: 99px; padding: 2px 8px; font-size: 11px; font-weight: 700; pointer-events: none; }
.filter-btn.active .filter-count { background: rgba(255, 255, 255, 0.3); color: white; }

.filter-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.filter-select { padding: 8px 14px; border: 1px solid rgba(255,255,255,0.8); background: rgba(255,255,255,0.65); border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--navy); outline: none; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.filter-select:focus, .filter-select:hover { background: white; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-pale); }

.search-box { position: relative; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-muted); }
.search-box input { padding: 8px 16px 8px 36px; border: 1px solid rgba(255,255,255,0.8); background: rgba(255,255,255,0.5); border-radius: 99px; font-size: 12px; outline: none; width: 220px; transition: all 0.2s; font-family: inherit;}
.search-box input:focus { background: white; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-pale);}

/* Order Cards */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-bottom: 24px;}
.order-card { background: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.9); border-radius: 24px; padding: 20px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; box-shadow: 0 4px 16px -6px rgba(1,0,80,0.08);}
.order-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px -8px rgba(1,0,80,0.15); background: rgba(255,255,255,0.8);}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.plain-id { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.badge-status { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 99px; display: flex; align-items: center; gap: 6px;}
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: block; }
.status-Penawaran { background: rgba(93,97,133,0.1); color: var(--text-muted); }
.status-Penawaran::before { background: var(--text-muted); }
.status-Deal { background: var(--brand-pale); color: var(--brand); }
.status-Deal::before { background: var(--brand); }
.status-Lunas { background: rgba(15,138,95,0.1); color: var(--success); }
.status-Lunas::before { background: var(--success); }
.status-Batal { background: rgba(217, 45, 58, 0.1); color: var(--danger); }
.status-Batal::before { background: var(--danger); }

.card-client { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 6px;}
.card-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 500;}
.card-meta svg { width: 14px; height: 14px; }
.card-tracking { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(1,0,80,0.1); }
.track-badge { font-size: 10px; font-weight: 600; padding: 4px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px;}
.track-badge.done { background: rgba(15,138,95,0.1); color: var(--success); }
.track-badge.pending { background: rgba(217,45,58,0.1); color: var(--danger); }

/* --- MODAL / DRAWER --- */
.modal-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(1,0,80,0.3); 
  z-index: 99999; 
  display: none; 
  justify-content: flex-end; 
  padding: 16px; 
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); 
}
.modal-overlay.show { display: flex; }
.modal-content { width: 600px; max-width: 100%; height: 100%; display: flex; flex-direction: column; animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 24px;}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0;} to { transform: translateX(0); opacity: 1;} }
.modal-header { padding: 24px 24px 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.4); display: flex; justify-content: space-between;}
.align-start { align-items: flex-start; }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.4); display: flex; justify-content: flex-end; gap: 12px; flex-shrink: 0; }

/* Forms */
.form-section { border-radius: 20px; padding: 20px; }
.status-section { background: var(--navy); border: none; box-shadow: 0 12px 24px rgba(1,0,80,0.3);}
.status-select { background: white !important; color: var(--navy) !important; font-weight: 700; border: none !important;}
.form-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--navy); border-bottom: 1px solid rgba(1,0,80,0.1); padding-bottom: 12px; display: flex; align-items: center; gap: 8px;}
.section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(1,0,80,0.1); margin-bottom: 16px; padding-bottom: 8px;}
.section-header h3 { border: none; margin: 0; padding: 0; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;}
.form-row:last-child { margin-bottom: 0; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; }
.flex-1 { flex: 1 1 150px; min-width: 0;} .flex-2 { flex: 2 1 200px; min-width: 0;}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 11px; font-weight: 700; color: var(--navy); opacity: 0.8;}
.form-group input, .form-group select, .form-group textarea { padding: 10px 14px; border: 1px solid rgba(1,0,80,0.15); border-radius: 12px; font-size: 13px; background: rgba(255,255,255,0.8); outline: none; transition: all 0.2s; color: var(--navy); font-family: inherit; font-weight: 500;}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-pale); background: white;}

.status-section .form-group label { color: white; opacity: 0.9; }

/* Buttons */
.btn-primary { background: var(--navy); color: #fff; border: none; padding: 10px 20px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; font-family: inherit;}
.btn-primary:hover { background: rgba(1,0,80,0.9); transform: translateY(-1px); box-shadow: 0 8px 16px rgba(1,0,80,0.2);}
.btn-secondary { background: white; color: var(--navy); border: 1px solid rgba(1,0,80,0.15); padding: 10px 20px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; font-family: inherit;}
.btn-secondary:hover { background: var(--brand-pale); border-color: var(--brand-pale);}
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Service Row & Finance */
.service-row { background: rgba(255,255,255,0.5); border: 1px solid rgba(1,0,80,0.1); border-radius: 16px; padding: 16px; margin-bottom: 12px; position: relative; }
.dashed-line { border: 0; border-top: 1px dashed rgba(1,0,80,0.15); margin: 16px 0; }

/* --- DASHBOARD SALDO GRID --- */
.dashboard-saldo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.saldo-card { padding: 14px 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 4px; }
.saldo-card.total-saldo { background: rgba(238, 240, 255, 0.9); border-color: rgba(59, 80, 247, 0.2); }
.saldo-label { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.saldo-value { font-size: 15px; font-weight: 800; color: var(--navy); }

/* --- DATE PICKER & LAPORAN --- */
input[type="date"].status-select {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12px !important;
  color: var(--navy) !important;
  background: white !important;
  outline: none;
  cursor: pointer;
  text-align: center !important;
}
input[type="date"].status-select::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(0.2); }

#tbody-laba-rugi tr td, #tbody-neraca tr td { white-space: nowrap; }
#tbody-laba-rugi tr td:nth-child(2), #tbody-neraca tr td:nth-child(2) { text-align: right; width: 35%; }
#tbody-laba-rugi tr td:nth-child(1), #tbody-neraca tr td:nth-child(1) { width: 65%; }

/* --- PANEL NOTIFIKASI --- */
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  background: red;
}
.notif-panel {
  position: absolute;
  top: 45px;
  right: 0;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid rgba(1,0,80,0.05);
  z-index: 1000;
  display: none; 
  flex-direction: column;
  overflow: hidden;
  cursor: default;
}
.notif-panel.show { display: flex; }
.notif-header { padding: 16px; font-weight: 800; color: var(--navy); border-bottom: 1px solid rgba(1,0,80,0.05); font-size: 14px; }
.notif-body { max-height: 300px; overflow-y: auto; }
.notif-item { padding: 14px 16px; border-bottom: 1px solid rgba(1,0,80,0.05); font-size: 12px; color: var(--navy); line-height: 1.5; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 12px; font-weight: 500; }

/* --- GAYA KHUSUS KARTU MEETING --- */
.meeting-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(1, 0, 80, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.meeting-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(1, 0, 80, 0.15); }
.meet-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; background: rgba(1, 0, 80, 0.05); color: var(--navy); width: fit-content; }
.meet-badge span { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-process { background: #d97706; }
.dot-selesai { background: var(--success); }
.dot-batal { background: var(--danger); }
.meet-title { font-size: 16px; font-weight: 800; color: var(--navy); }
.meet-time { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* --- GAYA KHUSUS NOTES (MASONRY ALA GOOGLE KEEP) --- */
.notes-masonry { column-count: auto; column-width: 250px; column-gap: 16px; padding-bottom: 24px; }
.note-card { break-inside: avoid-column; margin-bottom: 16px; border-radius: 16px; padding: 20px; border: 1px solid rgba(1, 0, 80, 0.08); cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; }
.note-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -8px rgba(1, 0, 80, 0.15); }
.note-title { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.note-content { font-size: 12px; color: #333; line-height: 1.5; white-space: pre-wrap; }
.color-picker { display: flex; gap: 12px; margin-top: 6px; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(1, 0, 80, 0.1); transition: all 0.2s ease; }
.color-dot.active { border: 2px solid var(--navy); transform: scale(1.1); box-shadow: 0 4px 10px rgba(1, 0, 80, 0.2); }

@media print {
  .sidebar, .topbar, .btn-primary, .btn-secondary, .filter-btn, .search-box { display: none !important; }
  .content-area, .main-content, #page-laporan { width: 100% !important; margin: 0 !important; padding: 0 !important; }
  #tab-neraca { page-break-before: always; margin-top: 20px; }
}

.filter-container:only-child, .filter-bar:only-child, .search-box:only-child, .search-container:only-child { width: 100% !important; flex: 1 !important; }
.filter-container:only-child input, .filter-bar:only-child input, .search-box:only-child input, .search-container:only-child input { width: 100% !important; }


/* --- RESPONSIVE MOBILE MODE (SUDAH DIPERBAIKI PADDINGNYA & ANTI CRASH IOS SAFARI) --- */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  body { font-size: 11px; background: radial-gradient(circle at top left, #e8ecff 0%, #f4f5f9 65%); }
  .bg-glow { display: none !important; }
  .glass { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background-color: rgba(255, 255, 255, 0.92); }
  .glass-strong { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background-color: rgba(255, 255, 255, 0.96); }
  .page-section { animation: none !important; }
  .nav-item { font-size: 11px; }
  .page-title { font-size: 20px; }
  
  .app-container { padding: 12px; gap: 12px;}
  .topbar { padding: 8px 16px; border-radius: 24px;}
  .topbar-left, .topbar-right { gap: 12px; }
  .logo-text { font-size: 14px; margin-left: 0; }
  .sync-pill { background: transparent; color: var(--navy); padding: 6px; margin-left: auto;}

  .notif-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 68px);
    left: 50%;
    right: auto;
    width: min(280px, calc(100vw - 32px));
    margin: 0;
    transform: translateX(-50%);
  }
  
  .sidebar { 
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 100;
    width: 260px; background: #ffffff; 
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    border-radius: 20px !important; 
    transform: translateX(0); opacity: 1; padding: 20px 12px;
    box-shadow: 15px 0 35px rgba(1, 0, 80, 0.3);
  }
  .sidebar.collapsed { transform: translateX(-110%); opacity: 0; }

  .content-area { position: relative; }
  .main-content { min-width: 0; overflow-x: hidden; }
  .content-area::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(1, 0, 80, 0.3); pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 5; border-radius: 24px;
  }
  body:has(.sidebar:not(.collapsed)) .content-area::after { opacity: 1; pointer-events: auto; }
  
  .page-header { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 0;}
  .page-header .btn-primary { width: 100%; justify-content: center; padding: 12px 20px; }
  
  .filter-bar { flex-direction: column; align-items: stretch; gap: 12px; border-radius: 24px; padding: 12px; }
  .filter-group { flex-wrap: nowrap; overflow-x: auto; gap: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #page-penjualan .filter-group, #page-meeting .filter-group { width: 100%; min-width: 0; }
  .filter-group::-webkit-scrollbar { display: none; }
  #page-penjualan .order-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-controls { width: 100%; flex-wrap: wrap; gap: 8px; margin-left: 0; }
  .filter-select { flex: 1 1 calc(50% - 4px); text-align: center; }
  .search-box { padding: 0; flex: 1 1 100%; width: 100%; } 
  .search-box input { width: 100%; }

  #page-laporan .glass div:nth-child(2) { justify-content: center !important; }
  #lap-start, #lap-end { width: 135px !important; padding: 8px 6px !important; font-size: 11px !important; }

  /* KUNCI PERBAIKAN PADDING MODAL TRANSAKSI & PENJUALAN */
  .modal-overlay { padding: 8px; justify-content: flex-end; align-items: flex-end; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .modal-content { height: 95vh; border-radius: 24px 24px 16px 16px; }
  
  .modal-header { padding: 16px 16px 12px 16px; }
  .modal-body { padding: 12px 16px; gap: 12px; }
  .modal-footer { padding: 12px 16px; }
  .form-section { padding: 12px; border-radius: 12px; margin-bottom: 12px;}
  .modal-body > .form-section { margin-bottom: 0; }
  
  .form-row {
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }

  .form-row:last-child { margin-bottom: 0 !important; }
  
  /* Matikan jarak besar bawaan auto-grid */
  .auto-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .form-row > .form-group {
    flex: 0 1 auto;
  }
  
  .mb-3 { margin-bottom: 0 !important; }

  #transaksi-modal .form-row.mb-3 { margin-bottom: 16px !important; }
  #transaksi-modal .form-row.mb-3:last-child { margin-bottom: 0 !important; }
  #transaksi-modal .form-group { gap: 8px; }

  .form-group, .form-group.flex-1, .form-group.flex-2 {
    width: 100% !important;
    max-width: 100% !important;
  }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 13px !important; padding: 10px 14px !important;
  }

  .vendor-details-preview {
    display: block;
    width: 100%;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  #page-layanan table td:last-child div,
  #page-layanan table td:last-child {
    display: flex !important; flex-direction: row !important; gap: 6px !important; justify-content: center !important; align-items: center !important;
  }
}