:root {
  --bg: #090d16;
  --surface: #111724;
  --surface-2: #151d2c;
  --surface-3: #1b2536;
  --border: #263247;
  --border-soft: #1e293b;
  --text: #f2f6fc;
  --muted: #8f9bb0;
  --muted-2: #68758b;
  --blue: #4b8cff;
  --blue-soft: rgba(75, 140, 255, .13);
  --violet: #9a7cff;
  --green: #3ddc97;
  --orange: #ffad5c;
  --red: #ff5d73;
  --shadow: 0 18px 50px rgba(0, 0, 0, .3);
  --radius: 14px;
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, rgba(75,140,255,.1), transparent 27rem), var(--bg); color: var(--text); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .025; background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px); background-size: 32px 32px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; font-size: 1.25rem; letter-spacing: -.025em; }
h3 { margin-bottom: .25rem; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.eyebrow { margin-bottom: .35rem; color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.danger-text { color: var(--red) !important; }
.hidden { display: none !important; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar); flex-direction: column; padding: 24px 16px; border-right: 1px solid var(--border-soft); background: rgba(10, 15, 25, .94); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(89,151,255,.5); border-radius: 11px; background: linear-gradient(145deg, rgba(75,140,255,.25), rgba(89,63,167,.25)); color: #bcd4ff; font-size: .72rem; font-weight: 900; letter-spacing: .04em; box-shadow: inset 0 0 18px rgba(75,140,255,.15); }
.brand-mark.large { width: 48px; height: 48px; border-radius: 14px; font-size: .85rem; }
.brand strong, .brand small, .login-brand strong, .login-brand small, .user-chip strong, .user-chip small { display: block; }
.brand strong { font-size: .96rem; }.brand small, .login-brand small { margin-top: 2px; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: .86rem; font-weight: 650; transition: .18s ease; }
.main-nav a span { width: 20px; color: var(--muted-2); font-size: 1rem; text-align: center; }
.main-nav a:hover { background: var(--surface); color: var(--text); }.main-nav a.active { border-color: rgba(75,140,255,.18); background: var(--blue-soft); color: #dce9ff; }.main-nav a.active span { color: var(--blue); }
.sidebar-foot { display: grid; gap: 12px; margin-top: auto; }
.user-chip { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--border-soft); }
.user-chip > span:last-child { min-width: 0; }.user-chip strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.user-chip small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--blue-soft); color: #bad2ff; font-size: .77rem; font-weight: 800; }
.app-main { min-height: 100vh; margin-left: var(--sidebar); padding: 0 34px 50px; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; min-height: 94px; align-items: center; gap: 20px; justify-content: space-between; border-bottom: 1px solid var(--border-soft); background: rgba(9,13,22,.88); backdrop-filter: blur(16px); }
.topbar .eyebrow { margin-bottom: .2rem; }.top-actions { display: flex; align-items: center; gap: 9px; }.top-actions form { display: contents; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--text); font-size: 1.25rem; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: #dfe8f7; font-size: .78rem; font-weight: 750; transition: .16s ease; }
.button:hover { transform: translateY(-1px); border-color: #3b4a63; filter: brightness(1.08); }.button.primary { border-color: #4b8cff; background: linear-gradient(135deg, #3478ed, #566df3); color: white; box-shadow: 0 8px 24px rgba(52,120,237,.22); }.button.ghost { background: rgba(18,25,39,.75); }.button.danger { border-color: rgba(255,93,115,.55); background: rgba(255,93,115,.13); color: #ff9aa8; }.button.small { min-height: 31px; padding: 5px 10px; font-size: .7rem; }.button.full { width: 100%; }.large-button { min-height: 46px; font-size: .82rem; }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.25rem; }.icon-button:hover { background: var(--surface-3); color: var(--text); }
.toast { position: fixed; z-index: 60; top: 22px; right: 24px; display: flex; max-width: 430px; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid; border-radius: 11px; background: #131b28; box-shadow: var(--shadow); font-size: .8rem; transition: .3s ease; }.toast span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; font-weight: 900; }.toast.success { border-color: rgba(61,220,151,.35); }.toast.success span { background: rgba(61,220,151,.14); color: var(--green); }.toast.error { border-color: rgba(255,93,115,.4); }.toast.error span { background: rgba(255,93,115,.14); color: var(--red); }.toast.fade { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.breadcrumb { display: flex; align-items: center; gap: 9px; padding: 18px 0; color: var(--muted); font-size: .72rem; }.breadcrumb a:hover { color: var(--blue); }.breadcrumb strong { color: #cbd5e5; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 28px; }
.stat-card { position: relative; display: flex; min-height: 130px; align-items: flex-start; gap: 14px; overflow: hidden; padding: 20px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: linear-gradient(145deg, rgba(21,29,44,.95), rgba(14,20,31,.95)); box-shadow: 0 12px 30px rgba(0,0,0,.12); }.stat-card::after { content: ""; position: absolute; right: -40px; bottom: -65px; width: 130px; height: 130px; border-radius: 50%; background: currentColor; opacity: .055; filter: blur(2px); }.stat-card small, .panel small { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .11em; }.stat-card strong { display: block; margin: 6px 0 3px; color: var(--text); font-size: 1.75rem; line-height: 1; }.stat-card p { margin: 0; color: var(--muted-2); font-size: .69rem; }.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: currentColor; color: inherit; font-size: .95rem; box-shadow: inset 0 0 0 1px currentColor; }.accent-blue { color: var(--blue); }.accent-violet { color: var(--violet); }.accent-green { color: var(--green); }.accent-orange { color: var(--orange); }
.section-head, .intro-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 14px; }.section-head h2, .intro-row h2 { margin: 0; }.section-head > p, .intro-row > p { max-width: 520px; margin: 0; font-size: .76rem; }
.organization-list { display: grid; gap: 14px; }.organization-card, .panel, .user-card { border: 1px solid var(--border-soft); border-radius: var(--radius); background: rgba(17,23,36,.86); }.organization-card > header, .user-card > header { display: flex; align-items: center; gap: 13px; padding: 17px 19px; border-bottom: 1px solid var(--border-soft); }.organization-card header div:nth-child(2), .user-card header div:nth-child(2) { min-width: 0; }.organization-card h3, .user-card h3 { font-size: .92rem; }.organization-card header p, .user-card header p { overflow: hidden; margin: 0; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }.org-avatar { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(75,140,255,.26); border-radius: 11px; background: var(--blue-soft); color: #a9c7ff; font-size: .72rem; font-weight: 900; }.count-pill, .badge { margin-left: auto; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .05em; }
.mailbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 13px; }.mailbox-card { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(13,19,30,.62); transition: .16s ease; }.mailbox-card:hover { transform: translateY(-1px); border-color: rgba(75,140,255,.42); background: var(--blue-soft); }.mailbox-state { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 10px currentColor; }.mailbox-state.healthy { color: var(--green); background: var(--green); }.mailbox-state.failed { color: var(--red); background: var(--red); }.mailbox-state.idle { color: var(--orange); background: var(--orange); }.mailbox-main { min-width: 0; }.mailbox-main strong, .mailbox-main > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.mailbox-main strong { font-size: .78rem; }.mailbox-main > span { margin: 3px 0 7px; color: var(--muted); font-size: .68rem; }.mailbox-meta { display: flex; gap: 8px; color: var(--muted-2); font-size: .61rem; }.mailbox-meta span:first-child { color: var(--blue); font-weight: 800; }.chevron { margin-left: auto; color: var(--muted-2); font-size: 1.3rem; }
.empty-inline { padding: 18px; color: var(--muted); font-size: .74rem; text-align: center; }.empty-state { display: grid; min-height: 230px; place-items: center; align-content: center; padding: 30px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }.empty-state > span { margin-bottom: 10px; color: var(--blue); font-size: 2rem; }.empty-state h3 { color: var(--text); }.empty-state p { margin: 0; font-size: .76rem; }.empty-state.compact { min-height: 210px; border: 0; }
.recent-panel { margin-top: 18px; }.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }.panel-head h2, .panel-head h3 { margin: 0; font-size: .9rem; }.run-list { padding: 4px 14px; }.run-row { display: grid; grid-template-columns: 34px minmax(170px, 1fr) 2fr auto; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }.run-row:last-child { border: 0; }.run-status { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; font-size: .7rem; font-weight: 900; }.run-status.success { background: rgba(61,220,151,.1); color: var(--green); }.run-status.failed { background: rgba(255,93,115,.1); color: var(--red); }.run-status.running { background: var(--blue-soft); color: var(--blue); }.run-row strong { display: block; font-size: .72rem; }.run-row small { display: block; margin-top: 3px; letter-spacing: 0; }.run-metrics { display: flex; gap: 7px; }.run-metrics span { padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: .61rem; }.run-label { color: var(--muted); font-size: .59rem !important; letter-spacing: .09em; }

