:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e2e8f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 45%, #f4f7fb 100%);
  color: var(--text);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

.left-panel {
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(8px);
}

.left-inner {
  padding: 42px 28px;
  position: sticky;
  top: 0;
}

.eyebrow {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.eyebrow.small {
  margin-bottom: 12px;
}

.left-inner h1 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.left-inner p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 22px;
}

.login-card,
.welcome-card,
.card,
.placeholder-card,
.balance-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login-card,
.welcome-card {
  padding: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: #fff;
}

.login-card h2,
.welcome-card h2,
.dashboard-header h2 {
  font-size: 30px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 15px;
}

input:focus {
  border-color: rgba(37,99,235,0.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-weight: 700;
  padding: 15px 22px;
  border-radius: 16px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 14px 28px rgba(37,99,235,0.22);
}

.btn.secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.login-message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.login-message.show {
  display: block;
}

.login-message.error {
  background: rgba(220,38,38,0.08);
  color: #991b1b;
  border: 1px solid rgba(220,38,38,0.14);
}

.login-message.success {
  background: rgba(22,163,74,0.08);
  color: #166534;
  border: 1px solid rgba(22,163,74,0.14);
}

.register-btn {
  margin-top: 10px;
}

.register-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.register-message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.register-message.show {
  display: block;
}

.register-message.error {
  background: rgba(220,38,38,0.08);
  color: #991b1b;
  border: 1px solid rgba(220,38,38,0.14);
}

.register-message.success {
  background: rgba(22,163,74,0.08);
  color: #166534;
  border: 1px solid rgba(22,163,74,0.14);
}

.right-panel {
  padding: 28px;
}

.dashboard-header {
  margin-bottom: 20px;
}

.dashboard-header p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

.balance-card {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.balance-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.balance-amount {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--primary-dark);
}

.balance-note {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
}

.card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.helper {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.console-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.no-margin {
  margin: 0;
}

.badge-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37,99,235,0.08);
  color: var(--primary-dark);
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.terminal {
  background: #0b1220;
  color: #dbeafe;
  border-radius: 18px;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #172033;
}

.terminal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #111827;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }

.terminal-body {
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  min-height: 320px;
  white-space: pre-wrap;
  overflow: auto;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  transition: width 1s linear;
}

.summary-box {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e7eef9;
}

.summary-box.show {
  display: block;
}

.summary-box h4 {
  margin-bottom: 8px;
  font-size: 18px;
}

.summary-box p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

.placeholder-shell {
  height: 100%;
  display: grid;
  place-items: center;
}

.placeholder-card {
  padding: 28px;
  max-width: 620px;
}

.placeholder-card h2 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.placeholder-card p {
  color: var(--muted);
}

.status-pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22,163,74,0.08);
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .app-shell,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .left-inner {
    position: static;
  }

  .balance-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .balance-note {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .right-panel,
  .left-inner {
    padding: 20px;
  }

  .left-inner h1 {
    font-size: 34px;
  }

  .balance-amount {
    font-size: 30px;
  }
}