:root {
  --bg: #071422;
  --side: #08182c;
  --card: rgba(14, 36, 64, 0.78);
  --line: #2a4a6e;
  --text: #e8f2fb;
  --soft: #9bb4cc;
  --teal: #7ecbff;
  --teal-deep: #0e4f86;
  --green: #3ddea6;
  --amber: #f0b429;
  --red: #ff8b96;
  color-scheme: dark;
  font-family: "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(980px 520px at -8% -12%, rgba(74, 168, 255, 0.34), transparent 58%),
    radial-gradient(760px 460px at 108% -8%, rgba(36, 112, 196, 0.28), transparent 52%),
    radial-gradient(820px 480px at 50% 115%, rgba(16, 74, 140, 0.32), transparent 56%),
    linear-gradient(180deg, #0b1d34 0%, #071422 46%, #06101c 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.login-card {
  width: min(460px, 100%);
  background: rgba(10, 28, 50, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 24px;
  box-shadow: 0 18px 50px rgba(4, 16, 32, 0.45);
}
.login-logo, .side-logo {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
  background: #071422;
  border-radius: 12px;
}
.login-logo { height: 168px; }
.side-logo { height: 74px; margin-bottom: 14px; }
.login-card h1 { margin: 18px 0 4px; font-size: 26px; letter-spacing: -0.3px; }
label { display: block; color: var(--soft); font-size: 13px; margin: 12px 0 6px; }
input, select {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c1c32;
  color: var(--text);
  padding: 0 12px;
}
.primary, .ghost {
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
}
.primary { background: linear-gradient(180deg, #1d74c2, #0e4f86); color: white; border-color: #3b93d6; font-weight: 650; }
.login-card .primary, .panel .primary { width: 100%; margin-top: 16px; }
.ghost { background: #0c1c32; color: var(--text); border-color: var(--line); }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }
.ok-note { color: var(--green); font-size: 13px; margin-top: 8px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.side {
  background: linear-gradient(180deg, rgba(10, 32, 58, 0.96), rgba(7, 18, 34, 0.96));
  border-right: 1px solid #1c3d5e;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: transparent;
  color: #d5e6f5;
  border: 0;
  border-radius: 8px;
  height: 40px;
  padding: 0 12px;
}
.nav svg { width: 18px; height: 18px; flex: none; }
.nav.active { background: linear-gradient(180deg, #1a6cb3, #0d4c82); color: white; font-weight: 650; }
.side .spacer { flex: 1; }
.who { color: var(--soft); font-size: 12px; padding: 0 12px 8px; }
.main { padding: 22px 24px 32px; min-width: 0; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.kicker { color: var(--teal); font-size: 13px; font-weight: 700; }
.top h1 { font-size: 28px; margin-top: 4px; }
.sub { color: var(--soft); margin-top: 4px; font-size: 13px; }
.tools { display: flex; gap: 8px; align-items: center; }
.search { width: 260px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.section-title { font-size: 15px; margin: 4px 0 10px; }
.package-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(18, 48, 84, 0.88), rgba(10, 28, 52, 0.88));
  border: 1px solid #2f5680;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(150, 205, 255, 0.12);
}
.package-grid .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
.ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  color: #eaf6ff;
  background: linear-gradient(160deg, #49b4f2 0%, #14609a 100%);
  box-shadow: inset 0 0 0 1px rgba(198, 230, 255, 0.28);
}
.ico svg { width: 20px; height: 20px; }
.package-grid .ico { width: 32px; height: 32px; border-radius: 9px; }
.package-grid .ico svg { width: 16px; height: 16px; }
.stat b { display: block; font-size: 26px; letter-spacing: -0.4px; line-height: 1.05; }
.package-grid .stat b { font-size: 22px; }
.stat-copy span, .stat > span { color: var(--soft); font-size: 13px; }
.package-grid .stat-copy span { font-size: 12px; }
.stat.new b { color: var(--amber); }
.stat.done b { color: var(--green); }
.stat.stop b { color: var(--red); }
.charts { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; margin-bottom: 12px; backdrop-filter: blur(6px); }
.card h2 { font-size: 15px; margin-bottom: 8px; }
.card svg { width: 100%; height: auto; display: block; }
.banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  background: rgba(240, 180, 41, 0.12);
  color: #ffe3a8;
  border: 1px solid rgba(240, 180, 41, 0.35);
  line-height: 1.45;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pill {
  border: 1px solid var(--line);
  background: #0c1c32;
  color: var(--text);
  border-radius: 999px;
  height: 34px;
  padding: 0 12px;
}
.pill.active { background: var(--teal-deep); border-color: #3b93d6; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; max-height: calc(100vh - 320px); }
table { width: 100%; border-collapse: collapse; background: #0c1c32; }
th, td { padding: 9px 12px; text-align: left; white-space: nowrap; font-size: 13px; }
th { position: sticky; top: 0; background: #0a1a2e; color: #9bb4cc; font-size: 11px; letter-spacing: 0.3px; }
td { border-top: 1px solid #1c2940; }
tr.thin td:nth-child(4) { color: var(--amber); font-weight: 700; }
.tag { font-weight: 700; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--soft); font-size: 13px; }
.panel { max-width: 720px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.user-list { margin-top: 18px; }
.user-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.inventory p { color: var(--soft); line-height: 1.5; max-width: 680px; }
.inventory h2 { margin: 18px 0 8px; font-size: 16px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .stats, .charts, .row2, .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 160px; }
}
