:root {
  --bg: #10141c;
  --bg-elev: #181e29;
  --line: #2a3344;
  --text: #eef2f7;
  --muted: #9aa8bc;
  --accent: #e8b86d;
  --accent-2: #7dd3c0;
  --danger: #f07178;
  --ok: #7dce82;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(232, 184, 109, 0.12), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(125, 211, 192, 0.08), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Avenir Next", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0 0.4rem;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

h1, h2 { margin: 0 0 0.6rem; }
p { color: var(--muted); line-height: 1.6; }

.hero {
  padding: 5.5rem 0 4rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  max-width: 14ch;
}

.hero p { max-width: 46ch; font-size: 1.05rem; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.btn, button, .btn-ghost {
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.btn, button[type="submit"], .btn-primary {
  background: var(--accent);
  color: #1b1408;
}

.btn-ghost, .secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

input[type="url"], input[type="number"] {
  background: #10151e;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  min-width: 0;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 0.7rem;
}

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
}

.flash.error { background: rgba(240, 113, 120, 0.12); color: #ffb4b8; }
.flash.success { background: rgba(125, 206, 130, 0.12); color: #b6f0ba; }

.price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
}

.meta { color: var(--muted); font-size: 0.9rem; }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.error { color: var(--danger); border-color: var(--danger); }
.badge.off { color: var(--muted); }

.item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.item-actions form { margin: 0; }

.chart-box { min-height: 280px; }
