/* Modern Executive Audit Panel Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.35);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 275px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 1.5rem 1rem;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-glow);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Project Selector Box */
.project-selector-container {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-selector-container label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.project-selector-row {
  display: flex;
  gap: 0.4rem;
}

.project-select {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-sans);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.nav-item .icon {
  font-size: 1.2rem;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

/* Header Topbar */
.topbar {
  min-height: 70px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.page-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.date-selector-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.date-selector-box label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--gradient-success);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-primary {
  background: transparent;
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-outline-primary:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-outline-danger {
  background: transparent;
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

/* Page Container */
.page-content {
  padding: 2rem;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Glassmorphism */
.card {
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* KPI Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.stat-info .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-info .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

.stat-info .sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Upload Dropzones */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.dropzone-icon {
  font-size: 2.8rem;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
}

.dropzone-text h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dropzone-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Data Tables (Viewport Scrollable with Sticky Header & Always-Visible Scrollbar) */
.table-responsive {
  width: 100%;
  max-height: 68vh;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.5) rgba(15, 23, 42, 0.6);
  user-select: text;
  -webkit-user-select: text;
}

.table-responsive::-webkit-scrollbar {
  width: 8px;
  height: 9px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}

.data-table th {
  background: #0f172a;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 20;
  user-select: text;
  -webkit-user-select: text;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.data-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  white-space: nowrap;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.data-table tbody tr.row-selected {
  background: rgba(59, 130, 246, 0.15) !important;
  border-left: 3px solid var(--accent-blue);
}

.data-table .mono {
  font-family: var(--font-mono);
}

.data-table .text-right {
  text-align: right;
}

/* Elegant Text Truncation with Interactive Hover Tooltip */
.cell-truncate {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  cursor: help;
  position: relative;
}

.cell-truncate-lg {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  cursor: help;
  position: relative;
}

.cell-truncate-sm {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  cursor: help;
  position: relative;
}

/* Floating Tooltip styling */
#global-table-tooltip {
  position: fixed;
  display: none;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-sans);
  line-height: 1.45;
  max-width: 380px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  pointer-events: none;
  word-break: break-word;
  backdrop-filter: blur(8px);
}

/* Badges & Status Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-matched {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-unmatched-bo {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-unmatched-bank {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-manual {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-debit {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.badge-credit {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

/* =====================================================================
   HORIZONTAL SUB-TABS & ACTIVE HIGHLIGHT (ALL MENUS)
   ===================================================================== */
.sub-tabs {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.4rem 0.5rem !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-lg) !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  margin-bottom: 1.25rem !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.sub-tabs::-webkit-scrollbar {
  display: none;
}

.sub-tab-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid transparent !important;
  user-select: none !important;
}

.sub-tab-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px);
}

/* Eye-Catching Active State Highlight */
.sub-tab-item.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.32) 100%) !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  border: 1px solid #0ea5e9 !important;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}

.sub-tab-item.active span {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* =====================================================================
   PROMINENT ROW SELECTION & PILIH BUTTON (RECONCILIATION)
   ===================================================================== */
.data-table tbody tr {
  transition: background 0.15s ease, border 0.15s ease, transform 0.15s ease;
}

.data-table tbody tr.row-selected {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.22) 0%, rgba(59, 130, 246, 0.15) 100%) !important;
  border-left: 4px solid #06b6d4 !important;
  box-shadow: inset 0 0 14px rgba(6, 182, 212, 0.2);
}

.data-table tbody tr.row-selected td {
  color: #ffffff !important;
  font-weight: 600;
}

.btn-select-tx {
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-select-tx:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  color: #38bdf8;
  transform: scale(1.05);
}

.btn-select-tx.selected {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.6) !important;
  font-weight: 800 !important;
  transform: scale(1.06);
}

/* Manual Matching Action Bar */
.manual-match-bar {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Empty State Banner */
.empty-state-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.empty-state-box .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state-box p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 500px;
  margin: 0 auto 1.5rem auto;
}

/* Fullscreen Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.loading-subtext {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* Modals */
.modal,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal.active,
.modal-overlay.active {
  display: flex !important;
}

.modal-content,
.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--accent-red);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-family: var(--font-sans);
}

select.form-control,
select {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid var(--border-color);
}

