:root {
  --navy: #0a2540;
  --navy-light: #1a3a5c;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --success: #059669;
  --danger: #dc2626;
  --shadow: 0 4px 24px rgba(10, 37, 64, 0.12);
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header */
.site-header {
  background: var(--white);
  color: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
}

.logo-img {
  height: 44px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  display: block;
}

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header-nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--navy);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-header .header-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.site-header .btn-secondary {
  color: var(--navy);
  border: 1px solid var(--gray-200);
}

.site-header .btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Login Page */
.login-page {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.login-hero h1 span {
  color: var(--gold);
}

.login-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 400px;
}

.hero-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.hero-features li::before {
  content: '✓';
  background: var(--gold);
  color: var(--navy);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.login-form-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--white);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.login-card .subtitle {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--navy);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-card .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.security-notice {
  margin-top: 1.5rem;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.security-notice::before {
  content: '🔒';
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.hidden {
  display: none !important;
}

/* Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
}

.sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 0;
}

.sidebar-user {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.sidebar-user .name {
  font-weight: 600;
  font-size: 1rem;
}

.sidebar-user .account-num {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 1.5rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-left-color: var(--gold);
}

.sidebar-nav .icon {
  width: 20px;
  text-align: center;
}

.main-content {
  padding: 2rem;
  background: var(--gray-50);
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--gray-600);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.card-value.positive {
  color: var(--success);
}

.card-value.negative {
  color: var(--danger);
}

.account-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.account-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: rgba(201, 162, 39, 0.15);
  border-radius: 50%;
}

.account-card .label {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.account-card .balance {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.account-card .details {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Transactions Table */
.transactions-section {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.section-header h2 {
  font-size: 1.1rem;
  color: var(--navy);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  font-weight: 600;
  background: var(--gray-50);
}

td {
  font-size: 0.9rem;
}

.amount-credit {
  color: var(--success);
  font-weight: 600;
}

.amount-debit {
  color: var(--gray-800);
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-completed {
  background: #ecfdf5;
  color: var(--success);
}

.status-pending {
  background: #fef3c7;
  color: #b45309;
}

/* Transfer Form */
.transfer-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
}

.transfer-form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.transfer-form-card h2 {
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.transfer-summary {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: fit-content;
}

.transfer-summary h3 {
  color: var(--navy);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

.summary-row.total {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  padding-top: 1rem;
}

/* MFA Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal h2 {
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.mfa-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.mfa-inputs input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
}

.mfa-inputs input:focus {
  outline: none;
  border-color: var(--navy);
}

/* Admin Panel */
.admin-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-panel h1 {
  color: var(--danger);
  margin-bottom: 0.5rem;
}

.admin-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  color: #991b1b;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.stat-card .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 4px;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-hero {
    display: none;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .transfer-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
