* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #0f172a;
}

.site-header {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-bottom: 3px solid #e30613;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.site-header-left {
  min-width: 0;
}

.site-brand {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.site-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: #cbd5e1;
}

.header-auth {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-auth-link {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.header-auth-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.header-auth-balance {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px 24px;
}

h1 {
  margin-bottom: 6px;
}

.sub {
  margin-top: 0;
  color: #475569;
}

.card {
  background: #fff;
  border: 1px solid #dbe1e8;
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.premium-nav-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.compact-services-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.premium-auth-shell {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 1.35fr);
  gap: 16px;
  align-items: stretch;
}

.premium-auth-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 60%, #111827 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.premium-auth-hero h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.15;
}

.premium-auth-hero p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.premium-auth-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(227, 6, 19, 0.18);
  color: #fecaca;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.premium-auth-points {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.premium-point {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-weight: 600;
}

.premium-auth-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.premium-auth-card {
  background: #fff;
  border: 1px solid #dbe1e8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.premium-login-card {
  border-top: 4px solid #0f172a;
}

.premium-register-card {
  border-top: 4px solid #e30613;
}

.premium-form-tag {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
}

.auth-form h3 {
  margin: 0 0 10px;
  font-size: 24px;
  color: #0f172a;
}

.auth-status {
  margin-top: 10px;
  color: #334155;
  font-weight: 600;
  text-align: center;
}

.auth-actions {
  margin-top: 10px;
  text-align: center;
}

.wallet-balance {
  margin: 0 0 10px;
  font-size: 15px;
}

.topup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topup-btn {
  background: #0f766e;
}

.custom-topup {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.price-note {
  margin: 0 0 8px;
  color: #475569;
  font-weight: 600;
}

.billing-card {
  border-left: 4px solid #e30613;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.billing-item {
  background: #f8fafc;
  border: 1px solid #dbe1e8;
  border-radius: 10px;
  padding: 12px;
}

.billing-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.billing-value {
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

.billing-note {
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
}

.login-required-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-required-modal.show {
  display: flex;
}

.login-required-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(2px);
}

.login-required-card {
  position: relative;
  width: min(92vw, 460px);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbe1e8;
  border-radius: 16px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.3);
  padding: 20px;
  z-index: 1;
}

.login-required-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #0f172a;
}

.login-required-card p {
  margin: 0;
  color: #475569;
}

.login-required-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(227, 6, 19, 0.12);
  color: #be123c;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.login-required-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.login-required-login {
  background: #0f172a;
  border: none;
}

.services-card h2 {
  margin-top: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.service-item {
  border: 1px solid #dbe1e8;
  border-left: 4px solid #e30613;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}

.service-item:hover {
  background: #eef2ff;
}

.service-item.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.service-panel {
  display: none;
}

.service-panel.active {
  display: block;
}

.coming-soon-card {
  text-align: center;
  padding: 34px 16px;
}

.coming-soon-card h2 {
  margin: 0 0 8px;
}

.coming-soon-card p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  font-weight: 600;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th,
.history-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
}

.history-table th {
  background: #f8fafc;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.admin-note {
  margin-top: 0;
  color: #475569;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

input,
select {
  height: 36px;
  padding: 8px 10px;
  border: 1px solid #bfc9d4;
  border-radius: 8px;
  background: #fff;
}

.auth-form input {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.auth-form button {
  width: 100%;
  margin-top: 6px;
}

.auth-switch-row {
  margin: 14px 0 0;
  text-align: center;
}

.auth-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-switch-link:hover {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.premium-login-card .auth-switch-link:hover {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.premium-register-card .auth-switch-link {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fffafa 0%, #fff1f2 100%);
  color: #9f1239;
}

.premium-register-card .auth-switch-link:hover {
  border-color: #e30613;
  background: #e30613;
  color: #fff;
}

.tx-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr auto auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.tx-row .delete-btn {
  border: none;
  background: #ef4444;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.tx-row .move-btn {
  background: #475569;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.row-actions,
.actions {
  margin-top: 12px;
}

button {
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.secondary-btn {
  margin-top: 8px;
  background: #64748b;
  padding: 8px 12px;
  font-size: 12px;
}

.hidden-transactions {
  display: none;
}

.hidden-summary {
  display: none;
}

.site-footer {
  margin-top: 22px;
  background: linear-gradient(90deg, #020617 0%, #0f172a 60%, #111827 100%);
  color: #cbd5e1;
  border-top: 1px solid #1e293b;
}

.site-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logout-btn {
  background: #e11d48;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
}

.footer-dot {
  color: #e30613;
}

@media (max-width: 900px) {
  .premium-auth-shell {
    grid-template-columns: 1fr;
  }

  .premium-auth-forms {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    align-items: flex-start;
  }

  .header-auth {
    width: 100%;
    justify-content: flex-start;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Statement preview styling (exported to PDF) */
.statement-preview {
  box-sizing: border-box;
  font-family: "Helvetica", "Arial", sans-serif;
  font-size: 10pt;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

/* Header Section */
.statement-preview .header {
  width: 100%;
  border-bottom: 2px solid #e30613;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.statement-preview .bank-name {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #e30613;
  text-transform: uppercase;
  line-height: 1;
}

.statement-preview .bank-subname {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #000;
}

.statement-preview .account-holder-label,
.statement-preview .label-bold {
  font-weight: 700;
}

/* Account Information Grid */
.statement-preview .info-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.statement-preview .holder-details {
  width: 50%;
}

.statement-preview .account-details {
  width: 40%;
  text-align: left;
}

/* Summary Boxes (Balance, Deposits, etc.) */
.statement-preview .summary-grid {
  width: 100%;
  margin-bottom: 20px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.statement-preview .summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.statement-preview .summary-box {
  background: #f3f3f3;
  border: 1px solid #d1d1d1;
  padding: 8px 6px;
}

.statement-preview .summary-label {
  color: #555555;
  font-size: 8pt;
}

.statement-preview .summary-value {
  margin-top: 2px;
  font-weight: bold;
  color: #000;
  font-size: 10pt;
}

/* Transaction Table */
.statement-preview .statement-table {
  font-variant-numeric: tabular-nums;
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.statement-preview .statement-table th {
  background-color: #e30613;
  padding: 6px 8px;
  color: #fff;
  text-align: left;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 8pt;
  border: none;
}

.statement-preview .statement-table td {
  border: none;
  border-bottom: 1px solid #e8e8e8;
  padding: 6px 8px;
  vertical-align: top;
}

/* Alignment Utilities */
.statement-preview .text-right {
  text-align: right;
}

.statement-preview .bold {
  font-weight: bold;
}

/* Footer Style */
.statement-preview .footer {
  margin-top: 40px;
  font-size: 7pt;
  color: #555555;
  border-top: 1px solid #d1d1d1;
  padding-top: 10px;
  text-align: center;
}

/* Hide preview section - direct download only */
#statementPreview {
  display: none !important;
}
