:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #172033;
    --muted: #718096;
    --line: #e7ebf2;
    --primary: #635bff;
    --primary-dark: #5148e5;
    --sidebar: #151827;
    --sidebar-muted: #9aa3b5;
    --green: #159570;
    --green-soft: #e5f7f0;
    --yellow: #c48616;
    --yellow-soft: #fff4d7;
    --red: #d44f5d;
    --red-soft: #ffeaed;
    --shadow: 0 12px 35px rgba(30, 42, 70, .07);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 14px; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; width: 250px; flex: 0 0 250px; padding: 28px 18px; color: #fff; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 38px; font-weight: 800; font-size: 18px; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: linear-gradient(135deg, #827aff, #5148e5); border-radius: 11px; box-shadow: 0 7px 17px rgba(99, 91, 255, .35); }
.nav-label { padding: 0 12px 10px; color: #687187; text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.nav-item { display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 11px 12px; color: var(--sidebar-muted); border-radius: 10px; text-decoration: none; }
.nav-button { width: 100%; border: 0; background: transparent; text-align: left; }
.nav-item.active, .nav-item:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--primary); }
.nav-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; color: currentColor; }
.ui-icon { display: block; width: 17px; height: 17px; }
.sidebar-bottom { margin-top: 42vh; padding: 15px; color: var(--sidebar-muted); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.07); border-radius: 13px; font-size: 12px; line-height: 1.55; }
.sidebar-bottom strong { display: block; color: #fff; font-size: 13px; }
.system-panel { margin-top: auto; }
.system-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; color: #fff; font-weight: 700; }
.system-heading > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.system-live { width: 7px; height: 7px; background: #42d7a1; border-radius: 50%; box-shadow: 0 0 0 4px rgba(66,215,161,.12); }
.system-live-label { color: #42d7a1; font-size: 9px; letter-spacing: .08em; }
.system-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 11px; }
.system-stat > span { display: inline-flex; align-items: center; gap: 6px; }
.system-stat .ui-icon { width: 14px; height: 14px; color: #b8c0d0; }
.system-stat strong { color: #fff; font-size: 11px; font-weight: 700; }
.system-stat small { color: #8791a7; font-size: 10px; font-weight: 500; }
.system-progress { height: 4px; margin-top: 6px; overflow: hidden; background: rgba(255,255,255,.1); border-radius: 10px; }
.system-progress span { display: block; height: 100%; background: linear-gradient(90deg, #675fff, #8c85ff); border-radius: inherit; }
.main { min-width: 0; flex: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 0 42px; background: var(--surface); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.user-menu { display: flex; align-items: center; gap: 11px; color: var(--muted); }
.account-link { padding: 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; font: inherit; }
.account-link:hover { color: var(--primary); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: linear-gradient(135deg, #8c85ff, #6058ed); border-radius: 50%; font-weight: 700; }
.logout { padding: 8px 11px; color: var(--muted); background: transparent; border: 0; }
.content { max-width: 1500px; margin: 0 auto; padding: 34px 42px 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 25px; }
.page-heading h2 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.045em; }
.page-heading p { margin: 0; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; color: #fff; background: var(--primary); border: 0; border-radius: 9px; font-weight: 700; box-shadow: 0 7px 14px rgba(99, 91, 255, .18); }
.button:hover { background: var(--primary-dark); }
.button.secondary { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.stat-card { display: flex; align-items: center; justify-content: space-between; padding: 20px; }
.stat-label { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.055em; }
.stat-note { margin-top: 4px; color: var(--muted); font-size: 11px; }
.button .ui-icon { width: 16px; height: 16px; stroke-width: 2.1; }
.logout .ui-icon { width: 18px; height: 18px; }
.stat-icon { display: grid; place-items: center; width: 43px; height: 43px; color: var(--primary); background: #eeedff; border-radius: 12px; }
.stat-icon .ui-icon { width: 20px; height: 20px; stroke-width: 1.9; }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.yellow { color: var(--yellow); background: var(--yellow-soft); }
.stat-icon.red { color: var(--red); background: var(--red-soft); }
.panel { padding: 23px; margin-bottom: 24px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.panel-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 9px; }
.site-tools { display: flex; justify-content: flex-end; gap: 10px; margin: -4px 0 15px; }
.site-tools input, .site-tools select { min-height: 36px; padding: 0 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.site-tools input { width: 210px; }
.site-tools select { min-width: 155px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; margin: 0 -23px; }
table { width: 100%; border-collapse: collapse; }
table th:nth-child(2), table th:nth-child(3), table th:nth-child(4), table th:nth-child(5),
table td:nth-child(2), table td:nth-child(3), table td:nth-child(4), table td:nth-child(5) { text-align: center; }
table th:last-child, table td:last-child { text-align: right; }
table td:nth-child(3) .agent-cell { margin-left: auto; margin-right: auto; text-align: center; }
table td:nth-child(4) .backup-summary { margin-left: auto; margin-right: auto; }
.actions { justify-content: flex-end; }
th { padding: 11px 23px; color: var(--muted); background: var(--surface-soft); text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
td { padding: 17px 23px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.domain-cell { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.domain-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--primary); background: #eeedff; border-radius: 10px; font-weight: 800; }
.domain-name { font-weight: 750; }
.domain-url { margin-top: 3px; color: var(--muted); font-size: 11px; }
.agent-cell { max-width: 260px; color: var(--muted); font-size: 12px; }
.agent-summary[data-tooltip] { cursor: help; }
.agent-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.agent-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.agent-state.connected { color: var(--green); }
.agent-state.unavailable { color: var(--red); }
.agent-state.unknown { color: var(--yellow); }
.agent-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.agent-version-warning .agent-detail { color: var(--yellow); }
.backup-summary { display: flex; flex-direction: column; gap: 4px; padding: 0; color: var(--muted); background: transparent; border: 0; font: inherit; text-align: left; cursor: pointer; }
.backup-summary:hover { color: var(--primary); }
.backup-summary span { display: block; font-size: 10px; white-space: nowrap; }
.backup-summary strong { display: inline-block; min-width: 39px; color: var(--ink); font-size: 10px; text-transform: uppercase; }
.backup-dialog { width: min(760px, 100%); }
.backup-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.backup-detail-card { padding: 15px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.backup-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); }
.backup-detail-heading strong { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.backup-detail-heading .ui-icon { width: 16px; height: 16px; color: var(--primary); }
.backup-detail-card p { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.backup-detail-card code { font-size: 9px; }
.backup-state { padding: 4px 6px; border-radius: 6px; font-size: 9px; font-weight: 800; }
.backup-state.ready { color: var(--green); background: var(--green-soft); }
.backup-state.missing { color: var(--yellow); background: var(--yellow-soft); }
.backup-download { display: inline-flex; margin-top: 12px; padding: 8px 10px; font-size: 11px; }
.backup-download .ui-icon { width: 14px; height: 14px; }
.backup-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 18px; }
.backup-usage { margin-right: auto; color: var(--muted); font-size: 11px; }
.backup-actions .field-help { margin: 0; }
.backup-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.backup-history h4 { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--ink); font-size: 14px; }
.backup-history h4 .ui-icon { width: 16px; height: 16px; color: var(--primary); }
.backup-history-intro { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.backup-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.backup-history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.backup-history-item > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.backup-history-item strong { font-size: 12px; }
.backup-history-item span { color: var(--muted); font-size: 10px; }
.backup-history-meta { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.backup-history-meta .backup-download { margin: 0; }
.form-action-buttons { display: flex; align-items: center; gap: 10px; }
.connection-test-dialog { width: min(620px, 100%); }
.connection-test-results { display: flex; flex-direction: column; gap: 9px; }
.connection-test-loading { padding: 18px; color: var(--muted); background: var(--surface-soft); border-radius: 9px; text-align: center; }
.connection-test-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; }
.connection-test-item strong { flex: 0 0 155px; font-size: 13px; }
.connection-test-item span { color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.connection-test-item.ok { color: var(--green); background: var(--green-soft); border-color: #c9ecdf; }
.connection-test-item.failed { color: var(--red); background: var(--red-soft); border-color: #ffd1d7; }
.connection-test-item.skipped { color: var(--yellow); background: var(--yellow-soft); border-color: #f5e4b4; }
.account-sessions { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-session { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.account-session > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.account-session strong { font-size: 12px; }
.account-session span, .account-session small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-session .button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.session-current { color: var(--green) !important; font-weight: 800; letter-spacing: .05em; }
@media (max-width: 680px) { .site-tools { justify-content: stretch; flex-direction: column; } .site-tools input, .site-tools select { width: 100%; } .form-action-buttons { width: 100%; flex-direction: column; align-items: stretch; } .connection-test-item { flex-direction: column; gap: 6px; } .connection-test-item span { text-align: left; } .account-session { align-items: flex-start; flex-direction: column; } }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.status[data-tooltip] { cursor: help; }
.status:before { width: 6px; height: 6px; background: currentColor; border-radius: 50%; content: ""; }
.status.verified { color: var(--green); background: var(--green-soft); }
.status.changed, .status.unknown, .status.requires-review { color: var(--yellow); background: var(--yellow-soft); }
.status.suspect, .status.compromised, .status.offline { color: var(--red); background: var(--red-soft); }
.status.maintenance { color: var(--primary); background: #eeedff; }
.status.disabled { color: #687386; background: #edf0f4; }
.is-disabled td { background: #fbfcfd; }
.is-disabled .domain-mark { color: #7f8a9c; background: #eef1f5; }
.muted { color: var(--muted); }
.action-form { margin: 0; }
.actions { display: flex; align-items: center; gap: 6px; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; }
.icon-button .ui-icon { width: 16px; height: 16px; stroke-width: 1.9; }
.icon-button:hover { color: var(--primary); border-color: #c9c6ff; background: #f6f5ff; }
.resume-icon { color: var(--green); }
.resume-icon:hover { color: var(--green); border-color: #b8ead8; background: var(--green-soft); }
.danger-icon:hover { color: var(--red); border-color: #ffc4cb; background: var(--red-soft); }
.notice { margin-bottom: 18px; padding: 12px 15px; color: #36536f; background: #eaf4ff; border: 1px solid #d6eaff; border-radius: 9px; }
.empty { padding: 45px 20px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.field-full { grid-column: 1 / -1; }
.form-section-heading { display: flex; align-items: baseline; gap: 12px; grid-column: 1 / -1; margin-top: 10px; padding: 15px 0 2px; border-top: 1px solid var(--line); }
.form-section-heading:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-heading strong { color: var(--ink); font-size: 15px; letter-spacing: -.015em; }
.form-section-heading span { color: var(--muted); font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { display: inline-flex; align-items: center; gap: 6px; color: #4c5870; font-size: 12px; font-weight: 700; }
.info-tip { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; padding: 0; color: var(--muted); background: #f3f5fa; border: 1px solid #d8deea; border-radius: 50%; cursor: help; }
.info-tip .ui-icon { width: 12px; height: 12px; stroke-width: 2; }
.info-tip:hover, .info-tip:focus-visible { color: var(--primary); border-color: #bcb8ff; background: #eeedff; outline: 0; }
.checkbox .info-tip { margin-left: -2px; }
.tooltip-popover { position: fixed; z-index: 100; left: 0; top: 0; display: none; width: min(300px, calc(100vw - 16px)); padding: 10px 12px; color: #fff; background: #202b42; border-radius: 8px; box-shadow: 0 8px 20px rgba(15,23,42,.2); font-size: 11px; font-weight: 500; line-height: 1.45; pointer-events: none; text-align: left; transform: translate(-50%, -100%); }
.tooltip-popover.visible { display: block; }
.tooltip-popover.below { transform: translate(-50%, 0); }
.field input { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid #dfe4ed; border-radius: 8px; outline: 0; }
.field textarea { width: 100%; min-height: 76px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #dfe4ed; border-radius: 8px; outline: 0; font: inherit; font-size: 12px; line-height: 1.45; resize: vertical; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,91,255,.11); }
.field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,91,255,.11); }
.field-help { color: var(--muted); font-size: 11px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; padding-top: 4px; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.checkbox input { accent-color: var(--primary); }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at top left, #e7e5ff, transparent 35%), var(--bg); }
.login-card { width: min(410px, 100%); padding: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 55px rgba(30,42,70,.12); }
.login-brand { justify-content: center; padding: 0 0 27px; color: var(--ink); }
.login-card h1 { margin: 0 0 8px; text-align: center; font-size: 24px; letter-spacing: -.045em; }
.login-card .intro { margin: 0 0 27px; color: var(--muted); text-align: center; }
.login-card .field { margin-bottom: 15px; }
.login-card .button { width: 100%; margin-top: 8px; }
.login-secondary-form { margin-top: 16px; text-align: center; }
.link-button, .notice-link { padding: 0; color: var(--primary); background: transparent; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.link-button:hover, .notice-link:hover { text-decoration: underline; }
.error { margin-bottom: 16px; padding: 11px 13px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 12px; }
.account-notice { color: #5b4c18; background: var(--yellow-soft); border-color: #f2e1ad; }
.modal { position: fixed; z-index: 50; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .58); }
.modal.open { display: flex; }
.modal-dialog { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; background: var(--surface); border: 1px solid rgba(255,255,255,.65); border-radius: 17px; box-shadow: 0 25px 80px rgba(15,23,42,.25); }
.modal-dialog.modal-wide { width: min(1180px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.modal-head-actions { display: flex; align-items: center; gap: 9px; }
.modal-head .panel-title { font-size: 20px; }
.modal-close { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
.modal-close .ui-icon { width: 17px; height: 17px; }
.modal-close:hover { color: var(--ink); background: #eef1f7; }
.modal-confirm { width: min(520px, 100%); }
.modal-confirm .modal-head { margin-bottom: 21px; }
.account-dialog { width: min(620px, 100%); }
.account-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.alert-section-heading { margin-top: 2px; }
.alert-enable-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.alert-enable-card .checkbox { color: var(--ink); }
.alert-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; padding: 2px 0 4px; }
.mail-smtp-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.mail-smtp-fields > .checkbox { align-self: end; }
.mail-smtp-fields[hidden] { display: none; }
.mail-form-actions { align-items: flex-end; gap: 20px; }
.mail-action-buttons { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.mail-test-result { grid-column: 1 / -1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; line-height: 1.45; }
.mail-test-result.ok { color: var(--green); background: var(--green-soft); border-color: #c9ecdf; }
.mail-test-result.failed { color: var(--red); background: var(--red-soft); border-color: #ffd1d7; }
.account-form-message { grid-column: 1 / -1; padding: 11px 13px; color: var(--red); background: var(--red-soft); border: 1px solid #ffd1d7; border-radius: 9px; font-size: 13px; line-height: 1.45; }
.account-form > .field:nth-of-type(1), .account-password-heading, .account-form > .form-actions { grid-column: 1 / -1; }
.account-password-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 7px; }
.account-password-heading strong { color: var(--ink); font-size: 13px; }
.confirm-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; color: var(--red); background: var(--red-soft); border-radius: 12px; }
.confirm-icon .ui-icon { width: 21px; height: 21px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.danger-button { background: var(--red); box-shadow: 0 7px 14px rgba(212, 79, 93, .18); }
.danger-button:hover { background: #bc3f4d; }
.danger-button .ui-icon { width: 16px; height: 16px; }
.queue-summary { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 11px; }
.queue-title { display: inline-flex; align-items: center; gap: 5px; margin-right: 3px; font-weight: 700; }
.queue-title .ui-icon { width: 14px; height: 14px; color: var(--primary); }
.worker-health { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.worker-health.online { color: var(--green); }
.worker-health.offline { color: var(--red); }
.worker-health-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.worker-health [data-worker-health-time] { font-weight: 600; opacity: .8; }
.audit-dialog { max-width: 860px; }
.audit-list { display: grid; gap: 8px; max-height: 65vh; overflow: auto; padding: 2px; }
.audit-item { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 10px; background: var(--surface-soft); }
.audit-item.warning { border-left-color: var(--yellow); }
.audit-item.critical { border-left-color: var(--red); }
.audit-item.info { border-left-color: var(--blue, #635bff); }
.audit-item-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .82rem; }
.audit-item > span:last-child { color: var(--muted); font-size: .82rem; }
.audit-severity { font-weight: 800; letter-spacing: .04em; }
.queue-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 6px; font-weight: 700; }
.queue-chip:before { width: 5px; height: 5px; border-radius: 50%; content: ""; background: currentColor; }
.queue-chip.pending { color: var(--yellow); background: var(--yellow-soft); }
.queue-chip.running { color: var(--primary); background: #eeedff; }
.queue-chip.failed { color: var(--red); background: var(--red-soft); }
.queue-button { border: 0; font: inherit; cursor: pointer; }
.queue-button:hover { filter: brightness(.97); }
.queue-errors-dialog { width: min(760px, 100%); }
.queue-error-list { display: flex; flex-direction: column; gap: 9px; max-height: 420px; overflow: auto; }
.queue-error-item { padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.queue-error-top { display: flex; justify-content: space-between; gap: 12px; }
.queue-error-top strong { color: var(--ink); font-size: 13px; }
.queue-error-top span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.queue-error-type { margin-top: 5px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.queue-error-item p { margin: 7px 0 0; color: var(--red); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.queue-error-item p.queue-job-time { color: var(--muted); font-size: 11px; }
.queue-errors-note { margin: 15px 0 0; color: var(--muted); font-size: 11px; }
.queue-action-button { margin-top: 10px; padding: 6px 9px; color: var(--primary); background: #fff; border: 1px solid #d9d7ff; border-radius: 6px; font-size: 11px; font-weight: 700; }
.queue-action-button:hover { background: #f4f3ff; }
.queue-cancel-button { color: var(--red); border-color: #ffd1d7; }
.queue-cancel-button:hover { color: #fff; background: var(--red); }
.queue-action-button:disabled { cursor: wait; opacity: .55; }
.queue-progress { height: 7px; margin-top: 12px; overflow: hidden; background: #e9ebf4; border-radius: 99px; }
.queue-progress span { display: block; height: 100%; background: linear-gradient(90deg, #635bff, #8b84ff); border-radius: inherit; transition: width .25s ease; }
.queue-progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.queue-progress-meta strong { color: var(--primary); }
.queue-clear-button { min-height: 34px; padding: 0 10px; color: var(--red); border-color: #ffd1d7; font-size: 11px; box-shadow: none; }
.queue-clear-button:hover { color: #fff; background: var(--red); }
.report-dialog { width: min(840px, 100%); }
.technical-section { margin-bottom: 14px; color: var(--ink); background: #fbfcff; }
.technical-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.technical-grid > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.technical-grid strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.technical-grid small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.technical-wide { grid-column: 1 / -1; }
.technical-history-section { color: var(--ink); background: #fbfcff; }
.technical-history-table { margin-top: 12px; overflow-x: auto; }
.technical-history-row { display: grid; grid-template-columns: 1.35fr 1.2fr .55fr .7fr .7fr .55fr; align-items: center; gap: 8px; min-width: 620px; padding: 8px 0; border-top: 1px solid rgba(20, 30, 50, .08); color: #687891; font-size: 12px; font-weight: 400; }
.technical-history-head { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.technical-history-row .status { justify-self: start; }
.diagnostics-dialog { width: min(980px, 100%); }
.diagnostics-content { min-height: 160px; }
.diagnostics-loading, .diagnostics-failure { padding: 30px; color: var(--muted); text-align: center; }
.diagnostics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.diagnostic-card { padding: 15px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.diagnostic-card h4 { margin: 0 0 12px; color: var(--ink); font-size: 14px; }
.diagnostic-worker, .diagnostic-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 0; border-top: 1px solid rgba(20, 30, 50, .08); font-size: 12px; }
.diagnostic-worker:first-child { padding-top: 0; border-top: 0; }
.diagnostic-worker small, .diagnostic-line small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.diagnostic-error { color: var(--red) !important; overflow-wrap: anywhere; }
.diagnostic-state { padding: 3px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.diagnostic-state.ok { color: var(--green); background: var(--green-soft); }
.diagnostic-state.bad { color: var(--red); background: var(--red-soft); }
.diagnostic-extensions { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; color: var(--muted); font-size: 12px; }
.diagnostic-errors { margin-top: 12px; }
.diagnostic-errors ul { display: grid; gap: 7px; max-height: 220px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.diagnostic-errors li { display: grid; grid-template-columns: minmax(100px, .35fr) 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(20, 30, 50, .08); font-size: 11px; }
.diagnostic-errors li span { overflow-wrap: anywhere; }
.diagnostic-errors li small { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.site-alert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.report-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.report-overview > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.report-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.report-overview strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.report-section { padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.report-section h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.report-section h4 .ui-icon { width: 17px; height: 17px; }
.report-section p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.report-critical { color: var(--red); background: #fffafb; border-color: #ffd8dd; }
.report-critical p { color: #8d4b55; }
.report-review { color: var(--yellow); background: #fffdf7; border-color: #f5e4b4; }
.report-ok { color: var(--green); background: #f8fffc; border-color: #d2f0e4; }
.report-ok p { color: #4c7668; }
.report-section ul { max-height: 280px; overflow: auto; margin: 14px 0 0; padding: 0; list-style: none; }
.report-section li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(20, 30, 50, .08); font-size: 11px; }
.report-section li code { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.report-section li span { flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.report-section + .report-section { margin-top: 14px; }
.report-changes { margin-top: 14px; color: var(--ink); background: #fbfcff; }
.report-changes h4 { color: var(--ink); }
.report-changes li span { padding: 3px 6px; border-radius: 5px; }
.status-history-section { margin-top: 14px; color: var(--ink); background: #fbfcff; }
.status-history-section h4 { color: var(--ink); }
.history-empty { margin-top: 14px; padding: 12px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 11px; }
.status-timeline { display: flex; flex-direction: column; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.status-timeline li { display: grid; grid-template-columns: 125px 1fr; gap: 12px; padding: 0 0 12px; border: 0; align-items: start; }
.status-timeline li:last-child { padding-bottom: 0; }
.status-timeline time { align-self: center; color: var(--muted); font-size: 10px; white-space: nowrap; }
.status-timeline-card { position: relative; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.status-timeline-card strong { color: var(--ink); font-size: 11px; }
.status-timeline-card p { margin-top: 5px; font-size: 11px; }
.status-timeline-card .transition-arrow { display: inline-block; padding: 0 5px; color: var(--muted); }
.timeline-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; letter-spacing: .02em; line-height: 1.2; text-transform: uppercase; }
.timeline-status:before { width: 5px; height: 5px; background: currentColor; border-radius: 50%; content: ""; }
.timeline-status.verified { color: var(--green); background: var(--green-soft); }
.timeline-status.changed, .timeline-status.unknown, .timeline-status.requires-review { color: var(--yellow); background: var(--yellow-soft); }
.timeline-status.suspect, .timeline-status.compromised, .timeline-status.offline { color: var(--red); background: var(--red-soft); }
.timeline-status.maintenance { color: var(--primary); background: #eeedff; }
.timeline-status.disabled { color: #687386; background: #edf0f4; }
.change-added { color: var(--green); background: var(--green-soft); }
.change-modified { color: var(--yellow); background: var(--yellow-soft); }
.change-deleted { color: var(--red); background: var(--red-soft); }
.report-empty { display: flex; flex-direction: column; gap: 5px; padding: 22px 0; color: var(--muted); }
.report-empty strong { color: var(--ink); }
body.modal-open { overflow: hidden; }

/* Comfortable reading size on larger desktop screens. */
body { font-size: 16px; }
.eyebrow, .panel-subtitle, .page-heading p { font-size: 13px; }
.nav-item { font-size: 14px; }
.sidebar-bottom { font-size: 13px; }
.stat-label { font-size: 13px; }
.stat-note { font-size: 12px; }
th { font-size: 12px; }
.domain-url { font-size: 12px; }
.agent-cell, .agent-state { font-size: 13px; }
.agent-detail { font-size: 11px; }
.queue-title, .queue-chip { font-size: 12px; }
.queue-error-type { font-size: 11px; }
.queue-error-item p.queue-job-time, .queue-errors-note { font-size: 12px; }
.report-label { font-size: 13px; }
.report-overview strong { font-size: 14px; }
.report-section h4 { font-size: 15px; }
.report-section p { font-size: 13px; }
.report-section li { font-size: 13px; }
.status-timeline time { font-size: 11px; }
.status-timeline-card strong { font-size: 12px; }
.status-timeline-card p { font-size: 12px; }
.account-dialog { width: min(880px, 100%); }
.alerts-dialog { width: min(980px, 100%); }
.alert-settings-section { display: block; grid-column: 1 / -1; padding: 4px 15px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.alert-settings-section + .alert-settings-section { margin-top: 1px; }
.alert-settings-section > summary { display: flex; align-items: center; gap: 12px; grid-column: 1 / -1; margin: -4px -15px 0; padding: 13px 15px; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; cursor: pointer; list-style: none; }
.alert-settings-section > summary::-webkit-details-marker { display: none; }
.alert-section-title { color: var(--primary); font-size: 16px; font-weight: 800; letter-spacing: -.015em; }
.alert-section-subtitle { color: var(--muted); font-size: 12px; }
.alert-section-chevron { margin-left: auto; color: var(--primary); font-size: 20px; line-height: 1; transition: transform .2s ease; }
.alert-settings-section:not([open]) > summary { border-bottom-color: transparent; }
.alert-settings-section:not([open]) > summary { border-radius: 11px; }
.alert-settings-section:not([open]) { padding-bottom: 0; }
.alert-settings-section:not([open]) .alert-section-chevron { transform: rotate(-90deg); }
.alert-settings-section > summary { transition: background-color .18s ease, color .18s ease; }
.alert-settings-section > summary:hover { background: #fafaff; }
.alert-settings-section > summary:hover .alert-section-title { color: #5148e8; }
.alert-settings-section[open] { border-color: #cfcaff; box-shadow: 0 4px 14px rgba(99, 91, 255, .08); }
.alert-settings-section[open] > summary { background: #efeeff; }
.alert-settings-section[open] > summary .alert-section-title { color: #5148e8; }
.alert-settings-section[open] > :not(summary) { animation: alert-accordion-open .24s ease both; }
@keyframes alert-accordion-open { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.alert-settings-section > .field,
.alert-settings-section > .alert-enable-card,
.alert-settings-section > .alert-options,
.alert-settings-section > .sms-test-result,
.alert-settings-section > .mail-test-result,
.alert-settings-section > .mail-smtp-fields { width: 100%; margin-top: 15px; }
.alert-settings-section > .alert-enable-card { display: flex; }
.alert-settings-section input,
.alert-settings-section textarea { font-size: 15px; }
.sms-global-fields, .sms-site-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.alert-settings-section > .sms-global-fields { margin-top: 15px; }
.sms-global-fields > .checkbox, .sms-site-fields > .checkbox { align-self: end; }
.sms-test-result { grid-column: 1 / -1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; line-height: 1.45; }
.sms-test-result.ok { color: var(--green); background: var(--green-soft); border-color: #c9ecdf; }
.sms-test-result.failed { color: var(--red); background: var(--red-soft); border-color: #ffd1d7; }
select { font: inherit; }
.field select, .site-tools select {
    min-height: 42px;
    padding: 0 38px 0 12px;
    color: var(--ink);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 17px;
    border: 1px solid #dfe4ed;
    border-radius: 8px;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}
.field select:focus, .site-tools select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,91,255,.11); }
.field label { font-size: 13px; }
.field-help { font-size: 12px; }
.checkbox { font-size: 13px; }
.status { font-size: 12px; }
.queue-error-type { font-size: 12px; }
.queue-action-button { font-size: 12px; }

/* Readable desktop table: the operational details should remain legible on
   large monitors without making the main headings oversized. */
table th { font-size: 13px; }
table td { font-size: 14px; }
.domain-url { font-size: 13px; }
.agent-cell, .agent-state { font-size: 14px; }
.agent-detail { font-size: 13px; }
.backup-summary span, .backup-summary strong { font-size: 13px; }
.status { font-size: 13px; }
.queue-summary, .queue-title, .queue-chip { font-size: 13px; }
.site-count { font-size: 13px; }
.report-label { font-size: 13px; }
.report-section li span { font-size: 12px; }
.report-changes li span { padding: 4px 8px; }

/* Backup center: give the modal enough room for its two-column layout and
   keep the operational details readable on large screens. */
.backup-dialog { width: min(960px, 100%); }
.backup-dialog .backup-details { gap: 16px; }
.backup-dialog .backup-detail-card { padding: 18px; }
.backup-dialog .backup-detail-heading strong { font-size: 15px; }
.backup-dialog .backup-detail-card p { font-size: 13px; line-height: 1.55; }
.backup-dialog .backup-detail-card code { font-size: 11px; }
.backup-dialog .backup-state { padding: 5px 7px; font-size: 11px; }
.backup-dialog .backup-actions { gap: 16px; }
.backup-dialog .backup-usage { font-size: 13px; }
.backup-dialog .backup-actions .button { font-size: 14px; }
.backup-dialog .backup-history h4 { font-size: 16px; }
.backup-dialog .backup-history-intro { font-size: 13px; }
.backup-dialog .backup-history-item { padding: 12px 14px; }
.backup-dialog .backup-history-item strong { font-size: 14px; }
.backup-dialog .backup-history-item span { font-size: 12px; }
.backup-dialog .backup-download { font-size: 13px; }

@media (max-width: 1000px) { .sidebar { width: 210px; flex-basis: 210px; } .topbar, .content { padding-left: 25px; padding-right: 25px; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .sidebar { display: none; } .topbar { min-height: 70px; padding: 0 18px; } .content { padding: 25px 15px 40px; } .page-heading { display: block; } .page-heading .button { margin-top: 16px; } .stats { gap: 10px; } .stat-card { padding: 15px; } .stat-value { font-size: 24px; } .form-grid, .account-form { grid-template-columns: 1fr; } .form-section-heading { align-items: flex-start; flex-direction: column; gap: 3px; } .site-alert-grid, .diagnostics-grid, .sms-global-fields, .sms-site-fields { grid-template-columns: 1fr; } .alert-section-subtitle { display: none; } .technical-grid { grid-template-columns: 1fr; } .technical-wide { grid-column: auto; } .diagnostic-errors li { grid-template-columns: 1fr; gap: 3px; } .panel { padding: 17px; } .table-wrap { margin: 0 -17px; } th, td { padding-left: 17px; padding-right: 17px; } .panel-head { gap: 14px; } .panel-meta { align-items: flex-start; width: 100%; } .queue-summary { justify-content: flex-start; } .modal { padding: 10px; } .modal-dialog { max-height: calc(100vh - 20px); padding: 19px; border-radius: 14px; } .modal-head { margin-bottom: 19px; } .form-actions { align-items: flex-start; flex-direction: column; gap: 15px; } .report-overview, .backup-details { grid-template-columns: 1fr; } .account-password-heading { align-items: flex-start; flex-direction: column; gap: 5px; } }
@media (max-width: 680px) { .alert-enable-card { align-items: flex-start; flex-direction: column; gap: 7px; } .alert-options { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .modal-head-actions { align-items: flex-end; flex-direction: column-reverse; gap: 6px; } }
@media (max-width: 760px) { .mail-form-actions { align-items: flex-start; flex-direction: column; } .mail-action-buttons { width: 100%; justify-content: flex-end; flex-wrap: wrap; } }
