:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --bg: #06101d;
  --panel: rgba(12, 26, 43, 0.88);
  --panel-strong: #0d2135;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f5f9ff;
  --muted: #9db0c6;
  --accent: #42e8b4;
  --accent-strong: #19c892;
  --blue: #4c8dff;
  --danger: #ff7285;
  --warning: #ffc65c;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(28, 103, 158, 0.24), transparent 34%),
    radial-gradient(circle at 88% 76%, rgba(20, 179, 135, 0.16), transparent 30%),
    linear-gradient(145deg, #06101d 0%, #071827 46%, #06101d 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.22;
}

.ambient-one {
  top: -90px;
  right: 12%;
  background: #3187ff;
}

.ambient-two {
  bottom: -110px;
  left: 16%;
  background: #20d7a1;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.center-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 430px);
  transform: translate(-50%, -50%);
}

.status-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 42px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.status-card h1,
.status-card p {
  margin: 0;
}

.status-card p {
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  min-height: 100vh;
}

.intro-panel,
.login-panel {
  padding: clamp(34px, 6vw, 88px);
}

.intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  border-right: 1px solid var(--line);
}

.login-panel {
  display: grid;
  place-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-row.compact {
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  color: #032219;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #78f7cf, #28d39e);
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(39, 217, 164, 0.24);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #8299b4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow.accent {
  color: var(--accent);
}

.brand-name {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.intro-copy {
  max-width: 680px;
  padding: 70px 0;
}

.intro-copy h1 {
  max-width: 620px;
  margin: 16px 0 22px;
  font-size: clamp(42px, 5.8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 13px;
}

.privacy-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #042118;
  font-weight: 900;
  background: var(--accent);
  border-radius: 50%;
}

.login-card {
  display: grid;
  gap: 24px;
  width: min(100%, 440px);
  padding: clamp(28px, 4vw, 44px);
  background: rgba(10, 24, 41, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.login-card h2 {
  margin: 8px 0 8px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 9px;
  color: #c6d4e4;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
  background: rgba(4, 14, 26, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66, 232, 180, 0.1);
}

.form-message {
  min-height: 20px;
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
  border-radius: 13px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.primary-button {
  color: #032219;
  background: linear-gradient(135deg, #72f2ca, #21d39d);
  border: 0;
  box-shadow: 0 14px 30px rgba(31, 205, 152, 0.2);
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.dashboard {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(5, 15, 27, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-copy {
  display: grid;
  margin-right: 8px;
  text-align: right;
}

.user-copy strong {
  font-size: 13px;
}

.user-copy span {
  color: var(--muted);
  font-size: 11px;
}

.ghost-button {
  min-height: 40px;
  color: #dce8f6;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.ghost-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.34);
}

.ghost-button.danger {
  color: #ff9aaa;
}

.dashboard-content {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 72px) 0;
}

.welcome-row,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.welcome-row h1 {
  margin: 7px 0 8px;
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: -0.05em;
}

.updated-time,
.section-note {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.metric-card,
.content-section {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.metric-card {
  display: grid;
  align-content: space-between;
  min-height: 168px;
  padding: 25px;
  border-radius: 22px;
}

.hero-metric {
  background:
    linear-gradient(135deg, rgba(48, 139, 255, 0.18), rgba(42, 220, 166, 0.12)),
    var(--panel-strong);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-value {
  margin: 8px 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-status {
  margin: 8px 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.metric-status.ok {
  color: var(--accent);
}

.metric-status.error {
  color: var(--danger);
}

.metric-detail {
  color: var(--muted);
  font-size: 12px;
}

.content-section {
  margin-top: 18px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
}

.section-heading {
  align-items: center;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.read-only-pill {
  padding: 7px 11px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(66, 232, 180, 0.09);
  border: 1px solid rgba(66, 232, 180, 0.22);
  border-radius: 999px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  display: grid;
  gap: 14px;
  min-height: 142px;
  padding: 19px;
  background: rgba(5, 16, 29, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
}

.summary-card-header,
.transaction-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.currency-code {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.status-pill {
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.status-pill.success {
  color: var(--accent);
  background: rgba(66, 232, 180, 0.1);
}

.status-pill.pending {
  color: var(--warning);
  background: rgba(255, 198, 92, 0.1);
}

.status-pill.failed {
  color: var(--danger);
  background: rgba(255, 114, 133, 0.1);
}

.summary-amount {
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.summary-count {
  color: var(--muted);
  font-size: 12px;
}

.transaction-list {
  display: grid;
  gap: 10px;
}

.transaction-card {
  padding: 16px 18px;
  background: rgba(5, 16, 29, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
}

.transaction-main,
.transaction-meta {
  display: grid;
  gap: 4px;
}

.transaction-main {
  min-width: 0;
}

.transaction-main strong,
.transaction-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-main span,
.transaction-meta span {
  color: var(--muted);
  font-size: 11px;
}

.transaction-meta {
  min-width: 150px;
  text-align: right;
}

.transaction-amount {
  color: #eaf2ff;
  font-size: 16px;
}

.empty-state {
  padding: 42px 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(5, 16, 29, 0.4);
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 16px;
}

.footer-note {
  padding: 0 20px 32px;
  color: #6f849d;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: auto;
    padding-bottom: 34px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-copy {
    padding: 56px 0 44px;
  }

  .intro-copy h1 {
    font-size: clamp(40px, 9vw, 64px);
  }

  .login-panel {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-metric {
    grid-column: 1 / -1;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .topbar .brand-name,
  .topbar .eyebrow,
  .user-copy {
    display: none;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .ghost-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .dashboard-content {
    width: min(100% - 24px, 1440px);
  }

  .welcome-row,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .status-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-metric {
    grid-column: auto;
  }

  .metric-card {
    min-height: 142px;
  }

  .transaction-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .transaction-main {
    width: 100%;
  }

  .transaction-meta {
    min-width: 0;
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
