:root {
    color-scheme: light;
    --page: #eef3f8;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --table-head: #e7e9f4;
    --line: #e3e7ef;
    --line-strong: #d5dbe7;
    --text: #25364a;
    --muted: #718197;
    --primary: #2f7fc9;
    --primary-hover: #246cac;
    --danger: #ff3f79;
    --danger-hover: #e92c67;
    --success: #10b981;
    --success-hover: #079b6b;
    --shadow: 0 14px 40px rgba(30, 43, 75, .08);
    --radius: 8px;
    --header-height: 70px;
    --sidebar-width: 242px;
    --page-gutter: clamp(18px, 1.5vw, 28px);
    --content-max: 1720px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
    height: var(--header-height);
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 20;
    box-shadow: 0 2px 5px rgba(28, 43, 58, .08);
}
.brand-row, .topbar-title, .topbar-actions, .dialog-actions, .action-cell { display: flex; align-items: center; }
.brand-row { min-height: var(--header-height); padding: 10px 16px; gap: 12px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { color: #fff; font-size: 18px; letter-spacing: -.01em; }
.brand-row span { margin-top: 0; color: #91a6af; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #6584ef, #4764d6);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(86, 118, 232, .25);
}
.brand-mark.small { width: 40px; height: 40px; border-radius: 11px; }
.topbar-title { gap: 14px; }
.topbar-title strong { color: #33465b; font-size: 22px; font-weight: 500; }
.topbar-menu-icon { width: 38px; height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid #cfd8e2; border-radius: 3px; color: #617487; background: #f8fafc; transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.topbar-menu-icon:hover { color: #2f7fc9; border-color: #aebdcb; background: #eef5fb; }
.topbar-menu-icon:focus-visible { outline: 3px solid rgba(47, 127, 201, .22); outline-offset: 2px; }
.topbar-menu-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.topbar-actions { gap: 10px; padding: 0; }
.topbar-refresh { min-height: 40px; border-radius: 3px; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: #4f586d;
    font-size: 13px;
    font-weight: 650;
}
.topbar-actions form { margin: 0; }
.icon-control {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #566078;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.user-chip.icon-control { padding: 0; }
.icon-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.account-control { color: #ff6a00; }
.account-control .account-icon { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.button.button-ghost.icon-control { padding: 0; border-color: transparent; background: transparent; color: #2459c4; }
.logout-control { width: 42px; height: 42px; min-height: 42px; flex: 0 0 42px; }
.logout-control .logout-icon { width: 28px !important; height: 28px !important; max-width: none; flex: 0 0 28px; display: block; fill: currentColor; stroke: none; }
.icon-control:hover, .button.button-ghost.icon-control:hover { background: #eef2ff; transform: translateY(-1px); }
.tooltip-control::before, .tooltip-control::after {
    position: absolute;
    right: 0;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.tooltip-control::before {
    content: "";
    top: calc(100% + 5px);
    border: 5px solid transparent;
    border-bottom-color: #273048;
}
.tooltip-control::after {
    content: attr(data-tooltip);
    top: calc(100% + 15px);
    width: max-content;
    max-width: 220px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #273048;
    color: #fff;
    box-shadow: 0 8px 22px rgba(23, 32, 51, .18);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}
.tooltip-control:hover::before, .tooltip-control:hover::after,
.tooltip-control:focus-visible::before, .tooltip-control:focus-visible::after { opacity: 1; visibility: visible; transform: translateY(0); }
.status-dot, .server-state {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

/* Responsive layout standard v18: one shared grid for browser zoom 70%-100%. */
/* Dashboard monitoring cards v19: consolidated server cards and colored icon system. */
/* Unified brand/sidebar column v20: continuous divider and compact navigation marker. */
/* Domain heading removed v21: records are the first actionable content. */
/* Balanced bold typography v22: regular text stays readable at 80% zoom. */
/* Fixed dark sidebar template v23: only the content pane follows page scrolling. */
/* Functional sidebar toggle v24: compact desktop rail and hidden mobile navigation. */
.app-layout { min-height: 100vh; padding-left: var(--sidebar-width); display: block; }
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 0;
    padding: 0;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    overflow: hidden;
    border-right: 1px solid #162127;
    background: #223138;
}
.sidebar-brand { border-bottom: 1px solid #33444c; background: #1d292f; }
.sidebar .brand-mark { box-shadow: none; }
.sidebar-nav { padding: 14px 10px; display: grid; gap: 4px; }
.sidebar-link {
    min-height: 52px;
    width: 100%;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 4px;
    color: #afbec5;
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.sidebar-link:hover { color: #fff; background: #2a3c44; transform: none; }
.sidebar-link.active { color: #fff; background: #1b292f; box-shadow: inset 3px 0 0 #55a7dc; }
.sidebar-link svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-link strong { display: block; font-size: 15px; font-weight: 600; }
body.sidebar-collapsed .sidebar { width: 72px; }
body.sidebar-collapsed .topbar { left: 72px; }
body.sidebar-collapsed .app-layout { padding-left: 72px; }
body.sidebar-collapsed .sidebar-brand { padding-right: 10px; padding-left: 10px; justify-content: center; }
body.sidebar-collapsed .sidebar-brand > div:last-child { display: none; }
body.sidebar-collapsed .sidebar-nav { padding-right: 8px; padding-left: 8px; }
body.sidebar-collapsed .sidebar-link { padding: 0; justify-content: center; }
body.sidebar-collapsed .sidebar-link > span { display: none; }
.sidebar, .topbar, .app-layout { transition: width .2s ease, left .2s ease, padding-left .2s ease; }
.page-shell {
    width: 100%;
    max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
    margin: 0 auto;
    padding: calc(var(--header-height) + 28px) var(--page-gutter) 56px;
}
.page-heading { margin: 0 0 22px; }
.page-heading h1 { margin: 4px 0 3px; font-size: clamp(24px, 2vw, 30px); font-weight: 500; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .11em; }
.muted, .panel-copy { margin: 0; color: var(--muted); }
.alert { margin-bottom: 16px; padding: 12px 15px; border: 1px solid; border-radius: 9px; background: var(--surface); font-weight: 600; }
.alert-success { color: #087353; border-color: #a7e7d1; background: #edfcf7; }
.alert-error { color: #a62049; border-color: #ffc2d5; background: #fff1f6; }

.dns-cards {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.dns-card {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(30, 43, 75, .04);
}
.dns-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dns-card-title { display: flex; align-items: center; gap: 13px; }
.dns-card-title strong, .dns-card-title small, .dns-address-row span, .dns-address-row strong { display: block; }
.dns-card-title strong { font-size: 15px; }
.dns-card-title small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.server-state.offline { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 63, 121, .12); }
.dns-addresses { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dns-address-row { padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
.dns-address-row span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dns-address-row strong { margin-top: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.badge-ok { color: #087353; background: #daf8ed; }
.badge-warn { color: #8c5d05; background: #fff0c5; }

.panel { background: var(--surface); border: 1px solid #d8e0e8; border-radius: var(--radius); box-shadow: 0 2px 5px rgba(31, 49, 66, .1); }
.records-action-heading { justify-content: space-between; }
.panel-heading { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 3px 0 2px; font-size: 19px; letter-spacing: -.02em; }
.panel-copy { font-size: 14px; }
/* Domain catalog v27: list managed zones before opening their DNS records. */
/* Add domain workflow v29: guarded authoritative-zone creation from the catalog. */
.domain-list-heading h2 { margin-top: 0; }
.domain-list-heading p { margin: 5px 0 0; font-size: 14px; }
.domain-list-actions { display: flex; align-items: center; gap: 10px; }
.domain-count { min-height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; color: #2858bd; background: #e9efff; font-size: 13px; font-weight: 750; white-space: nowrap; }
.domain-table-wrap { padding-top: 18px; }
.domain-list-table { min-width: 820px; }
.domain-list-table tbody tr:nth-child(odd) { background: #f7f9fc; }
.domain-list-table td { padding-top: 15px; padding-bottom: 15px; }
.domain-identity { display: flex; align-items: center; gap: 12px; }
.domain-identity > span:last-child, .nameserver-list { display: flex; flex-direction: column; gap: 2px; }
.domain-identity strong { color: #17233b; font-size: 15px; }
.domain-identity small, .nameserver-list { color: var(--muted); font-size: 13px; }
.domain-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 9px; color: #3566d4; background: #e8efff; }
.domain-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.extension-label { color: #48556d; font-size: 13px; font-weight: 750; }
.domain-status { min-height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; color: #fff; background: #08ad76; font-size: 13px; font-weight: 750; }
.manage-domain-button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #5676e8; border-radius: 999px; color: #3f63d4; background: #fff; font-size: 13px; font-weight: 700; text-decoration: none; transition: color .16s ease, background-color .16s ease; }
.manage-domain-button:hover { color: #fff; background: #5676e8; }
.manage-domain-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.zone-create-note { margin: 14px 0 0 162px; padding: 12px 14px; border: 1px solid #d5e1fb; border-radius: 8px; background: #f2f6ff; }
.zone-create-note strong, .zone-create-note span { display: block; }
.zone-create-note strong { color: #315ab7; font-size: 13px; }
.zone-create-note span { margin-top: 3px; color: #5d6d89; font-size: 13px; line-height: 1.45; }
.records-toolbar {
    padding: 15px 24px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 190px auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}
.search-control { position: relative; display: block; }
.search-control svg {
    width: 17px;
    height: 17px;
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    fill: none;
    stroke: #8790a3;
    stroke-width: 2;
    stroke-linecap: round;
}
.search-control input { padding-left: 40px; background: #fff; }
.filter-control { display: block; }
.filter-count { color: var(--muted); font-size: 14px; white-space: nowrap; text-align: right; }
.filter-count strong { color: var(--text); }
.sr-only {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.is-hidden { display: none !important; }
.button {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-control:focus-visible, input:focus-visible, select:focus-visible, .dialog-close:focus-visible, summary:focus-visible { outline: 3px solid rgba(86, 118, 232, .24); outline-offset: 2px; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button-primary, .button-edit { background: var(--primary); }
.button-primary:hover, .button-edit:hover { background: var(--primary-hover); }
.button-danger { background: var(--danger); }
.button-danger:hover { background: var(--danger-hover); }
.button-success { background: var(--success); }
.button-success:hover { background: var(--success-hover); }
.button-secondary, .button-ghost { color: #4b556b; background: #eef0f6; border-color: #e0e4ee; }
.button-secondary:hover, .button-ghost:hover { background: #e2e6ef; }
.button-small { min-height: 36px; padding: 0 13px; font-size: 13px; }

.table-wrap { width: 100%; overflow-x: auto; padding: 0 24px 24px; }
table { width: 100%; min-width: 940px; border-collapse: collapse; }
thead { background: var(--table-head); }
th { padding: 14px 12px; color: #333b52; font-size: 14px; font-weight: 750; text-align: left; white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 2; background: var(--table-head); }
th:first-child { border-radius: 7px 0 0 0; }
th:last-child { border-radius: 0 7px 0 0; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:nth-child(odd) { background: #fafbfc; }
tbody tr:hover { background: #f3f6ff; }
.owner-cell { min-width: 240px; color: #273048; font-weight: 550; }
.ttl-cell { width: 90px; color: #555f75; font-variant-numeric: tabular-nums; }
.class-label { color: #5d667a; font-size: 14px; }
.type-badge { color: #25314f; font-size: 14px; font-weight: 750; }
.value-cell { min-width: 290px; max-width: 520px; overflow-wrap: anywhere; color: #364057; }
.action-heading { text-align: right; }
.action-cell { min-width: 190px; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.inline-form { display: inline-flex; margin: 0; }
.protected-label { padding: 5px 9px; border-radius: 999px; color: #758096; background: #edf0f5; font-size: 13px; font-weight: 750; }
.empty-state { padding: 32px; color: var(--muted); text-align: center; }

.audit-panel { margin-top: 20px; box-shadow: 0 6px 20px rgba(30, 43, 75, .04); }
.audit-panel > summary { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.audit-panel > summary::-webkit-details-marker { display: none; }
.audit-panel > summary strong, .audit-panel > summary .eyebrow { display: block; }
.audit-panel > summary strong { margin-top: 3px; color: var(--text); font-size: 15px; }
.audit-list { padding: 0 22px 18px; }
.audit-row { padding: 11px 0; display: grid; grid-template-columns: 9px minmax(180px, 1fr) 1fr auto; align-items: center; gap: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.audit-row strong, .audit-row small { display: block; }
.audit-row strong { color: #3b4459; }
.audit-result { width: 8px; height: 8px; border-radius: 50%; }
.audit-result.ok { background: var(--success); }
.audit-result.bad { background: var(--danger); }

.monitoring-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.refresh-button svg { width: 16px; height: 16px; }
.monitor-summary { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
/* Summary watermark icons v25: large function-specific symbols aligned right. */
.monitor-summary article { position: relative; min-height: 104px; padding: 18px 110px 18px 20px; display: flex; align-items: center; overflow: hidden; border: 0; border-radius: var(--radius); color: #fff; background: #2f7fc9; box-shadow: 0 2px 5px rgba(31, 49, 66, .14); }
.monitor-summary article:nth-child(2) { background: #08a76d; }
.monitor-summary article:nth-child(3) { background: #f3a014; }
.monitor-summary article > div { position: relative; z-index: 1; }
.monitor-summary small, .monitor-summary strong { display: block; }
.monitor-summary small { color: rgba(255, 255, 255, .82); font-size: 12px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.monitor-summary strong { margin-top: 3px; color: #fff; font-size: 18px; font-weight: 600; }
.summary-icon { position: absolute; z-index: 0; top: 50%; right: 20px; width: 74px; height: 74px; display: grid; place-items: center; transform: translateY(-50%); border-radius: 0; color: rgba(13, 55, 79, .24); background: transparent; pointer-events: none; }
.summary-icon.good, .summary-icon.warning { color: rgba(13, 55, 79, .24); background: transparent; }
/* Stronger summary icon strokes v26: clearer watermark symbols at normal zoom. */
.summary-icon svg { width: 70px; height: 70px; fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.monitor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.monitor-node { overflow: hidden; border-top: 3px solid #2f7fc9; }
.monitor-node:nth-child(2) { border-top-color: #08a76d; }
.monitor-node-head { padding: 20px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.monitor-node-title { display: flex; align-items: center; gap: 13px; }
.monitor-node-title strong, .monitor-node-title small { display: block; }
.monitor-node-title strong { font-size: 18px; }
.monitor-node-title small { margin-top: 1px; color: var(--muted); font-size: 14px; }
.node-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 12px; color: #3f63d5; background: #eaf0ff; }
.node-icon.secondary { color: #7956c7; background: #f1ebff; }
.node-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.monitor-node-copy { min-width: 0; }
.monitor-node-addresses { margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.address-chip { min-height: 32px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dfe5f2; border-radius: 7px; background: #f8f9fc; color: #4f5b72; font-size: 14px; font-variant-numeric: tabular-nums; }
.address-chip b { color: #68758e; font-size: 12px; letter-spacing: .025em; text-transform: uppercase; }
.address-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.address-chip.local { color: #087e65; border-color: #ccecdf; background: #f0fbf7; }
.address-chip.public { color: #3f5fc3; border-color: #d8e0fb; background: #f1f4ff; }
.metric-grid { padding: 18px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.metric-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.metric-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { display: inline-flex; align-items: center; gap: 7px; color: #59657c; font-size: 13px; font-weight: 800; letter-spacing: .025em; }
.metric-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; color: #4366d7; background: #e8eeff; }
.metric-ram .metric-icon { color: #7954c5; background: #f0eaff; }
.metric-disk .metric-icon { color: #b66b09; background: #fff1dc; }
.metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.metric-card strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.metric-card small { display: block; overflow: hidden; color: #68758e; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card progress { width: 100%; height: 6px; margin: 11px 0 7px; display: block; overflow: hidden; border: 0; border-radius: 999px; background: #e2e6ef; }
.metric-card progress::-webkit-progress-bar { border-radius: 999px; background: #e2e6ef; }
.metric-card progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #617ee7, #4f69d0); }
.metric-card progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #617ee7, #4f69d0); }
.metric-ram progress::-webkit-progress-value { background: linear-gradient(90deg, #936ee2, #7650c3); }
.metric-ram progress::-moz-progress-bar { background: linear-gradient(90deg, #936ee2, #7650c3); }
.metric-disk progress::-webkit-progress-value { background: linear-gradient(90deg, #e5a13d, #c5780d); }
.metric-disk progress::-moz-progress-bar { background: linear-gradient(90deg, #e5a13d, #c5780d); }
.monitor-details { padding: 2px 20px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.monitor-details > div { min-width: 0; min-height: 54px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.monitor-details > div:nth-child(odd) { padding-right: 18px; }
.monitor-details > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
.detail-label { min-width: 0; display: inline-flex; align-items: center; gap: 8px; color: #657189; font-size: 15px; }
.detail-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; color: #4465d2; background: #ebf0ff; }
.detail-icon.uptime { color: #078463; background: #e6f8f1; }
.detail-icon.bind { color: #087353; background: #e3f8ef; }
.detail-icon.serial { color: #95630b; background: #fff2d8; }
.detail-icon.memory { color: #7954c5; background: #f1eaff; }
.detail-icon.rpz { color: #b54c6b; background: #ffebf1; }
.detail-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.monitor-details strong { overflow: hidden; color: #344058; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.service-value.good { color: #07875f; }
.monitor-error { margin: 20px; padding: 18px; border: 1px solid #ffd0de; border-radius: 10px; background: #fff3f7; }
.monitor-error strong, .monitor-error span { display: block; }
.monitor-error strong { color: #a62049; font-size: 13px; }
.monitor-error span { margin-top: 5px; color: #8c6070; font-size: 12px; overflow-wrap: anywhere; }
.node-offline { border-color: #ffd4e1; }

.record-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: visible; border: 0; border-radius: 12px; background: transparent; box-shadow: 0 30px 80px rgba(22, 31, 54, .24); }
.record-dialog[open] { position: fixed; inset: 0; margin: auto; z-index: 100; }
.record-dialog::backdrop { background: rgba(28, 35, 52, .56); backdrop-filter: blur(3px); }
/* Edit dialog transparent backdrop v30 */
.add-record-dialog::backdrop, .add-domain-dialog::backdrop, .edit-record-dialog::backdrop, .delete-record-dialog::backdrop, .propagation-dialog::backdrop { background: transparent; backdrop-filter: none; }
.add-record-dialog[open] { box-shadow: 0 24px 70px rgba(22, 31, 54, .2), 0 0 0 1px rgba(86, 118, 232, .08); }
.add-domain-dialog[open] { box-shadow: 0 24px 70px rgba(22, 31, 54, .2), 0 0 0 1px rgba(86, 118, 232, .08); }
.dialog-card { overflow: hidden; background: var(--surface); border-radius: 12px; }
.dialog-header { min-height: 92px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 4px 0 0; font-size: 19px; }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f2f7; color: #5f687a; font-size: 25px; line-height: 1; }
.dialog-close:hover { background: #e4e8f0; }
.dialog-form { padding: 26px 28px 24px; }
.horizontal-field { margin-bottom: 14px; display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 22px; color: #556078; font-size: 13px; }
.horizontal-field > span:first-child { font-weight: 650; }
input, select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--text); outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(86, 118, 232, .12); }
.input-group { width: 100%; display: flex; }
.input-group input { min-width: 0; border-radius: 5px 0 0 5px; }
.input-suffix { min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 5px 5px 0; background: #f6f7fa; color: #768096; white-space: nowrap; }
.field-help { margin: 4px 0 0 162px; color: var(--muted); font-size: 13px; }
.dialog-actions { margin-top: 24px; padding-top: 20px; justify-content: space-between; border-top: 1px solid var(--line); }
.delete-record-dialog { width: min(440px, calc(100% - 32px)); }
.confirmation-card { padding: 30px; text-align: center; }
.confirmation-card h2 { margin: 16px 0 7px; font-size: 21px; letter-spacing: -.02em; }
.confirmation-card p { margin: 0; color: var(--muted); }
.confirmation-card p strong { color: var(--text); overflow-wrap: anywhere; }
.confirmation-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--danger);
    background: #fff0f5;
}
.confirmation-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirmation-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.propagation-dialog { width: min(480px, calc(100% - 32px)); }
.propagation-icon { color: var(--success); background: #e9fbf4; }
.propagation-note { margin-top: 20px; padding: 14px 16px; border: 1px solid #ccefe2; border-radius: 9px; background: #f2fcf8; text-align: left; }
.propagation-note strong, .propagation-note span { display: block; }
.propagation-note strong { color: #087353; font-size: 13px; }
.propagation-note span { margin-top: 4px; color: #556b64; font-size: 13px; line-height: 1.55; }
.propagation-button { width: 100%; margin-top: 22px; }

.login-page { display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #f8f9fd, #edf1f8); }
.login-shell { width: min(430px, 100%); }
.login-card { padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 22px; }
.login-card h1 { margin: 5px 0 8px; font-size: 27px; }
.form-stack { margin-top: 24px; display: grid; gap: 15px; }
.form-stack label { display: grid; gap: 6px; color: #4f586d; font-size: 13px; font-weight: 700; }
.security-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

/* Compact interface density v28: proportional sizing for dashboard, domain, dialogs, and login. */
:root {
    --header-height: 60px;
    --sidebar-width: 214px;
    --page-gutter: clamp(14px, 1.2vw, 22px);
    --content-max: 1600px;
}
body { font-size: 14px; }
.topbar { padding-right: 16px; padding-left: 16px; gap: 16px; }
.brand-row { padding: 8px 12px; gap: 10px; }
.brand-row strong { font-size: 16px; }
.brand-row span { font-size: 9px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 9px; }
.topbar-title { gap: 11px; }
.topbar-title strong { font-size: 19px; }
.topbar-menu-icon { width: 34px; height: 34px; }
.topbar-menu-icon svg { width: 18px; height: 18px; }
.topbar-refresh { min-height: 34px; }
.topbar-actions { gap: 7px; }
.icon-control { width: 34px; height: 34px; min-height: 34px; }
.logout-control { width: 36px; height: 36px; min-height: 36px; flex-basis: 36px; }
.logout-control .logout-icon { width: 24px !important; height: 24px !important; flex-basis: 24px; }
.sidebar-nav { padding: 10px 8px; gap: 3px; }
.sidebar-link { min-height: 46px; padding: 0 11px; gap: 10px; }
.sidebar-link svg { width: 19px; height: 19px; flex-basis: 19px; }
.sidebar-link strong { font-size: 14px; }
body.sidebar-collapsed .sidebar { width: 64px; }
body.sidebar-collapsed .topbar { left: 64px; }
body.sidebar-collapsed .app-layout { padding-left: 64px; }
.page-shell { padding-top: calc(var(--header-height) + 20px); padding-bottom: 40px; }
.page-heading { margin-bottom: 16px; }
.page-heading h1 { font-size: clamp(21px, 1.7vw, 26px); }
.eyebrow { font-size: 11px; }
.alert { margin-bottom: 12px; padding: 10px 12px; }
.panel-heading { padding: 16px 18px; gap: 14px; }
.panel-heading h2 { font-size: 17px; }
.domain-list-heading p, .panel-copy { font-size: 13px; }
.domain-list-actions { gap: 9px; }
.domain-count { min-height: 26px; padding: 0 10px; font-size: 12px; }
.domain-table-wrap { padding-top: 12px; }
.domain-list-table td { padding-top: 11px; padding-bottom: 11px; }
.domain-identity { gap: 10px; }
.domain-icon { width: 34px; height: 34px; flex-basis: 34px; }
.domain-identity strong { font-size: 14px; }
.domain-identity small, .nameserver-list, .extension-label { font-size: 12px; }
.domain-status { min-height: 25px; padding: 0 10px; font-size: 12px; }
.manage-domain-button { min-height: 30px; padding: 0 10px; font-size: 12px; }
.records-toolbar { padding: 11px 18px; grid-template-columns: minmax(260px, 1fr) 175px auto; gap: 10px; }
.filter-count { font-size: 13px; }
.button { min-height: 34px; padding: 0 12px; gap: 6px; font-size: 13px; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 12px; }
input, select { min-height: 38px; }
.input-suffix { min-height: 38px; }
.table-wrap { padding-right: 18px; padding-bottom: 18px; padding-left: 18px; }
th { padding: 11px 10px; font-size: 13px; }
td { padding: 8px 10px; }
.owner-cell { min-width: 220px; }
.value-cell { min-width: 260px; }
.class-label, .type-badge { font-size: 13px; }
.protected-label { font-size: 12px; }
.empty-state { padding: 24px; }
.audit-panel { margin-top: 14px; }
.audit-panel > summary { padding: 14px 18px; font-size: 12px; }
.audit-panel > summary strong { font-size: 14px; }
.audit-list { padding: 0 18px 14px; }
.audit-row { padding: 8px 0; font-size: 12px; }
.monitor-summary { margin-bottom: 14px; gap: 12px; }
.monitor-summary article { min-height: 88px; padding: 14px 92px 14px 17px; }
.monitor-summary small { font-size: 11px; }
.monitor-summary strong { font-size: 16px; }
.summary-icon { right: 16px; width: 62px; height: 62px; }
.summary-icon svg { width: 58px; height: 58px; }
.monitor-grid { gap: 14px; }
.monitor-node-head { padding: 15px 17px; gap: 12px; }
.monitor-node-title { gap: 10px; }
.monitor-node-title strong { font-size: 16px; }
.monitor-node-title small { font-size: 12px; }
.node-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }
.node-icon svg { width: 20px; height: 20px; }
.monitor-node-addresses { margin-top: 6px; gap: 5px; }
.address-chip { min-height: 27px; padding: 3px 8px; font-size: 12px; }
.address-chip b { font-size: 10px; }
.metric-grid { padding: 14px 16px; gap: 9px; }
.metric-card { padding: 11px; border-radius: 8px; }
.metric-label { gap: 6px; font-size: 12px; }
.metric-icon { width: 25px; height: 25px; flex-basis: 25px; }
.metric-icon svg { width: 14px; height: 14px; }
.metric-card strong { font-size: 16px; }
.metric-card small { font-size: 12px; }
.metric-card progress { margin: 8px 0 5px; }
.monitor-details { padding: 1px 16px 15px; }
.monitor-details > div { min-height: 46px; padding-top: 8px; padding-bottom: 8px; gap: 9px; }
.monitor-details > div:nth-child(odd) { padding-right: 14px; }
.monitor-details > div:nth-child(even) { padding-left: 14px; }
.detail-label { gap: 6px; font-size: 13px; }
.detail-icon { width: 25px; height: 25px; flex-basis: 25px; }
.detail-icon svg { width: 14px; height: 14px; }
.monitor-details strong { font-size: 13px; }
.record-dialog { width: min(680px, calc(100% - 32px)); }
.dialog-header { min-height: 76px; padding: 16px 20px; }
.dialog-header h2 { font-size: 17px; }
.dialog-close { width: 32px; height: 32px; font-size: 22px; }
.dialog-form { padding: 20px 22px; }
.horizontal-field { margin-bottom: 11px; grid-template-columns: 125px minmax(0, 1fr); gap: 18px; font-size: 12px; }
.field-help { margin-left: 143px; font-size: 12px; }
.zone-create-note { margin-left: 143px; padding: 11px 13px; }
.zone-create-note strong, .zone-create-note span { font-size: 12px; }
.dialog-actions { margin-top: 18px; padding-top: 16px; }
.delete-record-dialog { width: min(400px, calc(100% - 32px)); }
.confirmation-card { padding: 24px; }
.confirmation-card h2 { margin-top: 13px; font-size: 18px; }
.confirmation-icon { width: 46px; height: 46px; }
.confirmation-actions { margin-top: 18px; }
.propagation-dialog { width: min(430px, calc(100% - 32px)); }
.propagation-note { margin-top: 16px; padding: 11px 13px; }
.login-shell { width: min(390px, 100%); }
.login-card { padding: 28px; }
.login-card .brand-mark { margin-bottom: 17px; }
.login-card h1 { font-size: 23px; }
.form-stack { margin-top: 18px; gap: 12px; }
.security-note { margin-top: 16px; font-size: 12px; }

@media (max-width: 900px) {
    :root { --sidebar-width: 196px; }
    .monitor-grid { grid-template-columns: 1fr; }
    .panel-heading { align-items: flex-start; }
    .records-toolbar { grid-template-columns: minmax(220px, 1fr) 180px; }
    .filter-count { grid-column: 1 / -1; text-align: left; }
    .audit-row { grid-template-columns: 9px 1fr auto; }
    .audit-row > span:nth-child(3) { display: none; }
}
@media (max-width: 700px) {
    .sidebar { width: 100%; height: auto; position: static; overflow: hidden; border-right: 0; }
    .sidebar-brand { min-height: 64px; }
    .sidebar-nav { padding: 8px 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { height: 62px; position: sticky; left: 0; }
    .topbar-title strong { font-size: 19px; }
    .topbar-menu-icon { display: none; }
    .app-layout { min-height: auto; padding-left: 0; }
    .page-shell { padding-top: 24px; }
    body.sidebar-collapsed .sidebar { width: 100%; display: none; }
    body.sidebar-collapsed .topbar { left: 0; }
    body.sidebar-collapsed .app-layout { padding-left: 0; }
}
@media (max-width: 640px) {
    :root { --page-gutter: 14px; }
    .brand-row span { display: none; }
    .page-shell { padding-top: 22px; padding-bottom: 40px; }
    .topbar { padding: 0 14px; }
    .topbar-refresh { width: 40px; padding: 0; font-size: 0; }
    .topbar-refresh svg { width: 18px; height: 18px; }
    .sidebar-nav { width: 100%; min-width: 0; }
    .sidebar-link { min-width: 0; }
    .monitoring-heading { align-items: flex-start; flex-direction: column; }
    .monitor-summary { grid-template-columns: 1fr; }
    .monitor-summary article { padding-right: 88px; }
    .summary-icon { right: 14px; width: 60px; height: 60px; }
    .summary-icon svg { width: 58px; height: 58px; }
    .metric-grid { grid-template-columns: 1fr; }
    .monitor-details { grid-template-columns: 1fr; }
    .monitor-details > div:nth-child(odd), .monitor-details > div:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
    .monitor-node-head { align-items: flex-start; }
    .monitor-node-title { align-items: flex-start; }
    .monitor-node-addresses { align-items: stretch; flex-direction: column; }
    .dns-cards { grid-template-columns: 1fr; gap: 12px; }
    .dns-card { padding: 18px; }
    .panel-heading { padding: 18px; flex-direction: column; }
    .domain-list-actions { width: 100%; justify-content: space-between; }
    .domain-list-actions .button { width: auto; }
    .table-heading .button { width: 100%; }
    .records-toolbar { padding: 14px 18px; grid-template-columns: 1fr; }
    .filter-count { grid-column: auto; }
    .table-wrap { padding: 0 12px 16px; }
    .record-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); overflow-y: auto; }
    .dialog-header { padding: 17px 18px; }
    .dialog-header h2 { font-size: 16px; }
    .dialog-form { padding: 20px 18px; }
    .horizontal-field { grid-template-columns: 1fr; gap: 6px; }
    .field-help { margin-left: 0; }
    .zone-create-note { margin-left: 0; }
    .input-suffix { max-width: 48%; overflow: hidden; text-overflow: ellipsis; }
    .audit-row { grid-template-columns: 9px 1fr; }
    .audit-row time { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
