:root {
  --bg: #050814;
  --panel: #0b1020;
  --panel-2: #11182d;
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255,255,255,.10);
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #eab308;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(37,99,235,.22), transparent 30%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 24px;
  background: rgba(5,8,20,.90);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand.center { justify-content: center; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #0ea5e9);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 18px 40px rgba(37,99,235,.35);
}

.brand strong { display: block; font-size: 18px; }
.brand span { color: var(--muted); font-size: 12px; }

nav {
  display: grid;
  gap: 8px;
}

nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #dbeafe;
  border: 1px solid transparent;
}

nav a:hover {
  background: rgba(37,99,235,.16);
  border-color: rgba(37,99,235,.35);
}

.main {
  margin-left: 280px;
  padding: 28px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

h1, h2, h3 { margin-top: 0; }
h1 { font-size: 34px; margin-bottom: 6px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

.topbar p, .muted, .hint {
  color: var(--muted);
}

.hint { font-size: 13px; }

.user-chip {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: #dbeafe;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.card {
  background: linear-gradient(180deg, rgba(17,24,45,.92), rgba(11,16,32,.92));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 20px 80px rgba(0,0,0,.25);
}

.narrow { max-width: 620px; }

.grid {
  display: grid;
  gap: 18px;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats article span {
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
}

.stats article strong {
  font-size: 34px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}

.steps div {
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.24);
  padding: 16px;
  border-radius: 16px;
  color: #dbeafe;
}

.steps b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--blue);
  border-radius: 999px;
  margin-right: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th { color: #bfdbfe; font-weight: 700; }

input, select, textarea {
  width: 100%;
  background: #050814;
  border: 1px solid rgba(148,163,184,.25);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
}

textarea { min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(37,99,235,.18);
}

button, .as-link {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: var(--blue-2);
  color: white;
}

.secondary {
  background: rgba(255,255,255,.08);
  color: white;
  border: 1px solid var(--line);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.danger {
  background: rgba(220,38,38,.14);
  color: #fecaca;
  border: 1px solid rgba(220,38,38,.35);
}

.small {
  padding: 8px 10px;
  font-size: 12px;
}

.full { width: 100%; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.form-row.compact {
  grid-template-columns: 1fr auto;
  margin-top: 14px;
}

.stack {
  display: grid;
  gap: 14px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.checks {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.checks label {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checks input {
  width: auto;
}

.badge {
  display: inline-flex;
  background: rgba(37,99,235,.18);
  color: #bfdbfe;
  border: 1px solid rgba(37,99,235,.35);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.14);
  border: 1px solid rgba(37,99,235,.35);
  color: #dbeafe;
}

.vendor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.vendor-card {
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.vendor-header, .actions, .list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list {
  display: grid;
  gap: 8px;
}

.list-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.16);
}

.source {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.source span, .source small {
  color: var(--muted);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 22px;
}

.login-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, rgba(17,24,45,.96), rgba(5,8,20,.96));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 25px 100px rgba(0,0,0,.45);
}

.login-card h1 { text-align: center; margin-top: 26px; }
.login-card p { color: var(--muted); text-align: center; }

.error-box, .warning-box, .success-box {
  padding: 12px 14px;
  border-radius: 14px;
  margin-top: 12px;
}

.error-box { background: rgba(220,38,38,.14); border: 1px solid rgba(220,38,38,.35); color: #fecaca; }
.warning-box { background: rgba(234,179,8,.14); border: 1px solid rgba(234,179,8,.35); color: #fef3c7; }
.success-box { background: rgba(22,163,74,.14); border: 1px solid rgba(22,163,74,.35); color: #bbf7d0; }

.hidden { display: none; }

.link {
  color: #93c5fd;
  font-weight: 700;
}

@media (max-width: 980px) {
  .sidebar { position: static; width: auto; }
  .main { margin-left: 0; }
  .stats, .steps, .two, .columns, .vendor-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
