:root {
  --bg: #020617;
  --text: #ffffff;
  --card-bg: #0f172a;
  --card-border: #1f2937;
  --input-bg: #111827;
  --input-text: #ffffff;
  --button-bg: #1e293b;
  --button-text: #ffffff;
  --kpi-bg: #0f172a;
  --price-card-bg: #020617;
  --price-card-border: #1e293b;
  --badge-profit-bg: rgba(34, 197, 94, 0.2);
  --badge-profit-text: #22c55e;
  --badge-loss-bg: rgba(239, 68, 68, 0.2);
  --badge-loss-text: #ef4444;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.app-shell {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.brand-logo {
  width: 220px;
  height: auto;
  object-fit: contain;
  display: block;
  padding: 12px;
  background: rgba(247, 246, 246, 0.881);
  border-radius: 12px;
  transition: background-color 0.25s ease;
}

body.light .brand-logo {
  background: rgba(0, 0, 0, 0.04);
}

.brand-subtitle {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.01em;
  font-weight: 500;
}

body.light .brand-subtitle {
  color: #1a1a1a;
  text-shadow: none;
}


.toggle-btn {
  background: var(--button-bg);
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  color: var(--button-text);
  cursor: pointer;
}

/* CARDS */
.card {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* INPUT */
input {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--input-bg);
  color: var(--input-text);
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.kpi {
  background: var(--kpi-bg);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.kpi p {
  font-size: 12px;
  opacity: 0.6;
}

.kpi h2 {
  font-size: 18px;
  margin-top: 4px;
}

/* VERDICT */
.verdict-box {
  text-align: center;
  font-weight: bold;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

/* PRICE CARDS */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.price-card {
  background: var(--price-card-bg);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--price-card-border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
}

.green {
  background: var(--badge-profit-bg);
  color: var(--badge-profit-text);
}

.red {
  background: var(--badge-loss-bg);
  color: var(--badge-loss-text);
}

.disclaimer {
  text-align: center;
  font-size: 14px;
  opacity: 0.5;
  margin-top: 20px;
  color: white;
}

body.light .disclaimer {
  color: #000000;
}

.card,
input,
.price-card,
.toggle-btn,
.verdict-box,
.kpi {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* LIGHT THEME */
body.light {
  --bg: #eef2ff;
  --text: #0f172a;
  --card-bg: #ffffff;
  --card-border: #dbeafe;
  --input-bg: #f8fbff;
  --input-text: #0f172a;
  --button-bg: #e2e8f0;
  --button-text: #0f172a;
  --kpi-bg: #ffffff;
  --price-card-bg: #ffffff;
  --price-card-border: #cbd5e1;
}
