:root {
  /*
    Brand palette (based on provided image):
    - Primary: Moxxi Blue
    - Accent: Moxxi Yellow
    - Neutrals: clean white + slate text
  */
  --bg: #eaf7ff;
  --bg-2: #f6fbff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.10);

  --accent: #0099e5;   /* blue */
  --accent-2: #ffc44d; /* yellow */
  --danger: #e11d48;

  /* Prototype-like sidebar */
  --sidebar-bg: #0b1220;
  --sidebar-bg-2: #0f1a30;
  --sidebar-text: rgba(255, 255, 255, 0.92);
  --sidebar-muted: rgba(255, 255, 255, 0.62);
  --sidebar-border: rgba(255, 255, 255, 0.08);

  --radius: 14px;
  --radius-sm: 10px;
  --gap: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 600px at 18% -10%, rgba(0, 153, 229, 0.14), transparent 62%),
    radial-gradient(900px 520px at 82% 0%, rgba(255, 196, 77, 0.18), transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  line-height: 1.45;
}

/* Full-page admin layout (keep topbar, remove outer page padding) */
:root { --topbar-h: 60px; }
.topbar { min-height: var(--topbar-h); }
.page { padding: 0; }

.shell {
  max-width: 1080px;
  margin: 0 auto;
}
.shell--center {
  max-width: 920px;
  margin: 60px auto;
}

.h1 { font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 10px; }
.h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 10px; }
.lead { font-size: 16px; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.hint { color: var(--muted-2); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}
.stack { display: grid; gap: 6px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 153, 229, 0.20), rgba(255, 196, 77, 0.22));
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}
.brand__text { font-size: 14px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
}
.userchip__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  object-fit: cover;
}
.userchip__avatar--fallback {
  background: linear-gradient(135deg, rgba(0, 153, 229, 0.28), rgba(255, 196, 77, 0.20));
}
.userchip__meta { display: grid; line-height: 1.1; }
.userchip__name { font-size: 12px; color: var(--text); }
.userchip__email { font-size: 11px; color: var(--muted-2); }

.actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,0.10); }
.btn:not(.btn--primary):hover { background: rgba(255, 255, 255, 0.92); }
.btn:active { transform: translateY(0px); }
.btn--primary {
  border-color: rgba(0, 153, 229, 0.35);
  background: rgba(0, 153, 229, 0.95);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 153, 229, 0.22);
}
.btn--primary:hover {
  background: rgba(0, 153, 229, 1);
  box-shadow: 0 14px 30px rgba(0, 153, 229, 0.26);
}

.btn__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  line-height: 1;
}
.btn--secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(0, 153, 229, 0.20);
  background: rgba(0, 153, 229, 0.10);
  color: rgba(2, 90, 132, 0.95);
}
.badge--danger {
  border-color: rgba(255, 107, 138, 0.25);
  background: rgba(255, 107, 138, 0.10);
  color: rgba(136, 19, 55, 0.96);
}

.card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--hero { padding: 22px; }
.card__title {
  font-size: 12px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.card__body { display: grid; gap: 12px; }

.app {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h));
}
.sidebar {
  border: 1px solid var(--sidebar-border);
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  border-radius: 0;
  padding: 14px;
  min-height: calc(100vh - var(--topbar-h));
  box-shadow: var(--shadow);
}
.sidebar__brand {
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}
.sidebar__brand-title { color: var(--sidebar-text); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav__item {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__item:hover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.07);
}
.nav__icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.75); }
.content {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0;
  padding: 24px;
  box-shadow: var(--shadow);
  min-height: calc(100vh - var(--topbar-h));
}
.content__header { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.grid > .card:nth-child(1) { grid-column: span 6; }
.grid > .card:nth-child(2) { grid-column: span 6; }

.alerts { display: grid; gap: 10px; margin: 0 0 14px; }
.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 14px;
}
.alert--success {
  border-color: rgba(0, 153, 229, 0.22);
  background: rgba(0, 153, 229, 0.08);
}
.alert--error {
  border-color: rgba(225, 29, 72, 0.22);
  background: rgba(225, 29, 72, 0.08);
}

.nav__item--active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.09);
}

.card__footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 10px; }
.card__meta { font-size: 13px; color: var(--muted); }
.card__title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.card--wide { grid-column: span 12 !important; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.72);
}
.status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}
.status--ok .status__dot {
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}
.status--running .status__dot {
  background: rgba(245, 158, 11, 0.98);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.96);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  color: var(--text);
}
.input:focus {
  border-color: rgba(0, 153, 229, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 153, 229, 0.10);
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.96);
  padding: 0 12px;
  height: 44px;
}
.searchbar__icon { color: rgba(15, 23, 42, 0.40); }
.searchbar__input {
  border: 0;
  outline: none;
  height: 42px;
  width: 100%;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}
.table th, .table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-size: 14px;
}
.table th { color: rgba(15, 23, 42, 0.65); font-weight: 700; background: rgba(15, 23, 42, 0.02); }
.table tr:last-child td { border-bottom: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.70);
}
.pill--active {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.10);
  color: rgba(21, 128, 61, 0.95);
}
.pill--inactive {
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(100, 116, 139, 0.10);
  color: rgba(51, 65, 85, 0.95);
}

.kpi { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border: 1px solid rgba(15,23,42,0.10); background: rgba(255,255,255,0.70); border-radius: var(--radius-sm); }
.kpi__label { color: var(--muted-2); font-size: 12px; }
.kpi__value { color: var(--text); font-weight: 700; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .grid > .card:nth-child(1),
  .grid > .card:nth-child(2) { grid-column: span 12; }
}
