.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.auth-shell {
  width: min(440px, calc(100% - 32px));
  position: relative;
  z-index: 1;
}
.auth-card,
.manage-card,
.manage-hero,
.admin-stats article {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.auth-card {
  padding: 34px;
}
.auth-brand img {
  width: 230px;
  max-width: 100%;
  margin-bottom: 24px;
}
.auth-card h1,
.manage-hero h1,
.manage-card h1,
.manage-card h2 { margin: 0 0 10px; }
.auth-muted { color: var(--muted); margin-top: 0; }
.stack-form { display: grid; gap: 16px; margin-top: 20px; }
.stack-form label { display: grid; gap: 7px; font-weight: 700; color: #2e3948; }
.stack-form input,
.stack-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
}
.stack-form input:focus,
.stack-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36,120,183,.12);
}
.stack-form small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.stack-form ul.errorlist { margin: 0; padding-left: 18px; color: var(--danger); font-weight: 600; }
.btn.full { width: 100%; justify-content: center; }
.message-list { display: grid; gap: 8px; margin: 0 0 18px; }
.message {
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid rgba(36,120,183,.16);
  font-weight: 700;
}
.message.error { background: #fff0f0; color: var(--danger); border-color: rgba(224,49,49,.25); }
.manage-container {
  max-width: 1240px;
  margin: 36px auto 72px;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}
.manage-container.narrow { max-width: 720px; }
.manage-hero {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.manage-hero p { color: var(--muted); margin-bottom: 0; max-width: 720px; }
.top-actions,
.hero-actions.compact,
.form-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.admin-stats article { padding: 20px; }
.admin-stats span { display: block; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.admin-stats strong { font-size: 32px; color: var(--blue-dark); }
.manage-card { padding: 24px; margin-top: 20px; }
.panel-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #53606f; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td code { background: #f2f6fa; padding: 4px 6px; border-radius: 8px; color: #29384a; }
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  margin: 2px 3px 2px 0;
  font-size: 12px;
  font-weight: 800;
  background: #f1f3f6;
  color: var(--muted);
}
.status-pill.ok { background: rgba(25,199,111,.12); color: #0b7d44; }
.status-pill.off { background: rgba(224,49,49,.1); color: #a11d1d; }
.small-link,
.link-button {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.small-link:hover,
.link-button:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.form-card { padding: 30px; }
.stack-form.wide { gap: 18px; }
.checkbox-line { display: flex !important; align-items: center; gap: 10px !important; }
.checkbox-line input { width: auto; }
.procedure-card ol { margin: 12px 0 0; padding-left: 22px; color: #334155; line-height: 1.65; }
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f2f6fa;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
@media (max-width: 760px) {
  .manage-hero { flex-direction: column; align-items: stretch; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions { justify-content: flex-end; }
}
@media (max-width: 520px) {
  .auth-card, .manage-card, .manage-hero { border-radius: 18px; padding: 22px; }
  .admin-stats { grid-template-columns: 1fr; }
}
