/* Starlit Bank — wallet + ledger */

#bankLoginPrompt[hidden],
#bankPromo[hidden],
#bankPanel[hidden],
#bankDesignShop[hidden],
#transferModal[hidden],
#txDetailModal[hidden] {
  display: none !important;
}

.page-bank .bank-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-bottom: 4rem;
}

.page-bank .bank-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.bank-hero {
  text-align: center;
  padding: 5.5rem 0 1.5rem;
}

.bank-title {
  font-size: clamp(1.75rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bank-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.bank-glass {
  background: rgba(16, 20, 36, 0.82);
  border: 1px solid rgba(140, 160, 220, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* Auth */
.bank-auth {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.bank-auth-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.bank-auth h2 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.bank-auth p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}

/* Promo */
.bank-promo-inner {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.25rem;
}

.bank-promo-card-preview {
  display: flex;
  justify-content: center;
}

.bank-card--preview {
  max-width: 280px;
  pointer-events: none;
  animation: bank-card-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bank-card--preview:hover {
  transform: none;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.bank-promo-copy h2 {
  font-size: 1.35rem;
  margin: 0.5rem 0 0.4rem;
}

.bank-promo-copy p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.bank-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.2);
  color: var(--accent);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.bank-promo-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bank-promo-list code {
  color: var(--accent);
  font-size: 0.95em;
}

.bank-btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
}

/* Layout */
.bank-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bank-layout-top {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.bank-card-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  width: 100%;
}

.bank-card-design-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(120, 140, 220, 0.1);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.bank-card-design-btn:hover {
  background: rgba(140, 160, 220, 0.18);
  border-color: rgba(167, 139, 250, 0.55);
  transform: translateY(-1px);
}

.bank-card-column .bank-card {
  max-width: none;
}

.bank-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.586 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
  perspective: 800px;
  animation: bank-card-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease;
}

.bank-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-5deg) scale(1.02);
  box-shadow:
    0 32px 56px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(107, 92, 231, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bank-card-shine {
  position: absolute;
  inset: -100%;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.03) 46%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.03) 54%,
    transparent 58%
  );
  animation: bank-card-shine 5s ease-in-out infinite;
  pointer-events: none;
}

.bank-card-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.25), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(94, 234, 212, 0.2), transparent 40%);
  animation: bank-card-aurora 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.bank-card-face {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(56, 189, 248, 0.35), transparent 50%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(201, 162, 39, 0.28), transparent 45%),
    linear-gradient(145deg, #1a0f3d 0%, #2d1f6e 40%, #163a5c 100%);
}

@keyframes bank-card-enter {
  from {
    opacity: 0;
    transform: translateY(28px) rotateX(8deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes bank-card-shine {
  0%, 100% {
    transform: translateX(-35%) rotate(12deg);
  }
  50% {
    transform: translateX(35%) rotate(12deg);
  }
}

@keyframes bank-card-aurora {
  0% {
    opacity: 0.55;
    filter: hue-rotate(0deg);
  }
  100% {
    opacity: 1;
    filter: hue-rotate(12deg);
  }
}

@keyframes bank-mark-float {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.35));
  }
  50% {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 12px rgba(253, 230, 138, 0.55));
  }
}

.bank-card-top,
.bank-card-mid,
.bank-card-bottom {
  position: relative;
  z-index: 1;
}

.bank-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bank-card-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.bank-card-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  animation: bank-mark-float 4s ease-in-out infinite;
}

.bank-card--preview .bank-card-mark {
  width: 36px;
  height: 36px;
}

.bank-card-logo-text {
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.95;
}

.bank-card-chip {
  width: 32px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #fde68a, #ca8a04);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
  animation: bank-chip-glint 3s ease-in-out infinite;
}

@keyframes bank-chip-glint {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

.bank-card-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bank-card-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 0.15rem;
}

.bank-card-amount {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.bank-card-amount small {
  font-size: 0.45em;
  font-weight: 700;
  opacity: 0.75;
  margin-left: 0.15rem;
}

.bank-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
}

.bank-code-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bank-card-code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: none;
  color: inherit;
}

.bank-card-owner {
  font-weight: 700;
  font-size: 0.85rem;
}

.bank-card-owner-block {
  text-align: right;
}

.bank-card-preview-balance {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  font-weight: 800;
  opacity: 0.85;
}

.bank-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.bank-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.bank-icon-btn.is-copied {
  background: rgba(74, 222, 128, 0.3);
}

/* Side panel */
.bank-side {
  min-width: 0;
}

.bank-side-panel {
  height: 100%;
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bank-side-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0;
}

.bank-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.bank-quick-btn--gold {
  background: linear-gradient(135deg, #e8c547 0%, #b8860b 100%);
  color: #1a1204;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35);
}

.bank-quick-btn--gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(201, 162, 39, 0.45);
}

