/* Admin console — widescreen sidebar layout */
.admin-body {
  background: #eef2f6;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  color: #fff !important;
  gap: 12px;
  align-items: flex-start;
}

.admin-brand strong {
  display: block;
  font-size: 16px;
}

.admin-brand small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav button {
  text-align: left;
  background: transparent;
  border: none;
  color: #94a3b8;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}

.admin-nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav button.active {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
}

.admin-side-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-side-foot a {
  color: #94a3b8;
  font-size: 13px;
}

.admin-side-foot .btn.ghost {
  background: transparent;
  color: #e2e8f0;
  border-color: #334155;
}

.admin-main {
  padding: 24px 28px 48px;
  min-width: 0;
}

.admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-top h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: rise 0.35s ease both; }

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

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat-card .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.admin-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-toolbar input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  min-width: 240px;
  background: #fff;
}

.table-wrap {
  padding: 0;
  overflow: auto;
}

.table-wrap .table {
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 14px;
}

.table .tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tag.ok { background: #ccfbf1; color: #0f766e; }
.tag.warn { background: #fef3c7; color: #b45309; }
.tag.off { background: #fee2e2; color: #b91c1c; }
.tag.muted { background: #f1f5f9; color: #64748b; }

.table .ops {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-side {
    position: relative;
    height: auto;
  }
  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
