:root {
  --bank-primary: #7d1734;
  --bank-primary-2: #9d263e;
  --bank-primary-3: #5f102b;
  --gold: #f2bd55;
  --gold-2: #d99b22;
  --ink: #20242a;
  --muted: #727782;
  --soft: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --line: #dfe4ea;
  --green: #147a52;
  --red: #b83242;
  --blue: #285f8f;
  --shadow: 0 18px 45px rgba(32, 36, 42, .12);
  --tight-shadow: 0 8px 24px rgba(32, 36, 42, .08);
  --radius: 8px;
  --radius-sm: 4px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef1f4;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(125, 23, 52, .07), transparent 28%),
    linear-gradient(315deg, rgba(40, 95, 143, .10), transparent 32%),
    #eef1f4;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.app-shell {
  min-height: 100vh;
}

.brand-mark {
  display: grid;
  width: 112px;
  min-width: 112px;
  height: 94px;
  place-items: center;
  border: 3px solid currentColor;
  color: #fff;
  background: var(--bank-primary);
  box-shadow: 0 12px 30px rgba(95, 16, 43, .18);
}

.brand-mark span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.06;
  text-align: center;
}

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  background: var(--surface);
}

.login-panel {
  display: grid;
  min-height: 100vh;
  align-content: start;
  background: #fff;
  box-shadow: 18px 0 55px rgba(32, 36, 42, .10);
  z-index: 1;
}

.login-head {
  position: relative;
  display: grid;
  height: 210px;
  place-items: end center;
  padding-bottom: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), transparent 36%),
    var(--bank-primary);
}

.login-head .brand-mark {
  transform: translateY(42px);
}

.login-form {
  display: grid;
  gap: 22px;
  padding: 78px 42px 30px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field-row label {
  color: #8c929d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field input,
.field-row input,
.field-row select {
  width: 100%;
  min-height: 44px;
  padding: 8px 2px 10px;
  border: 0;
  border-bottom: 1px solid #d7d2cc;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #3f454d;
  font-size: 16px;
  font-weight: 650;
}

.field input:focus,
.field-row input:focus,
.field-row select:focus {
  border-color: var(--bank-primary);
}

.form-link-row {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: -14px;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.text-button.gold {
  color: var(--gold-2);
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.primary-button {
  background: linear-gradient(180deg, #ffc75a, #e5a327);
  color: #fff;
  box-shadow: 0 11px 22px rgba(217, 155, 34, .25);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--bank-primary);
}

.danger-button {
  background: var(--bank-primary);
  color: #fff;
}

.error-text {
  display: none;
  margin-top: -10px;
  color: #b4232f;
  font-size: 13px;
  font-weight: 650;
}

.error-text.visible {
  display: block;
}

.loading-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--bank-primary);
  text-align: center;
}

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

.loading-state.inline {
  margin-top: -4px;
}

.loading-state strong {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(125, 23, 52, .18);
  border-top-color: var(--bank-primary);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

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

.login-utilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.utility-button {
  display: grid;
  min-height: 92px;
  place-items: center;
  gap: 8px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #7c818a;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.utility-button:last-child {
  border-right: 0;
}

.login-visual {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-content: center;
  overflow: hidden;
  padding: 64px;
  background:
    linear-gradient(rgba(41, 31, 34, .30), rgba(41, 31, 34, .18)),
    url("assets/banking-lobby.svg") center / cover no-repeat;
}

.login-visual-content {
  max-width: 650px;
  color: #fff;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #f7d893;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-visual h1 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 1.02;
}

.login-visual p {
  max-width: 520px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 17px;
  line-height: 1.7;
}

.login-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.proof-item {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.dashboard {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 284px minmax(0, 1fr);
  background: var(--soft);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 38%),
    var(--bank-primary);
  color: #fff;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px 24px;
}

.side-brand .brand-mark {
  width: 76px;
  min-width: 76px;
  height: 64px;
  border-width: 2px;
  box-shadow: none;
}

.side-brand .brand-mark span {
  font-size: 11px;
}

.mobile-brand .brand-mark {
  width: 76px;
  min-width: 76px;
  height: 64px;
  border-width: 2px;
  box-shadow: none;
}

.mobile-brand .brand-mark span {
  font-size: 11px;
}

.brand-copy strong {
  display: block;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.brand-copy small {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, .77);
  font-weight: 750;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.secure-box {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .09);
}

.secure-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 13px;
}

.secure-box span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 1.5;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
}

.page-title h1 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.1;
}

.page-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--bank-primary);
  box-shadow: 0 6px 16px rgba(32, 36, 42, .05);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .9fr);
  gap: 22px;
}

.stack {
  display: grid;
  gap: 18px;
}

.hero-account {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 24px 28px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 42%),
    linear-gradient(160deg, var(--bank-primary), var(--bank-primary-3));
  color: #fff;
  box-shadow: var(--shadow);
}