label { display: grid; gap: 7px; color: #bdc8da; font-size: .7rem; font-weight: 700; }
label small { color: var(--muted-2); font-size: .61rem; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--border); outline: 0; border-radius: 8px; background: #0d1420; color: var(--text); font-size: .76rem; transition: .15s ease; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(75,140,255,.1); }
input[type="checkbox"] { width: 16px; min-height: auto; height: 16px; accent-color: var(--blue); }
.form-stack { display: grid; gap: 16px; }.form-grid { display: grid; gap: 14px; }.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }.span-two { grid-column: span 2; }.check-row { display: flex; flex-wrap: wrap; gap: 18px; }.check { display: flex; grid-template-columns: none; align-items: center; gap: 8px; cursor: pointer; }.check span { font-size: .7rem; }.check small { display: block; margin-top: 2px; }.warning-check { align-items: flex-start; padding: 12px; border: 1px solid rgba(255,173,92,.25); border-radius: 9px; background: rgba(255,173,92,.06); }

.modal { width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 30px); padding: 0; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); color: var(--text); box-shadow: 0 24px 90px rgba(0,0,0,.65); }.modal.modal-wide { width: min(720px, calc(100vw - 28px)); }.modal::backdrop { background: rgba(2,5,10,.76); backdrop-filter: blur(5px); }.modal-card { padding: 22px; }.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.modal-head h2 { margin: 0; }.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 5px; }.modal-actions .left-action { margin-right: auto; }.warning-box { padding: 13px 14px; border: 1px solid rgba(255,173,92,.3); border-radius: 9px; background: rgba(255,173,92,.08); }.warning-box strong { color: #ffd0a0; font-size: .76rem; }.warning-box p { margin: 4px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }.warning-box.danger { border-color: rgba(255,93,115,.34); background: rgba(255,93,115,.08); }.warning-box.danger strong { color: #ff9cab; }.confirm-modal { width: min(450px, calc(100vw - 28px)); text-align: center; }.confirm-modal .modal-card { display: grid; justify-items: center; padding: 29px; }.danger-symbol { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 16px; border: 1px solid rgba(75,140,255,.4); border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-size: 1.3rem; font-weight: 900; }.confirm-modal.is-danger .danger-symbol { border-color: rgba(255,93,115,.4); background: rgba(255,93,115,.1); color: var(--red); }.confirm-modal h2 { font-size: 1.15rem; }.confirm-modal .muted { font-size: .75rem; line-height: 1.55; }.snapshot-warning { width: 100%; padding: 10px; border: 1px solid rgba(255,173,92,.25); border-radius: 8px; background: rgba(255,173,92,.08); color: #ffc88e; font-size: .68rem; line-height: 1.45; }.confirm-modal .modal-actions { width: 100%; justify-content: center; margin-top: 7px; }

.auth-body { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(circle at 50% 0, rgba(75,140,255,.16), transparent 32rem), #080c14; }.auth-main { width: 100%; }.login-shell { display: grid; width: min(430px, calc(100vw - 30px)); margin: 0 auto; gap: 20px; }.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }.login-brand strong { font-size: 1.03rem; }.login-card { padding: 30px; border: 1px solid var(--border); border-radius: 17px; background: rgba(17,23,36,.92); box-shadow: 0 30px 80px rgba(0,0,0,.42); }.login-card h1 { margin-bottom: 8px; font-size: 1.6rem; }.login-card > .muted { margin-bottom: 24px; font-size: .75rem; line-height: 1.55; }.login-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--muted-2); font-size: .62rem; }.login-note span { color: var(--green); font-size: .5rem; }.auth-footer { margin: 0; color: var(--muted-2); font-size: .6rem; text-align: center; }.form-error, .form-success { margin-bottom: 15px; padding: 10px 12px; border: 1px solid; border-radius: 8px; font-size: .7rem; }.form-error { border-color: rgba(255,93,115,.3); background: rgba(255,93,115,.07); color: #ffa2ae; }.form-success { border-color: rgba(61,220,151,.3); background: rgba(61,220,151,.07); color: #8dedc2; }

.mailbox-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: rgba(17,23,36,.82); }.mailbox-identity { display: flex; align-items: center; gap: 13px; }.mailbox-identity h2 { margin-bottom: 4px; font-size: 1rem; }.mailbox-identity p { margin: 0; color: var(--muted); font-size: .67rem; }.sync-state { display: flex; align-items: center; gap: 10px; padding-left: 20px; border-left: 1px solid var(--border-soft); }.sync-state > span { width: 7px; height: 7px; border-radius: 50%; }.sync-state.healthy > span { background: var(--green); box-shadow: 0 0 10px var(--green); }.sync-state.failed > span { background: var(--red); box-shadow: 0 0 10px var(--red); }.sync-state small, .sync-state strong, .sync-state p { display: block; }.sync-state small { color: var(--muted-2); font-size: .57rem; font-weight: 800; letter-spacing: .1em; }.sync-state strong { margin-top: 3px; font-size: .7rem; }.sync-state p { margin: 2px 0 0; color: var(--red); font-size: .6rem; }
.snapshot-banner { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255,173,92,.25); border-radius: 10px; background: rgba(255,173,92,.07); }.snapshot-banner > span { color: var(--orange); font-size: 1.2rem; }.snapshot-banner strong { display: block; color: #ffd0a0; font-size: .74rem; }.snapshot-banner p { margin: 3px 0 0; color: var(--muted); font-size: .66rem; }.snapshot-banner .button { margin-left: auto; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin: 14px 0; padding: 12px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(17,23,36,.82); }.search-field { position: relative; flex: 1 1 280px; }.search-field span { position: absolute; top: 50%; left: 12px; color: var(--muted); transform: translateY(-50%); }.search-field input { padding-left: 34px; }.compact-label { min-width: 150px; gap: 4px; color: var(--muted); font-size: .6rem; }.advanced-filters { display: none; flex: 1 0 100%; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 3px; }.advanced-filters.open { display: grid; }
.mail-browser { display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border-soft); border-radius: var(--radius); background: rgba(17,23,36,.8); }.folder-panel { min-width: 0; padding: 12px 10px; border-right: 1px solid var(--border-soft); background: rgba(11,17,27,.55); }.folder-head { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px 11px; }.folder-head strong { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }.folder-head span { padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .58rem; }.folder-tree { display: grid; gap: 2px; margin-top: 5px; }.folder-link { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 7px; color: var(--muted); font-size: .68rem; }.folder-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.folder-link:hover { background: var(--surface-2); color: var(--text); }.folder-link.active { background: var(--blue-soft); color: #c8dcff; }.folder-link.active span:first-child { color: var(--blue); }.folder-link.deleted { margin-top: 5px; color: #d28c96; }.folder-restore { margin-top: 14px; }
.mail-list-panel { min-width: 0; }.list-toolbar { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }.list-toolbar > div:first-child strong, .list-toolbar > div:first-child span { display: block; }.list-toolbar > div:first-child strong { font-size: .74rem; }.list-toolbar > div:first-child span { margin-top: 2px; color: var(--muted-2); font-size: .58rem; }.bulk-actions { display: none; align-items: center; gap: 7px; }.bulk-actions.visible { display: flex; }.bulk-actions > span { margin-right: 4px; color: var(--muted); font-size: .64rem; }.table-scroll { overflow-x: auto; }.mail-table { width: 100%; border-collapse: collapse; table-layout: fixed; }.mail-table th { padding: 10px 9px; border-bottom: 1px solid var(--border-soft); color: var(--muted-2); font-size: .58rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }.mail-table th:nth-child(2) { width: 20%; }.mail-table th:nth-child(3) { width: 34%; }.mail-table th:nth-child(4) { width: 16%; }.mail-table th:nth-child(5) { width: 14%; }.mail-table th:nth-child(6) { width: 9%; }.mail-table td { padding: 11px 9px; border-bottom: 1px solid rgba(38,50,71,.58); color: var(--muted); font-size: .65rem; vertical-align: middle; }.mail-table tbody tr:hover { background: rgba(75,140,255,.045); }.mail-table td a strong, .mail-table td a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.mail-table td a strong { color: #dce4f0; font-size: .69rem; }.mail-table td a small { margin-top: 4px; color: var(--muted-2); font-size: .61rem; }.check-cell { width: 38px !important; text-align: center !important; }.folder-pill { display: block; overflow: hidden; padding: 4px 6px; border-radius: 6px; background: var(--surface-3); color: #9ca9bd; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }.folder-pill.deleted { background: rgba(255,93,115,.08); color: #d88b97; }.deleted-mail { opacity: .76; }.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 14px; }.pagination span { color: var(--muted); font-size: .65rem; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 14px; }.message-card { overflow: hidden; border: 1px solid var(--border-soft); border-radius: var(--radius); background: rgba(17,23,36,.88); }.message-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px; border-bottom: 1px solid var(--border-soft); }.message-title { display: flex; min-width: 0; align-items: center; gap: 13px; }.message-title h2 { margin: 0; font-size: 1.1rem; }.sender-avatar { width: 42px; height: 42px; }.version-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 7px; background: var(--blue-soft); color: #a8c7ff; font-size: .62rem; font-weight: 750; }.message-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--border-soft); }.message-meta div { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 8px; padding: 7px 0; }.message-meta dt { color: var(--muted-2); font-size: .62rem; }.message-meta dd { overflow: hidden; margin: 0; color: #c2ccdc; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.attachment-section { padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }.attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }.attachment { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(10,15,24,.55); }.attachment:hover { border-color: rgba(75,140,255,.38); }.attachment > span { color: var(--blue); }.attachment div { min-width: 0; }.attachment strong, .attachment small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment strong { font-size: .65rem; }.attachment small { margin-top: 3px; color: var(--muted-2); font-size: .57rem; }.message-body { min-height: 280px; padding: 24px; background: #f3f5f8; color: #202737; }.message-body pre { margin: 0; font: 400 .78rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }.history-panel { display: grid; gap: 14px; }.version-list { padding: 7px; }.version-row { display: grid; grid-template-columns: 12px minmax(0,1fr) 12px; align-items: center; gap: 8px; padding: 9px; border-radius: 8px; }.version-row:hover, .version-row.active { background: var(--blue-soft); }.version-row strong, .version-row small { display: block; }.version-row strong { font-size: .66rem; }.version-row small { margin-top: 3px; color: var(--muted-2); font-size: .57rem; }.timeline-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(75,140,255,.12); }.timeline { display: grid; gap: 0; margin: 0; padding: 10px 14px 15px; list-style: none; }.timeline li { position: relative; display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 8px; padding: 7px 0 11px; }.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 18px; bottom: -4px; left: 3px; width: 1px; background: var(--border); }.timeline .timeline-dot.deleted { background: var(--red); }.timeline .timeline-dot.restored { background: var(--green); }.timeline strong { display: block; font-size: .65rem; }.timeline p, .timeline small { margin: 3px 0 0; color: var(--muted); font-size: .58rem; }.mail-preview { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: #0c121d; }.mail-preview strong { font-size: .74rem; }.mail-preview span, .mail-preview small { color: var(--muted); font-size: .62rem; }

.user-list { display: grid; gap: 13px; }.user-card > header .button { margin-left: 3px; }.large-avatar { width: 42px; height: 42px; }.user-badges { display: flex; margin-left: auto; gap: 6px; }.badge { margin: 0; }.badge.super { border-color: rgba(154,124,255,.28); background: rgba(154,124,255,.08); color: #bba8ff; }.badge.active { color: var(--green); }.badge.inactive { color: var(--red); }.account-rights { padding: 10px 18px; border-bottom: 1px solid var(--border-soft); }.management-rights { display: flex; align-items: center; gap: 7px; }.management-rights small { margin-right: 5px; color: var(--muted-2); font-size: .58rem; font-weight: 800; letter-spacing: .1em; }.permission-chip { padding: 4px 7px; border-radius: 6px; background: #0c121d; color: var(--muted-2); font-size: .6rem; }.permission-chip.on { background: rgba(61,220,151,.08); color: var(--green); }.superuser-note { display: flex; align-items: center; gap: 10px; padding: 15px 18px; color: var(--violet); }.superuser-note p { margin: 0; color: var(--muted); font-size: .68rem; }.superuser-note strong { color: #c2b2ff; }.grant-table { padding: 7px 14px; }.grant-head, .grant-row { display: grid; grid-template-columns: 100px minmax(150px, 1fr) repeat(4, 55px) 32px; align-items: center; gap: 7px; padding: 8px; }.grant-head { color: var(--muted-2); font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.grant-row { border-top: 1px solid var(--border-soft); font-size: .64rem; }.grant-row > strong { color: #a8c7ff; font-size: .58rem; }.grant-row > span:nth-child(2) { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }.grant-check { text-align: center; }.grant-check.yes { color: var(--green); }.grant-check.no { color: var(--muted-2); }.add-grant { border-top: 1px solid var(--border-soft); }.add-grant summary { padding: 12px 18px; color: var(--blue); font-size: .66rem; font-weight: 700; cursor: pointer; }.grant-form { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; align-items: end; gap: 9px; padding: 0 18px 16px; }.grant-checkboxes { grid-column: 1 / -1; display: flex; align-items: center; gap: 15px; }.all-check { padding-left: 14px; border-left: 1px solid var(--border); color: #bcaaff; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }.history-panel { grid-template-columns: repeat(2, 1fr); }
  .mail-browser { grid-template-columns: 190px minmax(0,1fr); }.mail-table th:nth-child(4), .mail-table td:nth-child(4), .mail-table th:nth-child(6), .mail-table td:nth-child(6) { display: none; }
  .grant-form { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: .2s ease; box-shadow: var(--shadow); }.sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding: 0 16px 35px; }.mobile-menu { display: block; }.topbar { min-height: 78px; }.topbar > div:nth-child(2) { margin-right: auto; }.top-actions .button { padding: 7px 9px; font-size: 0; }.top-actions .button::first-letter { font-size: .85rem; }
  .mailbox-grid { grid-template-columns: 1fr; }.run-row { grid-template-columns: 30px minmax(130px,1fr) auto; }.run-metrics { display: none; }
  .mail-browser { grid-template-columns: 1fr; }.folder-panel { border-right: 0; border-bottom: 1px solid var(--border-soft); }.folder-tree { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 150px; overflow-y: auto; }
  .mail-table th:nth-child(2), .mail-table td:nth-child(2) { width: 30%; }.mail-table th:nth-child(3), .mail-table td:nth-child(3) { width: 47%; }.mail-table th:nth-child(5), .mail-table td:nth-child(5) { width: 18%; }
  .grant-head { display: none; }.grant-row { grid-template-columns: 85px 1fr repeat(4, 28px) 28px; }.history-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }.section-head, .intro-row { align-items: flex-start; flex-direction: column; }.organization-card > header { flex-wrap: wrap; }.count-pill { margin-left: 0; }
  .mailbox-summary { align-items: flex-start; flex-direction: column; }.sync-state { width: 100%; padding: 10px 0 0; border-top: 1px solid var(--border-soft); border-left: 0; }.snapshot-banner { align-items: flex-start; flex-wrap: wrap; }.snapshot-banner .button { margin-left: 0; }
  .advanced-filters { grid-template-columns: 1fr; }.mail-table th:nth-child(2), .mail-table td:nth-child(2) { display: none; }.mail-table th:nth-child(3), .mail-table td:nth-child(3) { width: 60%; }.mail-table th:nth-child(5), .mail-table td:nth-child(5) { width: 30%; }.bulk-actions > span { display: none; }
  .form-grid.two, .message-meta, .attachment-grid { grid-template-columns: 1fr; }.span-two { grid-column: auto; }.modal-card { padding: 18px; }.modal-actions { flex-wrap: wrap; }.modal-actions .left-action { width: 100%; margin-right: 0; }.message-meta div { grid-template-columns: 65px minmax(0,1fr); }
  .user-card > header { flex-wrap: wrap; }.user-badges { margin-left: 0; }.grant-row { grid-template-columns: 70px 1fr repeat(4, 24px) 28px; overflow-x: auto; }.grant-form { grid-template-columns: 1fr; }.grant-checkboxes { grid-column: auto; flex-wrap: wrap; }
}

.folder-link.virtual { cursor: default; color: var(--muted-2); }
.folder-children { margin-left: 13px; padding-left: 4px; border-left: 1px solid var(--border-soft); }
.security-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; gap: 14px; padding-top: 28px; }
.security-card { overflow: hidden; }.security-form { padding: 20px; }.security-mark { color: var(--green); }
.security-info { padding: 20px; }.security-info ul { display: grid; gap: 18px; margin: 18px 0 0; padding: 0; list-style: none; }.security-info li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }.security-info li > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: rgba(61,220,151,.1); color: var(--green); font-size: .65rem; }.security-info strong { font-size: .7rem; }.security-info p { margin: 4px 0 0; color: var(--muted); font-size: .64rem; line-height: 1.45; }
@media (max-width: 760px) { .security-layout { grid-template-columns: 1fr; } }
