/* --- MODERN BANKING THEME VARIABLES --- */
:root {
  --primary: #004a99; /* Trusted Bank Blue */
  --primary-light: #e6f0ff;
  --secondary: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- RESET & BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.5;
  position: relative;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* --- COMMON COMPONENTS --- */
.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 25px;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

/* --- BUTTONS --- */
button,
.btn-secondary,
.btn-auth {
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
}

.btn-auth {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 14px;
}

.btn-auth:hover {
  background: #003366;
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
  padding: 10px 20px;
  text-decoration: none;
  display: inline-block;
}

.btn-logout-small {
  background: var(--danger);
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.btn-logout {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-logout:hover {
  filter: brightness(0.95);
}

/* --- AUTH PAGES (Login/Register) --- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}
.auth-header {
  text-align: center;
  margin-bottom: 25px;
}
.auth-header h1 {
  color: var(--primary);
  margin-bottom: 5px;
}

.password-container {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
}

/* --- DASHBOARD & ADMIN HEADERS --- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, #003366 100%);
  color: white;
  text-align: center;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 10px 0;
}

/* --- GRID LAYOUTS --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
}

/* --- ADMIN SPECIFIC --- */
.admin-header-bg {
  background: #1e293b;
  color: white;
  padding: 10px 0;
  margin-bottom: 30px;
}

.admin-header-bg h1 {
  font-size: 1.5rem;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}
.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.btn-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  margin-right: 5px;
}

.btn-deposit-trigger {
  background: var(--success);
  color: white;
}
.btn-withdraw-trigger {
  background: var(--warning);
  color: white;
}
.btn-toggle {
  background: var(--secondary);
  color: white;
}

/* --- UTILITIES --- */
.text-success {
  color: var(--success) !important;
}
.text-danger {
  color: var(--danger) !important;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 1;
  transition: opacity 0.5s ease;
  min-width: 280px;
  max-width: 90vw;
  text-align: center;
  justify-content: center;
}

.toast-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
/* --- MODAL --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  width: 100%;
  max-width: 400px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Transfer button */
.btn-transfer {
  background: linear-gradient(90deg, #0066cc 0%, #004a99 100%);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.btn-transfer:hover {
  filter: brightness(0.95);
}

/* --- SESSION EXPIRY WARNING --- */
#session-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.session-warning-box {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--warning);
  position: relative;
  z-index: 100000;
}

.session-warning-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.session-warning-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.session-warning-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.session-warning-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

#btn-stay-connected {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

#btn-stay-connected:hover {
  background: #003366;
}

#btn-logout-now {
  background: var(--danger);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

#btn-logout-now:hover {
  filter: brightness(0.9);
}