:root {
  --bg: #eef3fb;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --sidebar: #0f172a;
  --sidebar-soft: #1e293b;
  --danger: #dc2626;
  --warning: #b45309;
  --ok: #047857;
  --running: #7c3aed;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32rem), linear-gradient(135deg, #eef3fb 0%, #f8fafc 42%, #eaf2ff 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.35), transparent 16rem), linear-gradient(180deg, #101827 0%, #0f172a 48%, #111827 100%);
  color: #ffffff;
  box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 7px 24px;
  color: #ffffff;
}

.brand:hover {
  color: #ffffff;
}

.brand-copy strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.brand-copy small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.32);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #cbd5e1;
  font-weight: 750;
  transition: 160ms ease;
}
.side-nav-link:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.side-nav-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
.side-nav-link.logout-link {
  margin-top: 12px;
  color: #fecaca;
}
.side-nav-link.update-link {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.06));
  position: relative;
  font-weight: 700;
}
.side-nav-link.update-link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #f59e0b;
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  animation: update-pulse 1.6s ease-out infinite;
}
@keyframes update-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  }
  70% {
    box-shadow: 0 0 0 0.55rem rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}
.side-nav-link.update-link .nav-icon {
  color: #92400e;
  background: rgba(245, 158, 11, 0.22);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #bfdbfe;
  padding: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer small,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer small {
  color: #cbd5e1;
}

.sidebar-footer strong {
  color: #ffffff;
}

.connected-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.user-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.user-avatar svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-copy {
  min-width: 0;
}

.user-copy strong,
.user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy small {
  margin-top: 2px;
  font-size: 10px;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 11px 4px 2px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-logout svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-content {
  width: min(1660px, 100%);
  padding: 26px clamp(18px, 3vw, 42px) 46px;
}

.auth-container {
  width: min(460px, 100%);
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)), radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 22rem);
  box-shadow: var(--shadow);
}

.page-title h1,
.login-card h1 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-title p,
.login-card p,
.hero-card p,
.card-subtitle,
.empty-state p {
  margin: 0;
  color: var(--muted);
}

.card,
.login-card,
.site-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card,
.login-card {
  padding: clamp(20px, 3vw, 28px);
}

.card {
  overflow-x: auto;
}

.login-card {
  width: 100%;
}

.login-card .alert {
  margin-top: 18px;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 750;
}

input[type=text],
input[type=password],
input[type=email],
input[type=number],
input[type=url],
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: 160ms ease;
}

input:hover,
select:hover {
  border-color: #94a3b8;
}

input:focus,
select:focus {
  outline: 4px solid rgba(37, 99, 235, 0.16);
  border-color: var(--primary);
}

