/*
 * Copy Alpha handcrafted UI styles.
 */

:root {
  --bg: #08111f;
  --bg-2: #0d1728;
  --panel: rgba(13, 23, 40, 0.88);
  --panel-strong: rgba(16, 29, 51, 0.96);
  --border: rgba(116, 145, 189, 0.22);
  --border-strong: rgba(135, 169, 222, 0.36);
  --text: #e8eefc;
  --muted: #9eaecb;
  --soft: #7282a3;
  --accent: #7dd3fc;
  --accent-2: #38bdf8;
  --gold: #f2c66d;
  --green: #54d39a;
  --red: #ff7c87;
  --shadow: 0 24px 70px rgba(2, 8, 20, 0.45);
  --radius: 20px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(242, 198, 109, 0.10), transparent 26%),
    linear-gradient(180deg, #0a1424 0%, #07101c 100%);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.08));
}

main {
  min-height: 100vh;
}

a {
  color: var(--accent);
}

a:hover {
  color: #b4ecff;
}

button,
input,
select,
textarea {
  font: inherit;
}

.dashboard-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.dashboard-hero {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.dashboard-brand {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.dashboard-title {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.dashboard-subtitle {
  margin: 14px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

.hero-actions {
  width: min(360px, 100%);
  display: grid;
  gap: 14px;
}

.panel,
.signal-card,
.empty-state,
.auth-card,
.flash {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel::after,
.signal-card::after,
.auth-card::after,
.empty-state::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.status-panel,
.controls-panel {
  padding: 18px 20px;
}

.status-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.status-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.controls-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #08111f;
  background: linear-gradient(135deg, var(--gold), #ffd88f);
  box-shadow: 0 12px 32px rgba(242, 198, 109, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(242, 198, 109, 0.30);
}

.btn-secondary {
  color: var(--text);
  background: rgba(125, 211, 252, 0.10);
  border-color: rgba(125, 211, 252, 0.18);
}

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

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.market-panel {
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(20, 34, 58, 0.96), rgba(11, 19, 33, 0.94));
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #d6f6ff);
  box-shadow: 0 0 16px rgba(125, 211, 252, 0.55);
}

.market-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.market-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.stat-box {
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

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

.stat-value {
  margin-top: 8px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-note.success,
.edge-value.positive {
  color: var(--green);
}

.stat-note.warn {
  color: var(--gold);
}

.signals-board {
  display: grid;
  gap: 16px;
}

.signal-card {
  overflow: hidden;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(15, 26, 45, 0.96), rgba(11, 18, 31, 0.96));
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.signal-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 80px rgba(2, 8, 20, 0.55);
}

.signal-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.signal-main {
  min-width: 0;
}

.signal-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-blue {
  color: #82ccff;
  background: rgba(56, 189, 248, 0.12);
}

.badge-gold {
  color: #f3ce83;
  background: rgba(242, 198, 109, 0.14);
}

.badge-green {
  color: #7eedbb;
  background: rgba(84, 211, 154, 0.13);
}

.signal-time {
  color: var(--soft);
  font-size: 0.85rem;
}

.signal-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.3;
}

.signal-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.96rem;
}

.signal-details strong {
  color: var(--text);
  font-weight: 600;
}

.signal-side {
  text-align: right;
  min-width: 110px;
}

.edge-value {
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--green);
}

.edge-label {
  margin-top: 6px;
  color: var(--soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.signal-actions {
  margin-top: 18px;
}

.empty-state {
  padding: 52px 28px;
  text-align: center;
  border-style: dashed;
}

.empty-title {
  margin: 0;
  font-size: 1.3rem;
}

.empty-copy {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.65;
}

.flash-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
}

.flash-notice {
  border-color: rgba(84, 211, 154, 0.25);
  color: #d8f7e9;
  background: rgba(84, 211, 154, 0.10);
}

.flash-alert {
  border-color: rgba(255, 124, 135, 0.25);
  color: #ffd7db;
  background: rgba(255, 124, 135, 0.10);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 480px);
  padding: 0;
  overflow: hidden;
}

.auth-header {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.auth-body {
  padding: 24px 26px 26px;
}

.auth-brand {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.auth-title {
  margin: 14px 0 0;
  font-size: 2rem;
}

.auth-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.demo-credentials {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 16px;
  background: rgba(125, 211, 252, 0.08);
  color: #d8f6ff;
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
}

.field-input {
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(5, 12, 22, 0.74);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
  border-color: rgba(125, 211, 252, 0.5);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.field-input::placeholder {
  color: #6f7f9f;
}

.auth-footer {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
}

.auth-footer a {
  color: var(--text);
}

@media (max-width: 920px) {
  .dashboard-hero,
  .signal-top {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .dashboard-shell {
    padding: 28px 14px 56px;
  }

  .dashboard-title {
    font-size: 2.5rem;
  }

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

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .signal-side {
    text-align: left;
    min-width: 0;
  }
}
