:root {
  --bg0: #0b0d11;
  --bg1: #12151c;
  --line: rgba(210, 218, 230, 0.12);
  --text: #eef2f7;
  --muted: #94a0b3;
  --metal: #c9d2df;
  --good: #6fcaa8;
  --warn: #e0b05a;
  --bad: #e07a7a;
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(170, 190, 215, 0.16), transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 50%, #0f131a);
  background-attachment: fixed;
}
.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 24px 18px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: auto; }
.brand h1 { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.75rem); letter-spacing: -0.03em; background: linear-gradient(180deg,#fff,var(--metal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, button.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--text); text-decoration: none;
  font-size: 0.86rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn:hover { background: rgba(255,255,255,.1); }
.btn.primary { background: linear-gradient(180deg, #e8eef6, #b7c2d1); color: #12151c; border: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.kpi { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(255,255,255,.03)); }
.kpi span { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 8px; }
.kpi strong { font-family: var(--font-display); font-size: 1.5rem; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.03); padding: 16px; margin-bottom: 14px; }
.panel h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 1.1rem; }
.grid-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .grid-form { grid-template-columns: 1fr 1fr; } }
label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.28); color: var(--text); padding: 11px 12px; font: inherit;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { flex: 1; min-width: 160px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 0.88rem; vertical-align: top; }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; }
.status { display: inline-block; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.72rem; font-weight: 700; }
.status.New { color: var(--warn); }
.status.Converted { color: var(--good); }
.status.Lost { color: var(--bad); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button { padding: 7px 10px; font-size: 0.75rem; }
.empty, .hint { color: var(--muted); }
.error { color: var(--bad); padding: 12px; border: 1px solid rgba(224,122,122,.35); border-radius: 12px; background: rgba(224,122,122,.08); }
.msg.ok { color: var(--good); margin-top: 8px; }
