:root {
  --bg: #0d0f12;
  --panel: rgba(16, 18, 22, 0.92);
  --ink: #f3f5f7;
  --muted: #9aa2ab;
  --stroke: rgba(255, 255, 255, 0.08);
  --accent: #2dd4bf;
  --accent-strong: #0f766e;
  --highlight: #f1b26f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #0b0d10;
}

.demo-bar {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1200;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(12, 14, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.demo-title {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

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

.app {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.app[data-account="company"] {
  --accent: #f1b26f;
  --accent-strong: #b45309;
}

.app[data-account="company"] .shell {
  background: radial-gradient(circle at 20% 20%, rgba(241, 178, 111, 0.22), transparent 52%),
    radial-gradient(circle at 80% 10%, rgba(250, 204, 128, 0.18), transparent 45%),
    linear-gradient(160deg, rgba(18, 16, 14, 0.96), rgba(22, 18, 16, 0.95));
}

.app[data-account="company"] .glow-a {
  background: radial-gradient(circle at 30% 30%, rgba(241, 178, 111, 0.55), transparent 65%);
}

.app[data-account="company"] .glow-b {
  background: radial-gradient(circle at 60% 40%, rgba(255, 207, 146, 0.4), transparent 70%);
}

.app[data-account="company"] .glow-c {
  background: radial-gradient(circle at 40% 60%, rgba(255, 172, 110, 0.28), transparent 70%);
}

.app[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.shell {
  width: min(1120px, 94vw);
  background: radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.14), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(241, 178, 111, 0.12), transparent 45%),
    linear-gradient(160deg, rgba(14, 16, 20, 0.96), rgba(18, 21, 26, 0.95));
  border-radius: 28px;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(18px);
  opacity: 0;
  animation: fadeSlide 0.45s ease forwards;
  overflow: hidden;
}

.app[data-mode="branch"] .shell {
  width: min(1240px, 95vw);
  max-height: min(1040px, 96vh);
}

.head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  background: rgba(255, 255, 255, 0.08);
  color: #e9f9f6;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw + 1rem, 2.6rem);
}

.head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
}

.panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.overview-name {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 8px;
}

.panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.icon-badge.small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.icon-badge.subtle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.icon {
  width: 20px;
  height: 20px;
}

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

.summary-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-switch {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: fit-content;
}

.account-switch .btn.small {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  box-shadow: none;
  transform: none;
}

.account-switch .btn.small.active {
  background: rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.5);
  color: #d5fff6;
}