.dashboard-profile-photo {
  display: grid;
  box-sizing: border-box;
  flex: 0 0 74px;
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 9999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04)),
    #6f1530;
  box-shadow: 0 16px 32px rgba(21, 17, 18, .22);
  clip-path: circle(50%);
}

.dashboard-profile-photo span {
  color: #fff2ce;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
}

.dashboard-profile-photo > img,
.dashboard-profile-image,
.profile-initials img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 9999px !important;
  object-fit: cover;
  clip-path: circle(50%);
}

.hero-account-content {
  position: relative;
  z-index: 1;
}

.account-identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-meta,
.metric-header,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(242, 189, 85, .75);
  border-radius: 999px;
  color: #ffd98a;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero-account h2 {
  position: relative;
  margin: 22px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 500;
  line-height: 1;
  z-index: 1;
}

.hero-account p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, .74);
  z-index: 1;
}

.portfolio-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  z-index: 1;
}

.portfolio-chip {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.quick-actions-panel {
  display: grid;
  gap: 12px;
}

.action-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.action-tile {
  display: grid;
  min-height: 108px;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--tight-shadow);
}

.action-tile .icon {
  width: 24px;
  height: 24px;
  color: var(--bank-primary);
}

.action-tile span {
  font-size: 14px;
  font-weight: 800;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--tight-shadow);
}

.panel.pad {
  padding: 20px;
}

.section-header {
  margin-bottom: 14px;
}

.section-header h2,
.metric-header h2 {
  margin: 0;
  font-size: 16px;
}

.section-header span,
.metric-header span {
  color: var(--muted);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.metric small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  font-size: 24px;
  line-height: 1.1;
}

.metric.positive strong {
  color: var(--green);
}

.metric.negative strong {
  color: var(--red);
}

.account-list,
.transaction-list,
.profile-list {
  display: grid;
  gap: 10px;
}

.account-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.account-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.account-card .balance {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.account-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-pill {
  padding: 7px 9px;
  border-radius: 999px;
  background: #edf1f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-pill.green {
  color: var(--green);
}

.mini-pill.red {
  color: var(--red);
}

.transaction-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.transaction-row:last-child {
  border-bottom: 0;
}

.transaction-row.pending {
  opacity: .86;
}

.status-pill {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(20, 122, 82, .10);
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.status-pill.pending {
  background: rgba(217, 155, 34, .16);
  color: #9a6817;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #e7edf4;
  color: var(--bank-primary);
  font-weight: 850;
}

.transaction-row h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.amount {
  font-weight: 850;
  white-space: nowrap;
}

.amount.positive {
  color: var(--green);
}

.amount.negative {
  color: var(--bank-primary);
}

.accounts-page,
.history-page,
.profile-page {
  display: grid;
  gap: 18px;
}

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

.utility-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-button.active {
  border-color: var(--bank-primary);
  background: var(--bank-primary);
  color: #fff;
}

.profile-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f4f7fa);
  text-align: center;
}

.profile-initials {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: var(--bank-primary);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
}

.profile-hero h2 {
  margin: 0;
  font-size: 24px;
}

.profile-hero p {
  margin: 0;
  color: var(--muted);
}

.profile-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.info-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.info-card strong {
  overflow-wrap: anywhere;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  display: grid;
  min-height: 62px;
  place-items: center;
  gap: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav button.active {
  color: var(--bank-primary);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(242, 189, 85, .45);
  border-radius: var(--radius);
  background: #2f2025;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(21, 17, 18, .55);
}

.modal-backdrop.visible {
  display: flex;
}

.modal {
  width: min(520px, 100%);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal h2 {
  margin: 0;
  font-size: 18px;
}

.modal form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.modal-loading {
  min-height: 220px;
  align-content: center;
}

.field-row {
  display: grid;
  gap: 8px;
}

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

@media (max-width: 1080px) {
  .login-page,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    box-shadow: none;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 18px 86px;
  }

  .mobile-brand,
  .bottom-nav {
    display: grid;
  }

  .mobile-brand {
    display: flex;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .login-form {
    padding-right: 28px;
    padding-left: 28px;
  }

  .topbar {
    align-items: flex-start;
  }

  .page-title h1 {
    font-size: 26px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .hero-account {
    min-height: 0;
    padding: 22px;
  }

  .dashboard-profile-photo {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
  }

  .dashboard-profile-photo span {
    font-size: 22px;
  }

  .hero-account h2 {
    font-size: 40px;
    overflow-wrap: anywhere;
  }

  .quick-actions,
  .accounts-overview,
  .profile-info {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .action-tile {
    min-height: 76px;
    grid-template-columns: 28px 1fr;
    align-items: center;
  }

  .transaction-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .transaction-row .amount {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 460px) {
  .login-head {
    height: 188px;
  }

  .login-utilities {
    grid-template-columns: 1fr;
  }

  .utility-button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-content: start;
  }

  .hero-account h2 {
    font-size: 34px;
  }

  .modal-actions {
    display: grid;
  }
}