select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 0.4rem 0.6rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 200;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-blue); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drag-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Bank Group Accordion Cards */
.bank-groups-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bank-group-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.bank-group-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.bank-group-header {
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bank-group-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.bank-badge {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.bank-group-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bank-group-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.bank-group-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.bank-group-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bank-group-stat-item .label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.bank-group-stat-item .value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.toggle-arrow {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  margin-left: 0.5rem;
}

.bank-group-card.collapsed .toggle-arrow {
  transform: rotate(-90deg);
}

.bank-group-card.collapsed .bank-group-body {
  display: none;
}

.bank-group-body {
  padding: 0;
}

.view-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .sidebar { width: 80px; padding: 1rem 0.5rem; }
  .brand-text, .nav-item span, .nav-item .badge, .sidebar-footer button span, .project-selector-container { display: none; }
  .brand { justify-content: center; padding: 0; }
  .nav-item { justify-content: center; padding: 0.75rem; }
}


/* Searchable Dropdown Styling */
.custom-searchable-box { position: relative; width: 100%; }
.btn-clear-combobox {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 14px;
}
.btn-clear-combobox:hover { color: #f87171; }
/* Enhanced Searchable Combobox */
.custom-searchable-box { position: relative; width: 100%; display: flex; align-items: center; }
.btn-clear-combobox {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; padding: 4px; z-index: 5;
}
.btn-clear-combobox:hover { color: #f87171; }
.btn-dropdown-arrow {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #38bdf8; cursor: pointer; font-size: 12px; padding: 4px 6px; z-index: 5;
}
.btn-dropdown-arrow:hover { color: #fff; }
.combobox-suggestions-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto; background: #0b132b; border: 1.5px solid #38bdf8;
  border-radius: 8px; box-shadow: 0 16px 36px rgba(0,0,0,0.85); z-index: 99999 !important;
}
.combobox-item {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
}
.combobox-item:hover, .combobox-item.active-highlight {
  background: rgba(14, 165, 233, 0.2); color: #38bdf8;
}


/* Enhanced Searchable Combobox */
.custom-searchable-box { position: relative; width: 100%; display: flex; align-items: center; }
.btn-clear-combobox {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; padding: 4px;
}
.btn-clear-combobox:hover { color: #f87171; }
.btn-dropdown-arrow {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #38bdf8; cursor: pointer; font-size: 12px; padding: 4px 6px;
}
.btn-dropdown-arrow:hover { color: #fff; }
/* Enhanced Searchable Combobox */
.custom-searchable-box { position: relative; width: 100%; display: flex; align-items: center; }
.btn-clear-combobox {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; padding: 4px; z-index: 5;
}
.btn-clear-combobox:hover { color: #f87171; }
.btn-dropdown-arrow {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #38bdf8; cursor: pointer; font-size: 12px; padding: 4px 6px; z-index: 5;
}
.btn-dropdown-arrow:hover { color: #fff; }
.combobox-suggestions-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto; background: #0b132b; border: 1.5px solid #38bdf8;
  border-radius: 8px; box-shadow: 0 16px 36px rgba(0,0,0,0.85); z-index: 99999 !important;
}
.combobox-header {
  padding: 6px 12px; background: rgba(56, 189, 248, 0.1); border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.75rem; color: #38bdf8; font-weight: 700; display: flex; justify-content: space-between;
}
.combobox-item {
  padding: 9px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all 0.15s ease;
}
.combobox-item:hover, .combobox-item.active-highlight {
  background: rgba(14, 165, 233, 0.25); border-left: 3px solid #38bdf8;
}

/* Pos Gantung & Clearing Center Table Custom Styling */
#table-clearing-list {
  table-layout: auto;
  width: 100%;
}

#table-clearing-list th {
  white-space: nowrap;
}

#table-clearing-list td {
  vertical-align: top;
  padding: 0.55rem 0.65rem;
}

#table-clearing-list .col-desc {
  max-width: 220px;
  min-width: 160px;
  white-space: normal !important;
  word-break: break-word;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

#table-clearing-list .col-coa {
  max-width: 160px;
  min-width: 130px;
  white-space: normal !important;
  word-break: break-word;
}

#table-clearing-list .col-auditor-note {
  max-width: 140px;
  min-width: 110px;
  white-space: normal !important;
  word-break: break-word;
  font-size: 0.75rem;
  line-height: 1.3;
}

#table-clearing-list .col-bank-info {
  max-width: 180px;
  min-width: 140px;
  white-space: normal !important;
  word-break: break-word;
}