input:disabled,
select:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.checkbox {
  grid-template-columns: 22px 1fr;
  align-items: center;
  font-weight: 650;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.form-actions {
  grid-column: 1/-1;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #ffffff;
  font-weight: 850;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transition: 160ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #ffffff;
}

.button.secondary {
  background: #eef2ff;
  color: #1e3a8a;
  box-shadow: none;
}

.button.secondary:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.button.small {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 13px;
}

.button.danger,
button.danger {
  background: linear-gradient(135deg, var(--danger), #ef4444);
}

.button.danger:hover,
button.danger:hover {
  background: linear-gradient(135deg, #b91c1c, var(--danger));
}

.button.warning,
button.warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.button.warning:hover,
button.warning:hover {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.site-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.site-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.site-card h2 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.site-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.site-meta div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.site-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-meta dd {
  margin: 0;
  color: #0f172a;
  font-weight: 750;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 44px 24px;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  color: #0f172a;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nowrap {
  white-space: nowrap;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  background: #e5e7eb;
  color: #374151;
}

.badge.ok {
  background: #d1fae5;
  color: var(--ok);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

.badge.running {
  background: #ede9fe;
  color: var(--running);
}

.badge.warning {
  background: #ffedd5;
  color: #c2410c;
}

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
.alert:first-child {
  margin-top: 0;
}
.alert:last-child {
  margin-bottom: 0;
}
.alert.ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.alert.ok *, .alert.ok {
  color: var(--ok);
}
.alert.danger,
.alert .error {
  color: var(--danger);
}
.alert.warning {
  border-color: #fde68a;
  background: #fffbeb;
}
.alert.warning *, .alert.warning {
  color: var(--warning);
}
.alert a {
  text-decoration: underline;
}

.error,
.alert.alert-danger {
  border-color: #fecaca;
  background: #fef2f2;
}
.error *, .error,
.alert.alert-danger *,
.alert.alert-danger {
  color: #991b1b;
}
.error code,
.alert.alert-danger code {
  background: #fee2e2;
}

.error {
  padding: 7px;
  display: inline-block;
  border-radius: 7px;
  margin-bottom: 6px;
}

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

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.hero-card.inverse {
  flex-direction: column;
  align-items: stretch;
}

.hero-card h2,
.card h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.moodle-disable-dialog {
  width: min(560px, 100% - 32px);
  border: 0;
  border-radius: 22px;
  padding: 24px;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.moodle-disable-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.moodle-disable-dialog h2 {
  margin: 0 0 8px;
}

.moodle-disable-dialog p {
  margin: 0;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

.details-table th {
  width: 180px;
}

.details-table td small,
.diagnostic-message {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

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

.stat-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  text-align: center;
}
.stat-box h3 {
  margin: 0;
}
.stat-box span,
.stat-box small {
  display: block;
  color: var(--muted);
}
.stat-box strong {
  display: block;
  margin: 6px 0;
  color: #0f172a;
  font-size: 32px;
  letter-spacing: -0.04em;
}
.stat-box.compact-alert {
  margin: 14px 0 0;
}

.debug-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.debug-control strong {
  margin-right: 8px;
}

.inline-form {
  margin: 0;
}

.full-card {
  grid-column: 1/-1;
}

.card-subtitle {
  margin: 0 0 16px;
}

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

.flag-control {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.flag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.flag-control p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.flag-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.split-actions {
  justify-content: space-between;
}

.flag-value-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 360px;
}

.flag-value-form input[type=email] {
  flex: 1 1 220px;
}

.log-danger {
  color: var(--danger);
  font-weight: 850;
}

.job-log {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: break-spaces;
}

body.auth-page.onboarding-page {
  place-items: start center;
}

.onboarding-page .auth-container {
  width: min(980px, 100%);
  padding: 28px 0;
}
.onboarding-hero {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92)), radial-gradient(circle at top right, rgba(37, 99, 235, 0.24), transparent 24rem);
}

.setup-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.setup-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.setup-progress-step + .setup-progress-step::before {
  position: absolute;
  top: 17px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: #cbd5e1;
  content: "";
  transform: translateY(-50%);
}

.setup-progress-step > span {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: #64748b;
  font-weight: 900;
}

.setup-progress-step.is-active,
.setup-progress-step.is-complete {
  color: var(--primary-dark);
}

.setup-progress-step.is-active > span,
.setup-progress-step.is-complete > span {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.setup-progress-step.is-active::before,
.setup-progress-step.is-complete::before {
  background: var(--primary);
}

.onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 18px;
}

.onboarding-step {
  width: min(680px, 100%);
  margin: 0 auto;
}

.setup-guide-inline {
  display: grid;
  gap: 18px;
}

.setup-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.setup-step-actions.is-next {
  justify-content: flex-end;
}

.setup-guide {
  display: grid;
  gap: 18px;
}

.setup-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  grid-column: 1/-1;
}

.setup-section-heading > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(37, 99, 235, 0.22);
}

.setup-section-heading h2 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.25;
}

.setup-section-heading p,
.setup-alert p,
.setup-steps p,
.setup-note p {
  margin: 0;
  color: var(--muted);
}

.setup-section-spaced {
  margin-top: 10px;
}

.setup-alert {
  display: grid;
  gap: 4px;
  margin: 0;
}

.setup-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 22px;
}

.setup-steps li {
  padding-left: 4px;
}

.setup-steps li::marker {
  color: var(--primary);
  font-weight: 900;
}

.setup-steps li > strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.setup-dns-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}

.setup-dns-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 11px;
  background: #f8fafc;
}

.setup-dns-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.setup-dns-grid dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.setup-command {
  margin: 10px 0 0;
  border-radius: 14px;
  padding: 13px 14px;
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
}