.bank-quick-btn-icon {
  font-size: 1.2rem;
}

.bank-side-commands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-top: auto;
}

.bank-cmd {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(8, 10, 20, 0.5);
  border: 1px solid rgba(120, 140, 220, 0.12);
}

.bank-cmd-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.bank-cmd-icon--in {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.bank-cmd-icon--out {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.bank-cmd-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.bank-cmd code {
  font-size: 0.88rem;
  color: var(--accent);
  background: none;
  padding: 0;
}

/* Ledger */
.bank-ledger {
  width: 100%;
  padding: 1.35rem 1.5rem 1.25rem;
}

.bank-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.bank-ledger-head h2 {
  font-size: 1rem;
  font-weight: 800;
}

.bank-ledger-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(120, 140, 220, 0.15);
  color: var(--text-muted);
}

.bank-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.bank-filter {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(120, 140, 220, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.bank-filter:hover {
  border-color: rgba(201, 162, 39, 0.4);
  color: var(--text);
}

.bank-filter.is-active {
  background: rgba(201, 162, 39, 0.18);
  border-color: rgba(201, 162, 39, 0.45);
  color: var(--accent);
}

.bank-ledger-empty {
  text-align: center;
  padding: 2rem 0.5rem;
  color: var(--text-muted);
}

.bank-ledger-empty p {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.bank-ledger-empty span {
  font-size: 0.85rem;
}

.bank-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(520px, 50vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@media (min-width: 900px) {
  .bank-ledger-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    max-height: min(560px, 55vh);
  }
}

.bank-tx {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(120, 140, 220, 0.1);
  border-radius: 12px;
  background: rgba(8, 10, 20, 0.45);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background 0.2s, border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.bank-tx:hover {
  background: rgba(14, 18, 32, 0.75);
  border-color: rgba(120, 140, 220, 0.22);
}

.bank-tx:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bank-tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
  grid-row: 1;
  align-self: center;
}

.bank-tx--deposit .bank-tx-icon {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.bank-tx--withdraw .bank-tx-icon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.bank-tx--transfer_in .bank-tx-icon {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.bank-tx--transfer_out .bank-tx-icon {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.bank-tx-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  overflow: hidden;
}

.bank-tx-title {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-tx-sub {
  display: block;
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.15rem;
  flex-shrink: 0;
  min-width: 4.5rem;
  max-width: 42%;
  text-align: right;
}

.bank-tx-sum {
  display: block;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bank-tx--deposit .bank-tx-sum,
.bank-tx--transfer_in .bank-tx-sum {
  color: #4ade80;
}

.bank-tx--withdraw .bank-tx-sum,
.bank-tx--transfer_out .bank-tx-sum {
  color: #f87171;
}

.bank-tx-date {
  display: block;
  font-size: 0.65rem;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Overlay / modals */
.bank-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bank-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 14, 0.8);
  backdrop-filter: blur(5px);
}

.bank-overlay-panel {
  position: relative;
  width: min(100%, 400px);
  padding: 1.5rem;
  max-height: 90vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.bank-overlay-panel--transfer {
  width: min(100%, 520px);
}

.bank-overlay-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.bank-overlay-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.65));
}

.bank-overlay-hint code {
  font-size: 0.95em;
  letter-spacing: 0.04em;
}

.bank-overlay-lead {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.bank-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bank-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bank-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bank-field input,
.bank-field textarea {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 140, 220, 0.25);
  background: rgba(6, 8, 16, 0.9);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.bank-field textarea {
  resize: vertical;
  min-height: 86px;
}

.bank-field input:focus,
.bank-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}

.bank-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.bank-form-actions .btn {
  flex: 1;
}

.bank-form-actions--transfer {
  flex-direction: column;
  gap: 0.55rem;
}

.bank-form-actions--transfer > .btn-primary {
  flex: none;
  width: 100%;
}

.bank-form-actions-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.bank-form-actions-row .btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  font-size: 0.9rem;
}

.bank-error {
  color: #f87171;
  font-size: 0.85rem;
  margin: 0;
}

.bank-status {
  text-align: center;
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Tx detail */
.bank-tx-detail {
  text-align: center;
}

.bank-tx-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.bank-tx-badge--deposit {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

.bank-tx-badge--withdraw {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.bank-tx-badge--transfer_in {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.bank-tx-badge--transfer_out {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.bank-tx-detail-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.bank-tx-detail-amount {
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.1rem;
}

.bank-tx-detail-amount.is-in {
  color: #4ade80;
}

.bank-tx-detail-amount.is-out {
  color: #f87171;
}

.bank-tx-fields {
  text-align: left;
  margin: 0 0 1.15rem;
  display: grid;
  gap: 0.65rem;
}

.bank-tx-fields dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.bank-tx-fields dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  word-break: break-word;
}

.bank-tx-fields dd code {
  font-family: "Consolas", "Courier New", monospace;
  color: var(--accent);
  background: rgba(201, 162, 39, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.bank-tx-close {
  width: 100%;
}

@media (max-width: 900px) {
  .bank-layout-top {
    grid-template-columns: 1fr;
  }

  .bank-card-column {
    max-width: 100%;
  }

  .bank-card {
    max-width: 100%;
  }

  .bank-card-design-btn {
    align-self: stretch;
    min-height: 44px;
  }

  .bank-promo-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

@media (max-width: 560px) {
  .page-bank .bank-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-bank .bank-main {
    padding-top: 4.75rem;
  }

  .bank-side-commands {
    grid-template-columns: 1fr;
  }

  .bank-filters {
    gap: 0.5rem;
  }

  .bank-filter {
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    min-height: 44px;
  }

  .bank-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 44px;
    min-height: 44px;
  }

  .bank-tx {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
      "icon body"
      "icon right";
    gap: 0.35rem 0.65rem;
    padding: 0.85rem;
  }

  .bank-tx-icon {
    grid-area: icon;
    grid-row: 1 / -1;
    width: 36px;
    height: 36px;
    align-self: start;
  }

  .bank-tx-body {
    grid-area: body;
  }

  .bank-tx-right {
    grid-area: right;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem 0.65rem;
    max-width: none;
    min-width: 0;
    text-align: left;
  }

  .bank-tx-sum {
    font-size: 0.88rem;
  }

  .bank-overlay {
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    align-items: flex-end;
  }

  .bank-overlay-panel {
    width: 100%;
    max-height: min(92vh, 100%);
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .bank-form-actions-row {
    flex-direction: column;
  }

  .bank-form-actions-row .btn {
    width: 100%;
    white-space: normal;
    font-size: 0.95rem;
  }

  .bank-quick-btn {
    min-height: 48px;
  }
}

/* Магазин дизайнов */
.bank-design-shop {
  padding: 1.35rem 1.5rem 1.25rem;
}

.bank-design-shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bank-design-shop-head h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.bank-design-shop-lead {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.bank-design-shop-close {
  flex-shrink: 0;
}

.bank-design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.bank-design-item {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  min-height: 100%;
  padding: 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(120, 140, 220, 0.14);
  background: rgba(8, 10, 20, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bank-design-item.is-active {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.25);
}

.bank-design-item.is-owned:not(.is-active) {
  border-color: rgba(74, 222, 128, 0.25);
}

.bank-design-preview {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.bank-design-preview .bank-card-face {
  height: 100%;
  padding: 0.55rem 0.65rem;
  font-size: 0.65rem;
}

.bank-design-preview .bank-card-logo-text {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
}

.bank-design-preview .bank-card-mark {
  width: 22px;
  height: 22px;
}

.bank-design-preview-emoji {
  position: absolute;
  right: 0.45rem;
  bottom: 0.35rem;
  font-size: 1rem;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.bank-design-meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.bank-design-meta h3 {
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 0.15rem;
  line-height: 1.25;
}

.bank-design-meta p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bank-design-price {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  margin-top: 0.2rem;
}

.bank-design-price.is-owned {
  color: #4ade80;
}

.bank-design-action {
  width: 100%;
  margin-top: auto;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.bank-design-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.bank-design-action--buy {
  background: linear-gradient(135deg, #e8c547 0%, #b8860b 100%);
  color: #1a1204;
}

.bank-design-action--equip {
  background: rgba(120, 140, 220, 0.18);
  color: var(--text);
  border: 1px solid rgba(140, 160, 220, 0.3);
}

.bank-design-action--active {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.bank-design-rarity {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
}

.bank-design-rarity--rare {
  color: #fde68a;
}

.bank-design-rarity--uncommon {
  color: #a5f3fc;
}

/* Штрафы */
.bank-penalties {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.bank-penalty-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35), rgba(24, 20, 36, 0.9));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.bank-penalty-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fecaca;
  margin-bottom: 0.2rem;
}

.bank-penalty-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem;
}

.bank-penalty-amount small {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bank-penalty-reason {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.45;
}

.bank-penalty-due {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #fde68a;
}

.bank-penalty-due--overdue {
  color: #fca5a5;
}

.bank-penalty-pay {
  flex-shrink: 0;
  min-width: 8rem;
}

@media (prefers-reduced-motion: reduce) {
  .bank-card,
  .bank-card-shine,
  .bank-card-aurora,
  .bank-card-mark,
  .bank-card-chip {
    animation: none;
    transition: none;
  }

  .bank-card:hover {
    transform: none;
  }
}
