@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090a0c;
  --sidebar: #0c0d10;
  --surface: #121419;
  --surface-raised: #171a20;
  --surface-soft: #0f1115;
  --surface-hover: #1b1e25;
  --border: #24272e;
  --border-strong: #343841;
  --text: #f3f4f6;
  --text-soft: #b4b8c1;
  --muted: #747985;
  --accent: #7891ff;
  --accent-hover: #8ba1ff;
  --accent-soft: rgba(120, 145, 255, .12);
  --green: #63d58a;
  --green-soft: rgba(62, 185, 104, .10);
  --orange: #efb36a;
  --orange-soft: rgba(229, 148, 54, .10);
  --red: #ff858b;
  --red-soft: rgba(255, 100, 108, .10);
  --shadow: 0 1px 0 rgba(255, 255, 255, .025), 0 18px 40px rgba(0, 0, 0, .16);
  --radius: 14px;
  --radius-small: 10px;
  --sidebar-width: 248px;
  --transition: 160ms cubic-bezier(.2, .7, .2, 1);
}

body[data-theme="light"] {
  --bg: #f6f7f9;
  --sidebar: #f1f2f5;
  --surface: #ffffff;
  --surface-raised: #f8f9fb;
  --surface-soft: #fafbfc;
  --surface-hover: #f0f2f6;
  --border: #e1e3e8;
  --border-strong: #ccd0d8;
  --text: #17191e;
  --text-soft: #555b66;
  --muted: #858b96;
  --accent: #4f6edb;
  --accent-hover: #415fc7;
  --accent-soft: rgba(79, 110, 219, .10);
  --green: #19733b;
  --green-soft: #edf8f0;
  --orange: #ad5c16;
  --orange-soft: #fff6e9;
  --red: #b4232a;
  --red-soft: #fff0f1;
  --shadow: 0 1px 2px rgba(24, 28, 38, .04), 0 10px 30px rgba(24, 28, 38, .045);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; color-scheme: dark; background: var(--bg); }