.setup-command code {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  white-space: pre-wrap;
}

.setup-note {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 14px 16px;
  background: #eff6ff;
}

.setup-note strong {
  color: #1e3a8a;
}

.setup-complete {
  display: grid;
  justify-items: center;
  width: min(680px, 100%);
  margin: clamp(20px, 8vh, 72px) auto 0;
  text-align: center;
}

.setup-complete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: #d1fae5;
  color: var(--ok);
  font-size: 38px;
  font-weight: 900;
}

.setup-complete h1 {
  margin: 4px 0 8px;
  color: #0f172a;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.04em;
}

.setup-complete > p {
  margin: 0;
  color: var(--muted);
}

.setup-credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 24px 0 18px;
}

.setup-credentials div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}

.setup-credentials dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-credentials dd {
  margin: 8px 0 0;
}

.setup-credentials code {
  font-size: 16px;
  font-weight: 850;
}

.setup-complete .setup-alert {
  width: 100%;
  margin-bottom: 18px;
  text-align: left;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .sidebar {
    padding: 20px;
  }
}
@media (max-width: 920px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border-radius: 0 0 26px 26px;
  }
  .brand {
    padding-bottom: 14px;
  }
  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .side-nav-link {
    justify-content: center;
    min-height: 44px;
    padding: 10px;
    font-size: 13px;
  }
  .side-nav-link:hover {
    transform: none;
  }
  .nav-icon {
    display: none;
  }
  .sidebar-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 12px;
  }
  .connected-user-link {
    min-width: 0;
    flex: 1;
  }
  .sidebar-language-selector {
    display: none;
  }
  .sidebar-logout {
    flex: 0 0 auto;
    margin-top: 0;
    border-top: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    padding: 8px 2px 8px 14px;
  }
  .main-content {
    padding: 22px 16px 40px;
  }
  .page-title,
  .hero-card,
  .debug-control {
    align-items: flex-start;
    flex-direction: column;
  }
  .details-grid,
  .flag-grid,
  .onboarding-layout {
    grid-template-columns: 1fr;
  }
  .hero-actions,
  .hero-actions .button,
  .page-title .button {
    width: 100%;
  }
}
@media (max-width: 640px) {
  body.auth-page {
    padding: 14px;
  }
  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-title {
    border-radius: 22px;
  }
  .site-card-header,
  .flag-header,
  .flag-actions,
  .flag-value-form {
    align-items: stretch;
    flex-direction: column;
  }
  .flag-actions button,
  .flag-actions .button,
  .flag-value-form input[type=email] {
    width: 100%;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .setup-dns-grid,
  .setup-credentials {
    grid-template-columns: 1fr;
  }
  .setup-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .setup-progress-step strong {
    font-size: 11px;
  }
  .setup-step-actions,
  .setup-step-actions .button,
  .setup-step-actions button {
    width: 100%;
  }
  .setup-step-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .onboarding-page .auth-container {
    padding: 0;
  }
}
.language-selector {
  margin-top: 14px;
}
.language-selector small {
  display: block;
  margin-bottom: 6px;
  opacity: 0.75;
}

.language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.language-options .language-option {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  line-height: 1;
  padding: 6px 8px;
  text-decoration: none;
}
.language-options .language-option img {
  border-radius: 2px;
  display: block;
  height: 14px;
  object-fit: cover;
  width: 20px;
}
.language-options .language-option.is-active {
  font-weight: 700;
}
.language-options.language-options-loged .language-option span {
  color: #ffffff;
}

.sidebar-language-selector {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding-top: 12px;
}

.update-waiting {
  margin-top: 1rem;
}

.update-waiting-meta {
  margin-top: 0.65rem;
  font-size: 0.875rem;
  opacity: 0.78;
}

.section-heading-actions,
.log-viewer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.resource-item {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.resource-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.resource-item strong {
  color: #0f172a;
  font-size: 21px;
}

.disk-progress {
  height: 12px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.disk-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.server-control-grid {
  display: grid;
  gap: 14px;
}

.server-control-item {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}
.server-control-item p {
  margin: 0;
  color: var(--muted);
}
.server-control-item .flag-actions {
  margin-top: auto;
}

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

.log-sources {
  display: grid;
  gap: 8px;
}

.log-source {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
}
.log-source.is-active {
  border-color: #93c5fd;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.log-filter-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin: 18px 0;
}
.log-filter-form .checkbox {
  min-height: 48px;
}

.log-line-count {
  display: block;
  margin: 10px 0 6px;
}

.server-log {
  min-height: 340px;
  max-height: 70vh;
  margin: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid #334155;
  border-radius: 16px;
  background: #0f172a;
  color: #dbeafe;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.job-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.job-cancel-form {
  display: inline-flex;
  margin-top: 12px;
}

.job-card-actions .job-cancel-form {
  margin-top: 0;
}

@media (max-width: 900px) {
  .resource-grid,
  .server-control-grid,
  .log-layout {
    grid-template-columns: 1fr;
  }
  .section-heading-actions,
  .log-viewer-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .log-filter-form {
    grid-template-columns: 1fr;
  }
}
.server-overview {
  margin-bottom: 22px;
}

.server-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.server-stat-card {
  --server-accent: #2563eb;
  --server-soft: #dbeafe;
  --server-border: #bfdbfe;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 155px;
  overflow: hidden;
  border: 1px solid var(--server-border);
  border-radius: 22px;
  padding: 19px;
  background: linear-gradient(145deg, #ffffff 15%, var(--server-soft) 145%);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}
.server-stat-card::after {
  position: absolute;
  z-index: 0;
  top: -56px;
  right: -48px;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: var(--server-accent);
  content: "";
  opacity: 0.08;
}
.server-stat-card.is-memory {
  --server-accent: #7c3aed;
  --server-soft: #ede9fe;
  --server-border: #ddd6fe;
}
.server-stat-card.is-load {
  --server-accent: #d97706;
  --server-soft: #fef3c7;
  --server-border: #fde68a;
}
.server-stat-card.is-environment {
  --server-accent: #059669;
  --server-soft: #d1fae5;
  --server-border: #a7f3d0;
}
.server-stat-card.is-storage {
  --server-accent: #2563eb;
  --server-soft: #dbeafe;
  --server-border: #bfdbfe;
}
.server-stat-card.is-sites {
  --server-accent: #2563eb;
  --server-soft: #dbeafe;
  --server-border: #bfdbfe;
}
.server-stat-card.is-users {
  --server-accent: #4f46e5;
  --server-soft: #e0e7ff;
  --server-border: #c7d2fe;
}
.server-stat-card.is-active {
  --server-accent: #0891b2;
  --server-soft: #cffafe;
  --server-border: #a5f3fc;
}
.server-stat-card.is-online {
  --server-accent: #16a34a;
  --server-soft: #dcfce7;
  --server-border: #bbf7d0;
}

.server-stat-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.server-stat-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--server-soft);
  color: var(--server-accent);
}
.server-stat-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.server-stat-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 18px;
  color: #0f172a;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.server-stat-caption {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}

.server-stat-progress {
  position: relative;
  z-index: 1;
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}
.server-stat-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--server-accent), color-mix(in srgb, var(--server-accent), white 28%));
}

