:root {
  --navy: #0b2a4a;
  --navy-2: #123c6b;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15, 23, 42, 0.06);
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }

/* ---------- top navbar ---------- */
.navbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: 0.3px; display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #60a5fa, var(--blue));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { color: #cbd5e1; font-size: 14px; }
.nav-links a { color: #cbd5e1; margin-left: 18px; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.btn-logout {
  background: transparent; border: 1px solid #475569; color: #e2e8f0;
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-logout:hover { background: #1e3a5f; }

/* ---------- layout ---------- */
.container { max-width: 1000px; margin: 0 auto; padding: 28px 20px 60px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card h3 { font-size: 15px; margin-bottom: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- account cards ---------- */
.account-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.account-card .acc-type {
  text-transform: uppercase; font-size: 12px; letter-spacing: 1px;
  color: #93c5fd; margin-bottom: 6px; font-weight: 600;
}
.account-card .acc-number { font-size: 14px; color: #cbd5e1; margin-bottom: 14px; font-family: monospace; }
.account-card .acc-balance { font-size: 30px; font-weight: 700; }
.account-card .acc-label { font-size: 12px; color: #94a3b8; margin-bottom: 16px; }
.account-card .acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- stats ---------- */
.stat { text-align: left; }
.stat .stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat .stat-value { font-size: 26px; font-weight: 700; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; background: #fff; color: var(--text);
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.field { margin-bottom: 16px; }

.btn {
  display: inline-block; background: var(--blue); color: #fff; border: none;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.btn:hover { background: #1d4ed8; }
.btn.secondary { background: transparent; color: #cbd5e1; border: 1px solid #475569; }
.btn.secondary:hover { background: #1e3a5f; }
.btn.small { padding: 7px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border);
}
td { padding: 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

.amount-pos { color: var(--green); font-weight: 600; }
.amount-neg { color: var(--red); font-weight: 600; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.badge.deposit, .badge.transfer_in { background: #dcfce7; color: var(--green); }
.badge.withdrawal, .badge.transfer_out { background: #fee2e2; color: var(--red); }
.badge.savings { background: var(--blue-soft); color: var(--blue); }
.badge.checking { background: #fef3c7; color: var(--amber); }
.badge.pending { background: #fef3c7; color: var(--amber); }
.badge.approved { background: #dcfce7; color: var(--green); }
.badge.rejected { background: #fee2e2; color: var(--red); }

/* ---------- login page ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 60%, var(--navy-2) 100%);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 36px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.login-card .brand { color: var(--navy); justify-content: center; margin-bottom: 6px; }
.login-card .tagline { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.demo-creds { margin-top: 22px; padding: 14px; background: var(--bg); border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.demo-creds code { background: #e2e8f0; padding: 1px 6px; border-radius: 4px; color: var(--navy); font-size: 11px; }

/* ---------- messages ---------- */
.msg { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.msg.error { background: #fee2e2; color: var(--red); }
.msg.success { background: #dcfce7; color: var(--green); }
/* !important so it beats component display rules like
   .modal-backdrop { display: flex } and .pagination { display: flex },
   which are defined later in this file with equal specificity. */
.hidden { display: none !important; }

.pagination { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--muted); justify-content: center; }
.muted { color: var(--muted); }
.mt { margin-top: 18px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; border-radius: 16px; padding: 28px; width: 100%;
  max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.modal h4 { font-size: 18px; margin-bottom: 16px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
