:root {
  --bg: #f3f6fa;
  --card: #fff;
  --ink: #142033;
  --muted: #6b778c;
  --line: #e4e9f1;
  --brand: #172554;
  --brand2: #2447a6;
  --accent: #0f766e;
  --danger: #b42318;
  --warn: #b54708;
  --good: #067647;
  --sidebar: #0d1730;
  --sidebar2: #121f3d;
  --shadow: 0 8px 24px rgba(16, 32, 64, 0.06);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}
body {
  font-size: 14px;
  line-height: 1.45;
}
a {
  color: var(--brand2);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
  color: #dbe5ff;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.brand strong {
  display: block;
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.2px;
}
.brand span {
  display: block;
  color: #94a3c7;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.brand-mark.large {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 24px;
  margin: auto;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  padding-right: 2px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #becbea;
  font-size: 13px;
  font-weight: 600;
  transition: 0.15s;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-link.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.nav-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}
.sidebar-foot {
  margin-top: auto;
  padding: 14px 9px 2px;
  color: #9daccc;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-foot small {
  float: right;
}
.status-dot,
.service i,
.live-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.12);
}
.main-wrap {
  margin-left: 242px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 68px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.page-head h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 750;
}
.page-head span {
  font-size: 11px;
  color: var(--muted);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.domain-switch select,
.mobile-tools {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 28px 0 10px;
  color: var(--ink);
  max-width: 220px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #e8eefc;
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.15;
}
.user-chip strong {
  font-size: 12px;
}
.user-chip small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.content {
  padding: 20px 24px 28px;
  flex: 1;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}
.footer {
  padding: 14px 24px 20px;
  text-align: center;
  font-size: 11px;
  color: #8792a6;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h2 {
  font-size: 16px;
  margin: 0 0 4px;
}
.card h3 {
  font-size: 14px;
  margin: 14px 0 8px;
}
.card p {
  color: var(--muted);
  margin: 3px 0 14px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.card-head p {
  margin: 2px 0 0;
  font-size: 12px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metric {
  padding: 15px 16px;
}
.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  font-weight: 700;
}
.metric-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 5px 0 7px;
}
.metric-value.small {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin-top: 9px;
}
.metric small {
  color: var(--muted);
  font-size: 11px;
}
.meter {
  height: 5px;
  background: #edf1f6;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 7px;
}
.meter span {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--brand2));
  border-radius: 20px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.two-col.wide-left {
  grid-template-columns: 1.7fr 0.8fr;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mini-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.mini-stat span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}
