/* ============================================================
   PrimeValley — Navy & White Design System
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --navy-900:    #0d1b3e;
  --navy-800:    #1a2c5b;
  --navy-700:    #1e3a7a;
  --navy-600:    #2347a0;
  --navy-500:    #2563eb;
  --navy-400:    #3b82f6;
  --navy-200:    #bfdbfe;
  --navy-100:    #dbeafe;
  --navy-50:     #eff6ff;
  --white:       #ffffff;
  --bg:          #f0f4f8;
  --card:        #ffffff;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --border-dark: #cbd5e1;
  --success:     #10b981;
  --warning:     #f59e0b;
  --error:       #ef4444;
  --sidebar-width: 240px;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 20px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:   0 8px 32px rgba(13,27,62,0.12);
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Prompt', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-500); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy-700); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Prompt', sans-serif;
  color: var(--text);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-muted    { color: var(--text-muted); }
.text-primary  { color: var(--navy-800); }
.text-success  { color: var(--success); }
.text-error    { color: var(--error); }

/* ── App Layout (Sidebar) ──────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--navy-800);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(13,27,62,0.15);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.25rem 1.25rem;
  flex-shrink: 0;
}

.sidebar-logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  font-family: 'Prompt', sans-serif;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}

.sidebar-close:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  flex: 1;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0.75rem 1rem 0.25rem;
  display: block;
  font-family: 'Prompt', sans-serif;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  font-family: 'Prompt', sans-serif;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.sidebar-link.active {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #ffffff;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  font-family: 'Prompt', sans-serif;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-logout {
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Prompt', sans-serif;
  transition: color var(--transition);
  padding: 0.25rem 0;
}

.sidebar-logout:hover { color: white; }

.badge-role {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  color: white;
  letter-spacing: 0.04em;
  font-family: 'Prompt', sans-serif;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 299;
  display: none;
}

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

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Mobile Header ─────────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: var(--navy-800);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.hamburger {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: background var(--transition);
}

.hamburger:hover { background: rgba(255,255,255,0.1); }

.mobile-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  font-family: 'Prompt', sans-serif;
}

/* ── Content Area ──────────────────────────────────────────── */
.content-area {
  padding: 2rem 2rem;
  flex: 1;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-800);
  font-family: 'Prompt', sans-serif;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-family: 'Prompt', sans-serif;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-800);
  font-family: 'Prompt', sans-serif;
}

/* ── Container ─────────────────────────────────────────────── */
.container    { max-width: 1200px; margin: 0 auto; }
.container-sm { max-width: 600px; margin: 0 auto; }
.container-md { max-width: 900px; margin: 0 auto; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
  position: relative;
}

.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: var(--navy-800);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--navy-700);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26,44,91,0.3);
}

.btn-secondary {
  background: var(--navy-500);
  color: #ffffff;
}
.btn-secondary:hover {
  background: var(--navy-600);
  color: #ffffff;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}
.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.4);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.08);
  border-color: var(--error);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--navy-50);
  color: var(--navy-800);
  border-color: var(--border-dark);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn.loading::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 0.4rem;
  font-family: 'Prompt', sans-serif;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-control:read-only {
  background: var(--bg);
  opacity: 0.75;
  cursor: not-allowed;
}

.form-control.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control option {
  background: var(--white);
  color: var(--text);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-family: 'Prompt', sans-serif;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* File input */
.file-input-wrapper { position: relative; }

.file-input-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: 'Prompt', sans-serif;
}

.file-input-label:hover {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.file-input-label .file-icon {
  width: 32px;
  height: 32px;
  background: var(--navy-100);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── Autocomplete ──────────────────────────────────────────── */
.autocomplete-wrapper { position: relative; }

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.open { display: block; }

.autocomplete-item {
  padding: 0.65rem 0.875rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: var(--navy-50);
}

.autocomplete-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
}

.autocomplete-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Prompt', sans-serif;
}

/* ── Bank Select ───────────────────────────────────────────── */
.bank-select-wrapper { position: relative; }
.bank-search-input { margin-bottom: 0; }

.bank-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.bank-dropdown.open { display: block; }

.bank-option {
  padding: 0.65rem 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  font-family: 'Prompt', sans-serif;
}

.bank-option:last-child { border-bottom: none; }
.bank-option:hover,
.bank-option.highlighted,
.bank-option.selected {
  background: var(--navy-50);
}

.bank-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bank-option-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.bank-option-short {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-family: 'Prompt', sans-serif;
}

.data-table thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--navy-800);
  white-space: nowrap;
  font-family: 'Prompt', sans-serif;
}

.data-table thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }

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

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--navy-50); }

.data-table tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
}

.data-table .actions-col { white-space: nowrap; }

