:root {
  --bg: #0b1220;
  --panel: #142033;
  --text: #f8fafc;
  --hint: #94a3b8;
  --line: rgba(148, 163, 184, .16);
  --accent: #38bdf8;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Estedad", Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, .14), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(52, 211, 153, .1), transparent 36%),
    var(--bg);
}

#app { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.brand { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.muted { color: var(--hint); font-size: 13px; font-weight: 600; line-height: 1.6; }
label { display: block; margin: 14px 0 6px; font-size: 12px; color: var(--hint); font-weight: 700; }
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .55);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}
.btn {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #082f49;
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
}
.btn.secondary { background: rgba(148, 163, 184, .16); color: var(--text); width: auto; }
.btn.ghost { background: transparent; color: var(--hint); border: 1px solid var(--line); width: auto; }
.btn.success { background: var(--success); color: #064e3b; }
.error { color: var(--danger); font-size: 13px; font-weight: 700; margin-top: 10px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .4);
  color: var(--hint);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.chip.active { background: rgba(56, 189, 248, .16); color: #7dd3fc; border-color: transparent; }

.grid2, .grid4 {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.title { font-size: 14px; font-weight: 800; }
.meta { margin-top: 6px; font-size: 12px; color: var(--hint); font-weight: 600; line-height: 1.55; }
.price { margin-top: 8px; font-size: 18px; font-weight: 900; color: #7dd3fc; }
.price.good { color: var(--success); }
.price.warn { color: var(--warning); }

.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td {
  text-align: right;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { color: var(--hint); font-weight: 700; }
.status {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148,163,184,.14);
}
.status.delivered, .status.approved { background: rgba(52,211,153,.16); color: #6ee7b7; }
.status.review, .status.pending_review { background: rgba(251,191,36,.14); color: #fcd34d; }
.status.waiting, .status.waiting_receipt { background: rgba(56,189,248,.14); color: #7dd3fc; }
.status.rejected, .status.cancelled { background: rgba(248,113,113,.14); color: #fca5a5; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(56,189,248,.75);
  min-width: 4px;
}
.inline { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline input { margin: 0; }
.inline .btn { margin: 0; width: auto; min-width: 72px; }
.hidden { display: none !important; }