.account-switch.head-switch {
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.account-switch.head-switch .btn.small {
  font-size: 0.78rem;
}

.company-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.company-card h3 {
  margin: 0;
  font-size: 1rem;
}

.company-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.company-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.value {
  font-size: clamp(2rem, 3vw, 2.9rem);
  font-weight: 700;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

.divider {
  height: 1px;
  background: var(--stroke);
}

.hidden {
  display: none !important;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-text {
  font-weight: 600;
  color: var(--accent);
}

.status-text.bad {
  color: #f7b19a;
}

.status-text.flash {
  animation: statusFlash 3s ease;
}

@keyframes statusFlash {
  0% {
    color: #f7b19a;
    text-shadow: 0 0 0 rgba(247, 91, 91, 0);
    transform: scale(1);
    opacity: 1;
  }
  20% {
    color: #ff5b5b;
    text-shadow: 0 0 22px rgba(255, 91, 91, 0.95), 0 0 36px rgba(255, 91, 91, 0.6);
    transform: scale(1.08);
    opacity: 1;
  }
  40% {
    color: #ffd1c3;
    text-shadow: 0 0 10px rgba(255, 91, 91, 0.6);
    transform: scale(1.02);
    opacity: 0.9;
  }
  60% {
    color: #ff5b5b;
    text-shadow: 0 0 28px rgba(255, 91, 91, 0.9);
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    color: #f7b19a;
    text-shadow: 0 0 0 rgba(247, 91, 91, 0);
    transform: scale(1);
    opacity: 1;
  }
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-btn.active {
  color: #d5fff6;
  border-color: rgba(45, 212, 191, 0.6);
}

.tab-icon {
  width: 16px;
  height: 16px;
}

.tab-panel {
  display: none;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.transfer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.transfer-panel {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.address-controls {
  margin-bottom: 12px;
}

.address-book {
  display: grid;
  gap: 12px;
}

.address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.address-head h3 {
  margin: 0;
  font-size: 1rem;
}

.address-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.contact-meta small {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

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

.contact-empty {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-form .btn {
  width: fit-content;
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: visible;
}

.history-chart {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.history-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.history-controls .field {
  margin-bottom: 0;
  min-width: 180px;
  flex: 1;
}

.history-controls .btn {
  height: 44px;
}

.history-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.page-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chart-head p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.legend-item.out .legend-dot {
  background: #f39a88;
}

.history-chart canvas {
  width: 100%;
  height: 190px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(12, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.chart-tooltip[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
}

.history-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.history-type {
  font-weight: 600;
}

.history-amount {
  font-weight: 600;
}

.history-amount.in {
  color: #55f2c8;
}

.history-amount.out {
  color: #f39a88;
}

.history-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-overview {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

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

.cards-panel {
  display: none;
}

.cards-panel.active {
  display: grid;
  gap: 16px;
}

.card-section {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-section.empty {
  text-align: center;
}

.card-section.empty h3 {
  margin: 0 0 8px;
}

.card-section .section-head.compact {
  margin-bottom: 10px;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.card-row.active {
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.12);
}

.card-info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.btn.small {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.card-row small {
  color: var(--muted);
}

.block h2 {
  margin: 0;
  font-size: 1.2rem;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.field input,
.field select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  background: rgba(8, 10, 12, 0.7);
  color: var(--ink);
}

.iban-info {
  display: none;
  margin: -2px 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.iban-info.known {
  color: var(--accent);
}

.iban-info.unknown {
  color: #f39a88;
}

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

.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04110e;
}

.btn.outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  margin-top: 6px;
}

.login {
  position: relative;
  border: 1px solid rgba(45, 212, 191, 0.18);
  background: rgba(13, 17, 20, 0.85);
}

.login-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.login-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: rgba(45, 212, 191, 0.9);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.scan {
  width: 56px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  position: relative;
  overflow: hidden;
  background: rgba(12, 16, 19, 0.8);
}

.scan::before {
  content: "";
  position: absolute;
  inset: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, transparent, rgba(45, 212, 191, 0.65), transparent);
  animation: scanLine 2.6s ease-in-out infinite;
}

.card-bay {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.card-list-wrap {
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 18, 0.6);
  position: relative;
}

.card-list-tip {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(45, 212, 191, 0.9);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#atmLock[data-needs-card="true"] .card-list-tip {
  opacity: 1;
  transform: translateY(0);
}

#atmLock[data-needs-card="true"] .card-list-wrap {
  border-color: rgba(45, 212, 191, 0.8);
  box-shadow: 0 0 22px rgba(45, 212, 191, 0.35);
  animation: cardPulse 1.4s ease-in-out infinite;
}

#atmLock[data-needs-card="true"] #pinPanel {
  display: none;
}

@keyframes cardPulse {
  0% {
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.25);
  }
  50% {
    box-shadow: 0 0 26px rgba(45, 212, 191, 0.5);
  }
  100% {
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.25);
  }
}

.card-slot {
  position: relative;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 20, 24, 0.9), rgba(10, 12, 15, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.card-slot.active {
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.2);
}

.card-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-track::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.8), transparent);
  animation: cardSweep 2.4s ease-in-out infinite;
}

.card-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: var(--muted);
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 18, 0.8);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.5);
}

.card-chip.active {
  border-color: rgba(45, 212, 191, 0.7);
  color: #bff7ee;
}

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

.pin-dots {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  justify-content: start;
}

.pin-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, background 0.2s ease;
}

.pin-dots span.filled {
  background: rgba(45, 212, 191, 0.8);
  border-color: rgba(45, 212, 191, 0.9);
  transform: scale(1.05);
}

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

.pad {
  border-radius: 14px;
  padding: 12px 0;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.pad:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.4);
}

