:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --card: #ffffff;
  --card-soft: #f8f9fc;
  --border: #e4e8f0;
  --text: #18202b;
  --muted: #6b7480;
  --accent: #111111;
  --accent-strong: #000000;
  --surface: #ffffff;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.auth-layout {
  width: min(360px, 100%);
  display: grid;
  gap: 18px;
}

.app-layout {
  width: min(420px, 100%);
}

.brand-stack {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.brand-stack-compact {
  gap: 6px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
}

.card-head {
  display: grid;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-title,
.app-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.brand-subtitle,
.panel-lead,
.legal-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.panel-card {
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.app-panel {
  gap: 18px;
}

.logout-button {
  width: 100%;
  margin-top: 4px;
}

.balance-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.balance-label,
.balance-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.balance-card strong {
  font-size: 34px;
  line-height: 1;
}

.cashout-form {
  display: grid;
  gap: 12px;
}

.form-panel {
  padding-top: 4px;
}

.cashout-form label {
  display: grid;
  gap: 7px;
}

.cashout-form span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.cashout-form input,
.cashout-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
}

.cashout-form textarea {
  resize: vertical;
}

.ghost-button,
.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.secondary-button {
  width: 100%;
}

.cashout-form input:focus,
.cashout-form textarea:focus {
  outline: 2px solid rgba(17, 17, 17, 0.08);
  border-color: rgba(17, 17, 17, 0.28);
}

#login-button,
#submit-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #1d1d1d 0%, #000 100%);
  cursor: pointer;
}

#login-button[disabled],
#submit-button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.status-box {
  padding: 16px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.status-box.info {
  background: #f5f7fb;
  border-color: #dbe2ee;
}

.status-box.success {
  background: #eef9f1;
  border-color: #c7e8d1;
}

.status-box.error {
  background: #fff3f1;
  border-color: #efc2bb;
}

.legal-copy {
  text-align: center;
  font-size: 13px;
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px;
  }

  .panel-card {
    padding: 18px;
  }
}