:root {
  --bg-1: #f8f8f8;
  --bg-2: #f8f8f8;
  --card: #f8f8f8;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --key-bg: #e2e8f0;
  --key-text: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #f8f8f8;
}

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  border: none;
}

.login-page .screen {
  place-items: start center;
  padding-top: 12px;
}

.card {
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

h1 {
  margin: 8px 0 8px;
  font-size: 1.25rem;
  text-align: center;
}

h1 small {
    color: #777;
    font-weight: normal;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
}

.pin-display {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.pin-slot {
  height: 54px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.pin-slot.filled {
  border-color: var(--accent);
  background: #e0f2fe;
}

.error {
  min-height: 24px;
  margin: 0 0 8px;
  color: var(--danger);
  font-size: 0.95rem;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.key {
  border: 0;
  border-radius: 14px;
  height: 56px;
  background: var(--key-bg);
  color: var(--key-text);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.2s ease;
}

.key:active {
  transform: scale(0.97);
}

.action {
  background: #cbd5e1;
  font-size: 0.9rem;
}

.login-card {
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 380px) {
  .card {
    border-radius: 18px;
    padding: 18px;
  }

  .key,
  .pin-slot {
    height: 52px;
  }
}

.bank-card {
  max-width: 420px;
  background: #f8f8f8;
  padding: 18px 18px 88px;
  display: grid;
  gap: 12px;
  text-align: center;
}

.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.bank-title {
  margin: 0;
  text-align: center;
  font-size: 1.12rem;
  font-weight: 700;
  flex: 1;
}

.icon-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf1ff;
  color: #103e9f;
}

.service-link {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.icon-link i {
  font-size: 0.95rem;
}

.service-link span {
    font-weight: normal;
    font-size: 10px;
}

.small-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.balance-panel {
  background: #123163;
  color: #ffffff;
  border-radius: 14px;
  padding: 16px;
}

.card-name {
  margin: 0;
  color: #bdd5ff;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.balance-button {
  margin: 6px 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 2.05rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.account-meta {
  margin: 0;
  font-size: 0.92rem;
  color: #d9e8ff;
}

.next-payment {
  margin: 0;
  font-size: 0.95rem;
  color: #334155;
}

.credit-usage {
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
  text-align: left;
}

.usage-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: #00395d;
  font-size: 0.82rem;
}

.usage-track {
  width: 100%;
  height: 10px;
  background: #dce9ff;
  border-radius: 999px;
  overflow: hidden;
}

.usage-fill {
  display: block;
  width: 2.3%;
  min-width: 10px;
  height: 100%;
  background: #0d6efd;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.action-chip {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 60px;
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #f8fbff;
  color: #00395d;
}

.action-chip i {
  font-size: 0.95rem;
}

.action-chip span {
  font-size: 0.7rem;
  line-height: 1.1;
}

.security-card {
  border: 1px solid #d7e5ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
  text-align: left;
  color: #1e3a5f;
}

.security-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #00395d;
}

.security-card p {
  margin: 4px 0;
  font-size: 0.82rem;
}

.promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid #d7e5ff;
  background: #f5f9ff;
  padding: 12px;
  color: #0f172a;
  text-align: left;
}

.promo-copy {
  display: block;
}

.promo-card strong {
  display: block;
  margin-bottom: 3px;
}

.promo-card span {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}

.promo-icon {
  font-size: 1.5rem;
  color: #00395d;
  padding-left: 10px;
  padding-right: 10px;
  flex: 0 0 auto;
}

.transactions-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  z-index: 35;
}

.transactions-overlay[hidden] {
  display: none;
}

.transactions-modal {
  width: 100%;
  height: 100%;
  background: #fbfdff;
  padding: 20px 16px 90px;
  overflow: auto;
}

.transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.transactions-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #00395d;
}

.transactions-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eaf1ff;
  color: #00395d;
  font-size: 1.05rem;
  cursor: pointer;
}

.transactions-summary {
  background: #ffffff;
  border: 1px solid #d8e3fb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.summary-row {
  display: grid;
  gap: 10px;
  padding: 6px 0;
}

.summary-row + .summary-row {
  border-top: 1px solid #e5edff;
  margin-top: 4px;
  padding-top: 12px;
}

.summary-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-label {
  margin: 0;
  font-size: 0.76rem;
  color: #334155;
  font-weight: 600;
}

.summary-value {
  margin: 4px 0 0;
  font-size: 1rem;
  color: #00395d;
  font-weight: 700;
}

.transactions-list h3 {
  margin: 14px 0 6px;
  font-size: 0.92rem;
  color: #1e3a5f;
  background-color: #e1e1e1;
  padding: 6px 10px;
}

.transactions-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.transactions-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  padding: 10px 2px;
  border-bottom: 1px solid #e5edff;
}

.transactions-list li:last-child {
  border-bottom: 0;
}

.bottom-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #d8e3fb;
  background: #00395d;
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
}

.bottom-menu a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  text-align: center;
  background: transparent;
  border-radius: 0;
  padding: 6px 4px;
  font-size: 0.78rem;
}

.bottom-menu a i {
  font-size: 0.95rem;
}

.bottom-menu a span {
  line-height: 1.1;
}

@media (min-width: 460px) {
  .bottom-menu {
    left: 50%;
    transform: translateX(-50%);
    max-width: 420px;
    border-left: 1px solid #d8e3fb;
    border-right: 1px solid #d8e3fb;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 248, 248, 0.92);
  display: grid;
  place-items: center;
  z-index: 20;
}

.loading-overlay[hidden] {
  display: none;
}

.loading-content {
  text-align: center;
  color: #334155;
  font-weight: 600;
}

.loading-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  animation: pulse-logo 1.1s ease-in-out infinite;
}

@keyframes pulse-logo {
  0% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.75;
  }
}

.accounts-title {
    color: #00395d;
    text-align: left;
    font-size: 14px;
    margin-bottom: 2px;
}