.mini-stat strong {
  display: block;
  font-size: 14px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th,
td {
  text-align: left;
  padding: 10px 9px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: #7c8798;
  background: #fafbfc;
  white-space: nowrap;
}
td {
  font-size: 12px;
}
tr:last-child td {
  border-bottom: none;
}
td code {
  display: block;
  font-size: 11px;
  color: #536078;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}
.badge.good {
  background: #ecfdf3;
  color: var(--good);
}
.badge.warn {
  background: #fff7ed;
  color: var(--warn);
}
.badge.neutral {
  background: #eef2f7;
  color: #475467;
}
.live-pill {
  font-size: 10px;
  color: var(--good);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.live-pill i {
  width: 6px;
  height: 6px;
}
.process-list > div,
.service-admin-list > div,
.simple-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f5;
}
.process-list > div:last-child,
.service-admin-list > div:last-child,
.simple-list > div:last-child {
  border-bottom: 0;
}
.process-list span {
  min-width: 0;
}
.process-list strong,
.process-list small {
  display: block;
}
.process-list small {
  font-size: 10px;
  color: var(--muted);
}
.process-list b {
  margin-left: auto;
  font-size: 11px;
}
.process-list em {
  font-size: 10px;
  color: var(--muted);
  font-style: normal;
  min-width: 60px;
  text-align: right;
}
.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.service {
  display: inline-flex;
  align-items: center;
  background: #f7f9fc;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}
.service.bad i {
  background: #f04438;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}
.info-strip {
  border: 1px solid #dce5f3;
  background: #f7faff;
  border-radius: 10px;
  padding: 11px 13px;
  color: #536078;
  font-size: 12px;
  margin: 14px 0;
}
.info-strip strong {
  color: var(--ink);
}
.alert {
  border-radius: 9px;
  padding: 11px 13px;
  margin: 0 0 14px;
  font-weight: 600;
}
.alert-success {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #067647;
}
.alert-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}
.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
}
.btn-primary {
  background: var(--brand2);
  color: #fff;
}
.btn-primary:hover {
  background: #193b91;
}
.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: #344054;
}
.btn-ghost:hover {
  background: #f8fafc;
}
.btn-danger {
  background: #fff;
  border-color: #fecdca;
  color: var(--danger);
}
.btn-danger:hover {
  background: #fef3f2;
}
.btn-sm {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 11px;
}
.btn-xs {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 10px;
}
.btn-block {
  width: 100%;
}
.inline-form {
  display: inline;
}
.actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.actions form {
  margin: 0;
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.stack-form label,
.row-form label {
  font-size: 11px;
  font-weight: 700;
  color: #475467;
}
.stack-form input,
.stack-form select,
.stack-form textarea,
.row-form input,
.row-form select,
.row-form textarea {
  width: 100%;
  margin-top: 5px;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  outline: none;
}
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.row-form input:focus,
.row-form select:focus,
.row-form textarea:focus {
  border-color: #8aa6e8;
  box-shadow: 0 0 0 3px rgba(36, 71, 166, 0.08);
}
.row-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.row-form > input,
.row-form > select {
  height: 36px;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  padding: 0 9px;
}
.row-form .grow {
  flex: 1;
  min-width: 180px;
}
.form-divider {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 2px;
}
.form-actions {
  margin-top: 10px;
}
.muted {
  color: var(--muted) !important;
  font-weight: 400;
}
.mono,
code,
.code-editor,
.log-view {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.block {
  display: block;
}
.danger-zone {
  border-color: #fecdca;
}
.domain-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.domain-cards a {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  background: #fafcff;
}
.domain-cards strong,
.domain-cards span {
  display: block;
}
.domain-cards span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.domain-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.domain-tab {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #566176;
  font-size: 11px;
  font-weight: 700;
}
.domain-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.file-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
}
.breadcrumbs {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  overflow: auto;
  font-size: 11px;
}
.toolbar-actions {
  display: flex;
  gap: 6px;
}
.file-card {
  padding: 0;
  overflow: hidden;
}
.file-table .file-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #253a63;
  font-weight: 650;
}
.file-table .file-name span {
  color: #7c8aa7;
}
.upload-label {
  position: relative;
}
.hidden-upload {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.hidden-upload input[type="file"] {
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.editor-card {
  margin-top: 12px;
}
.code-editor {
  width: 100%;
  min-height: 410px;
  resize: vertical;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
  font-size: 12px;
  white-space: pre;
  tab-size: 4;
}
.secret-box {
  border: 1px solid #b2ddff;
  background: #eff8ff;
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 14px;
}
.secret-box strong,
.secret-box code,
.secret-box small {
  display: block;
}
.secret-box code {
  background: #fff;
  border: 1px solid #d5e7f6;
  padding: 7px 9px;
  border-radius: 7px;
  margin-top: 7px;
  user-select: all;
  word-break: break-all;
}
.secret-box small {
  color: #475467;
  margin-top: 8px;
}
dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.25);
  width: min(460px, calc(100vw - 30px));
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
dialog form {
  padding: 20px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.dns-value {
  max-width: 520px;
  word-break: break-word;
}
.ssl-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.ssl-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  background: #f2f4f7;
  color: #667085;
}
.ssl-status.valid .ssl-ring {
  background: #ecfdf3;
  color: var(--good);
}
.detail-list {
  margin: 0;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f5;
}
.detail-list > div:last-child {
  border-bottom: 0;
}
.detail-list dt {
  font-size: 11px;
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}
.detail-list.compact > div {
  padding: 5px 0;
}
.button-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.cron-presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.cron-presets button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 10px;
  color: #596579;
}
.wrap-code {
  white-space: normal !important;
  word-break: break-all !important;
  max-width: 580px !important;
}
.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 5px;
  background: #fff;
}
.input-suffix input {
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.input-suffix span {
  padding: 0 9px;
  font-size: 11px;
  color: #667085;
  white-space: nowrap;
  border-left: 1px solid var(--line);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 17px 0;
}
.simple-list span strong,
.simple-list span small {
  display: block;
}
.simple-list span small {
  font-size: 10px;
  color: var(--muted);
}
.dns-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: #fafcff;
}
.dns-card strong,
.dns-card code {
  display: block;
}
.dns-card code {
  margin-top: 6px;
  font-size: 10px;
}
.dns-card p {
  font-size: 10px;
  margin: 7px 0 0;
}
.break-all {
  word-break: break-all;
}
.log-view {
  background: #0b1220;
  color: #c8d4ea;
  border-radius: 9px;
  padding: 12px;
  min-height: 180px;
  max-height: 350px;
  overflow: auto;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.architecture {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 4px;
}
.architecture div {
  border: 1px solid var(--line);
  background: #fafcff;
  border-radius: 9px;
  padding: 12px;
  text-align: center;
  font-weight: 750;
}
.architecture div small {
  color: var(--muted);
  font-weight: 500;
}
.architecture span {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.good-text {
  color: var(--good) !important;
  font-weight: 650;
}
.hero-tool {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 780px;
}
.tool-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #eaf0ff;
  color: var(--brand2);
  font-weight: 900;
  display: grid;
  place-items: center;
}
.empty {
  text-align: center;
  padding: 46px 20px;
}
.empty h3 {
  font-size: 18px;
}
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 20% 10%, #e8efff, transparent 35%),
    linear-gradient(160deg, #f8fafc, #edf2f9);
}
.login-card {
  width: min(410px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(19, 35, 68, 0.12);
}
.login-brand {
  text-align: center;
  margin-bottom: 20px;
}
.login-brand h1 {
  font-size: 22px;
  margin: 10px 0 2px;
}
.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.login-form label {
  font-size: 11px;
  font-weight: 700;
  color: #475467;
}
.login-note {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 15px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-only {
  display: none;
}
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
}
.login-card .alert {
  font-size: 12px;
}
@media (max-width: 1180px) {
  .dashboard-grid,
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col,
  .two-col.wide-left {
    grid-template-columns: 1fr;
  }
  .three-col {
    grid-template-columns: 1fr;
  }
  .user-chip div {
    display: none;
  }
  .domain-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
  }
  .main-wrap {
    margin-left: 0;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    padding: 0 12px;
    height: 62px;
  }
  .page-head {
    display: none;
  }
  .top-actions {
    margin-left: auto;
  }
  .domain-switch select {
    max-width: 150px;
  }
  .mobile-tools {
    max-width: 115px;
  }
  .content {
    padding: 14px 12px 22px;
  }
  .dashboard-grid,
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .user-chip {
    display: none;
  }
  .file-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .domain-cards {
    grid-template-columns: 1fr;
  }
  .architecture span {
    display: none;
  }
}
@media (max-width: 520px) {
  .dashboard-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }
  .domain-switch {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .content {
    padding: 10px;
  }
  .card {
    border-radius: 10px;
    padding: 14px;
  }
  .metric-value {
    font-size: 24px;
  }
  .row-form {
    align-items: stretch;
    flex-direction: column;
  }
  .row-form > input,
  .row-form > select,
  .row-form > .grow,
  .row-form > .btn {
    width: 100%;
  }
  .three-col {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 22px;
  }
}
.brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: none;
}
.login-logo {
  display: block;
  width: min(260px, 90%);
  height: auto;
  margin: 0 auto 10px;
}
.help-link {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.footer a,
.login-footer a {
  color: var(--brand2);
  font-weight: 650;
}
.login-footer {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 18px;
}
.recovery-codes {
  margin-bottom: 14px;
  border-color: #b2ddff;
}
.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.recovery-grid code {
  display: block;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  text-align: center;
  user-select: all;
}
@media (max-width: 820px) {
  .help-link {
    display: none;
  }
}
@media (max-width: 520px) {
  .recovery-grid {
    grid-template-columns: 1fr;
  }
}

/* RC18 visual refinement: presentation only; routes and form contracts remain unchanged. */
:root {
  --bg: #f4f7fb;
  --card: #fff;
  --ink: #111d33;
  --muted: #66748b;
  --line: #dfe6f0;
  --brand: #142653;
  --brand2: #2458c5;
  --accent: #0b7f76;
  --sidebar: #0c1730;
  --sidebar2: #14264a;
  --shadow: 0 10px 30px rgba(22, 38, 73, 0.065);
  --shadow-raised: 0 18px 46px rgba(18, 35, 70, 0.12);
  --focus: 0 0 0 3px rgba(36, 88, 197, 0.18);
  color-scheme: light;
}
html {
  scroll-behavior: smooth;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection {
  background: #dbe7ff;
  color: #0f2250;
}
a,
.btn,
.nav-link,
.domain-tab,
.domain-cards a,
.icon-btn,
input,
select,
textarea {
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
  border-color: #7b9ee5;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 9px 13px;
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  box-shadow: var(--shadow-raised);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}
.sidebar {
  width: 256px;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, #0b1630 0%, #102144 58%, #13284d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 12px 0 42px rgba(9, 20, 45, 0.1);
}
.main-wrap {
  margin-left: 256px;
}
.brand {
  padding: 3px 8px 19px;
  margin-bottom: 12px;
}
.brand-icon {
  width: 38px;
  height: 38px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.brand strong {
  font-size: 18px;
  letter-spacing: 0.1px;
}
.brand span {
  margin-top: 2px;
  color: #9eafd2;
}
.nav-list {
  gap: 3px;
  padding: 1px 3px 8px 0;
  scrollbar-width: thin;
  scrollbar-color: #30456d transparent;
}
.nav-link {
  position: relative;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #c3cfee;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.07);
  transform: translateX(1px);
}
.nav-link.active {
  background: linear-gradient(135deg, #fff, #f1f5ff);
  color: #18336f;
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #74a2ff;
}
.sidebar-foot {
  margin-top: 12px;
  padding-top: 15px;
}
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(8, 17, 36, 0.56);
  backdrop-filter: blur(2px);
  z-index: 35;
}
.topbar {
  height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(150%) blur(14px);
  box-shadow: 0 4px 18px rgba(25, 45, 81, 0.035);
}
.page-head h1 {
  font-size: 20px;
  letter-spacing: -0.25px;
}
.page-head span {
  display: block;
  margin-top: 2px;
}
.content {
  padding: 27px 30px 36px;
  max-width: 1720px;
}
.footer {
  padding: 12px 30px 24px;
}
.card,
.mini-stat {
  border-color: #e0e7f1;
  box-shadow: var(--shadow);
}
.card {
  border-radius: 14px;
  padding: 20px;
}
.card h2 {
  font-size: 16px;
  letter-spacing: -0.1px;
}
.card h3 {
  letter-spacing: -0.05px;
}
.card-head {
  margin-bottom: 16px;
}
.metric {
  position: relative;
  overflow: hidden;
  border-top: 3px solid #dbe6fb;
}
.metric:nth-child(2) {
  border-top-color: #d5eee9;
}
.metric:nth-child(3) {
  border-top-color: #e6ddf7;
}
.metric:nth-child(4) {
  border-top-color: #f4e1d2;
}
.metric-value {
  color: #10234b;
}
.mini-stat {
  border-radius: 11px;
}
.table-wrap {
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: #b8c5d9 transparent;
}
table {
  font-variant-numeric: tabular-nums;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 10px;
  background: #f7f9fc;
  color: #637188;
}
td {
  padding: 11px 10px;
}
tbody tr {
  transition: background-color 0.14s ease;
}
tbody tr:hover {
  background: #f8faff;
}
.badge {
  gap: 5px;
  padding: 4px 9px;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
}
.btn {
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(16, 30, 56, 0.04);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(16, 30, 56, 0.09);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(135deg, #285fce, #204cae);
  border-color: #204cae;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2458c5, #193f96);
}
.btn[disabled],
button[disabled],
input[disabled],
select[disabled],
textarea[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}
.stack-form input,
.stack-form select,
.stack-form textarea,
.row-form input,
.row-form select,
.row-form textarea {
  min-height: 39px;
  border-color: #cfd9e7;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(17, 35, 67, 0.025);
}
.stack-form textarea,
.row-form textarea {
  line-height: 1.55;
}
.stack-form input:hover,
.stack-form select:hover,
.stack-form textarea:hover,
.row-form input:hover,
.row-form select:hover,
.row-form textarea:hover {
  border-color: #aebcd1;
}
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.row-form input:focus,
.row-form select:focus,
.row-form textarea:focus {
  border-color: #7598df;
  box-shadow: var(--focus);
}
fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
legend {
  padding: 0 6px;
  color: #45536a;
  font-size: 11px;
  font-weight: 800;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.checkbox-grid label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid #e6ebf2;
  border-radius: 7px;
  background: #fafcff;
  font-weight: 600;
}
.checkbox-grid input {
  width: auto !important;
  min-height: 0 !important;
  margin: 2px 0 0 !important;
  accent-color: var(--brand2);
}
.domain-tab {
  border-radius: 9px;
}
.domain-tab:hover,
.domain-cards a:hover {
  border-color: #b8c8e1;
  background: #f5f8ff;
  box-shadow: 0 6px 18px rgba(22, 47, 93, 0.07);
}
.domain-tab.active {
  background: linear-gradient(135deg, #172b59, #224782);
}
.info-strip {
  border-color: #d7e3f5;
  background: linear-gradient(135deg, #f8fbff, #f4f8ff);
}
.alert {
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(16, 35, 69, 0.04);
}
.danger-zone {
  background: linear-gradient(180deg, #fff, #fffafa);
}
dialog {
  border: 1px solid #e1e7f0;
  border-radius: 15px;
  box-shadow: 0 30px 90px rgba(10, 23, 50, 0.28);
}
.log-view {
  border: 1px solid #1b2b47;
  background: linear-gradient(180deg, #0b1425, #0a1220);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}
.login-body {
  background: radial-gradient(
      circle at 12% 8%,
      rgba(66, 117, 226, 0.18),
      transparent 32%
    ),
    radial-gradient(
      circle at 88% 82%,
      rgba(20, 144, 132, 0.12),
      transparent 30%
    ),
    linear-gradient(145deg, #f8fbff, #eef3fa);
}
.login-card {
  border-radius: 20px;
  padding: 32px;
  border-color: rgba(214, 224, 238, 0.9);
  box-shadow: 0 28px 80px rgba(18, 36, 70, 0.15);
}
.login-logo {
  width: min(245px, 88%);
}
.login-brand h1 {
  font-size: 24px;
  letter-spacing: -0.35px;
}
.icon-btn {
  place-items: center;
  color: #31405a;
}
.avatar {
  border-radius: 10px;
  background: linear-gradient(135deg, #eaf0ff, #dce7ff);
  box-shadow: inset 0 0 0 1px #d3def3;
}
.user-chip {
  min-height: 38px;
}
.page-actions {
  justify-content: flex-end;
}
.secret-box {
  box-shadow: 0 7px 22px rgba(34, 91, 140, 0.055);
}
@media (max-width: 1180px) {
  .content {
    padding: 23px 22px 30px;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  body.nav-open {
    overflow: hidden;
  }
  .mobile-only.icon-btn {
    display: inline-grid;
  }
  .sidebar {
    width: 264px;
  }
  .main-wrap {
    margin-left: 0;
  }
  .sidebar-scrim:not([hidden]) {
    display: block;
  }
  .topbar {
    height: 64px;
    padding: 0 13px;
  }
  .content {
    padding: 16px 13px 25px;
  }
  .card {
    padding: 17px;
  }
  .nav-link {
    min-height: 42px;
  }
}
@media (max-width: 520px) {
  .content {
    padding: 11px;
  }
  .card {
    padding: 15px;
  }
  .topbar {
    padding: 0 10px;
  }
  .login-card {
    padding: 24px 21px;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  th,
  td {
    padding: 10px 8px;
  }
  .btn:hover {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
