:root {
  --ink: #172026;
  --muted: #64727c;
  --line: #dce3e7;
  --panel: #ffffff;
  --page: #f4f7f8;
  --blue: #2364aa;
  --green: #16845b;
  --amber: #b96b12;
  --red: #c03b3b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  background: #10242f;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand,
.user-chip,
.panel-head,
.check-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #42b883;
  color: #082016;
  font-weight: 800;
}

.brand small,
.sidebar-note span {
  display: block;
  color: #b5c5cd;
}

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

.nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #dce9ef;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-btn.active,
.nav-btn:hover {
  background: #183746;
  border-color: #2e5a6d;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #2c5364;
  border-radius: 8px;
}

.shell {
  padding: 28px;
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.user-chip {
  gap: 10px;
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.user-chip span {
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.mini-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 18px;
}

.metric span,
.mini-card span,
label {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.metric.warning strong {
  color: var(--amber);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head p,
.panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.status-pill,
.tag {
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e8f3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.module-list {
  display: grid;
  gap: 12px;
}

.module {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.module h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.asset {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #edf1f3;
}

.asset-type {
  text-align: center;
  border-radius: 8px;
  background: #f0f5f7;
  color: #31444e;
  padding: 8px;
  font-weight: 800;
  font-size: 12px;
}

.asset strong {
  display: block;
}

.asset small {
  color: var(--muted);
}

.download {
  color: var(--green);
  font-weight: 700;
}

.locked {
  color: var(--amber);
  font-weight: 700;
}

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

.mini-card {
  padding: 14px;
}

.mini-card strong {
  display: block;
  margin-top: 5px;
}

.mini-card.alert {
  border-color: #f3c98b;
  background: #fff8ed;
}

.upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-form {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}

.check-row {
  grid-template-columns: auto 1fr;
  gap: 9px;
  color: var(--ink);
}

.check-row input {
  width: auto;
}

button[type="submit"] {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.admin-automation {
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tag.good {
  background: #e8f8f1;
  color: var(--green);
}

.tag.warn {
  background: #fff3df;
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  max-width: 360px;
  background: #10242f;
  color: #fff;
  padding: 13px 16px;
  border-radius: 8px;
  box-shadow: 0 16px 35px rgba(16, 36, 47, 0.25);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 18px;
  }

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

  .sidebar-note {
    display: none;
  }

  .stats-grid,
  .content-layout,
  .upload-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .asset {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .asset .download,
  .asset .locked {
    grid-column: 2;
  }
}
