:root {
  --bg:#f2f4f7; --panel:#fff; --border:#d9dee7; --text:#20252b;
  --muted:#68717d; --accent:#1d6fd8; --accent2:#e9f2ff;
  --code:#f6f7f9; --danger:#b42318;
  --mono:"Cascadia Mono","Consolas","DejaVu Sans Mono","Liberation Mono","Menlo",monospace;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text);
       font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
.header { background:#17212b; color:white; padding:14px 22px; }
.header .title { font-size:20px; font-weight:600; }
.header .sub { color:#b8c3ce; margin-top:2px; }
.container { max-width:1200px; margin:18px auto; padding:0 16px; }
.panel { background:var(--panel); border:1px solid var(--border); border-radius:8px;
         box-shadow:0 1px 2px rgba(0,0,0,.03); margin-bottom:16px; }
.pad { padding:16px; }
.toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
input[type=text] { border:1px solid #bfc7d2; border-radius:6px; padding:8px 10px;
                   min-width:280px; font:inherit; }
button,.btn { display:inline-block; border:1px solid #bfc7d2; background:white;
              border-radius:6px; padding:7px 11px; color:var(--text); cursor:pointer;
              font:inherit; font-size:13px; }
.btn:hover { text-decoration:none; filter:brightness(.97); }
table { width:100%; border-collapse:collapse; }
th,td { padding:8px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.num { text-align:right; white-space:nowrap; }
.muted { color:var(--muted); }
.badge { display:inline-block; padding:2px 7px; border-radius:10px; background:#edf0f4;
         color:#4d5966; font-size:12px; }
.error { color:var(--danger); background:#fff0ee; padding:9px 11px; border-radius:6px; }
.small { font-size:12px; }
.mono { font-family:var(--mono); }

/* ---------- стиль GoldED: тёмные списки ---------- */
.arealist { background:#0d1522; border:1px solid #223146; border-radius:8px;
            overflow:hidden; margin-bottom:16px; }
.al-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline;
           background:#17212b; padding:11px 16px; }
.al-head .t { color:#e8eef5; font-weight:600; }
.al-head .i { color:#8fa3b8; font-size:12px; }
table.areas { width:100%; border-collapse:collapse;
              font-family:var(--mono); font-size:13px; line-height:1.55; }
table.areas th { background:#111a29; color:#7f95ad; text-align:left; font-weight:600;
                 padding:7px 14px; border-bottom:1px solid #223146; white-space:nowrap;
                 font-size:12px; }
table.areas td { padding:6px 14px; border-bottom:1px solid #182435; color:#d7e2ee;
                 vertical-align:top; }
table.areas td.num, table.areas th.num { text-align:right; white-space:nowrap; }
table.areas td.c-n { color:#5c718a; }
table.areas td.c-name a { color:#9fc6ff; text-transform:uppercase; }
table.areas td a { color:#9fc6ff; }
table.areas .newcell-hot { color:#ffd54a; font-weight:700; }
table.areas .newcell-zero { color:#44576f; }
table.areas tr.arow:hover td { background:#1d4ed8; color:#ffffff; }
table.areas tr.arow:hover td a { color:#ffffff; }
table.areas tr.areply td { background:#111c2e; }
table.areas tr.areply:hover td { background:#1d4ed8; }
table.areas tr.hasnew td.c-name a { color:#ffd54a; }
table.areas tr.hasnew:hover td.c-name a { color:#ffffff; }
table.areas .sub { color:#5f7694; font-size:11px; font-family:var(--mono); }
table.areas tr.arow:hover td .sub { color:#cfe0f5; }
table.areas td.c-date { color:#8fa3b8; white-space:nowrap; font-size:12px; }
.al-err { color:#ff7b6b; font-weight:700; cursor:help; }
.al-foot { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
           align-items:center; background:#111a29; border-top:1px solid #223146;
           padding:9px 14px; }
.al-foot .al-status { color:#7f95ad; font-size:12px; font-family:var(--mono); }
.al-foot .al-status strong { color:#ffd54a; }
.btn-dark { background:#1b2940; color:#d7e2ee; border-color:#2c3e58; }
.btn-dark:hover { filter:brightness(1.2); }
.badge-d { display:inline-block; padding:1px 6px; border-radius:10px;
           background:#2a3a55; color:#ffd54a; font-size:11px; }
.al-warn { color:#ff9d8f; font-size:12px; }

/* шапка внутри эхи — одна строка */
.al-echo { flex-wrap:wrap; gap:8px 16px; align-items:center; }
.al-title { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; }
.al-title .t { text-transform:uppercase; }
.al-back { display:inline-block; width:26px; height:26px; line-height:25px;
           text-align:center; border:1px solid #2c3e58; border-radius:6px;
           background:#1b2940; color:#9fc6ff; font-size:12px; user-select:none; }
.al-back:hover { background:#1d4ed8; color:#ffffff; text-decoration:none;
                 border-color:#1d4ed8; }
.al-stats { color:#8fa3b8; font-size:12px; font-family:var(--mono); }
.al-tools { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-left:auto; }
.al-search { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.al-search input[type=text] { min-width:190px; background:#0b111c; color:#d7e2ee;
                              border:1px solid #2c3e58; border-radius:6px; padding:6px 9px;
                              font-family:var(--mono); font-size:12px; }
.al-search input[type=text]::placeholder { color:#54677f; }

/* стрелки раскрытия веток */
a.tgl, span.tgl { display:inline-block; width:20px; height:20px; line-height:19px;
       text-align:center; border:1px solid #2c3e58; border-radius:4px; background:#0d1522;
       color:#8fa3b8; font-size:11px; user-select:none; vertical-align:middle; }
a.tgl:hover { background:#1b2940; text-decoration:none; border-color:#4a6285; color:#9fc6ff; }
span.tgl.tgl-none { border-color:transparent; background:transparent; }
.branch { color:#5f7694; margin-right:3px; }
.hidden { display:none !important; }

/* ---------- просмотр письма: тёмная тема ---------- */
.dpanel { background:#0d1522; border:1px solid #223146; border-radius:8px;
          overflow:hidden; margin-bottom:16px; }
.msgbar { display:flex; justify-content:space-between; gap:10px; align-items:baseline;
          background:#17212b; color:#fff; padding:10px 16px; }
.msgbar .t { font-weight:600; }
.msgbar .i { color:#b8c3ce; font-size:12px; white-space:nowrap; }
table.msghead { width:100%; border-collapse:collapse;
                font-family:var(--mono); font-size:13px; line-height:1.5; }
table.msghead td { padding:8px 16px; border-bottom:1px solid #182435;
                   color:#d7e2ee; vertical-align:top; }
table.msghead tr:last-child td { border-bottom:none; }
table.msghead td.lbl { width:84px; color:#7f95ad; white-space:nowrap; }
table.msghead td.addr { width:220px; text-align:right; color:#8fa3b8; white-space:nowrap; }

.msgnav { display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
          gap:10px; margin-bottom:12px; }
.msgnav .mnav-l { justify-self:start; }
.msgnav .mnav-c { justify-self:center; display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:center; }
.msgnav .mnav-l, .msgnav .mnav-r { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.msgnav .mnav-r { justify-self:end; }

.page-nav {
  margin: 0 0 12px;
  padding: 0 4px;
}
.page-nav .btn {
  min-height: 38px;
}
.page-nav .mnav-c {
  gap: 10px;
}
.echo-list-nav { margin:0 0 10px; padding:0 2px; }

.body { margin:0; padding:16px; white-space:pre-wrap; overflow-x:auto;
        color:#d7e2ee; font-family:var(--mono); font-size:14px; line-height:1.5; }
.body .q1 { color:#ffb066; }
.body .q2 { color:#7ede8c; }
.body .q3 { color:#7dbdff; }
.body .q4 { color:#cf9bff; }
.body .q5 { color:#ff90b0; }
.body .tear { color:#8fa3b8; font-style:italic; }
.body .origin { color:#5fd0dd; font-style:italic; }
.body .seenby { color:#6c82a0; font-size:12px; }

/* плашки писем ветки */
.threadcard { background:#111a29; border:1px solid #223146; border-radius:8px;
              margin-bottom:10px; }
.threadcard > summary { padding:10px 14px; cursor:pointer; user-select:none;
                        font-size:13px; color:#a9bccf; }
.threadcard > summary:hover { background:#16233a; border-radius:8px; }
.threadcard[open] > summary { border-bottom:1px solid #223146;
                              border-radius:8px 8px 0 0; background:#16233a; }
.threadcard .cardsubj { color:#e8eef5; font-weight:600; }
.threadcard .cardmeta { padding:10px 14px 0; font-size:12px; color:#7f95ad; }
.threadcard .body { padding:10px 14px; font-size:13px; }
.threadcard .nested { margin:2px 14px 12px 30px; }
.threadcard .mono.small { color:#7f95ad; }
.threadcard .badge { background:#2a3a55; color:#ffd54a; }

details.mkludge { background:#0d1522; border:1px solid #223146; border-radius:8px;
                  margin-bottom:16px; }
details.mkludge > summary { padding:12px 16px; cursor:pointer; font-weight:600;
                            font-size:14px; color:#a9bccf; user-select:none; }
details.mkludge[open] > summary { border-bottom:1px solid #223146; border-radius:8px 8px 0 0; }
details.mkludge > pre { margin:0; padding:12px 16px; white-space:pre-wrap; word-break:break-word;
                        font-family:var(--mono); font-size:12px; line-height:1.5;
                        color:#8fa3b8; }

details.kludges { background:var(--panel); border:1px solid var(--border);
                  border-radius:8px; margin-bottom:16px; }
details.kludges > summary { padding:12px 16px; cursor:pointer; font-weight:600;
                            font-size:14px; color:#4b5563; user-select:none; }
details.kludges[open] > summary { border-bottom:1px solid var(--border); border-radius:8px 8px 0 0; }
details.kludges > pre { margin:0; padding:12px 16px; white-space:pre-wrap; word-break:break-word;
                        font-family:var(--mono); font-size:12px; line-height:1.5;
                        color:#4b5563; }

@media(max-width:800px) {
  table.msghead td.addr { display:none; }
  .msgnav { grid-template-columns:1fr; grid-template-rows:auto auto; }
  .msgnav .mnav-l { grid-column:1; grid-row:1; justify-self:start; }
  .msgnav .mnav-c { grid-column:1; grid-row:2; justify-self:center; }
  .msgnav .mnav-r { display:none; }
}
/* ================= шапка с кнопками ================= */
.header .htop { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.hbtns { display:none; }
.btn-h { background:#223146; color:#d7e2ee; border-color:#2c3e58; }
.btn-h:hover { background:#1d4ed8; color:#ffffff; }

/* ================= экран входа ================= */
.loginbox { display:flex; justify-content:center; padding-top:60px; }
.loginpanel { background:#0d1522; border:1px solid #223146; border-radius:10px;
              padding:26px 30px; width:360px; max-width:100%; }
.logintitle { color:#e8eef5; font-weight:600; font-size:18px; margin-bottom:14px; }
.loginpanel label { display:block; color:#8fa3b8; font-size:12px; margin:10px 0 4px; }
.loginpanel select, .loginpanel input { width:100%; background:#0b111c; color:#d7e2ee;
  border:1px solid #2c3e58; border-radius:6px; padding:8px 10px;
  font-family:var(--mono); font-size:13px; }
.loginerr { color:#ff9d8f; font-size:12px; min-height:16px; margin-top:6px; }

/* ================= модальные окна ================= */
.modal-ov { position:fixed; inset:0; background:rgba(5,10,18,.66);
  display:flex; align-items:flex-start; justify-content:center;
  padding:40px 16px; z-index:100; overflow:auto; }
.modal { background:#0d1522; border:1px solid #223146; border-radius:10px;
  width:660px; max-width:100%; }
.modal-h { display:flex; justify-content:space-between; align-items:center;
  background:#17212b; color:#e8eef5; padding:12px 16px; font-weight:600;
  border-bottom:1px solid #223146; border-radius:10px 10px 0 0; }
.modal-b { padding:16px; }
.frm .fld { margin-bottom:10px; }
.frm label { display:block; color:#8fa3b8; font-size:12px; margin-bottom:3px; }
.frm input[type=text], .frm input[type=password], .frm select {
  width:100%; background:#0b111c; color:#d7e2ee; border:1px solid #2c3e58;
  border-radius:6px; padding:7px 10px; font-family:var(--mono); font-size:13px; }
.frm .fldrow { display:flex; gap:8px; align-items:center; margin-top:12px; }
.utable { width:100%; border-collapse:collapse; font-family:var(--mono); font-size:13px; }
.utable th, .utable td { padding:7px 10px; border-bottom:1px solid #182435;
  text-align:left; color:#d7e2ee; }
.utable th { color:#7f95ad; font-size:12px; }
.chkrow { display:flex; align-items:center; gap:8px; color:#d7e2ee; margin:10px 0; }.hbtns.on { display:flex; }
/* мейлер */
.ml-log { background:#0b111c; color:#a9d3ab; border:1px solid #223146;
          border-radius:6px; padding:10px; height:280px; overflow:auto;
          white-space:pre-wrap; font-family:var(--mono); font-size:12px;
          line-height:1.45; margin:0; }

/* GoldEd-style status line for background Squish indexing */
.db-statusbar{position:fixed;left:0;right:0;bottom:0;z-index:9000;height:24px;line-height:24px;padding:0 10px;box-sizing:border-box;background:#20252b;color:#d9e2ef;font:12px/24px "Cascadia Mono","Consolas",monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-top:1px solid #3b4654}
body{padding-bottom:24px}
.db-statusbar.busy:before{content:"● ";}


/* v6.2: новые сообщения, появившиеся во время открытой страницы */
@keyframes sqdLiveGlow {
  0%   { opacity:.15; transform:translateY(-5px); filter:brightness(1.8); }
  18%  { opacity:1; transform:translateY(0); filter:brightness(1.35); }
  45%  { filter:brightness(1.12); }
  100% { opacity:1; transform:translateY(0); filter:brightness(1); }
}
@keyframes sqdCellHalo {
  0%   { box-shadow:inset 0 0 0 1px rgba(255,213,74,.95), inset 0 0 24px rgba(255,213,74,.48), 0 0 16px rgba(255,213,74,.50); }
  55%  { box-shadow:inset 0 0 0 1px rgba(255,213,74,.45), inset 0 0 14px rgba(255,213,74,.20), 0 0 9px rgba(255,213,74,.24); }
  100% { box-shadow:inset 0 0 0 1px rgba(255,213,74,0), inset 0 0 0 rgba(255,213,74,0), 0 0 0 rgba(255,213,74,0); }
}
tr.live-new { animation:sqdLiveGlow 3.8s ease-out both; }
tr.live-new td { animation:sqdCellHalo 3.8s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  tr.live-new, tr.live-new td { animation:none; }
  tr.live-new td { box-shadow:inset 0 0 0 1px rgba(255,213,74,.45); }
}

/* v6.3: live update of the echo-area list itself */
@keyframes sqdAreaArrive {
  0%   { opacity:0; transform:translateX(-10px) scale(.995); }
  22%  { opacity:1; transform:translateX(0) scale(1); }
  100% { opacity:1; transform:none; }
}
.arealist tr.live-new { animation:sqdAreaArrive 4.2s ease-out both; }
.arealist tr.live-new td { animation:sqdCellHalo 4.2s ease-out both; }
.arealist tr.live-new .c-name a { text-shadow:0 0 10px rgba(255,213,74,.85); }
@media (prefers-reduced-motion: reduce) {
  .arealist tr.live-new { animation:none; }
  .arealist tr.live-new .c-name a { text-shadow:none; }
}
/* v6.5 GoldEd-like reader */
.current-msg { outline:2px solid rgba(255,210,40,.75); outline-offset:-2px; box-shadow:inset 0 0 16px rgba(255,210,40,.18); }
.golded-head .msghead td { padding-top:5px; padding-bottom:5px; }
.golded-head .msghead .lbl { color:#f0c93d; font-weight:700; width:72px; }
.golded-head .msghead .addr { text-align:right; font-family:var(--mono); }
.golded-status { position:sticky; bottom:0; z-index:20; padding:7px 12px; margin-top:8px; border:1px solid #2d4866; background:#0d1a29; color:#d9e7f5; font-family:var(--mono); font-weight:700; }

/* v7 EchoMail composer */
#ec-body{min-height:320px;resize:vertical;line-height:1.4}
.al-tools>#btn-echo-new{margin-right:6px}

/* v7.4 area groups / packet routing */
.area-cfg-btn{min-width:34px;padding:4px 8px}
.area-group{display:inline-block;margin-left:8px;padding:1px 6px;border:1px solid #33455f;border-radius:9px;font-size:10px;line-height:16px;vertical-align:1px;color:#91a6bd;background:#101a28}
.area-group-personal{color:#e5b9ff;border-color:#67457f;background:#20152c}
.area-group-local{color:#8edbc1;border-color:#356b5c;background:#10251f}
.area-group-bone{color:#ffd86b;border-color:#756224;background:#27220f}
.area-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:8px}
.area-stat-grid>div{background:#101927;border:1px solid #223146;border-radius:7px;padding:10px 12px}
.area-stat-grid span{display:block;color:#7f95ad;font-size:11px;margin-bottom:3px}
.area-stat-grid strong{color:#e8eef5;font-family:var(--mono);font-size:15px}
.area-subs{border:1px solid #223146;border-radius:7px;background:#0b111c;max-height:260px;overflow:auto;padding:6px 10px}
.area-sub-row{display:flex!important;gap:8px;align-items:flex-start;padding:7px 2px;margin:0!important;border-bottom:1px solid #182435;color:#d7e2ee!important}
.area-sub-row:last-child{border-bottom:0}
.warn-tag,.webonly-tag{display:inline-block;margin-left:5px;padding:0 5px;border-radius:7px;font-size:10px;line-height:16px}
.warn-tag{color:#ffd36b;border:1px solid #6d5a23;background:#241f0e}
.webonly-tag{color:#7bd7ff;border:1px solid #285f77;background:#0d2230}
.packet-flags{flex-wrap:wrap;gap:8px 10px}
.packet-flags input[type=checkbox]{margin:0}
.packet-box{margin-top:8px;border:1px solid #223146;border-radius:7px;padding:9px 10px;background:#101927}
@media(max-width:800px){.area-stat-grid{grid-template-columns:repeat(2,1fr)}}

/* v7.6 mailer queue flags */
.ml-queue .ml-flag{display:inline-block;min-width:58px;text-align:center;font-family:var(--mono);font-weight:700}
.ml-flag-hold{color:#ffd86b!important;border-color:#6f5d25!important;background:#261f0d!important}
.ml-flag-crash{padding:5px 8px;border:1px solid #75413d;border-radius:5px;color:#ff9b91;background:#2a1412}
.ml-attempts{display:inline-block;margin-left:6px;color:#8fa5bc;font-family:var(--mono);font-size:11px}
.ml-queue td{vertical-align:middle}

/* v7.8: wide BinkP mailer window and compact queue actions */
.modal.mailer-modal{width:1120px;max-width:calc(100vw - 32px)}
.mailer-modal .modal-b{padding:18px}
.mailer-modal .ml-queue{table-layout:auto}
.mailer-modal .ml-queue th,.mailer-modal .ml-queue td{white-space:nowrap}
.mailer-modal .ml-queue td:first-child{white-space:normal;min-width:130px}
.mailer-modal .ml-flag-cell{text-align:right;width:1%}
.mailer-modal .ml-delete-cell{text-align:center;width:1%;padding-left:6px}
.mailer-modal .ml-delete{min-width:38px;padding:6px 9px;font-size:16px;line-height:1}

/* v7.12: единая навигация и отдельный выбор «Применить к…» */
.msgnav a.btn-dark { background:#223146; color:#d7e2ee; border-color:#2c3e58; }
.msgnav a.btn-dark:hover { background:#1d4ed8; color:#fff; filter:none; }
.area-setting-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:3px; }
.frm .area-setting-head label { margin:0; }
.area-apply-small { margin:0; padding:3px 7px; font-size:11px; line-height:1.25; min-height:0; white-space:nowrap; }
.area-apply-ov { z-index:180; background:rgba(5,10,18,.76); align-items:center; padding:20px 16px; }
.area-apply-modal { width:760px; max-width:calc(100vw - 32px); }
.area-apply-modal .modal-b { padding:14px 16px 16px; }
.area-apply-help { margin-bottom:8px; }
.area-multi { width:100%; margin:0; padding:5px; background:#0d1522; color:#d7e2ee; border:1px solid #2c3e58; border-radius:6px; font-family:var(--mono); font-size:13px; }
.area-multi-overlay { height:min(62vh,560px); min-height:360px; }
.area-multi option { padding:5px 8px; }
.area-multi option:checked { background:#1d4ed8 linear-gradient(0deg,#1d4ed8,#1d4ed8); color:#fff; }
.area-apply-actions { justify-content:flex-start; margin-top:10px !important; }

/* v7.14: NetMail status/actions and compact uplink connect picker */
.nm-state{display:inline-block;padding:2px 7px;border-radius:10px;font-size:11px;font-weight:700;white-space:nowrap}
.nm-state-in{background:#20334a;color:#b9d4ef}
.nm-state-sent{background:#183c2b;color:#9be0b8;border:1px solid #285941}
.nm-state-unsent{background:#4a2f12;color:#ffd48a;border:1px solid #6b4821}
.nm-state-note{display:block;margin-top:3px;font-size:10px;color:#8fa5bc;white-space:nowrap}
.nm-status-cell{white-space:nowrap;width:1%}
.nm-actions-cell{white-space:nowrap;width:1%;text-align:right}
.nm-action{margin-left:5px;padding:5px 8px}
.nm-delete{min-width:36px;padding:5px 8px}

.ml-connect-wrap{position:relative;display:inline-block;margin-bottom:12px}
.ml-connect-menu{position:absolute;z-index:40;top:calc(100% + 6px);left:0;min-width:430px;max-width:min(650px,calc(100vw - 80px));max-height:300px;overflow:auto;background:#101a2a;border:1px solid #2a3c55;border-radius:7px;box-shadow:0 10px 30px rgba(0,0,0,.42);padding:6px}
.ml-connect-choice{display:grid;grid-template-columns:minmax(110px,auto) minmax(90px,auto) 1fr;gap:12px;width:100%;border:0;border-radius:5px;background:transparent;color:#d7e2ee;text-align:left;padding:8px 10px;cursor:pointer;font:inherit}
.ml-connect-choice:hover{background:#1b2a3f}
.ml-connect-choice .muted{color:#8fa5bc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ml-connect-empty{padding:9px 10px}

/* v7.16 */
.frm input[type=number]{background:#0b111c;color:#d7e2ee;border:1px solid #26364b;border-radius:6px;padding:7px 9px;font:inherit}
.uplink-poll-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.uplink-poll-row #u-poll-value{width:90px;min-width:70px}
.uplink-poll-row select{width:auto;min-width:105px}
.ml-uplink-row td{background:rgba(34,73,112,.10)}


/* v7.21: admin AreaFix request/reply archive */
.modal.areafix-history-modal{width:1080px;max-width:calc(100vw - 32px)}
.areafix-history-modal .modal-b{padding:16px 18px}
.af-history-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.af-history-list{max-height:72vh;overflow:auto;border:1px solid #223146;border-radius:7px;background:#0b111c}
.af-entry{border-bottom:1px solid #182435;color:#d7e2ee}
.af-entry:last-child{border-bottom:0}
.af-entry summary{display:grid;grid-template-columns:72px 150px 220px minmax(180px,1fr) 58px;gap:10px;align-items:center;padding:9px 11px;cursor:pointer;font-size:12px}
.af-entry summary:hover{background:#111d2c}
.af-kind{font-weight:700}
.af-request .af-kind{color:#ffd86b}
.af-reply .af-kind{color:#9be0b8}
.af-source{justify-self:end;color:#8fa5bc;font-family:var(--mono);font-size:11px}
.af-meta{padding:10px 14px 3px;color:#9eb1c6;font-size:12px;line-height:1.55}
.af-body{margin:7px 14px 14px;padding:11px 12px;background:#07101a;border:1px solid #1e2d40;border-radius:6px;color:#d7e2ee;white-space:pre-wrap;overflow:auto;max-height:360px;font:12px/1.45 var(--mono)}
@media(max-width:820px){.af-entry summary{grid-template-columns:68px 1fr;gap:4px 8px}.af-source{justify-self:start}.af-entry summary span:nth-child(3),.af-entry summary span:nth-child(4){grid-column:2}}


/* v7.27 — persistent BinkP connection statistics */
.mailer-stats-overlay {
  position:fixed;
  inset:0;
  z-index:1400;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:24px 16px;
  overflow:auto;
  background:rgba(5,10,18,.72);
}
.mailer-stats-modal {
  width:min(1180px,96vw);
  max-width:1180px;
  max-height:calc(100vh - 48px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 18px 60px rgba(0,0,0,.55);
}
.mailer-stats-modal .modal-b {
  overflow:auto;
  min-height:0;
}
.mailer-stats-controls { justify-content:flex-start; gap:10px; align-items:end; }
.mailer-stats-controls input[type=date] {
  margin-left:8px; padding:7px 9px; border:1px solid #2c3e58; border-radius:6px;
  background:#0b1422; color:#d7e2ee;
}
.ml-stat-cards {
  display:grid; grid-template-columns:repeat(4,minmax(130px,1fr)); gap:8px; margin:10px 0 16px;
}
.ml-stat-cards > div {
  background:#0b1422; border:1px solid #263950; border-radius:7px; padding:10px 12px;
  display:flex; flex-direction:column; gap:3px;
}
.ml-stat-cards b { font-size:17px; color:#f4f8ff; }
.ml-stat-cards span { font-size:11px; color:#7fa2c8; text-transform:uppercase; }
.ml-hours {
  height:110px; display:grid; grid-template-columns:repeat(24,1fr); gap:3px;
  align-items:end; border:1px solid #263950; border-radius:7px; padding:8px 7px 20px;
  background:#0b1422;
}
.ml-hour { position:relative; height:80px; display:flex; align-items:flex-end; justify-content:center; }
.ml-hour-bar { width:70%; min-height:1px; background:#2a75c8; border-radius:2px 2px 0 0; }
.ml-hour span { position:absolute; bottom:-17px; font-size:9px; color:#6f91b6; }
.ml-stat-history { max-height:290px; overflow:auto; border:1px solid #263950; border-radius:7px; }
.ml-stat-ok { color:#69d28a; }
.ml-stat-aborted { color:#f0c24b; }
.ml-stat-error, .ml-stat-connect_error { color:#ff7d7d; }
@media(max-width:760px){
  .ml-stat-cards { grid-template-columns:repeat(2,minmax(120px,1fr)); }
  .ml-hours { overflow-x:auto; grid-template-columns:repeat(24,28px); }
}
