:root {
  --canvas: #f4f4f1;
  --surface: #fff;
  --surface-soft: #fafaf8;
  --ink: #202420;
  --ink-soft: #656c65;
  --muted: #90978f;
  --line: #e9ebe6;
  --line-strong: #dfe3dc;
  --green: #246c49;
  --green-dark: #1d593b;
  --green-soft: #eaf4ed;
  --amber: #bd7d25;
  --red: #b85448;
  --shadow: 0 18px 55px rgba(25, 42, 30, .12);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(48, 128, 82, .23); outline-offset: 2px; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: 256px; flex: 0 0 256px; height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 23px 15px 14px; background: #fbfbf9; border-right: 1px solid var(--line); }
.brand { height: 34px; display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); padding: 0 6px; }
.brand-mark { width: 23px; height: 23px; background: #285f43; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-5deg); }
.brand-mark span { width: 2px; background: #e5f2e7; border-radius: 2px; display: block; }
.brand-mark span:nth-child(1) { height: 7px; margin-top: 3px; }
.brand-mark span:nth-child(2) { height: 11px; }
.brand-mark span:nth-child(3) { height: 7px; margin-bottom: 3px; }
.brand-name { font: 800 19px Manrope, sans-serif; letter-spacing: -.9px; }
.brand-name span { color: #66816b; font-weight: 600; }
.brand-version { margin-left: auto; font: 500 8px 'DM Mono', monospace; color: #838c81; border: 1px solid #e0e6df; background: #f4f7f2; border-radius: 5px; padding: 3px 5px; letter-spacing: .08em; }
.workspace-label, .section-heading { font: 500 9px 'DM Mono', monospace; letter-spacing: .105em; color: #9aa098; }
.workspace-label { margin: 33px 7px 8px; }
.workspace-switcher { display: flex; width: 100%; align-items: center; text-align: left; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 8px; background: #fff; cursor: pointer; }
.workspace-icon { display: grid; place-items: center; width: 31px; height: 31px; color: #356845; background: #e9f2e9; border: 1px solid #d7e8d8; border-radius: 8px; font: 700 14px Manrope, sans-serif; }
.workspace-copy, .user-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.workspace-copy strong, .user-copy strong { font-size: 11px; font-weight: 600; }
.workspace-copy small, .user-copy small { color: var(--muted); font-size: 10px; }
.workspace-switcher svg { margin-left: auto; width: 14px; fill: none; stroke: #8b9289; stroke-width: 1.5; }
.primary-nav { display: grid; gap: 3px; margin: 21px 0 28px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: #646b64; text-align: left; font-size: 12px; cursor: pointer; }
.nav-link:hover { background: #f1f3ef; color: var(--ink); }
.nav-link.active { background: #eaf2eb; color: #285f43; font-weight: 600; }
.nav-icon { display: inline-grid; place-items: center; width: 17px; color: currentColor; font-size: 17px; line-height: 1; }
.mail-icon { font-size: 15px; }
.nav-count { margin-left: auto; padding: 2px 7px; color: #737b72; background: #fff; border: 1px solid #eaede8; border-radius: 20px; font: 10px 'DM Mono', monospace; }
.section-heading { display: flex; align-items: center; padding: 0 7px 8px; }
.section-heading button { margin-left: auto; }
.icon-button { border: 1px solid var(--line); border-radius: 7px; background: #fff; display: inline-grid; place-items: center; cursor: pointer; color: #687168; transition: background .15s, border-color .15s, transform .15s; }
.icon-button:hover { background: #f3f6f2; border-color: #d6dfd5; color: var(--green); }
.icon-button.small { width: 23px; height: 23px; font-size: 16px; line-height: 1; }
.inbox-nav-list { display: grid; gap: 2px; overflow: auto; }
.inbox-nav-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 8px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; color: #626a62; }
.inbox-nav-item:hover, .inbox-nav-item.active { background: #f0f3ef; color: var(--ink); }
.inbox-nav-item.active { box-shadow: inset 2px 0 #39794f; }
.inbox-avatar { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border: 1px solid #dce9db; border-radius: 8px; color: #36734a; background: #edf5ec; font: 700 10px Manrope, sans-serif; text-transform: uppercase; }
.inbox-nav-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.inbox-nav-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 550; }
.inbox-nav-copy small { color: #999f97; font: 9px 'DM Mono', monospace; }
.unread-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #438157; font: 9px 'DM Mono', monospace; }
.sidebar-bottom { margin-top: auto; }
.domain-panel { padding: 11px 11px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.domain-top { display: flex; align-items: center; gap: 6px; color: #8e958d; font: 9px 'DM Mono', monospace; letter-spacing: .06em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.status-dot.ready { background: #58a76b; box-shadow: 0 0 0 3px #eaf5ec; }
.help-icon { margin-left: auto; width: 17px !important; height: 17px !important; border-radius: 50%; font: 10px Georgia, serif !important; }
.domain-name { margin: 8px 0 3px; font: 500 12px 'DM Mono', monospace; color: #39443b; }
.domain-caption { color: #999f97; font-size: 9px; }
.user-profile { display: flex; align-items: center; width: 100%; gap: 8px; margin-top: 10px; padding: 8px 4px; border: 0; background: transparent; text-align: left; }
.avatar { display: grid; place-items: center; color: #f3f5ef; background: #667860; font: 600 11px Manrope, sans-serif; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; }
.more-dots { margin-left: auto; color: #9ba198; font-size: 18px; letter-spacing: 1px; }

.main-area { min-width: 0; flex: 1; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 33px; border-bottom: 1px solid var(--line); background: rgba(251, 251, 249, .72); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #969d95; font-size: 11px; }
.breadcrumbs strong { color: #4a514a; font-weight: 600; }
.crumb-sep { color: #c5c9c2; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.server-pill { display: flex; align-items: center; gap: 6px; color: #868e84; font: 9px 'DM Mono', monospace; letter-spacing: .035em; }
.server-pill i { width: 6px; height: 6px; border-radius: 50%; background: #78a47b; }
.server-pill i.error { background: var(--red); }
.top-help { width: 22px; height: 22px; border-radius: 50%; font: 11px Georgia, serif; }
.mini-avatar { width: 24px; height: 24px; border-radius: 50%; font-size: 9px; }
.content-area { max-width: 1360px; margin: 0 auto; padding: 33px 36px 60px; }
.loading-state { min-height: 55vh; display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 13px; }
.loader { width: 15px; height: 15px; border: 2px solid #dfe8de; border-top-color: #3c7a50; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { color: #878f86; font: 10px 'DM Mono', monospace; letter-spacing: .095em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 7px 0 5px; font: 700 28px Manrope, sans-serif; letter-spacing: -1.15px; color: #242a24; }
.page-heading p { margin: 0; color: #828a81; font-size: 12px; }
.button-primary, .button-secondary, .button-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 35px; padding: 0 13px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; font-size: 11px; font-weight: 600; transition: .15s; }
.button-primary { color: white; background: #286746; box-shadow: 0 2px 4px rgba(28, 90, 53, .12); }
.button-primary:hover { background: #205a3c; transform: translateY(-1px); }
.button-primary:disabled { opacity: .5; cursor: wait; transform: none; }
.button-secondary { color: #4b554b; background: #fff; border-color: var(--line-strong); }
.button-secondary:hover { border-color: #c9d5c9; background: #fafcf9; }
.button-quiet { min-height: 31px; padding: 0 9px; color: #767e75; background: transparent; }
.button-quiet:hover { background: #f3f4f1; color: #354535; }
.plus { font-size: 16px; font-weight: 400; margin-top: -1px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric-card { padding: 16px 17px 14px; min-height: 94px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #8d948b; font-size: 10px; }
.metric-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #f0f5ef; color: #488055; font-size: 13px; }
.metric-value { margin-top: 7px; font: 700 25px Manrope, sans-serif; letter-spacing: -.8px; }
.metric-hint { margin-top: 0; color: #a0a69e; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .78fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.panel-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid #f0f1ed; }
.panel-title { display: flex; align-items: center; gap: 8px; font: 650 12px Manrope, sans-serif; }
.panel-title .mini-icon { color: #66836a; font-size: 15px; }
.panel-header .subtle-link { border: 0; background: none; color: #858e83; font-size: 10px; cursor: pointer; }
.panel-header .subtle-link:hover { color: var(--green); }
.inbox-table { width: 100%; }
.inbox-table-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(110px, .95fr) 72px 62px 20px; align-items: center; gap: 12px; min-height: 59px; padding: 0 17px; border: 0; border-bottom: 1px solid #f2f3ef; background: #fff; width: 100%; text-align: left; cursor: pointer; }
.inbox-table-row:last-child { border-bottom: 0; }
.inbox-table-row:hover { background: #fafcf9; }
.inbox-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.inbox-identity .inbox-avatar { width: 29px; height: 29px; flex-basis: 29px; }
.inbox-identity-copy { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.inbox-identity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.inbox-identity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 9px 'DM Mono', monospace; color: #a0a69e; }
.table-meta { color: #737c72; font-size: 10px; }
.table-meta strong { color: #343d34; font: 500 11px 'DM Mono', monospace; }
.table-chevron { color: #adb3ab; font-size: 15px; }
.table-head { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(110px, .95fr) 72px 62px 20px; gap: 12px; padding: 9px 17px; border-bottom: 1px solid #eff1ed; background: #fcfcfb; color: #9ba198; font: 8px 'DM Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.inbox-search-row { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid #eff1ed; background: #fcfcfb; }
.inbox-search-row input { flex: 0 1 270px; min-width: 120px; height: 31px; padding: 0 9px; border: 1px solid #e3e8e1; border-radius: 6px; color: #475147; font-size: 10px; }
.inbox-search-row > span { margin-left: auto; color: #9ba198; font: 9px 'DM Mono', monospace; white-space: nowrap; }
.inbox-pagination { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid #eff1ed; color: #8c948a; font: 9px 'DM Mono', monospace; }
.inbox-pagination > div { display: flex; gap: 6px; }
.inbox-pagination .button-secondary { min-height: 29px; padding: 0 9px; font-size: 9px; }
.inbox-pagination .button-secondary:disabled { opacity: .42; cursor: not-allowed; }
.recent-list { display: grid; }
.recent-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 12px; width: 100%; padding: 12px 15px; border: 0; border-bottom: 1px solid #f1f2ef; text-align: left; background: #fff; cursor: pointer; }
.recent-row:hover { background: #fafcf9; }
.recent-row:last-child { border-bottom: 0; }
.recent-main { min-width: 0; }
.recent-title { display: flex; align-items: center; gap: 6px; color: #343b34; font-size: 10px; font-weight: 600; }
.recent-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 4px 0 3px; color: #5b655b; font-size: 10px; }
.recent-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9a9f98; font-size: 9px; }
.recent-time { color: #a3a9a1; text-align: right; font: 9px 'DM Mono', monospace; }
.direction-tag { color: #739078; font: 8px 'DM Mono', monospace; text-transform: uppercase; }
.empty-note { padding: 24px 18px; color: #969d95; text-align: center; font-size: 11px; line-height: 1.6; }
.empty-note strong { display: block; margin-bottom: 3px; color: #596259; font: 600 11px Manrope, sans-serif; }
.empty-state { border: 1px dashed #dfe5dc; border-radius: 10px; background: #fbfcfa; text-align: center; padding: 30px 20px; }
.empty-state .empty-illustration { margin: 0 auto 12px; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: #3a774d; background: #eaf3ea; font-size: 20px; }
.empty-state h3 { margin: 0 0 6px; font: 650 14px Manrope, sans-serif; }
.empty-state p { max-width: 340px; margin: 0 auto 15px; color: #8b9389; font-size: 11px; line-height: 1.55; }
.inbox-overview { display: grid; gap: 16px; }
.right-column { display: grid; gap: 15px; }
.setup-list { display: grid; padding: 6px 16px 12px; }
.setup-step { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; }
.setup-num { flex: 0 0 20px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #64836a; background: #edf4ed; font: 10px 'DM Mono', monospace; }
.setup-step strong { display: block; margin: 1px 0 3px; color: #4e584e; font-size: 10px; font-weight: 600; }
.setup-step small { display: block; color: #92998f; font-size: 9px; line-height: 1.45; }
.setup-state { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font: 8px 'DM Mono', monospace; color: #a3a9a1; }
.setup-state.ready { color: #458159; }
.setup-state i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.api-callout { margin: 0 14px 14px; padding: 11px 12px; border-radius: 7px; background: #f5f7f3; color: #6d786d; font-size: 9px; line-height: 1.5; }
.api-callout code { color: #3f6849; font: 9px 'DM Mono', monospace; }
.activity-empty { display: grid; place-items: center; min-height: 144px; text-align: center; color: #a0a69e; font-size: 10px; }
.activity-empty span { display: block; margin-bottom: 6px; font-size: 19px; color: #b4c2b2; }

.mail-workspace { display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: min(680px, calc(100vh - 150px)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.mail-list-panel { min-width: 0; border-right: 1px solid var(--line); background: #fdfdfb; display: flex; flex-direction: column; }
.mailbox-head { padding: 18px 15px 14px; border-bottom: 1px solid var(--line); }
.mailbox-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mailbox-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mailbox-title .inbox-avatar { width: 33px; height: 33px; flex-basis: 33px; border-radius: 10px; font-size: 12px; }
.mailbox-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 0 3px; font: 650 13px Manrope, sans-serif; }
.mailbox-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #92998f; font: 9px 'DM Mono', monospace; }
.mailbox-tools { display: flex; align-items: center; gap: 3px; }
.mail-filter { display: flex; gap: 5px; padding: 10px 12px 7px; }
.filter-chip { border: 1px solid transparent; background: transparent; color: #92998f; border-radius: 6px; padding: 5px 8px; font-size: 9px; cursor: pointer; }
.filter-chip.active { border-color: #e5eae3; color: #4e7255; background: #f2f7f1; }
.thread-list { overflow: auto; flex: 1; }
.thread-item { position: relative; width: 100%; display: block; padding: 12px 14px; border: 0; border-top: 1px solid #f0f1ed; background: transparent; text-align: left; cursor: pointer; }
.thread-item:hover { background: #f7f9f6; }
.thread-item.active { background: #f0f5ef; box-shadow: inset 2px 0 #438052; }
.thread-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.thread-sender { display: flex; align-items: center; gap: 5px; overflow: hidden; color: #454d45; font-size: 10px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.thread-time { flex: none; color: #a0a69e; font: 8px 'DM Mono', monospace; }
.thread-subject { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 5px 0 4px; color: #656e64; font-size: 10px; }
.thread-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #a0a69e; font-size: 9px; }
.thread-item.unread .thread-sender, .thread-item.unread .thread-subject { color: #2e573b; font-weight: 650; }
.thread-item.unread::after { position: absolute; right: 14px; top: 34px; content: ''; width: 5px; height: 5px; border-radius: 50%; background: #4c905b; }
.thread-empty { padding: 30px 17px; color: #9da39b; text-align: center; font-size: 10px; line-height: 1.5; }
.thread-detail { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.thread-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 76px; padding: 17px 21px; border-bottom: 1px solid #eff1ed; }
.thread-detail-head h2 { margin: 0 0 5px; font: 650 15px Manrope, sans-serif; letter-spacing: -.25px; }
.thread-detail-head p { margin: 0; color: #90988e; font-size: 9px; }
.thread-actions { display: flex; gap: 4px; }
.messages-scroll { flex: 1; overflow: auto; padding: 20px 23px; }
.message-card { margin: 0 0 17px; }
.message-meta { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: #778075; font-size: 9px; }
.message-meta strong { color: #4b554b; font-weight: 600; }
.message-meta time { margin-left: auto; color: #a4aaa2; font: 8px 'DM Mono', monospace; }
.message-avatar { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #43764e; background: #edf4ed; font: 700 8px Manrope, sans-serif; }
.message-avatar.external { color: #61718c; background: #eff2f7; }
.message-body { margin-left: 29px; padding: 12px 14px; border: 1px solid #edf0ea; border-radius: 0 9px 9px 9px; color: #4d554d; background: #fdfdfb; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-card.outbound .message-body { background: #f1f7f1; border-color: #e3eee2; }
.message-html { max-height: 380px; overflow: auto; }
.message-html img { max-width: 100%; }
.reply-box { padding: 13px 17px 15px; border-top: 1px solid var(--line); background: #fcfcfb; }
.reply-context { margin: 0 0 7px; color: #92998f; font-size: 9px; }
.reply-box textarea { resize: vertical; width: 100%; min-height: 71px; padding: 10px 11px; border: 1px solid #e5e9e2; border-radius: 7px; background: #fff; color: #454e45; font-size: 10px; line-height: 1.5; }
.reply-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.reply-recipient { color: #929a90; font-size: 9px; }
.detail-placeholder { flex: 1; display: grid; place-items: center; padding: 25px; color: #9ba299; text-align: center; }
.detail-placeholder > div { max-width: 240px; }
.detail-placeholder-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 11px; border-radius: 14px; color: #739078; background: #edf4ed; font-size: 20px; }
.detail-placeholder strong { display: block; margin-bottom: 5px; color: #697369; font: 600 12px Manrope, sans-serif; }
.detail-placeholder p { margin: 0; font-size: 10px; line-height: 1.5; }
.inbox-empty-wrap { display: grid; place-items: center; min-height: 430px; padding: 20px; }
.inbox-empty-wrap .empty-state { max-width: 390px; }
.inbox-info-card { margin-top: 13px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; color: #858e83; background: #fcfcfa; font-size: 9px; line-height: 1.55; }
.inbox-info-card code { color: #4e7756; font: 9px 'DM Mono', monospace; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(25, 33, 27, .38); backdrop-filter: blur(3px); animation: fade-in .14s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(100%, 460px); max-height: min(90vh, 760px); overflow: auto; border: 1px solid rgba(255,255,255,.65); border-radius: 13px; background: #fff; box-shadow: var(--shadow); animation: modal-in .18s ease; }
@keyframes modal-in { from { transform: translateY(7px) scale(.99); opacity: .8; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(100%, 610px); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 21px 16px; border-bottom: 1px solid #eff1ed; }
.modal-header h2 { margin: 0 0 4px; font: 700 16px Manrope, sans-serif; letter-spacing: -.4px; }
.modal-header p { margin: 0; color: #8f978d; font-size: 10px; line-height: 1.45; }
.modal-close { width: 26px; height: 26px; font-size: 18px; }
.modal-content { padding: 17px 21px 20px; }
.form-field { display: grid; gap: 6px; margin-bottom: 14px; }
.form-field label { color: #626c62; font-size: 10px; font-weight: 600; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 37px; padding: 9px 10px; border: 1px solid #e3e8e1; border-radius: 7px; background: #fff; color: #3d473d; font-size: 11px; }
.form-field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #b0b6ad; }
.field-help { color: #9aa197; font-size: 9px; line-height: 1.45; }
.address-preview { display: flex; align-items: center; gap: 5px; margin-top: -4px; padding: 9px 10px; border-radius: 6px; color: #6f786e; background: #f4f7f2; font: 10px 'DM Mono', monospace; }
.address-preview strong { color: #3b704a; font-weight: 500; }
.form-error { margin: 0 0 12px; color: #ae5247; font-size: 10px; line-height: 1.45; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.secret-panel { padding: 13px; border: 1px solid #d9e8d8; border-radius: 8px; background: #f2f8f1; }
.secret-panel strong { display: block; margin-bottom: 5px; color: #3f7048; font-size: 11px; }
.secret-panel p { margin: 0 0 10px; color: #788676; font-size: 9px; line-height: 1.5; }
.secret-key { padding: 9px; overflow-wrap: anywhere; border: 1px solid #e0eadd; border-radius: 6px; color: #375a3e; background: #fff; font: 9px 'DM Mono', monospace; line-height: 1.45; }
.secret-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.code-block { position: relative; margin: 10px 0; padding: 12px; overflow: auto; border: 1px solid #e6eae3; border-radius: 7px; background: #f8faf7; color: #445146; font: 9px/1.55 'DM Mono', monospace; white-space: pre; }
.copy-code { position: absolute; top: 6px; right: 6px; z-index: 1; }
.guide-section { margin-bottom: 17px; }
.guide-section h3 { margin: 0 0 6px; color: #4e5b4f; font: 650 11px Manrope, sans-serif; }
.guide-section p { margin: 0; color: #828b81; font-size: 10px; line-height: 1.55; }
.guide-section code { color: #4b7853; font: 9px 'DM Mono', monospace; }
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; gap: 8px; }
.toast { max-width: min(350px, calc(100vw - 40px)); display: flex; align-items: center; gap: 8px; padding: 10px 13px; color: white; border-radius: 8px; background: #2d6141; box-shadow: 0 8px 25px rgba(20, 50, 30, .18); font-size: 10px; animation: toast-in .2s ease; }
.toast.error { background: #8c453e; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1080px) {
  .sidebar { width: 225px; flex-basis: 225px; }
  .content-area { padding: 29px 25px 50px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); }
  .inbox-table-row, .table-head { grid-template-columns: minmax(130px, 1.1fr) minmax(100px, .9fr) 55px 20px; }
  .inbox-table-row > :nth-child(4), .table-head > :nth-child(4) { display: none; }
}
@media (max-width: 800px) {
  .sidebar { width: 66px; flex-basis: 66px; padding: 18px 9px 10px; align-items: center; }
  .brand { padding: 0; }
  .brand-name, .brand-version, .workspace-label, .workspace-switcher, .nav-link:not(.active) .nav-icon, .nav-link, .section-heading span, .section-heading button, .inbox-nav-copy, .inbox-nav-item .unread-badge, .sidebar-bottom .domain-panel, .user-copy, .more-dots { display: none; }
  .primary-nav { margin: 30px 0 20px; gap: 10px; }
  .nav-link.active { display: grid; place-items: center; width: 39px; height: 39px; padding: 0; font-size: 0; }
  .nav-link.active .nav-icon { display: inline-grid; font-size: 19px; }
  .inbox-nav-list { justify-items: center; width: 100%; gap: 6px; }
  .inbox-nav-item { padding: 4px; }
  .inbox-nav-item.active { box-shadow: none; }
  .inbox-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .sidebar-bottom { width: 100%; display: flex; justify-content: center; }
  .user-profile { justify-content: center; padding: 5px 0; }
  .topbar { padding: 0 20px; }
  .content-area { padding: 25px 19px 42px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mail-workspace { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .sidebar { display: none; }
  .topbar { height: 51px; padding: 0 15px; }
  .topbar-actions { gap: 9px; }
  .server-pill { font-size: 8px; }
  .content-area { padding: 22px 13px 35px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  h1 { font-size: 23px; }
  .page-heading p { max-width: 240px; font-size: 10px; line-height: 1.45; }
  .page-heading > .button-primary { min-height: 32px; padding: 0 9px; font-size: 9px; white-space: nowrap; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 13px; }
  .metric-card { min-height: 83px; padding: 12px; }
  .metric-value { font-size: 22px; }
  .right-column { grid-template-columns: 1fr; }
  .table-head { display: none; }
  .inbox-table-row { grid-template-columns: minmax(0,1fr) 54px 20px; gap: 7px; padding: 0 11px; }
  .inbox-table-row > :nth-child(2) { display: none; }
  .panel-header { padding: 0 12px; }
  .mail-workspace { display: block; min-height: 65vh; border: 0; background: transparent; overflow: visible; }
  .mail-list-panel { min-height: 54vh; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
  .mail-workspace.has-thread .mail-list-panel { display: none; }
  .mail-workspace:not(.has-thread) .thread-detail { display: none; }
  .thread-detail { min-height: 70vh; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
  .thread-detail-head { padding: 14px; }
  .messages-scroll { padding: 16px 13px; }
  .reply-box { padding: 11px; }
  .thread-detail-head .back-to-list { display: inline-grid !important; }
  .inbox-info-card { font-size: 8px; }
  .toast-root { right: 12px; bottom: 12px; }
}
