:root {
  color-scheme: dark;
  --bg: #151515;
  --sidebar: #0f0f0f;
  --surface: #202020;
  --surface-2: #292929;
  --surface-3: #323232;
  --text: #f4f4f4;
  --muted: #a4a4a4;
  --border: #373737;
  --accent: #FFA500;
  --accent-hover: #e69500;
  --danger: #ef5b5b;
  --danger-bg: rgba(239, 91, 91, .1);
  --success: #43c99a;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 1.8rem; letter-spacing: 0; }
h2 { margin-bottom: 4px; font-size: 1.12rem; letter-spacing: 0; }
h3 { margin-bottom: 4px; font-size: 1rem; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.5; }
small { display: block; color: var(--muted); line-height: 1.4; }
code { display: block; color: #cfcfcf; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; background: var(--sidebar); border-right: 1px solid #242424; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; padding: 8px; margin-bottom: 20px; }
.brand strong, .brand small { display: block; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; background: var(--text); color: var(--sidebar); border-radius: 50%; font-weight: 700; }
.brand-mark.large { width: 48px; height: 48px; margin: 0 auto 14px; font-size: 1.2rem; }
.nav { display: grid; gap: 15px; min-height: 0; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; }
.nav-group { display: grid; gap: 2px; }
.nav-group-title { padding: 0 10px 5px; color: #6f6f6f; font-size: .69rem; font-weight: 700; text-transform: uppercase; }
.nav-link { display: flex; gap: 10px; align-items: center; min-height: 36px; padding: 7px 10px; border-radius: var(--radius); color: #d7d7d7; }
.nav-link:hover, .nav-link.active { background: var(--surface-2); color: var(--text); }
.nav-icon { width: 20px; text-align: center; color: var(--muted); }
.sidebar-footer { flex: 0 0 auto; margin-top: 14px; display: grid; gap: 8px; }
.admin-identity { display: flex; align-items: center; gap: 10px; padding: 9px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #444; color: var(--text); font-weight: 600; }
.content-shell { min-width: 0; }
.content { width: min(1380px, 100%); margin: 0 auto; padding: 34px 36px 64px; }
.mobile-header { display: none; }
.page-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head p, .section-head p { margin-bottom: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { min-height: 126px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat > span { color: var(--muted); }
.stat strong { display: block; margin: 12px 0 4px; font-size: 1.8rem; font-weight: 600; }
.section-block { margin-top: 18px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section-block.no-top { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { color: var(--muted); font-size: .82rem; font-weight: 500; text-align: left; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td.right { text-align: right; }
.empty { padding: 28px !important; text-align: center; color: var(--muted); }
.tag, .badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: #e7e7e7; font-size: .8rem; white-space: nowrap; }
.tag + .tag { margin-left: 4px; }
.badge.success { background: rgba(67,201,154,.13); color: #72deb8; }
.badge.danger { background: var(--danger-bg); color: #ff9191; }
.badge.warning { background: rgba(255,165,0,.11); color: #ffc45c; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; }
.status-dot.on { background: var(--success); }
.status-dot.off { background: var(--danger); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); cursor: pointer; }
.button:hover { background: var(--surface-3); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #171717; }
.button.primary:hover { background: var(--accent-hover); }
.button.ghost { background: transparent; }
.button.danger { color: #ff9a9a; border-color: rgba(239,91,91,.45); background: var(--danger-bg); }
.button.danger:hover { background: rgba(239,91,91,.18); }
.button.small { min-height: 32px; padding: 5px 10px; font-size: .86rem; }
.button.full { width: 100%; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 320px; }
.toolbar .month-select { width: auto; min-width: 180px; }
.toolbar .period-select { width: auto; min-width: 150px; }
label { display: grid; gap: 7px; color: #d9d9d9; font-size: .9rem; }
input, select, textarea { width: 100%; height: 42px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
textarea { height: auto; min-height: 130px; resize: vertical; line-height: 1.45; }
input::placeholder { color: #777; }
select { cursor: pointer; }
.stack { display: grid; gap: 14px; }
.stack.compact { gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid.compact { margin: 16px 0; }
.form-actions { display: flex; align-items: end; }
.stack-form { display: grid; gap: 18px; }
.toggle-line { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.toggle-line input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.row-actions form { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.metric { display: grid; gap: 5px; min-height: 106px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric span, .metric small, .muted { color: var(--muted); }
.metric strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.check { display: flex; align-items: center; align-self: end; min-height: 42px; gap: 9px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius); background: rgba(67,201,154,.12); border: 1px solid rgba(67,201,154,.28); color: #85e8c6; }
.alert.error { background: var(--danger-bg); border-color: rgba(239,91,91,.35); color: #ffaaaa; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); }
.breadcrumbs { display: flex; gap: 8px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--text); }
.user-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.large-avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 1.1rem; }
.user-hero h1, .user-hero p { margin-bottom: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.side-column { display: grid; gap: 14px; position: sticky; top: 22px; }
.side-block { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.balance-value { margin: 12px 0 18px; font-size: 2rem; font-weight: 600; }
.balance-value span { color: var(--accent); }
.facts { display: grid; gap: 0; margin: 12px 0 18px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.subscription-list { display: grid; gap: 12px; }
.subscription { padding: 16px; background: #1b1b1b; border: 1px solid var(--border); border-radius: var(--radius); }
.subscription.blocked { border-color: rgba(239,91,91,.35); }
.subscription-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.subscription-head p { margin-bottom: 0; }
.subscription-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.subscription-meta span { padding: 10px; background: var(--surface); border-radius: 6px; }
.subscription-meta strong { display: block; margin-top: 3px; }
details { border-top: 1px solid var(--border); padding-top: 12px; }
summary { color: #d8d8d8; cursor: pointer; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 14px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-form input { width: 160px; }
.danger-zone { border-color: rgba(239,91,91,.32); }
.danger-zone p { font-size: .88rem; }
.danger-zone.mini { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 16px; padding: 12px; border: 1px solid rgba(239,91,91,.25); border-radius: var(--radius); }
.danger-zone.mini label { flex: 1 1 220px; }
.timeline { display: grid; }
.timeline-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
.timeline-item > span { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item code { margin-top: 5px; color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 25%, #242424 0, var(--bg) 38%); }
.login-panel { width: min(420px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 22px 60px rgba(0,0,0,.34); }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h1 { margin-bottom: 3px; font-size: 1.5rem; }
.login-brand p { margin-bottom: 0; }
.error-page { min-height: 55vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.error-page > strong { font-size: 4rem; color: var(--muted); }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: var(--radius); background: var(--surface-2); color: var(--text); cursor: pointer; }
.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; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.warning, .warning-zone { background: rgba(255,165,0,.11); border-color: rgba(255,165,0,.38); color: #ffc45c; }
.plain-list, .change-list, .check-list { margin: 0; padding-left: 20px; color: #dedede; line-height: 1.7; }
.change-list li::marker, .check-list li::marker { color: var(--accent); }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.compact-health { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.health-item { display: flex; align-items: center; gap: 10px; min-height: 74px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.health-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; font-weight: 700; }
.health-icon.ok { background: rgba(67,201,154,.15); color: #72deb8; }
.health-icon.fail { background: var(--danger-bg); color: #ff9b9b; }
.monitoring-head { align-items: center; }
.monitoring-updated { display: grid; gap: 3px; justify-items: end; color: var(--muted); font-size: .82rem; }
.monitoring-updated strong { color: var(--text); font-size: .9rem; }
.monitoring-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--border); border-left: 3px solid var(--success); background: var(--surface); border-radius: var(--radius); }
.monitoring-summary.warning { border-left-color: var(--accent); }
.monitoring-summary.failed { border-left-color: var(--danger); }
.monitoring-summary.unknown { border-left-color: #777; }
.monitoring-summary-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(67,201,154,.13); color: #72deb8; font-size: 1.35rem; font-weight: 700; }
.monitoring-summary.warning .monitoring-summary-icon { background: rgba(255,165,0,.12); color: #ffc45c; }
.monitoring-summary.failed .monitoring-summary-icon { background: var(--danger-bg); color: #ff9191; }
.monitoring-summary.unknown .monitoring-summary-icon { background: var(--surface-3); color: var(--muted); }
.monitoring-summary span { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.monitoring-summary h2 { margin: 3px 0 3px; font-size: 1.25rem; }
.monitoring-summary p { margin: 0; }
.monitoring-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.monitoring-counters > div { display: grid; grid-template-columns: 10px auto 1fr; gap: 8px; align-items: center; min-height: 58px; padding: 12px 16px; border-right: 1px solid var(--border); }
.monitoring-counters > div:last-child { border-right: 0; }
.monitoring-counters strong { font-size: 1.05rem; }
.monitoring-counters small { display: inline; }
.monitor-dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.monitor-dot.ok { background: var(--success); }
.monitor-dot.failed { background: var(--danger); }
.monitor-dot.inactive { background: #777; }
.monitor-dot.warning { background: var(--accent); }
.attention-section { margin-bottom: 22px; padding: 18px 20px; border: 1px solid rgba(255,165,0,.34); border-radius: var(--radius); background: rgba(255,165,0,.055); }
.attention-section .section-head { margin-bottom: 12px; }
.incident-list { display: grid; gap: 8px; }
.incident-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid rgba(255,165,0,.18); }
.incident-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,165,0,.14); color: #ffc45c; font-weight: 700; }
.incident-row.critical .incident-mark { background: var(--danger-bg); color: #ff9191; }
.incident-row strong, .incident-row small { display: block; }
.incident-row small { margin-top: 4px; }
.incident-meta { display: flex; align-items: center; gap: 8px; }
.monitoring-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.monitor-group { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.monitor-group-head { padding: 17px 18px 13px; border-bottom: 1px solid var(--border); }
.monitor-group-head p { margin: 3px 0 0; font-size: .86rem; }
.monitor-service-list { padding: 0 18px; }
.monitor-service { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 78px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.monitor-service:last-child { border-bottom: 0; }
.monitor-state-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(67,201,154,.13); color: #72deb8; font-weight: 700; }
.monitor-service.failed .monitor-state-icon { background: var(--danger-bg); color: #ff9191; }
.monitor-service.inactive .monitor-state-icon, .monitor-service.unknown .monitor-state-icon { background: var(--surface-3); color: #aaa; }
.monitor-service-copy { min-width: 0; }
.monitor-service-copy strong, .monitor-service-copy small { display: block; overflow-wrap: anywhere; }
.monitor-service-copy small { margin-top: 3px; }
.monitor-service-meta { display: grid; gap: 4px; justify-items: end; text-align: right; }
.monitor-state-label { color: #72deb8; font-size: .78rem; font-weight: 600; }
.monitor-service.failed .monitor-state-label { color: #ff9191; }
.monitor-service.inactive .monitor-state-label, .monitor-service.unknown .monitor-state-label { color: #aaa; }
.monitor-service-meta small { white-space: nowrap; font-size: .75rem; }
.monitor-empty { padding: 22px 0; color: var(--muted); text-align: center; }
.incident-history { margin-top: 14px; }
.infrastructure-form { margin-bottom: 20px; }
.infrastructure-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: end; }
.infrastructure-list { display: grid; border-top: 1px solid var(--border); }
.infrastructure-row { display: grid; grid-template-columns: 28px minmax(240px, 1fr) auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); }
.infrastructure-row:last-child { border-bottom: 0; }
.infrastructure-row > div:nth-child(2) strong, .infrastructure-row > div:nth-child(2) small { display: block; }
.infrastructure-row > div:nth-child(2) small { margin-top: 3px; }
.infrastructure-row .monitor-state-icon.failed { background: var(--danger-bg); color: #ff9191; }
.infrastructure-row .monitor-state-icon.inactive { background: var(--surface-3); color: #aaa; }
.domain-row { grid-template-columns: 28px minmax(230px, 1fr) auto minmax(260px, auto); }
.domain-statuses { display: flex; flex-wrap: wrap; gap: 6px; }
.infrastructure-actions { justify-content: flex-end; }
.monitoring-owner-confirmation { margin: 4px 0 18px; }
.support-layout { grid-template-columns: minmax(0, 1fr) 330px; }
.functions-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); }
.feature-list { display: grid; gap: 2px; }
.section-tabs, .filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.section-tabs a, .filter-tabs a { padding: 9px 11px; border-bottom: 2px solid transparent; color: var(--muted); }
.section-tabs a:hover, .filter-tabs a:hover { color: var(--text); }
.section-tabs a.active, .filter-tabs a.active { border-bottom-color: var(--accent); color: var(--text); }
.filter-tabs a { display: flex; align-items: center; gap: 7px; }
.filter-tabs a span { min-width: 24px; padding: 2px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; text-align: center; }
.filter-tabs a.active span { background: rgba(255,165,0,.15); color: var(--accent); }
.feature-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.feature-row strong, .feature-row small { display: block; }
.feature-row small { margin-top: 4px; color: var(--muted); }
.feature-controls { display: grid; grid-template-columns: repeat(2, 56px); gap: 10px; flex: 0 0 auto; }
.feature-controls form { display: grid; justify-items: center; gap: 5px; }
.feature-unavailable { display: grid; justify-items: center; align-content: start; gap: 5px; color: #666; }
.feature-controls form small { margin: 0; font-size: .72rem; text-transform: uppercase; }
.switch { width: 42px; height: 24px; padding: 3px; border: 1px solid #555; border-radius: 999px; background: #252525; cursor: pointer; }
.switch span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #777; transition: transform .16s ease, background .16s ease; }
.switch.on { border-color: rgba(255,165,0,.65); background: rgba(255,165,0,.2); }
.switch.on span { background: var(--accent); transform: translateX(18px); }
.inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.inline-actions form { display: flex; gap: 5px; align-items: center; }
.inline-actions input { width: 145px; padding: 7px 8px; }
.owner-confirmation { display: flex; align-items: end; gap: 12px; margin-bottom: 14px; }
.owner-confirmation label { width: min(360px, 100%); }
.owner-confirmation small { padding-bottom: 10px; }
.account-actions { display: grid; justify-items: end; gap: 6px; }
.account-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.conversation { display: grid; align-content: start; gap: 11px; height: clamp(360px, 58vh, 620px); overflow-y: auto; overflow-anchor: none; scrollbar-gutter: stable; scroll-behavior: smooth; padding: 4px 6px 16px 2px; }
.message-bubble { max-width: min(760px, 92%); padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.message-bubble.user-message { justify-self: start; background: #1b1b1b; }
.message-bubble.admin-message { justify-self: end; background: rgba(255,165,0,.11); border-color: rgba(255,165,0,.32); }
.message-bubble.message-enter { animation: message-enter .18s ease-out both; }
@keyframes message-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.message-meta { display: flex; align-items: baseline; gap: 9px; margin-bottom: 7px; }
.message-meta small { display: inline; }
.reply-form { position: relative; display: grid; gap: 7px; padding-top: 16px; border-top: 1px solid var(--border); }
.reply-composer { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 8px; align-items: end; min-height: 58px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.reply-composer:focus-within { border-color: #555; box-shadow: 0 0 0 1px rgba(255,255,255,.04); }
.reply-composer textarea { align-self: center; min-height: 38px; max-height: 160px; padding: 8px 3px; border: 0; border-radius: 0; background: transparent; resize: none; overflow-y: auto; line-height: 1.45; }
.reply-composer textarea:focus { outline: 0; }
.attachment-button, .composer-send { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.attachment-button { position: relative; border: 2px solid #777; border-radius: 50%; color: #aaa; }
.attachment-plus, .attachment-plus::before, .attachment-plus::after { position: absolute; display: block; background: currentColor; border-radius: 1px; content: ""; }
.attachment-plus { inset: 50% auto auto 50%; width: 16px; height: 2px; transform: translate(-50%, -50%); }
.attachment-plus::before { inset: 50% auto auto 50%; width: 2px; height: 16px; transform: translate(-50%, -50%); }
.attachment-plus::after { display: none; }
.attachment-button:hover, .attachment-button.has-file { border-color: var(--accent); color: var(--accent); }
.attachment-button:focus-visible, .composer-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.composer-send { color: var(--accent); font-size: 1.65rem; transform: translateX(1px); }
.composer-send:hover { color: #ffc04d; }
.composer-send:disabled { color: #5b5b5b; cursor: default; opacity: .72; }
.reply-form.is-sending .reply-composer { border-color: #3f3f3f; }
.reply-form.is-sending .attachment-button { pointer-events: none; opacity: .55; }
.support-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.composer-feedback { display: flex; justify-content: space-between; gap: 12px; min-height: 18px; padding: 0 12px; }
.selected-file { min-width: 0; overflow: hidden; color: var(--accent); text-overflow: ellipsis; white-space: nowrap; }
.selected-file:empty { display: none; }
.composer-status { margin-left: auto; color: var(--muted); white-space: nowrap; }
.composer-status.success { color: #72deb8; }
.composer-status.error { color: #ff9191; }
.new-message-notice { position: absolute; z-index: 2; bottom: calc(100% + 10px); left: 50%; padding: 5px 10px; border: 1px solid rgba(255,165,0,.4); border-radius: 6px; background: #2b2418; color: #ffc04d; cursor: pointer; font-size: .82rem; transform: translateX(-50%); box-shadow: 0 5px 18px rgba(0,0,0,.28); }
.new-message-notice:hover { background: rgba(255,165,0,.16); }
.new-message-notice[hidden] { display: none; }
.support-list-notice { position: static; display: block; margin: 0 auto 12px; transform: none; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-note { font-size: .86rem; }
.support-attachment { display: grid; gap: 7px; margin-bottom: 9px; color: var(--accent); font-size: .85rem; }
.support-attachment img { display: block; width: min(520px, 100%); max-height: 420px; object-fit: contain; object-position: left center; border: 1px solid var(--border); border-radius: 6px; background: #111; }
.select-cell { width: 42px; text-align: center; }
.select-cell input { width: 17px; height: 17px; accent-color: var(--accent); }
.ai-train-bar { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; padding-top: 14px; }
.ai-train-bar .button { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ai-runtime-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: rgba(255,165,0,.38); }
.ai-runtime-panel strong, .ai-runtime-panel small { display: block; }
.ai-runtime-panel small { max-width: 760px; margin-top: 4px; color: var(--muted); }
.ai-runtime-panel form { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.manual-actions { display: flex; justify-content: flex-end; gap: 6px; }
.manual-fields { display: grid; gap: 16px; }
.manual-content { min-height: 52vh; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.55; }
.check-line { display: flex; align-items: center; gap: 9px; }
.check-line input { width: 17px; height: 17px; accent-color: var(--accent); }
.manual-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tariffs-layout, .notifications-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.row-editor { position: relative; }
.row-editor summary { list-style: none; cursor: pointer; }
.row-editor summary::-webkit-details-marker { display: none; }
.row-editor[open] { min-width: 250px; }
.row-editor form { margin-top: 9px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); text-align: left; }
.form-page { width: min(900px, 100%); }
.notification-body { min-height: 220px; resize: vertical; line-height: 1.5; }
.notification-attachment { display: grid; justify-items: start; gap: 8px; }
.notification-attachment-button { display: inline-flex; align-items: center; gap: 8px; }
.notification-attachment-icon { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 18px; line-height: 1; }
.notification-image-preview { display: grid; grid-template-columns: 72px minmax(0, 1fr) 34px; align-items: center; gap: 12px; width: min(100%, 520px); padding: 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.notification-image-preview[hidden] { display: none; }
.notification-image-preview img { width: 72px; height: 54px; border-radius: 4px; object-fit: cover; background: #111; }
.notification-image-preview div { min-width: 0; }
.notification-image-preview strong, .notification-image-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-image-preview small, .field-hint { color: var(--muted); font-size: .8rem; }
.field-error { min-height: 1em; color: var(--danger); font-size: .82rem; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--surface); }
.template-list { display: grid; gap: 4px; }
.template-row { display: grid; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.template-row:last-child { border-bottom: 0; }
.template-row strong, .template-row small { display: block; }
.template-row small { margin-top: 4px; }
.template-preview { max-width: 760px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-details { max-width: 360px; }
.automation-list { display: grid; }
.automation-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 17px 4px; border-bottom: 1px solid var(--border); }
.automation-row:last-child { border-bottom: 0; }
.automation-state { align-self: start; padding-top: 5px; }
.automation-copy p { margin: 6px 0 3px; }
.automation-actions { display: flex; align-items: center; gap: 12px; }
.automation-actions form { display: flex; }
.placeholder-note { padding: 14px; border: 1px solid rgba(255,165,0,.3); border-radius: var(--radius); background: rgba(255,165,0,.07); }
.placeholder-note > div { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 7px; }
.placeholder-note code { display: inline-block; padding: 4px 7px; border-radius: 5px; background: var(--surface-3); color: #ffc45c; }
.onboarding-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.release-summary { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(210px, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); }
.release-current, .agent-state { min-width: 0; padding: 18px; background: var(--surface); }
.release-current { display: grid; gap: 4px; }
.release-current small, .release-current span, .agent-state small { color: var(--muted); }
.release-current strong { color: var(--accent); font-size: 1.45rem; }
.agent-state { display: flex; align-items: center; gap: 12px; }
.agent-state strong, .agent-state small { display: block; }
.agent-state small { margin-top: 4px; }
.deploy-live { border-color: rgba(255,165,0,.38); }
.deploy-progress { height: 8px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.deploy-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.deploy-progress-label { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: .82rem; }
.deploy-log { max-height: 260px; margin: 16px 0 0; padding: 13px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #101010; color: #c9c9c9; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; line-height: 1.5; }
.upload-release { display: flex; align-items: end; gap: 12px; }
.upload-release label { flex: 1; }
.release-list { display: grid; }
.release-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.release-row:last-child { border-bottom: 0; }
.release-main > div { display: flex; align-items: center; gap: 9px; }
.release-main p { margin: 7px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.release-main small, .table-note { display: block; color: var(--muted); }
.release-action { position: relative; }
.release-action > summary { list-style: none; cursor: pointer; }
.release-action > summary::-webkit-details-marker { display: none; }
.release-action[open] { width: min(330px, 42vw); }
.release-action form { display: grid; gap: 10px; margin-top: 9px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.release-action label { font-size: .82rem; }
.table-note { max-width: 340px; margin-top: 5px; white-space: normal; }

@media (max-width: 1350px) {
  .staff-layout { grid-template-columns: 1fr; }
  .staff-layout .side-column { position: static; }
}
@media (max-width: 1050px) {
  .stat-grid, .onboarding-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .support-layout { grid-template-columns: 1fr; }
  .functions-layout { grid-template-columns: 1fr; }
  .tariffs-layout, .notifications-layout { grid-template-columns: 1fr; }
  .side-column { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-column .danger-zone { grid-column: 1 / -1; }
  .health-grid, .compact-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitoring-groups { grid-template-columns: 1fr; }
  .release-summary { grid-template-columns: 1fr; }
  .domain-row { grid-template-columns: 28px minmax(0, 1fr); }
  .domain-statuses, .domain-row .infrastructure-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -268px; width: 248px; transition: left .18s ease; box-shadow: 18px 0 50px rgba(0,0,0,.35); }
  .sidebar.open { left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; background: rgba(21,21,21,.94); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
  .content { padding: 22px 16px 48px; }
  .conversation { height: clamp(300px, 55vh, 520px); }
  .form-grid, .side-column, .check-grid, .metric-grid { grid-template-columns: 1fr; }
  .side-column .danger-zone { grid-column: auto; }
  .subscription-meta { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; flex-direction: column; }
  .monitoring-updated { justify-items: start; }
  .monitoring-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitoring-counters > div:nth-child(2) { border-right: 0; }
  .monitoring-counters > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .incident-row { grid-template-columns: 28px minmax(0, 1fr); }
  .incident-meta { grid-column: 2; justify-content: space-between; }
  .infrastructure-row { grid-template-columns: 27px minmax(0, 1fr); }
  .infrastructure-row > .inline-actions { grid-column: 2; justify-content: flex-start; }
  .owner-confirmation { align-items: stretch; flex-direction: column; }
  .owner-confirmation small { padding-bottom: 0; }
  .upload-release, .release-row { align-items: stretch; flex-direction: column; }
  .upload-release { display: flex; }
  .release-row { display: flex; }
  .release-action[open] { width: 100%; }
  .automation-row { grid-template-columns: 16px minmax(0, 1fr); }
  .automation-actions { grid-column: 2; justify-content: space-between; }
}
@media (max-width: 440px) {
  .stat-grid, .onboarding-stats { grid-template-columns: 1fr; }
  .section-block { padding: 15px; }
  .subscription-head { flex-direction: column; }
  .toolbar > * { flex: 1 1 100%; }
  .toolbar .button { width: 100%; }
  .login-panel { padding: 22px; }
  .health-grid, .compact-health, .three { grid-template-columns: 1fr; }
  .monitoring-summary { grid-template-columns: 38px minmax(0, 1fr); padding: 16px; }
  .monitoring-summary-icon { width: 38px; height: 38px; }
  .monitoring-counters { grid-template-columns: 1fr; }
  .monitoring-counters > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .monitoring-counters > div:last-child { border-bottom: 0; }
  .monitor-service { grid-template-columns: 27px minmax(0, 1fr); }
  .monitor-service-meta { grid-column: 2; grid-auto-flow: column; justify-content: space-between; justify-items: start; text-align: left; }
  .infrastructure-checks { grid-template-columns: 1fr; }
  .reply-composer { grid-template-columns: 36px minmax(0, 1fr) 36px; padding-inline: 8px; }
  .attachment-button, .composer-send { width: 36px; height: 36px; }
}