.pad.ghost {
  color: var(--muted);
  font-size: 0.85rem;
}

.pad.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04110e;
}

.pin-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pin-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.pin-hint.bad {
  color: #f39a88;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(243, 154, 136, 0.15);
  border: 1px solid rgba(243, 154, 136, 0.35);
}

.app[data-mode="branch"] #atmLock {
  display: none;
}

.app[data-mode="atm"] #cardRequestBlock {
  display: none;
}

.app[data-mode="atm"] .account-switch,
.app[data-mode="atm"] .company-card {
  display: none;
}

.app[data-mode="atm"] .tab-btn[data-tab="transfer"],
.app[data-mode="atm"] .tab-btn[data-tab="addressbook"],
.app[data-mode="atm"] .tab-btn[data-tab="cards"] {
  display: none;
}

.app[data-mode="atm"] .tab-panel[data-tab="transfer"],
.app[data-mode="atm"] .tab-panel[data-tab="addressbook"],
.app[data-mode="atm"] .tab-panel[data-tab="cards"] {
  display: none;
}

.app[data-mode="atm"][data-locked="true"] #actionsBlock {
  display: none;
}

.app[data-mode="atm"][data-locked="false"] #atmLock {
  display: none;
}

.atm-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 8, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
}

.atm-modal[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.atm-card {
  width: min(520px, 92vw);
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(10, 12, 15, 0.96), rgba(16, 19, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: atmPop 0.35s ease;
  position: relative;
  overflow: hidden;
}

.atm-warning {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.atm-warning[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.warning-card {
  width: min(420px, 92%);
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(241, 178, 111, 0.5);
  background: rgba(20, 18, 12, 0.95);
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.warning-card h2 {
  margin: 12px 0 8px;
  font-size: 1.4rem;
}

.warning-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.warning-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(241, 178, 111, 0.6);
  background: rgba(241, 178, 111, 0.15);
  display: grid;
  place-items: center;
  color: #f1b26f;
}

.warning-icon svg {
  width: 40px;
  height: 40px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.65);
  transition: opacity 0.2s ease;
}

.modal[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  width: min(380px, 90vw);
  background: rgba(14, 17, 22, 0.95);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.intro-overlay[data-open="true"] {
  opacity: 1;
  pointer-events: all;
}

.intro-panel {
  position: fixed;
  max-width: min(420px, 90vw);
  background: rgba(14, 17, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.intro-step {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.intro-panel h3 {
  margin: 0 0 6px;
}

.intro-panel p {
  margin: 0 0 12px;
  color: var(--muted);
}

.intro-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.intro-highlight {
  position: relative;
  z-index: 1001;
  outline: 2px solid rgba(45, 212, 191, 0.8);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.35);
  border-radius: 12px;
  pointer-events: none;
}

.modal-card.danger {
  border-color: rgba(243, 154, 136, 0.5);
}

.delete-card-label {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.modal-card h3 {
  margin: 0 0 8px;
}

.modal-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.lock-warning {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 20px;
  border: 1px solid rgba(241, 178, 111, 0.6);
  background: rgba(241, 178, 111, 0.15);
  display: grid;
  place-items: center;
  color: #f1b26f;
}

.lock-warning svg {
  width: 36px;
  height: 36px;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.6;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.glow-a {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(45, 212, 191, 0.45), transparent 65%);
  top: -8%;
  left: 6%;
}

.glow-b {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 60% 40%, rgba(241, 178, 111, 0.35), transparent 70%);
  bottom: 6%;
  right: 10%;
  animation-delay: 1.6s;
}

.glow-c {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 40% 60%, rgba(120, 138, 255, 0.22), transparent 70%);
  top: 35%;
  right: 40%;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scanLine {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  60% {
    transform: translateY(120%);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes cardSweep {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  60% {
    transform: translateX(220%);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes atmPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 22px;
  }

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

  .head {
    flex-wrap: wrap;
  }

  .head-actions {
    width: 100%;
    justify-content: space-between;
  }

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