.server-stat-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.server-stat-meta.has-three-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.server-stat-meta.is-stacked {
  grid-template-columns: 1fr;
}
.server-stat-meta span {
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.server-stat-meta b {
  display: block;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .server-overview-grid {
    grid-template-columns: 1fr;
  }
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-heading h1 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.dashboard-heading p {
  margin: 0;
  color: var(--muted);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.live-status i,
.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.11);
}

.dashboard-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button-icon,
.icon-button svg {
  width: 19px;
  height: 19px;
  min-height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon {
  margin-right: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-analytics-grid,
.dashboard-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-details-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
}

.dashboard-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 19px 10px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-heading > a {
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.panel-filter {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 9px;
  color: #475569;
  font-size: 11px;
}

.chart-legend {
  display: flex;
  gap: 18px;
  padding: 0 19px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend span::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.chart-legend .is-blue {
  color: #2563eb;
}

.chart-legend .is-violet {
  color: #7c3aed;
}

.line-chart {
  position: relative;
  padding: 2px 10px 8px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 230px;
}

.chart-grid line {
  stroke: #e2e8f0;
  stroke-dasharray: 4 4;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-active {
  stroke: #2563eb;
}

.chart-access {
  stroke: #7c3aed;
}

.axis-label {
  fill: #94a3b8;
  font-size: 10px;
}

.axis-left {
  fill: #2563eb;
}

.axis-right {
  fill: #7c3aed;
}

.chart-empty {
  position: absolute;
  inset: 50% 15% auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  transform: translateY(-50%);
}

.location-content {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1.1fr);
  align-items: center;
  gap: 10px;
  padding: 0 17px 7px;
}

.brazil-map {
  position: relative;
  min-height: 260px;
}

.brazil-map svg {
  display: block;
  width: 100%;
  height: 260px;
}

.brazil-shape {
  fill: #f8fafc;
  stroke: #cbd5e1;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.map-lines path {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.map-point,
.map-point-pulse {
  fill: #2563eb;
}

.map-point {
  stroke: #ffffff;
  stroke-width: 2;
  opacity: 0.82;
}

.map-point-pulse {
  opacity: 0.14;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.45);
}

.map-empty {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.location-list {
  display: grid;
}

.location-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 11px;
}

.location-list > div:last-child {
  border-bottom: 0;
}

.location-list span {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-list span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2563eb;
}

.location-list strong {
  color: #0f172a;
  font-size: 13px;
}

.location-list small {
  min-width: 32px;
  text-align: right;
}

.location-total {
  border-top: 1px solid var(--line);
  padding: 11px 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.location-total strong {
  margin-right: 4px;
  color: var(--primary);
  font-size: 18px;
}

.empty-inline {
  color: var(--muted);
  font-size: 11px;
}

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

.dashboard-table {
  min-width: 1060px;
}

.dashboard-table th,
.dashboard-table td {
  padding: 10px 12px;
  font-size: 11px;
}

.dashboard-table th:first-child,
.dashboard-table td:first-child {
  padding-left: 19px;
}

.dashboard-table th:last-child,
.dashboard-table td:last-child {
  padding-right: 19px;
}

.dashboard-table td > a {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}

.dashboard-table td > a strong,
.dashboard-table td > a small {
  grid-column: 2;
}

.dashboard-table td > a strong {
  color: var(--primary);
  font-size: 11px;
}

.dashboard-table td > a small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-dot {
  grid-row: 1/span 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.environment-dot.is-ok {
  background: #16a34a;
}

.environment-dot.is-warning {
  background: #f59e0b;
}

.environment-dot.is-danger {
  background: #ef4444;
}

.environment-dot.is-running {
  background: #2563eb;
}

.dashboard-empty {
  padding: 30px 20px;
  text-align: center;
}

.dashboard-empty h3 {
  margin: 0;
}

.dashboard-empty p {
  color: var(--muted);
}

.alert-list {
  display: grid;
}

.dashboard-alert {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 11px 16px;
}

.dashboard-alert:first-child {
  border-top: 0;
}

.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
}

.alert-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-alert.is-danger .alert-icon {
  background: #fef2f2;
  color: #ef4444;
}

.dashboard-alert.is-warning .alert-icon {
  background: #fffbeb;
  color: #f59e0b;
}

.dashboard-alert.is-info .alert-icon {
  background: #eff6ff;
  color: #2563eb;
}

.dashboard-alert.is-ok .alert-icon {
  background: #ecfdf5;
  color: #16a34a;
}

.dashboard-alert strong,
.dashboard-alert small {
  display: block;
}

.dashboard-alert strong {
  color: #0f172a;
  font-size: 11px;
}

.dashboard-alert small {
  margin-top: 2px;
  font-size: 9px;
}

.dashboard-alert > a {
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.mini-progress {
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

@media (max-width: 1240px) {
  .dashboard-analytics-grid,
  .dashboard-details-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .dashboard-heading,
  .dashboard-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-heading-actions .button,
  .dashboard-heading-actions .icon-button {
    width: 100%;
  }
  .location-content {
    grid-template-columns: 1fr;
  }
  .brazil-map {
    min-height: 220px;
  }
  .brazil-map svg {
    height: 220px;
  }
  .dashboard-alert {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .dashboard-alert > a {
    grid-column: 2;
  }
}

/*# sourceMappingURL=style.css.map */
