/* Settings is a modal, the way the mssgs app does its user settings: a
   glass sheet over the mailbox, a tab rail on the left, the chosen tab on
   the right. Every setting sits in a glass bar (a `.card`), rows carry an
   icon tile so a long tab scans, and anything that needs its own form opens
   as a dialog over the modal. Nothing here is a page. */

.settings-scrim { align-items: stretch; padding: 24px; }
.settings-modal:focus { outline: none; }
.settings-modal {
  width: min(1020px, 100%); height: min(720px, 100%); margin: auto;
  display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  animation: rise .2s ease-out;
}
.settings-body { flex: 1; min-height: 0; display: flex; }

/* ---------- the rail ---------- */

.settings-nav {
  width: 244px; flex: 0 0 244px; min-height: 0;
  display: flex; flex-direction: column;
  padding: 24px 14px 14px;
  background: rgba(0, 0, 0, .18);
  border-right: 1px solid var(--line-soft);
}
:root[data-theme='light'] .settings-nav { background: rgba(50, 55, 30, .04); }
.settings-nav-head { padding: 0 10px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.settings-nav-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.settings-nav-head span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-tabs { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.settings-tab {
  display: flex; align-items: center; gap: 12px; width: 100%;
  height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid transparent; text-align: left;
  color: var(--text-3); font-size: 14.5px; font-weight: 500;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.settings-tab svg { width: 18px; height: 18px; flex: none; }
.settings-tab:hover { background: var(--hover); color: var(--text); }
.settings-tab.is-active {
  color: #fff;
  background: var(--primary-bg);
  border-color: rgba(144, 238, 144, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 8px rgba(74, 124, 89, .3);
}
.settings-tab.is-active svg { color: #d6f5e0; }
:root[data-theme='light'] .settings-tab.is-active { color: var(--accent-ink); border-color: rgba(38, 95, 62, .35); }
.settings-nav-foot { flex: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.settings-tab.is-danger { color: var(--danger); }
.settings-tab.is-danger:hover { background: var(--danger-soft); }

/* ---------- the tab ---------- */

.settings-content { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 30px 36px; }
.tab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-right: 36px; }
.tab-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.tab-head .sub { margin: 5px 0 0; font-size: 14px; color: var(--text-3); line-height: 1.5; }
.tab-head .btn { flex: none; margin-top: 2px; }
.settings-content > h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.settings-content > .sub { margin: 5px 0 22px; font-size: 14px; color: var(--text-3); line-height: 1.5; }

/* Each setting group is a glass bar: an edge, a faint surface, a lift on
   hover. That is what turns a column of labels into something you can scan. */
.settings-content .card {
  padding: 2px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07);
  transition: border-color .15s ease, background .15s ease;
}
.settings-content .card:hover { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .045); }
:root[data-theme='light'] .settings-content .card { background: rgba(255, 255, 255, .55); border-color: rgba(50, 55, 30, .09); }
:root[data-theme='light'] .settings-content .card:hover { background: rgba(255, 255, 255, .75); border-color: rgba(50, 55, 30, .14); }
.settings-content .card + .card, .settings-content .card + .domain-list { margin-top: 14px; }
.settings-content .card.card-plain { padding: 16px 18px; }
.settings-content .card h2 { font-size: 15px; }
.settings-content .card > h2 { padding: 14px 0 6px; }

.settings-content .card-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.settings-content .card-row:first-child { border-top: 0; }
.settings-content .card-row .t { flex: 1; min-width: 0; }
.settings-content .card-row .t b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.settings-content .card-row .t span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-3); line-height: 1.45; }
.settings-content .card-row.is-stacked { align-items: flex-start; }
.settings-content .card-row.is-stacked .row-ico { margin-top: 2px; }
.row-field { margin-top: 12px; max-width: 420px; }
.row-field .input { width: 100%; }
.row-range { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.row-range b { min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.row-range input[type='range'] { flex: 1; }

/* The icon tile before a row title. */
.row-ico {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: var(--text-3);
  transition: color .15s ease;
}
.row-ico svg { width: 16px; height: 16px; }
.card:hover .row-ico, .card-row:hover .row-ico { color: var(--text); }
:root[data-theme='light'] .row-ico { background: rgba(50, 55, 30, .05); border-color: rgba(50, 55, 30, .08); }

/* Status pills (domains, DNS steps). */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-3);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
}
.pill svg { width: 12px; height: 12px; }
.pill.is-ok { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.pill.is-part { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.pill.is-wait { color: var(--text-3); }
.pill.is-bad { color: var(--danger); background: var(--danger-soft); border-color: rgba(237, 66, 69, .3); }
:root[data-theme='light'] .pill { background: rgba(50, 55, 30, .05); border-color: rgba(50, 55, 30, .1); }

/* The account tab's identity card. */
.identity-card { padding: 18px !important; }
.identity { display: flex; align-items: center; gap: 16px; }
.identity .t b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.identity .t span { display: block; font-size: 13.5px; color: var(--text-3); margin-top: 2px; }
.avatar-xl { width: 64px; height: 64px; font-size: 20px; border-radius: 16px; }
.photo-card .photo-btns { display: flex; gap: 8px; flex: none; }
.photo-editor { padding: 16px 0 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 14px; }
.photo-actions { display: flex; justify-content: flex-end; gap: 10px; }

.settings-content .rich { margin: 16px 0 10px; min-height: 140px; }
.settings-content .set-hint { font-size: 13px; color: var(--text-4); line-height: 1.5; margin: 0 0 14px; }
.settings-content .card > .set-hint:last-child { margin-bottom: 14px; }
.settings-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.settings-build { margin-top: 24px; font-size: 12px; color: var(--text-4); }
.settings-content .shortcuts-grid { padding: 12px 0; }
.settings-content .device-tables { margin: 0 0 12px; }
.settings-content .supp-list .set-hint { margin: 14px 0; }

@media (max-width: 719px) {
  .settings-scrim { padding: 0; }
  .settings-modal { width: 100%; height: 100%; border-radius: 0; }
  .settings-body { flex-direction: column; }
  .settings-nav { width: auto; flex: none; padding: 14px 8px 8px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .settings-nav-head { padding: 0 8px 10px 8px; margin-right: 44px; }
  .settings-tabs { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 4px; padding-bottom: 2px; }
  .settings-tab { width: auto; flex: none; height: 34px; padding: 0 12px; }
  .settings-nav-foot { display: none; }
  .settings-content { padding: 18px 16px 32px; }
  .tab-head { flex-wrap: wrap; padding-right: 0; }
  .settings-content .card { padding: 2px 14px; }
}

/* ---------- automations ---------- */
.rules-list { display: grid; gap: 8px; }
.rules-empty { padding: 32px 16px; height: auto; }
.rule-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); transition: border-color .15s ease, background .15s ease; }
.rule-row:hover { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .045); }
:root[data-theme='light'] .rule-row { background: rgba(255, 255, 255, .55); border-color: rgba(50, 55, 30, .09); }
.rule-row.is-off { opacity: .6; }
.rule-row .t { flex: 1; min-width: 0; }
.rule-row .t b { display: block; font-size: 14px; }
.rule-row .t span { display: block; font-size: 12.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-row .t small { display: block; font-size: 11.5px; color: var(--text-4); margin-top: 2px; }
.rule-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rule-dot.is-green, .rule-color.is-green { background: #4a7c59; }
.rule-dot.is-blue, .rule-color.is-blue { background: #5865f2; }
.rule-dot.is-orange, .rule-color.is-orange { background: #faa61a; }
.rule-dot.is-red, .rule-color.is-red { background: #da373c; }
.rule-dot.is-yellow, .rule-color.is-yellow { background: #fee75c; }
.rule-dot.is-purple, .rule-color.is-purple { background: #9146ff; }
.rule-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-4); margin: 6px 0 10px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.rule-colors { display: flex; gap: 8px; height: var(--btn-h); align-items: center; }
.rule-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; outline-offset: 2px; }
.rule-color.is-on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.rule-enabled { margin-top: 4px; font-size: 14px; }
.rule-dialog .textarea { min-height: 72px; font-family: var(--font); }

/* Automations: one card per rule, a wide two-column dialog. */
.rule-card { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); }
.rule-card:hover { border-color: rgba(255, 255, 255, .12); }
:root[data-theme='light'] .rule-card { background: rgba(255, 255, 255, .55); border-color: rgba(50, 55, 30, .09); }
.rule-card.is-off { opacity: .6; }
.rule-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.rule-ico svg { width: 18px; height: 18px; }
.rule-ico.is-green { background: #4a7c59; } .rule-ico.is-blue { background: #5865f2; } .rule-ico.is-orange { background: #faa61a; } .rule-ico.is-red { background: #da373c; } .rule-ico.is-yellow { background: #d9b83a; } .rule-ico.is-purple { background: #9146ff; }
.rule-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rule-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.rule-title .pill { font-size: 11px; }
.rule-line { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-3); min-width: 0; }
.rule-line > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-k { flex: none; width: 42px; color: var(--text-4); text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; padding-top: 2px; }
.rule-main small { font-size: 11.5px; color: var(--text-4); }
.rule-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.dialog.rule-dialog { width: min(920px, 100%); }
.rule-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
@media (max-width: 760px) { .rule-layout { grid-template-columns: 1fr; } }
.rule-col-action { border-left: 1px solid var(--line); padding-left: 24px; }
@media (max-width: 760px) { .rule-col-action { border-left: 0; padding-left: 0; } }
.rule-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rule-kind { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.rule-kind svg { width: 18px; height: 18px; flex: none; color: var(--text-3); }
.rule-kind b { display: block; font-size: 13.5px; }
.rule-kind span { display: block; font-size: 12px; color: var(--text-3); }
.rule-kind.is-on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.rule-grid-url { grid-template-columns: 120px 1fr; }
.rule-dialog .textarea.is-mono { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; min-height: 96px; }

/* The transactional console: tables, filters, the detail dialog. */
.console-filters { display: flex; gap: 10px; margin: 0 0 12px; }
.console-filters .input { max-width: 260px; }
.console-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.console-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.console-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--hover); white-space: nowrap; }
.console-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-table tr:last-child td { border-bottom: 0; }
.console-table tr.is-link { cursor: pointer; }
.console-table tr.is-link:hover td { background: var(--hover); }
.console-table code { font-size: 12px; }
.console-empty { padding: 32px 16px; height: auto; }
.console-h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.console-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.console-secret { display: inline-flex; align-items: center; gap: 4px; }
.console-keys { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.console-keys-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.console-token { display: block; margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--hover); font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.console-kvs { display: grid; gap: 6px; margin-bottom: 12px; }
.console-kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 13px; }
.console-kv span { color: var(--text-4); }
.console-kv code { overflow-wrap: anywhere; }
.console-preview { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.console-text { white-space: pre-wrap; font-size: 13px; }
.dialog.console-dialog { width: min(880px, 100%); }
.pill.is-warn { color: var(--warn); }
.pill.is-bad { color: var(--danger); }
/* Security */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h3 { font-size: 15px; font-weight: 600; margin: 0; }
.sec-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sec-list { display: grid; gap: 8px; margin-top: 10px; }
.sec-enrol { display: grid; gap: 10px; justify-items: start; }
.sec-qr { border-radius: 12px; background: #fff; padding: 8px; }
.sec-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sec-codes code { padding: 8px 10px; border-radius: 8px; background: var(--hover); font-family: var(--font-mono, ui-monospace, monospace); }

/* ---------- the automation wizard ----------
   Four steps in one dialog: the example mail, the words to match, the
   actions, the name. The step rail is the header of the body; the dialog's
   own footer carries Back / Next / Create. */
.dialog.wiz-dialog { width: min(960px, 100%); max-height: min(92vh, 100%); }
.wiz { display: flex; flex-direction: column; gap: 18px; min-height: 420px; }
.wiz-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wiz-step { display: flex; align-items: center; gap: 8px; flex: 1; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--text-4); border: 1px solid transparent; }
.wiz-step.is-done { color: var(--text-3); cursor: pointer; }
.wiz-step.is-done:hover { background: var(--hover); }
.wiz-step.is-on { color: var(--text); background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.wiz-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--hover); font-size: 11.5px; font-weight: 700; flex: none; }
.wiz-step.is-on .wiz-num { background: var(--primary); color: var(--accent-ink, #fff); }
.wiz-step.is-done .wiz-num { background: var(--accent-soft); color: var(--accent); }
.wiz-num svg { width: 12px; height: 12px; }
.wiz-body { display: flex; flex-direction: column; gap: 14px; }
.wiz-h { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.wiz-p { margin: -8px 0 0; font-size: 13.5px; color: var(--text-3); line-height: 1.5; }
.wiz-search { display: flex; align-items: center; gap: 8px; }
.wiz-search svg { width: 16px; height: 16px; color: var(--text-4); flex: none; }
.wiz-mails { display: grid; gap: 4px; max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.wiz-mail { display: grid; grid-template-columns: 160px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 9px; text-align: left; color: var(--text); font: inherit; }
.wiz-mail:hover { background: var(--hover); }
.wiz-mail-from { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-mail-subject { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wiz-mail-subject span { color: var(--text-3); }
.wiz-mail-time { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.wiz-skip { display: flex; justify-content: center; }
.wiz-field { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.wiz-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13.5px; }
.wiz-status { font-size: 12px; color: var(--accent); }
.wiz-status.is-any { color: var(--text-4); }
.wiz-words { display: flex; flex-wrap: wrap; gap: 4px 3px; max-height: 132px; overflow-y: auto; padding: 4px 0 8px; line-height: 1.2; }
.wiz-word { padding: 3px 6px; border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--text-2); background: transparent; border: 1px solid transparent; cursor: pointer; }
.wiz-word:hover { background: var(--hover); color: var(--text); }
.wiz-word.is-on { background: color-mix(in srgb, var(--primary) 22%, transparent); border-color: color-mix(in srgb, var(--primary) 55%, transparent); color: var(--text); }
.wiz-field-input .input { font-size: 13.5px; }
.wiz-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiz-kind { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.wiz-kind:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.wiz-kind-t { flex: 1; min-width: 0; }
.wiz-kind-t b { display: block; font-size: 14px; }
.wiz-kind-t span { display: block; font-size: 12.5px; color: var(--text-3); }
.wiz-kind > svg { width: 16px; height: 16px; color: var(--text-4); flex: none; }
.wiz-actions { display: grid; gap: 8px; }
.wiz-action { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.wiz-action-t { flex: 1; min-width: 0; }
.wiz-action-t b { display: block; font-size: 13.5px; }
.wiz-action-t span { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-add { display: flex; justify-content: center; padding-top: 4px; }
.wiz-form { display: flex; flex-direction: column; gap: 14px; }
.wiz-form-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.wiz-form-head > div { flex: 1; min-width: 0; }
.wiz-form-head b { display: block; font-size: 14px; }
.wiz-form-head span { display: block; font-size: 12.5px; color: var(--text-3); }
.wiz-preview-wrap { padding: 10px 12px; border-radius: 10px; background: var(--hover); }
.wiz-preview-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-4); margin-bottom: 4px; }
.wiz-preview { margin: 0; font-size: 13px; white-space: pre-wrap; color: var(--text-2); }
.wiz-form-foot { display: flex; justify-content: flex-end; gap: 10px; }
.wiz-recap { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); margin-top: 6px; }
.wiz-recap .rule-line { font-size: 13px; }
.rule-ico.is-email { background: #4a7c59; } .rule-ico.is-reply { background: #2f8f83; } .rule-ico.is-mssgs { background: #5865f2; } .rule-ico.is-http { background: #b56ad7; }
.rule-icos { display: flex; flex: none; }
.rule-icos .rule-ico + .rule-ico { margin-left: -10px; box-shadow: 0 0 0 2px var(--bg); }
.rules-empty .btn { margin-top: 12px; }
.rule-dialog .textarea, .wiz-dialog .textarea { min-height: 72px; font-family: var(--font); }
.wiz-dialog .textarea.is-mono { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; min-height: 96px; }
.dialog-actions .spacer { flex: 1; }

/* The transaction log. */
.log-kind { display: inline-flex; align-items: center; gap: 6px; }
.log-kind svg { width: 14px; height: 14px; color: var(--text-3); }
.log-error { font-size: 12px; color: var(--danger); }
.log-response { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--hover); font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
.pill.is-ok { color: var(--accent); }

/* The console pages take the sheet: a page header over a table that fills
   the pane, the way the mailbox does. The page's one action lives beside
   the search box at the top of the app. */
.console-bar { height: 56px; padding: 0 16px 0 18px; gap: 10px; }
.console-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.console-title-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.console-title-ico svg { width: 16px; height: 16px; }
.console-title b { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.console-body .console-table-wrap { border: 0; border-radius: 0; overflow: visible; flex: none; }
.console-body .console-table th { position: sticky; top: 0; z-index: 1; background: transparent; padding: 10px 16px; font-size: 10.5px; letter-spacing: .08em; color: var(--text-4); border-bottom: 1px solid var(--line-soft); }
.console-body .console-table th::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--glass-bg-strong, rgba(20, 22, 26, .85)); backdrop-filter: blur(8px); }
.console-body .console-table td { height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.console-body .console-table td b { font-weight: 600; color: var(--text); }
.console-body .console-table code { font-size: 12.5px; color: var(--text-2); }
.topbar-action { display: flex; align-items: center; margin-left: 10px; flex: none; }
.topbar-action:empty { display: none; }
.topbar-action .btn { height: 38px; white-space: nowrap; }
.console-body .empty { flex: 1; min-height: 320px; }
.console-body .empty .btn { margin-top: 14px; }
.console-loading { padding: 18px 16px; font-size: 13.5px; color: var(--text-3); }
.console-note { padding: 12px 16px; font-size: 12.5px; color: var(--text-4); line-height: 1.5; }
.tb-select { height: 32px; padding: 0 30px 0 10px; font-size: 13px; width: auto; margin-right: 6px; }
.list-toolbar .btn-small { margin-right: 6px; }

/* The security tab: a card is a heading, its explanation, the list, and the
   buttons on a footer row of their own instead of floating in the heading. */
.sec-head { display: block; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0 2px; margin-top: 10px; border-top: 1px solid var(--line-soft); }
.settings-content .card .sec-head + .set-hint { margin-top: 4px; }
