:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #69758a;
  --line: #e1e6ef;
  --canvas: #f4f6fa;
  --paper: #ffffff;
  --nav: #0b1424;
  --nav-soft: #18243a;
  --blue: #5268e9;
  --blue-dark: #3549c6;
  --blue-soft: #edf0ff;
  --cyan: #2bc4bd;
  --success: #168765;
  --success-soft: #e7f7f1;
  --warning: #b97618;
  --warning-soft: #fff3dc;
  --danger: #b84455;
  --shadow: 0 14px 40px rgba(24, 39, 75, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
svg { display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 10; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px 18px; color: #d6dcec; background: radial-gradient(circle at 20% -10%, rgba(82, 104, 233, .24), transparent 33%), linear-gradient(180deg, #0b1424 0%, #0e192a 100%); border-right: 1px solid rgba(255, 255, 255, .04); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand strong, .login-wordmark strong { display: block; color: #fff; font-size: 19px; letter-spacing: -.025em; }
.brand small, .login-wordmark small { display: block; margin-top: 2px; color: #7f8ca5; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.brand-mark { display: inline-grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #6479f6, #4256d4); box-shadow: 0 10px 26px rgba(63, 84, 220, .3); }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.brand-mark.large { width: 46px; height: 46px; border-radius: 14px; }
.brand-mark.large svg { width: 26px; height: 26px; }

.workspace-card { display: flex; align-items: center; gap: 10px; margin: 0 2px 22px; padding: 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 11px; background: rgba(255, 255, 255, .035); }
.workspace-card div { min-width: 0; }
.workspace-card small, .workspace-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card small { margin-bottom: 4px; color: #697891; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.workspace-card strong { color: #dce3f2; font-size: 11px; font-weight: 650; }
.workspace-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(43, 196, 189, .1); }
.sidebar nav { display: grid; gap: 3px; }
.nav-section { margin: 17px 11px 7px; color: #586781; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-section:first-child { margin-top: 0; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 9px; color: #98a5bb; font-size: 13px; font-weight: 620; transition: color .16s ease, background .16s ease; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(82, 104, 233, .22), rgba(82, 104, 233, .08)); }
.nav-link.active::before { position: absolute; left: -18px; width: 3px; height: 23px; border-radius: 0 3px 3px 0; background: #6d80ff; content: ""; }
.nav-icon { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; color: #71809a; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.nav-link.active .nav-icon { color: #8293ff; }
.engine-card { margin-top: auto; padding: 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.engine-card > div { display: flex; align-items: center; gap: 8px; }
.engine-card strong { color: #e5e9f4; font-size: 12px; }
.engine-card p { margin: 8px 0 10px; color: #7f8ca2; font-size: 10px; line-height: 1.5; }
.engine-card > span { color: #9ca8ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.engine-pulse { width: 7px; height: 7px; border-radius: 50%; background: #efa94c; box-shadow: 0 0 0 4px rgba(239, 169, 76, .1); }

.workspace { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(24px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; color: #9aa3b2; font-size: 12px; }
.breadcrumb b { color: #c5cbd4; font-weight: 400; }
.breadcrumb strong { overflow: hidden; color: #3b4559; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.environment { display: inline-flex; align-items: center; gap: 7px; padding-right: 16px; border-right: 1px solid var(--line); color: #667085; font-size: 10px; font-weight: 650; }
.environment i { width: 7px; height: 7px; border-radius: 50%; background: #21a77b; box-shadow: 0 0 0 4px rgba(33, 167, 123, .09); }
.user-chip { display: flex; min-width: 0; align-items: center; gap: 9px; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #4052ca; background: #e9edff; font-size: 12px; font-weight: 800; }
.user-chip div { min-width: 0; }
.user-chip strong, .user-chip small { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { color: #30394b; font-size: 11px; }
.user-chip small { margin-top: 2px; color: #929bab; font-size: 9px; }
.logout { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #7c8798; background: #fff; font-size: 16px; }
.logout:hover { color: var(--blue); border-color: #cbd2fa; background: var(--blue-soft); }

.main-content { min-width: 0; max-width: 1600px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 52px) 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 0 0 25px; }
.page-head.compact { max-width: 760px; }
.page-head h1 { margin: 5px 0 8px; color: #162037; font-size: clamp(28px, 3.2vw, 39px); line-height: 1.08; letter-spacing: -.04em; }
.page-head p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0; color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 11px; border-radius: 8px; font-size: 10px; font-weight: 750; }
.status span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--success); background: var(--success-soft); }
.status-dev { color: #a46510; background: var(--warning-soft); }
.compact-button { min-height: 36px !important; padding: 8px 13px !important; font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; padding: 19px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 6px 20px rgba(34, 50, 84, .035); }
.metric::after { position: absolute; top: 0; right: 0; width: 55px; height: 55px; border-radius: 0 0 0 100%; background: linear-gradient(135deg, transparent, rgba(82, 104, 233, .055)); content: ""; }
.metric > span { display: block; color: #7a8598; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.metric strong { display: block; margin: 10px 0 4px; color: #1d2840; font-size: 27px; letter-spacing: -.04em; }
.metric small { color: #8b95a6; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .85fr); gap: 18px; margin-bottom: 18px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid #e9edf3; }
.panel-head h2 { margin: 0 0 3px; color: #273149; font-size: 15px; letter-spacing: -.02em; }
.panel-head p { margin: 0; color: #8993a4; font-size: 10px; }
.panel-head .panel-kicker { margin-bottom: 5px; color: var(--blue); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.text-link { color: var(--blue); font-size: 10px; font-weight: 750; }
.pill { display: inline-block; padding: 5px 8px; border-radius: 6px; color: #5b6678; background: #eef1f5; font-size: 9px; font-weight: 750; }
.pill-ok { color: var(--success); background: var(--success-soft); }
.pill-warn, .pill-dev { color: var(--warning); background: var(--warning-soft); }

.flow-map { display: grid; grid-template-columns: 1fr minmax(30px, .3fr) 1fr minmax(30px, .3fr) 1fr; align-items: center; padding: 29px 24px 25px; }
.flow-node { display: flex; align-items: center; gap: 9px; min-width: 0; }
.flow-node > div { min-width: 0; }
.flow-node strong, .flow-node small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-node strong { color: #364157; font-size: 11px; }
.flow-node small { margin-top: 3px; color: #98a1b1; font-size: 9px; }
.flow-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid #e1e6ef; border-radius: 10px; color: #667289; background: #f7f8fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 800; }
.primary-node .flow-icon { color: #fff; border-color: var(--blue); background: linear-gradient(145deg, #6679f4, #4559d7); box-shadow: 0 8px 19px rgba(73, 93, 218, .22); }
.flow-link { height: 1px; margin: 0 9px; background: repeating-linear-gradient(90deg, #ccd3df 0, #ccd3df 4px, transparent 4px, transparent 8px); }
.flow-link span { display: block; width: 6px; height: 6px; margin: -2.5px 0 0 auto; border-top: 1px solid #aeb7c7; border-right: 1px solid #aeb7c7; transform: rotate(45deg); }
.flow-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 20px 20px; border: 1px solid #e7eaf0; border-radius: 10px; background: #f8f9fc; }
.flow-stats div { padding: 11px 13px; border-right: 1px solid #e7eaf0; }
.flow-stats div:last-child { border: 0; }
.flow-stats span, .flow-stats strong { display: block; }
.flow-stats span { color: #9099a9; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.flow-stats strong { margin-top: 4px; color: #5f6a7d; font-size: 10px; }
.health-list { padding: 4px 20px 8px; }
.health-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.health-row:last-child { border: 0; }
.service-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: #5d6bd1; background: #f0f2ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 850; }
.health-row strong, .health-row small { display: block; }
.health-row strong { color: #354057; font-size: 10px; }
.health-row small { margin-top: 3px; color: #99a2b1; font-size: 8px; }
.health-state { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 800; }
.health-state::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.health-state.online { color: var(--success); }
.health-state.building { color: var(--warning); }
.health-state.planned { color: #8a94a7; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 18px; }
.form-panel { padding-bottom: 21px; }
.form-panel .panel-head { margin-bottom: 19px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 11px 15px; color: #8791a3; background: #f8f9fb; text-align: left; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 15px; border-top: 1px solid #edf0f4; vertical-align: middle; }
tbody tr:hover { background: #fafbfc; }
td strong { font-size: 11px; }
.sub { display: block; margin-top: 4px; color: #929bab; font-size: 9px; }
.empty { padding: 34px; color: var(--muted); text-align: center; }
.details { max-width: 390px; color: #667185; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; word-break: break-word; }
code { padding: 2px 5px; border-radius: 5px; color: #4556c7; background: #eef0ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.usage { width: 110px; height: 5px; margin-right: 8px; border: 0; border-radius: 10px; overflow: hidden; background: #e9edf3; vertical-align: middle; }
.usage::-webkit-progress-bar { background: #e9edf3; }
.usage::-webkit-progress-value { background: var(--blue); }
.usage::-moz-progress-bar { background: var(--blue); }

.stack-form { display: grid; gap: 14px; padding: 0 20px; }
.stack-form label { display: grid; gap: 7px; color: #465168; font-size: 10px; font-weight: 750; }
.stack-form input, .stack-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d2d8e3; border-radius: 8px; outline: none; color: #202a3e; background: #fff; font-size: 12px; font-weight: 520; transition: .15s ease; }
.stack-form input::placeholder { color: #b2b9c5; }
.stack-form input:focus, .stack-form select:focus { border-color: #7b8cf0; box-shadow: 0 0 0 3px rgba(82, 104, 233, .11); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-form .check { display: flex; align-items: center; grid-template-columns: auto 1fr; gap: 9px; }
.stack-form .check input { width: 17px; min-height: 17px; accent-color: var(--blue); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; border: 0; border-radius: 8px; font-size: 11px; font-weight: 780; transition: transform .15s ease, filter .15s ease; }
.button.primary { color: #fff; background: linear-gradient(135deg, #6175ef, #4053ce); box-shadow: 0 9px 20px rgba(64, 83, 206, .19); }
.button.primary:hover { filter: brightness(.97); transform: translateY(-1px); }
.button.wide { width: 100%; }
.button.wide span { margin-left: auto; font-size: 17px; font-weight: 400; }
.notice { padding: 11px 12px; border-left: 3px solid #d19a42; border-radius: 7px; color: #75531f; background: #fff8e9; font-size: 10px; line-height: 1.5; }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: radial-gradient(circle at 8% 10%, rgba(82, 104, 233, .11), transparent 30%), radial-gradient(circle at 92% 85%, rgba(43, 196, 189, .09), transparent 28%), #eef1f7; }
.login-shell { width: min(100%, 1060px); min-height: 650px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid rgba(255, 255, 255, .82); border-radius: 22px; background: #fff; box-shadow: 0 34px 90px rgba(19, 31, 58, .17); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: clamp(38px, 6vw, 70px); color: #fff; background: radial-gradient(circle at 12% 8%, rgba(102, 123, 244, .3), transparent 35%), radial-gradient(circle at 90% 90%, rgba(43, 196, 189, .15), transparent 38%), linear-gradient(145deg, #0a1425, #101d33); }
.login-brand::after { position: absolute; top: -90px; right: -100px; width: 300px; height: 300px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255, 255, 255, .018), 0 0 0 90px rgba(255, 255, 255, .012); content: ""; }
.login-wordmark { display: flex; align-items: center; gap: 12px; margin-bottom: 52px; }
.login-brand .eyebrow { color: #8194ff; }
.login-brand h1 { max-width: 510px; margin: 13px 0 16px; font-size: clamp(34px, 4.7vw, 49px); line-height: 1.04; letter-spacing: -.05em; }
.login-brand > p:not(.eyebrow) { max-width: 510px; margin: 0; color: #9ba9bf; font-size: 12px; line-height: 1.7; }
.login-flow { display: grid; grid-template-columns: 1fr 26px 1fr 26px 1fr; align-items: center; margin-top: 40px; padding: 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.login-flow div { min-width: 0; }
.login-flow span, .login-flow strong, .login-flow small { display: block; }
.login-flow span { margin-bottom: 7px; color: #7487f6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 800; }
.login-flow strong { color: #e5e9f4; font-size: 10px; }
.login-flow small { margin-top: 3px; color: #748199; font-size: 8px; }
.login-flow i { height: 1px; margin: 0 5px; background: repeating-linear-gradient(90deg, #4f5f78 0, #4f5f78 3px, transparent 3px, transparent 6px); }
.mail-preview { margin-top: 38px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .075); border-radius: 13px; background: rgba(255, 255, 255, .04); box-shadow: 0 18px 45px rgba(0, 0, 0, .12); }
.preview-head { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 9px; padding: 8px 2px 11px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.preview-head span { width: 7px; height: 7px; border-radius: 50%; background: #6579f3; box-shadow: 0 0 0 4px rgba(101, 121, 243, .1); }
.preview-head strong { color: #dfe5ef; font-size: 9px; }
.preview-head small { color: #65738a; font-size: 7px; }
.preview-row { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; padding: 11px 2px; border-bottom: 1px solid rgba(255, 255, 255, .055); }
.preview-row:last-child { border: 0; }
.preview-row i { width: 27px; height: 27px; border-radius: 8px; background: linear-gradient(145deg, rgba(98, 119, 239, .35), rgba(69, 87, 207, .12)); }
.preview-row strong, .preview-row small { display: block; }
.preview-row strong { color: #d2d9e7; font-size: 8px; }
.preview-row small { margin-top: 4px; color: #6e7b91; font-size: 7px; }
.preview-row.muted-row { opacity: .62; }
.security-note { display: flex; align-items: center; gap: 11px; margin-top: 30px; }
.shield { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: #57d9c2; background: rgba(43, 196, 189, .1); }
.shield svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.security-note strong, .security-note small { display: block; }
.security-note strong { color: #d9dfeb; font-size: 10px; }
.security-note small { margin-top: 4px; color: #748199; font-size: 9px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 5vw, 63px); }
.login-card h2 { margin: 10px 0 8px; color: #1c263b; font-size: 30px; letter-spacing: -.04em; }
.login-card > div > p:not(.eyebrow) { margin: 0 0 30px; color: var(--muted); font-size: 11px; }
.login-card .stack-form { padding: 0; }
.mobile-wordmark { display: none; }
.alert { margin: 0 0 18px; padding: 11px 12px; border: 1px solid #f0c7cf; border-radius: 8px; color: #8f3448; background: #fff3f5; font-size: 10px; }
.muted { color: var(--muted); }
.center { display: block; margin-top: 18px; text-align: center; }
.login-card .center { font-size: 9px; line-height: 1.5; }
.login-mode-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 22px; padding: 11px; border: 1px solid #e8ebf3; border-radius: 9px; background: #f8f9fc; }
.login-mode-note > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #5268e9; background: #edf0ff; }
.login-mode-note svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.login-mode-note p { margin: 0; color: #7b8597; font-size: 8px; line-height: 1.55; }
.error-card { width: min(100%, 520px); padding: 48px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.error-card .brand-mark { margin: 0 auto 20px; }
.error-card h1 { margin: 9px 0; font-size: 30px; }
.error-card p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); line-height: 1.6; }

/* Mailbox users land in a mail-client workspace, separate from the admin console. */
.webmail-body { overflow: hidden; background: #f5f7fb; }
.webmail-app { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.mail-sidebar { min-height: 100vh; display: flex; flex-direction: column; padding: 22px 15px 18px; border-right: 1px solid #e2e6ee; background: #fff; }
.mail-brand { padding: 0 8px 26px; }
.mail-brand strong { color: #202b40; }
.mail-brand small { color: #929bad; }
.compose-button { display: flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; margin: 0 3px 22px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #667af1, #4357d1); box-shadow: 0 10px 23px rgba(67, 87, 209, .2); font-size: 11px; font-weight: 750; }
.compose-button:disabled { opacity: .68; }
.compose-button span { font-size: 19px; font-weight: 350; line-height: 1; }
.folder-nav { display: grid; gap: 3px; }
.folder-link { display: flex; min-height: 38px; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 8px; color: #778196; font-size: 11px; font-weight: 620; }
.folder-link.active { color: #4255c8; background: #eef1ff; }
.folder-link b { display: grid; width: 18px; height: 18px; place-items: center; color: #929cad; font-size: 15px; font-weight: 500; }
.folder-link b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.folder-link em { font-style: normal; }
.folder-link.active b { color: #586de5; }
.folder-link i { min-width: 19px; margin-left: auto; padding: 2px 5px; border-radius: 10px; color: #5c6ed7; background: #dfe4ff; font-size: 8px; font-style: normal; text-align: center; }
.mail-storage { margin-top: auto; padding: 14px 11px 5px; border-top: 1px solid #edf0f4; }
.mail-storage div { display: flex; justify-content: space-between; gap: 8px; color: #727d90; font-size: 8px; }
.mail-storage strong { color: #505b70; font-size: 8px; }
.mail-storage progress { width: 100%; height: 5px; margin: 9px 0 6px; border: 0; border-radius: 9px; overflow: hidden; background: #e9edf4; }
.mail-storage progress::-webkit-progress-bar { background: #e9edf4; }
.mail-storage progress::-webkit-progress-value { background: #5c70e8; }
.mail-storage progress::-moz-progress-bar { background: #5c70e8; }
.mail-storage small { color: #a0a8b7; font-size: 7px; }
.mail-stage { min-width: 0; }
.mail-topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 clamp(22px, 3vw, 42px); border-bottom: 1px solid #e3e7ef; background: rgba(255, 255, 255, .91); backdrop-filter: blur(12px); }
.mail-search { width: min(100%, 500px); min-width: 180px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #e0e5ed; border-radius: 9px; color: #98a1b1; background: #f7f8fb; }
.mail-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }
.mail-search input { width: 100%; height: 38px; border: 0; outline: 0; color: #69758a; background: transparent; font-size: 10px; }
.mail-account { display: flex; min-width: 0; align-items: center; gap: 9px; }
.mail-account > div { min-width: 0; }
.mail-account strong, .mail-account small { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-account strong { color: #344056; font-size: 10px; }
.mail-account small { margin-top: 3px; color: #98a1b1; font-size: 8px; }
.inbox { padding: 31px clamp(22px, 3vw, 42px) 50px; }
.inbox-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.inbox-head h1 { margin: 5px 0 5px; color: #1e293f; font-size: 30px; letter-spacing: -.04em; }
.inbox-head p:not(.eyebrow) { margin: 0; color: #8b95a6; font-size: 10px; }
.mail-engine-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #f0d8b3; border-radius: 8px; color: #a76a16; background: #fff8e9; font-size: 9px; font-weight: 720; }
.mail-engine-badge i { width: 6px; height: 6px; border-radius: 50%; background: #d38d29; box-shadow: 0 0 0 3px rgba(211, 141, 41, .1); }
.message-panel { min-height: calc(100vh - 186px); border: 1px solid #e1e6ee; border-radius: 13px; background: #fff; box-shadow: 0 12px 35px rgba(29, 42, 72, .05); overflow: hidden; }
.message-toolbar { height: 51px; display: flex; align-items: center; gap: 12px; padding: 0 17px; border-bottom: 1px solid #e9edf3; }
.select-box { width: 15px; height: 15px; border: 1px solid #cfd6e2; border-radius: 4px; }
.message-toolbar button { border: 0; color: #8c96a7; background: transparent; font-size: 9px; font-weight: 650; }
.toolbar-separator { width: 1px; height: 19px; background: #e4e8ef; }
.message-toolbar small { margin-left: auto; color: #a0a8b7; font-size: 8px; }
.mail-empty { min-height: calc(100vh - 238px); display: flex; align-items: center; flex-direction: column; justify-content: center; padding: 45px 25px; text-align: center; }
.empty-mail-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 17px; color: #5368df; background: #eef1ff; box-shadow: 0 12px 30px rgba(76, 96, 217, .1); }
.empty-mail-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.mail-empty h2 { margin: 18px 0 7px; color: #2b364c; font-size: 18px; letter-spacing: -.025em; }
.mail-empty > p { max-width: 510px; margin: 0; color: #8c96a7; font-size: 10px; line-height: 1.65; }
.development-notice { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding: 9px 12px; border: 1px solid #e5e9f1; border-radius: 9px; background: #f8f9fc; color: #7e889a; font-size: 8px; }
.development-notice strong { color: #4d596e; }
.development-notice i { width: 3px; height: 3px; border-radius: 50%; background: #a9b0bd; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .split-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 22px 12px; }
  .brand { justify-content: center; padding: 0 0 24px; }
  .brand > span:last-child, .workspace-card, .nav-section, .nav-link > span:last-child, .engine-card { display: none; }
  .sidebar nav { gap: 8px; }
  .nav-link { justify-content: center; padding: 11px; }
  .nav-link.active::before { left: -12px; }
  .topbar { padding: 0 20px; }
  .environment, .user-chip div { display: none; }
  .main-content { padding: 28px 20px 48px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; max-width: 520px; }
  .login-brand { display: none; }
  .mobile-wordmark { display: flex; align-items: center; gap: 10px; margin-bottom: 42px; }
  .mobile-wordmark strong { color: #24304a; font-size: 18px; }
  .webmail-app { grid-template-columns: 76px minmax(0, 1fr); }
  .mail-sidebar { padding: 18px 11px; }
  .mail-brand { justify-content: center; padding: 0 0 24px; }
  .mail-brand > span:last-child, .folder-link:not(.active), .folder-link em, .folder-link i, .mail-storage { display: none; }
  .compose-button { width: 44px; min-height: 42px; margin: 0 auto 22px; font-size: 0; }
  .compose-button span { font-size: 19px; }
  .folder-link { justify-content: center; padding: 10px; }
  .mail-account > div { display: none; }
}
@media (max-width: 620px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; display: block; padding: 12px 15px; }
  .brand { justify-content: flex-start; padding: 0; }
  .brand > span:last-child { display: block; }
  .sidebar nav { grid-template-columns: repeat(5, 1fr); margin-top: 12px; }
  .nav-link { padding: 8px; }
  .nav-link.active::before { display: none; }
  .topbar { height: 58px; }
  .breadcrumb span, .breadcrumb b { display: none; }
  .main-content { padding: 24px 14px 42px; }
  .head-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .status, .compact-button { justify-content: center; }
  .metric-grid, .field-grid { grid-template-columns: 1fr; }
  .flow-map { grid-template-columns: 1fr; gap: 10px; }
  .flow-link { width: 1px; height: 15px; margin: 0 0 0 18px; background: repeating-linear-gradient(180deg, #ccd3df 0, #ccd3df 4px, transparent 4px, transparent 8px); }
  .flow-link span { display: none; }
  .flow-stats { grid-template-columns: 1fr; }
  .flow-stats div { border-right: 0; border-bottom: 1px solid #e7eaf0; }
  .health-state { font-size: 0; }
  .login-body { padding: 13px; }
  .login-card { padding: 36px 24px; }
  .webmail-body { overflow: auto; }
  .webmail-app { display: block; }
  .mail-sidebar { min-height: auto; display: block; padding: 11px 14px; border-right: 0; border-bottom: 1px solid #e2e6ee; }
  .mail-brand { justify-content: flex-start; padding: 0; }
  .mail-brand > span:last-child { display: block; }
  .compose-button, .folder-nav { display: none; }
  .mail-topbar { height: 58px; padding: 0 14px; }
  .mail-search { min-width: 0; }
  .mail-account .avatar { display: none; }
  .inbox { padding: 23px 14px 35px; }
  .inbox-head { align-items: flex-start; flex-direction: column; }
  .message-panel { min-height: 520px; }
  .mail-empty { min-height: 470px; }
  .development-notice { max-width: 320px; align-items: flex-start; flex-direction: column; }
  .development-notice i { display: none; }
}