/* Item table inside form */
.item-table-wrapper {
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.item-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Prompt', sans-serif;
}

.item-table th {
  padding: 0.65rem 0.75rem;
  background: var(--navy-800);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-align: left;
  font-family: 'Prompt', sans-serif;
}

.item-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.item-table tr:last-child td { border-bottom: none; }

.item-table .form-control {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.item-table td.num-col { text-align: right; }
.item-table td.idx-col {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 36px;
}

/* ── Amount Cell ───────────────────────────────────────────── */
.amount-cell {
  color: var(--navy-700);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Prompt', sans-serif;
}

/* ── Status Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-family: 'Prompt', sans-serif;
  border: 1px solid transparent;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.badge-transferred {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.badge-cancelled {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.badge-admin {
  background: var(--navy-100);
  color: var(--navy-800);
  border-color: var(--navy-200);
}

.badge-user {
  background: var(--bg);
  color: var(--text-muted);
  border-color: var(--border-dark);
}

/* ── Total Amount Display ──────────────────────────────────── */
.total-display {
  background: var(--navy-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  border: 1.5px solid var(--navy-200);
}

.total-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Prompt', sans-serif;
}

.total-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-800);
  font-family: 'Prompt', sans-serif;
}

/* ── Filter Tabs ───────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border-dark);
  text-decoration: none;
  background: var(--white);
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: 'Prompt', sans-serif;
}

.filter-tab:hover {
  background: var(--navy-50);
  color: var(--navy-800);
  border-color: var(--navy-200);
}

.filter-tab.active {
  background: var(--navy-800);
  color: #ffffff;
  border-color: var(--navy-800);
}

.filter-tab .count {
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
}

.filter-tab:not(.active) .count {
  background: var(--border);
  color: var(--text-muted);
}

/* ── Alert / Flash ─────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-family: 'Prompt', sans-serif;
  border: 1px solid transparent;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.alert-info {
  background: var(--navy-50);
  color: var(--navy-800);
  border-color: var(--navy-200);
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2), 0 0 0 1px var(--border);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-800);
  font-family: 'Prompt', sans-serif;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body { padding: 1.25rem 1.5rem; }

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: 'Prompt', sans-serif;
}

.empty-state-desc {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-family: 'Prompt', sans-serif;
}

/* ── Bank Color Indicators ─────────────────────────────────── */
.bank-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Prompt', sans-serif;
}

.bank-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Section Headers ───────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Prompt', sans-serif;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--navy-200), transparent);
}

/* ── Document Link ─────────────────────────────────────────── */
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--navy-500);
  font-weight: 500;
  transition: color var(--transition);
  font-family: 'Prompt', sans-serif;
}

.doc-link:hover { color: var(--navy-700); }

/* ── Info Row (in modal) ───────────────────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-family: 'Prompt', sans-serif;
}

.info-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
}

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 32px 96px rgba(0,0,0,0.3);
}

.login-logo {
  font-family: 'Prompt', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--navy-800);
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}

.login-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
  font-family: 'Prompt', sans-serif;
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Prompt', sans-serif;
  text-decoration: none;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: var(--navy-800);
  color: #ffffff;
}

.auth-tab:not(.active):hover {
  color: var(--navy-800);
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utility ────────────────────────────────────────────────── */
.flex           { display: flex; }
.flex-wrap      { flex-wrap: wrap; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.mt-1   { margin-top: 0.25rem; }
.mt-2   { margin-top: 0.5rem; }
.mt-3   { margin-top: 0.75rem; }
.mt-4   { margin-top: 1rem; }
.mt-6   { margin-top: 1.5rem; }
.mb-2   { margin-bottom: 0.5rem; }
.mb-4   { margin-bottom: 1rem; }
.mb-6   { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-mono   { font-family: 'Courier New', monospace; }
.font-bold   { font-weight: 700; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.78rem; }

/* ── Responsive Breakpoints ─────────────────────────────────── */

/* Tablet: sidebar 200px */
@media (max-width: 1024px) and (min-width: 769px) {
  .sidebar { width: 200px; }
  .main-content { margin-left: 200px; }
  .content-area { padding: 1.5rem; }
}

/* Mobile: sidebar hidden, hamburger shows it */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: flex;
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-header {
    display: flex;
  }
  .content-area {
    padding: 1.25rem;
  }
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .page-title { font-size: 1.35rem; }
  .total-amount { font-size: 1.5rem; }
  .modal { max-height: 85vh; }
  .data-table thead th, .data-table tbody td {
    padding: 0.65rem 0.6rem;
  }
  .login-card { padding: 1.75rem 1.25rem; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .filter-tabs { gap: 0.35rem; }
  .filter-tab { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
  .btn { padding: 0.5rem 0.9rem; font-size: 0.82rem; }
}