body[data-theme="light"] { color-scheme: light; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font: 14px/1.5 "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; }
button { color: inherit; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 17px; height: 17px; stroke-width: 1.35; }
input, textarea, select { color: var(--text); }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #353941; background-clip: padding-box; }
.is-hidden { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 17px; font-weight: 660; letter-spacing: -.025em; }
.brand-mark { display: block; width: 28px; height: 28px; object-fit: contain; filter: invert(1); }
body[data-theme="light"] .brand-mark { filter: none; }
.section-label { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 550; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #51d17b; box-shadow: 0 0 0 3px rgba(81, 209, 123, .08); }

.auth-view { display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 40px; background: #090a0c; }
.auth-shell { display: grid; width: min(1100px, 100%); min-height: 650px; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); align-items: center; gap: clamp(55px, 8vw, 120px); }
.auth-intro { display: flex; min-height: 570px; flex-direction: column; padding: 14px 0; }
.auth-copy { margin: auto 0 42px; }
.auth-copy .section-label { color: #828894; }
.auth-copy h1 { max-width: 560px; margin: 0 0 20px; color: #f6f7f9; font-size: clamp(48px, 6vw, 78px); font-weight: 570; line-height: .98; letter-spacing: -.062em; }
.auth-copy > p:last-child { max-width: 500px; margin: 0; color: #9da2ad; font-size: 16px; line-height: 1.65; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #22252b; border-radius: 12px; background: #0e1013; }
.feature-list li div { display: flex; min-width: 0; flex-direction: column; }
.feature-list strong { color: #dedfe4; font-size: 12px; font-weight: 600; }
.feature-list small { overflow: hidden; margin-top: 2px; color: #6f7580; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-note { display: flex; align-items: center; gap: 9px; margin: 22px 0 0; color: #6f7580; font-size: 11px; }
.auth-card { display: flex; min-height: 510px; flex-direction: column; justify-content: center; padding: clamp(36px, 5vw, 54px); border: 1px solid #272a31; border-radius: 20px; background: #111318; box-shadow: 0 30px 90px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .025); }
.mobile-brand { display: none; align-items: center; gap: 11px; margin-bottom: 64px; color: #f3f4f6; }
.auth-heading { margin-bottom: 32px; }
.auth-heading h2 { margin: 0 0 7px; color: #f3f4f6; font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.auth-heading p { margin: 0; color: #7f8590; font-size: 13px; }
.stack-form { display: flex; flex-direction: column; gap: 19px; }
.auth-view .field > span:first-child { color: #aeb3bd; }
.auth-view .field > input, .auth-view .input-with-action { color: #f3f4f6; border-color: #30343c; background: #0c0e11; }
.auth-view .input-with-action input { color: #f3f4f6; }

.field { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 8px; }
.field > span:first-child, .type-picker legend { color: var(--text-soft); font-size: 12px; font-weight: 560; }
.field small { color: var(--muted); font-size: 11px; }
.field > input, .field > select, .field > textarea, .input-with-action, .domain-field { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-small); background: var(--surface-soft); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
.field > input, .field > select { padding: 0 13px; }
.field > textarea { padding: 13px; resize: vertical; }
.field > input:focus, .field > select:focus, .field > textarea:focus, .input-with-action:focus-within, .domain-field:focus-within { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
input::placeholder, textarea::placeholder { color: #565b65; }
body[data-theme="light"] input::placeholder, body[data-theme="light"] textarea::placeholder { color: #9ba0aa; }
.input-with-action, .domain-field { display: flex; align-items: center; overflow: hidden; }
.input-with-action input, .domain-field input { min-width: 0; height: 42px; flex: 1; padding: 0 13px; border: 0; outline: 0; color: var(--text); background: transparent; }
.domain-field > span { padding-left: 13px; color: var(--muted); font-size: 12px; }
.reveal-button { width: 34px !important; height: 34px !important; flex: 0 0 34px !important; margin-right: 5px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%) !important; background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px !important; background-size: 5px 5px, 5px 5px !important; background-repeat: no-repeat !important; }
select option { color: var(--text); background: var(--surface); }
.form-error { min-height: 0; margin: -5px 0 0; color: var(--red); font-size: 12px; }
.form-error:empty { display: none; }
.form-note { color: var(--muted); font-size: 11px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius-small); background: transparent; font-size: 12px; font-weight: 620; transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition); }
.button:hover { text-decoration: none; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .58; }
.button:disabled svg, .is-spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.button-large { min-height: 47px; }
.button-primary { color: #0c0d10; background: #eef0f5; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18); }
.button-primary:hover { background: #fff; }
body[data-theme="light"] .button-primary { color: #fff; background: var(--accent); }
body[data-theme="light"] .button-primary:hover { background: var(--accent-hover); }
.button-secondary, .button-ghost { color: var(--text-soft); border-color: var(--border-strong); background: var(--surface-raised); }
.button-secondary:hover, .button-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.button-danger { color: #fff; background: #d54b53; }
.button-danger-soft { color: var(--red); border-color: rgba(255, 133, 139, .22); background: var(--red-soft); }
.button-row { display: flex; gap: 8px; }
.icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.icon-button:hover { color: var(--text); border-color: var(--border); background: var(--surface-hover); }
.icon-button svg { width: 16px; height: 16px; }
.plain-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--accent); background: transparent; font-size: 12px; font-weight: 580; }
.plain-link:hover { color: var(--accent-hover); }
.plain-link svg { width: 13px; height: 13px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 24px 16px 16px; border-right: 1px solid var(--border); background: var(--sidebar); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 31px; }
.sidebar-close { display: none; }
.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-item { position: relative; display: flex; width: 100%; min-height: 45px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: #858b96; background: transparent; font-size: 13px; font-weight: 510; text-align: left; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.nav-item:hover { color: var(--text-soft); background: rgba(255, 255, 255, .025); }
body[data-theme="light"] .nav-item:hover { background: rgba(15, 18, 25, .045); }
.nav-item.is-active { color: var(--text); border-color: var(--border); background: var(--surface-raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }
.nav-item.is-active::before { content: ""; position: absolute; left: -17px; width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-icon { display: grid; width: 18px; place-items: center; color: currentColor; }
.nav-icon svg { width: 16px; height: 16px; }
.nav-count { min-width: 21px; margin-left: auto; padding: 1px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 10px; text-align: center; }
.nav-divider { height: 1px; margin: 16px 11px; background: var(--border); }
.sidebar-bottom { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.server-mini, .profile-card { display: flex; width: 100%; min-height: 58px; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.server-mini > div, .profile-card > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.server-mini strong, .profile-card strong { overflow: hidden; font-size: 11px; font-weight: 610; text-overflow: ellipsis; white-space: nowrap; }
.server-mini div span, .profile-card small { color: var(--muted); font-size: 10px; }
.server-mini .icon-button { width: 29px; height: 29px; flex-basis: 29px; }
.profile-card { border-color: transparent; background: transparent; text-align: left; }
.profile-card:hover { border-color: var(--border); background: var(--surface-soft); }
.profile-card > i svg { width: 13px; height: 13px; }
.avatar { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 9px; color: #101217; background: #e8eaf0; font-size: 11px; font-weight: 740; }
body[data-theme="light"] .avatar { color: #fff; background: var(--accent); }
.sidebar-backdrop { display: none; }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 25; top: 0; display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 clamp(28px, 3.4vw, 52px); border-bottom: 1px solid var(--border); background: rgba(9, 10, 12, .93); backdrop-filter: blur(14px); }
body[data-theme="light"] .topbar { background: rgba(246, 247, 249, .92); }
.topbar-title { display: flex; align-items: center; gap: 11px; }
.topbar-title > div { display: flex; align-items: baseline; gap: 10px; }
.topbar-kicker { color: var(--muted); font-size: 11px; }
.topbar h2 { margin: 0; font-size: 15px; font-weight: 630; }
.topbar-actions { display: flex; align-items: center; gap: 5px; }
.top-status { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; color: var(--text-soft); font-size: 11px; }
.menu-button { display: none; }
.page-wrap { width: min(100%, 1380px); margin: 0 auto; padding: 48px clamp(28px, 3.4vw, 52px) 80px; }
.page { display: none; }
.page.is-active { display: block; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 31px; }
.page-heading h1 { margin: 0; font-size: 32px; font-weight: 590; line-height: 1.12; letter-spacing: -.042em; }
.page-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; }

.status-banner { display: flex; min-height: 92px; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid rgba(99, 213, 138, .16); border-radius: var(--radius); background: var(--green-soft); }
.status-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid rgba(99, 213, 138, .14); border-radius: 12px; background: rgba(99, 213, 138, .08); font-size: 20px; }
.status-banner > div { min-width: 0; flex: 1; }
.status-banner h2 { margin: 0 0 3px; color: #b9efca; font-size: 14px; font-weight: 610; }
body[data-theme="light"] .status-banner h2 { color: var(--green); }
.status-banner p { margin: 0; color: #879d8e; font-size: 12px; }
.uptime-chip, .badge { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-soft); background: rgba(9, 10, 12, .38); font-size: 10px; font-weight: 590; white-space: nowrap; }
body[data-theme="light"] .uptime-chip { background: var(--surface); }
.badge-success { color: var(--green); border-color: rgba(99, 213, 138, .2); background: var(--green-soft); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.metric-card { position: relative; display: flex; min-height: 190px; flex-direction: column; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: border-color var(--transition), background var(--transition); }
.metric-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.metric-heading { display: flex; align-items: center; gap: 9px; color: var(--text-soft); font-size: 12px; font-weight: 570; }
.metric-heading small { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 500; }
.metric-icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); font-size: 15px; filter: saturate(.84); }
.metric-value { display: flex; align-items: baseline; margin-top: 21px; }
.metric-value strong { font-size: 38px; font-weight: 590; line-height: 1; letter-spacing: -.05em; }
.metric-value span { margin-left: 4px; color: var(--muted); font-size: 13px; }
.metric-card > p { overflow: hidden; margin: 9px 0 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card .plain-link { margin-top: auto; }
.progress-track { height: 4px; margin-top: auto; overflow: hidden; border-radius: 999px; background: #252830; }
body[data-theme="light"] .progress-track { background: #eceef2; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 450ms ease; }
.progress-track.blue span { background: var(--accent); }
.progress-track.orange span { background: var(--orange); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(350px, .7fr); gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.server-panel, .activity-panel, .sites-panel, .compose-panel, .delivery-card, .recent-mail-panel, .timeline-panel { padding: 23px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 17px; margin-bottom: 21px; }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 610; letter-spacing: -.015em; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.server-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 20px; }
.server-stats > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.server-stats span { color: var(--muted); font-size: 9px; }
.server-stats strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.service-row { display: flex; min-height: 62px; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
.service-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); font-size: 15px; }
.service-row > div { display: flex; flex: 1; flex-direction: column; }
.service-row strong { font-size: 11px; font-weight: 600; }
.service-row small { color: var(--muted); font-size: 9px; }
.service-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 600; }
.service-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.service-state.is-online { color: var(--green); }
.service-state.is-online i { background: var(--green); }

.activity-list { display: flex; flex-direction: column; }
.activity-item { display: grid; min-height: 59px; grid-template-columns: 35px 1fr auto; align-items: center; gap: 11px; padding: 8px 0; }
.activity-item + .activity-item { border-top: 1px solid var(--border); }
.activity-marker { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); font-size: 14px; }
.activity-copy { display: flex; min-width: 0; flex-direction: column; }
.activity-copy strong { overflow: hidden; font-size: 10px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { color: var(--muted); font-size: 9px; }
.activity-time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.timeline-panel { padding: 10px 23px; }
.timeline .activity-item { min-height: 72px; grid-template-columns: 40px 1fr auto; }
.timeline .activity-marker { width: 38px; height: 38px; font-size: 16px; }
.timeline .activity-copy strong { font-size: 12px; }
.empty-state { display: flex; min-height: 330px; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.empty-state.mini { min-height: 215px; }
.empty-icon { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-raised); font-size: 24px; }
.empty-icon svg { width: 18px; height: 18px; }
.empty-state h2, .empty-state h3 { margin: 0 0 6px; font-size: 15px; font-weight: 610; }
.empty-state p { max-width: 410px; margin: 0 0 19px; color: var(--muted); font-size: 11px; }

.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.summary-strip > div { display: flex; min-height: 86px; align-items: center; gap: 13px; padding: 16px 22px; }
.summary-strip > div + div { border-left: 1px solid var(--border); }
.summary-icon { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); font-size: 17px; }
.summary-strip > div > span:last-child { display: flex; flex-direction: column; }
.summary-strip small { color: var(--muted); font-size: 9px; }
.summary-strip strong { margin-top: 2px; font-size: 16px; font-weight: 610; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.search-shell { display: flex; width: min(350px, 100%); height: 41px; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-soft); }
.search-shell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-shell svg { width: 14px; height: 14px; color: var(--muted); }
.search-shell input { width: 100%; height: 39px; padding: 0 9px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.segmented button { min-height: 30px; padding: 0 11px; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; }
.segmented button.is-active { color: var(--text); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border); }
.site-list { display: flex; flex-direction: column; }
.site-row { display: grid; min-height: 76px; grid-template-columns: minmax(220px, 1.4fr) minmax(140px, .7fr) minmax(110px, .5fr) auto; align-items: center; gap: 18px; padding: 9px 4px; border-top: 1px solid var(--border); }
.site-row:first-child { border-top: 0; }
.site-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.site-favicon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--text-soft); background: var(--surface-raised); font-size: 13px; font-weight: 660; }
.site-identity > div, .site-cell { display: flex; min-width: 0; flex-direction: column; }
.site-identity strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.site-identity a { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.site-identity a:hover { color: var(--accent); }
.site-cell span { color: var(--muted); font-size: 9px; }
.site-cell strong { margin-top: 3px; color: var(--text-soft); font-size: 10px; font-weight: 580; }
.site-status { display: inline-flex; width: fit-content; align-items: center; gap: 6px; text-transform: capitalize; }
.site-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.site-status.online { color: var(--green); }
.site-status.online i { background: var(--green); }
.site-status.pending { color: var(--orange); }
.site-status.pending i { background: var(--orange); }
.site-status.offline, .site-status.degraded { color: var(--red); }
.site-status.offline i, .site-status.degraded i { background: var(--red); }
.site-actions { display: flex; justify-content: flex-end; gap: 3px; }
.site-actions .icon-button { width: 33px; height: 33px; flex-basis: 33px; }

.mail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); gap: 14px; }
.compose-form { display: flex; flex-direction: column; gap: 16px; }
.message-field { position: relative; }
.message-field textarea { min-height: 270px; line-height: 1.65; }
.message-field > small { position: absolute; right: 11px; bottom: 9px; padding: 2px 6px; border-radius: 5px; background: var(--surface); }
.compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 17px; margin-top: 4px; }
.mail-side { display: flex; flex-direction: column; gap: 14px; }
.delivery-card { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.delivery-card h2 { margin: 0 0 6px; font-size: 16px; font-weight: 610; }
.delivery-card > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.delivery-details { width: 100%; margin-bottom: 18px; }
.delivery-details > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 10px; }
.delivery-details span { color: var(--muted); }
.delivery-details strong { overflow: hidden; max-width: 65%; color: var(--text-soft); text-overflow: ellipsis; white-space: nowrap; }
.warning-text { color: var(--orange) !important; }
.success-text { color: var(--green) !important; }
.danger-text { color: var(--red) !important; }
.delivery-card .button-row { margin-top: auto; }
.mail-stats-card { display: flex; min-height: 104px; align-items: center; gap: 14px; padding: 19px; }
.mail-stats-card > div { display: flex; flex-direction: column; }
.mail-stats-card small, .mail-stats-card span { color: var(--muted); font-size: 9px; }
.mail-stats-card strong { margin: 2px 0; font-size: 24px; font-weight: 590; }
.recent-mail-panel { margin-top: 14px; }
.mail-log { display: flex; flex-direction: column; }
.mail-row { display: grid; min-height: 60px; grid-template-columns: 34px minmax(150px, .8fr) minmax(170px, 1.3fr) 85px 105px; align-items: center; gap: 13px; border-top: 1px solid var(--border); }
.mail-row:first-child { border-top: 0; }
.mail-row-icon { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(99, 213, 138, .18); border-radius: 8px; color: var(--green); background: var(--green-soft); }
.mail-row-icon.failed { color: var(--red); border-color: rgba(255, 133, 139, .2); background: var(--red-soft); }
.mail-row-icon svg { width: 13px; height: 13px; }
.mail-row > span { overflow: hidden; color: var(--text-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .mail-subject { color: var(--text); font-weight: 580; }
.mail-state { display: inline-flex; width: fit-content; align-items: center; gap: 5px; color: var(--green) !important; text-transform: capitalize; }
.mail-state.failed { color: var(--red) !important; }
.mail-state i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-card { display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding: 23px; }
.settings-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-raised); font-size: 18px; }
.settings-copy h2 { margin: 0 0 5px; font-size: 15px; font-weight: 610; }
.settings-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.settings-form { display: flex; grid-column: 1 / -1; flex-direction: column; gap: 14px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.settings-form .button { align-self: flex-start; }
.action-card { min-height: 180px; align-items: start; }
.action-card > .button, .action-card > .badge { grid-column: 2; align-self: end; justify-self: start; }
.danger-card { border-color: rgba(255, 133, 139, .15); }

.modal-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); }
.modal { position: relative; width: min(100%, 560px); max-height: calc(100vh - 44px); overflow: auto; padding: 27px; border: 1px solid var(--border-strong); border-radius: 16px; background: #14161a; box-shadow: 0 30px 90px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .025); }
body[data-theme="light"] .modal { background: var(--surface); }
.modal-wide { width: min(100%, 930px); }
.modal-small { width: min(100%, 410px); text-align: center; }
.modal-head { display: flex; justify-content: space-between; gap: 19px; margin-bottom: 24px; }
.modal-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 620; letter-spacing: -.025em; }
.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }
.modal-head-actions { display: flex; gap: 2px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 11px; }
.form-row > .field { flex: 1; }
.form-row .grow { flex: 2; }
.form-row .small-field { flex: 0 0 100px; }
.type-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.type-picker legend { grid-column: 1 / -1; margin-bottom: 1px; }
.type-picker label { position: relative; cursor: pointer; }
.type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker label > span { display: grid; min-height: 98px; grid-template-columns: 31px 1fr; align-content: center; column-gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); transition: border-color var(--transition), background var(--transition); }
.type-picker label > span > b { grid-row: 1 / span 2; }
.type-picker strong { font-size: 11px; font-weight: 600; }
.type-picker small { color: var(--muted); font-size: 9px; }
.type-picker input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.form-divider { display: flex; align-items: center; gap: 10px; margin: 3px 0; color: var(--muted); font-size: 10px; }
.form-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 7px; padding-top: 20px; border-top: 1px solid var(--border); }
.modal-actions.centered { justify-content: center; }
.modal-small h2 { margin: 0 0 7px; font-size: 20px; }
.modal-small > p { margin: 0 auto 22px; color: var(--muted); font-size: 11px; }
.editor-modal { overflow: hidden; }
.editor-form { display: flex; flex-direction: column; }
.editor-form textarea { width: 100%; height: min(60vh, 590px); padding: 17px; resize: vertical; border: 1px solid var(--border-strong); border-radius: 10px; outline: none; color: #dfe1e6; background: #0a0b0d; font: 12px/1.65 "SFMono-Regular", Consolas, monospace; tab-size: 2; }
.editor-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor-note { margin-right: auto; color: var(--muted); font: 10px "SFMono-Regular", Consolas, monospace; }

.toast-stack { position: fixed; z-index: 150; top: 18px; right: 18px; display: flex; width: min(380px, calc(100% - 36px)); flex-direction: column; gap: 8px; }
.toast { display: grid; min-height: 64px; grid-template-columns: 34px 1fr 25px; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--border-strong); border-radius: 12px; background: #17191e; box-shadow: 0 18px 50px rgba(0, 0, 0, .32); }
body[data-theme="light"] .toast { background: var(--surface); }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: 170ms ease; }
.toast-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); }
.toast.error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast.warning .toast-icon { color: var(--orange); background: var(--orange-soft); }
.toast-icon svg { width: 14px; height: 14px; }
.toast-copy { display: flex; min-width: 0; flex-direction: column; }
.toast-copy strong { font-size: 11px; font-weight: 610; }
.toast-copy span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.toast-close { display: grid; width: 25px; height: 25px; place-items: center; color: var(--muted); background: transparent; }
.toast-close svg { width: 13px; height: 13px; }

@media (max-width: 1160px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .mail-grid { grid-template-columns: 1fr; }
  .mail-side { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr 410px; gap: 55px; }
  .auth-copy h1 { font-size: 58px; }
}

@media (max-width: 880px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 255px; transform: translateX(-102%); transition: transform 190ms ease; box-shadow: 12px 0 45px rgba(0, 0, 0, .32); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: grid; }
  .sidebar-backdrop { position: fixed; z-index: 35; inset: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
  .sidebar-backdrop.is-open { display: block; }
  .main-area { margin-left: 0; }
  .auth-shell { width: min(460px, 100%); grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-card { min-height: 570px; }
  .mobile-brand { display: flex; }
  .site-row { grid-template-columns: minmax(200px, 1fr) minmax(110px, .5fr) auto; }
  .site-row .site-type-cell { display: none; }
}

@media (max-width: 720px) {
  .auth-view { padding: 0; }
  .auth-shell { min-height: 100vh; }
  .auth-card { min-height: 100vh; border: 0; border-radius: 0; }
  .top-status { display: none; }
  .page-wrap { padding-top: 34px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .status-banner { align-items: flex-start; }
  .uptime-chip { margin-left: auto; }
  .server-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .panel-toolbar { align-items: stretch; flex-direction: column; }
  .search-shell { width: 100%; }
  .segmented { align-self: flex-start; }
  .site-row { grid-template-columns: 1fr auto; }
  .site-row .site-cell { display: none; }
  .mail-side { grid-template-columns: 1fr; }
  .compose-actions { align-items: stretch; flex-direction: column; }
  .compose-actions .button { width: 100%; }
  .mail-row { grid-template-columns: 33px minmax(120px, 1fr) 72px; }
  .mail-row .mail-recipient, .mail-row .mail-date { display: none; }
  .form-row { flex-direction: column; }
  .form-row .small-field { flex-basis: auto; }
}

@media (max-width: 500px) {
  .topbar { height: 66px; padding: 0 15px; }
  .topbar-title > div { display: block; }
  .topbar-kicker { display: none; }
  .page-wrap { padding: 28px 15px 56px; }
  .page-heading { margin-bottom: 26px; }
  .page-heading h1 { font-size: 28px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 175px; }
  .status-banner { display: grid; grid-template-columns: 42px 1fr; }
  .uptime-chip { grid-column: 2; margin: 5px 0 0; justify-self: start; }
  .server-panel, .activity-panel, .sites-panel, .compose-panel, .delivery-card, .recent-mail-panel, .timeline-panel { padding: 18px; }
  .server-stats { grid-template-columns: 1fr 1fr; }
  .modal-layer { padding: 9px; }
  .modal { max-height: calc(100vh - 18px); padding: 21px; }
  .type-picker { grid-template-columns: 1fr; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .modal-actions.centered { flex-direction: column-reverse; }
  .settings-card { grid-template-columns: 38px 1fr; padding: 19px; }
  .settings-icon { width: 38px; height: 38px; }
  .action-card > .button, .action-card > .badge { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* icon-tile refinements v10 */
.status-icon { color: var(--green); }
.metric-icon, .service-icon, .summary-icon, .settings-icon { color: var(--text-soft); }
.type-icon { display: grid; place-items: center; width: 31px; height: 31px; color: var(--muted); }
.type-picker input:checked + span .type-icon { color: var(--accent); }
.confirm-icon { display: grid; width: 46px; height: 46px; place-items: center; margin: 2px auto 15px; border: 1px solid color-mix(in srgb, var(--red) 22%, transparent); border-radius: 12px; background: var(--red-soft); color: var(--red); }
.status-banner.is-attention { border-color: color-mix(in srgb, var(--red) 22%, transparent); background: var(--red-soft); }
.status-banner.is-attention h2 { color: var(--red); }
.status-banner.is-attention p { color: var(--muted); }
.status-banner.is-attention .status-icon { border-color: color-mix(in srgb, var(--red) 22%, transparent); background: var(--red-soft); color: var(--red); }
body[data-theme="light"] .auth-intro .brand-mark,
body[data-theme="light"] .mobile-brand .brand-mark { filter: invert(1); }
