/* SpamFactor - main stylesheet (on top of Bootstrap 5) */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

:root {
    --sf-blue: #1463e6;
    --sf-blue-dark: #0a4fc2;
    --sf-blue-soft: #e8f0fe;
    --sf-navy: #0f1b3d;
    --sf-ink: #1e293b;
    --sf-muted: #64748b;
    --sf-line: #e3e8f0;
    --sf-bg: #f5f7fb;
    --sf-surface: #ffffff;

    --sf-red: #dc2638;
    --sf-red-soft: #fde8ea;
    --sf-orange: #d9620b;
    --sf-orange-soft: #fff0e3;
    --sf-amber: #a16207;
    --sf-amber-soft: #fef6dc;
    --sf-green: #15803d;
    --sf-green-soft: #e3f6ea;
    --sf-purple: #7c3aed;
    --sf-purple-soft: #f0e9fe;

    --sf-radius: 12px;
    --sf-shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 4px 16px rgba(15, 27, 61, .05);
    --sf-ease: cubic-bezier(.23, 1, .32, 1);

    --bs-body-font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--sf-ink);
    --bs-body-bg: var(--sf-bg);
    --bs-primary: var(--sf-blue);
    --bs-primary-rgb: 20, 99, 230;
    --bs-link-color: var(--sf-blue);
    --bs-link-color-rgb: 20, 99, 230;
    --bs-link-hover-color: var(--sf-blue-dark);
    --bs-link-hover-color-rgb: 10, 79, 194;
    --bs-border-color: var(--sf-line);
    --bs-border-radius: 8px;
    --bs-border-radius-lg: var(--sf-radius);
    --bs-focus-ring-color: rgba(20, 99, 230, .25);
}

body { font-size: .9375rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { color: var(--sf-navy); font-weight: 700; letter-spacing: -.01em; }
.text-muted { color: var(--sf-muted) !important; }
a { text-underline-offset: 2px; }
code { color: var(--sf-blue-dark); }

/* Buttons */
.btn { font-weight: 600; border-radius: 8px; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .16s var(--sf-ease), box-shadow .15s ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { --bs-btn-bg: var(--sf-blue); --bs-btn-border-color: var(--sf-blue); --bs-btn-hover-bg: var(--sf-blue-dark); --bs-btn-hover-border-color: var(--sf-blue-dark); --bs-btn-active-bg: var(--sf-blue-dark); --bs-btn-active-border-color: var(--sf-blue-dark); --bs-btn-disabled-bg: var(--sf-blue); --bs-btn-disabled-border-color: var(--sf-blue); }
.btn-outline-primary { --bs-btn-color: var(--sf-blue); --bs-btn-border-color: var(--sf-blue); --bs-btn-hover-bg: var(--sf-blue); --bs-btn-hover-border-color: var(--sf-blue); --bs-btn-active-bg: var(--sf-blue-dark); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--sf-line); --bs-btn-hover-bg: #f1f4f9; --bs-btn-hover-border-color: #d5dce7; --bs-btn-color: var(--sf-ink); }
.btn-danger { --bs-btn-bg: var(--sf-red); --bs-btn-border-color: var(--sf-red); }
.btn-success { --bs-btn-bg: var(--sf-green); --bs-btn-border-color: var(--sf-green); --bs-btn-hover-bg: #116632; --bs-btn-hover-border-color: #116632; }
.btn .fa, .btn .fas, .btn .far, .btn .fal, .btn .fab { margin-right: .4rem; }
.btn-icon .fas, .btn-icon .far { margin-right: 0; }

.form-control, .form-select { border-color: var(--sf-line); border-radius: 8px; padding: .55rem .8rem; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: #8db4f5; box-shadow: 0 0 0 .2rem rgba(20, 99, 230, .15); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--sf-navy); }
.form-text { color: var(--sf-muted); }
.form-check-input:checked { background-color: var(--sf-blue); border-color: var(--sf-blue); }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; color: var(--sf-navy); line-height: 1; }
.brand img { height: 34px; width: auto; }
.brand .brand-accent { color: var(--sf-blue); }
.brand:hover { color: var(--sf-navy); }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-accent { color: #8fc0ff; }

/* Shared by the portal help page */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .85rem; line-height: 1.55; }
.check-list li::before { content: '\f00c'; font-family: 'Font Awesome 5 Pro'; font-weight: 900; position: absolute; left: 0; top: .1rem; width: 20px; height: 20px; border-radius: 50%; background: var(--sf-green-soft); color: var(--sf-green); font-size: .65rem; display: flex; align-items: center; justify-content: center; }
/* FAQ */
.faq .accordion-item { border: 1px solid var(--sf-line); border-radius: 12px !important; margin-bottom: .75rem; overflow: hidden; }
.faq .accordion-button { font-weight: 600; color: var(--sf-navy); padding: 1.1rem 1.25rem; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { background: #fff; color: var(--sf-blue); }
.faq .accordion-body { color: var(--sf-muted); padding-top: 0; line-height: 1.65; }

/* ---------------------------------------------------------------- */
/* Portal                                                           */
/* ---------------------------------------------------------------- */

.portal { --topbar-h: 68px; --sidebar-w: 248px; }
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--sf-line); z-index: 1030; display: flex; align-items: center; padding: 0 1.25rem; gap: 1rem; }
.topbar .brand { font-size: 1.3rem; }
.topbar .brand img { height: 30px; }
.user-menu { display: inline-flex; align-items: center; gap: .6rem; border: 0; background: none; padding: .3rem .5rem; border-radius: 10px; font-weight: 600; color: var(--sf-navy); font-size: .9rem; }
.user-menu:hover { background: var(--sf-bg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sf-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.dropdown-menu { border-color: var(--sf-line); border-radius: 12px; box-shadow: 0 12px 32px -8px rgba(15, 27, 61, .18); padding: .4rem; font-size: .9rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; }
.dropdown-item i { width: 20px; color: var(--sf-muted); }

.sidebar { position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--sf-line); padding: 1.25rem .9rem; display: flex; flex-direction: column; overflow-y: auto; z-index: 1020; }
.side-nav { list-style: none; padding: 0; margin: 0; }
.side-nav a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 10px; color: var(--sf-ink); text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: .2rem; transition: background-color .15s ease, color .15s ease; }
.side-nav a i { width: 20px; text-align: center; font-size: 1rem; color: #7b8aa3; transition: color .15s ease; }
.side-nav a:hover { background: var(--sf-bg); }
.side-nav a.active { background: var(--sf-navy); color: #fff; }
.side-nav a.active i { color: #fff; }
.side-nav .badge-count { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: var(--sf-blue-soft); color: var(--sf-blue); }
.side-nav a.active .badge-count { background: rgba(255, 255, 255, .18); color: #fff; }
.side-nav .nav-header { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; padding: 1.25rem .9rem .5rem; }
.service-card { margin-top: auto; border: 1px solid var(--sf-line); border-radius: 12px; padding: 1rem; font-size: .8rem; color: var(--sf-muted); position: relative; }
.service-card strong { color: var(--sf-green); display: flex; align-items: center; gap: .4rem; font-size: .82rem; margin-bottom: .25rem; }
.service-card strong::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sf-green); }
.service-card .fa-shield-check, .service-card .fa-shield-alt { position: absolute; right: 1rem; top: 1rem; color: var(--sf-blue); font-size: 1.3rem; }

.portal-main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 2rem) 2rem 2rem; min-height: 100vh; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: .35rem; }
.page-head p { color: var(--sf-muted); margin: 0; max-width: 680px; }

.card { border-color: var(--sf-line); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); }
.card-header { background: #fff; border-bottom-color: var(--sf-line); padding: 1rem 1.25rem; font-weight: 700; color: var(--sf-navy); }
.card-header:first-child { border-radius: var(--sf-radius) var(--sf-radius) 0 0; }
.card-body { padding: 1.25rem; }

/* Summary cards */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border: 1px solid var(--sf-line); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); margin-bottom: 1.5rem; }
.stat { display: flex; gap: .85rem; padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; border-radius: var(--sf-radius); transition: background-color .15s ease; }
.stat + .stat { border-left: 1px solid var(--sf-line); border-radius: 0; }
a.stat:hover { background: #fafbfd; }
.stat-icon { flex: 0 0 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.stat-label { font-size: .8rem; color: var(--sf-muted); font-weight: 600; }
.stat-value { font-size: 1.45rem; font-weight: 800; color: var(--sf-navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .75rem; color: var(--sf-muted); }
.stat.is-active { box-shadow: inset 0 -3px 0 var(--sf-blue); }

.tone-blue { background: var(--sf-blue-soft); color: var(--sf-blue); }
.tone-red { background: var(--sf-red-soft); color: var(--sf-red); }
.tone-orange { background: var(--sf-orange-soft); color: var(--sf-orange); }
.tone-amber { background: var(--sf-amber-soft); color: var(--sf-amber); }
.tone-green { background: var(--sf-green-soft); color: var(--sf-green); }
.tone-purple { background: var(--sf-purple-soft); color: var(--sf-purple); }
.tone-navy { background: #e6e9f2; color: var(--sf-navy); }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.filter-bar .search { position: relative; flex: 1 1 260px; }
.filter-bar .search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.filter-bar .search input { padding-left: 2.4rem; }
.filter-bar .form-select { flex: 0 0 auto; width: auto; min-width: 150px; }

/* Message table */
.list-card { background: #fff; border: 1px solid var(--sf-line); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); overflow: hidden; }
.msg-table { margin: 0; font-size: .875rem; }
.msg-table thead th { background: #fafbfd; color: var(--sf-navy); font-weight: 700; font-size: .8rem; border-bottom: 1px solid var(--sf-line); padding: .8rem 1rem; white-space: nowrap; }
.msg-table td { padding: .8rem 1rem; vertical-align: middle; border-color: #eef1f6; }
.msg-table tbody tr { cursor: pointer; transition: background-color .12s ease; }
.msg-table tbody tr:hover { background: #f8faff; }
.msg-table tbody tr.is-selected { background: var(--sf-blue-soft); }
.msg-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--sf-blue); }
.msg-table .col-check { width: 44px; }
.msg-table .col-date { white-space: nowrap; color: var(--sf-muted); font-variant-numeric: tabular-nums; }
.msg-table .cell-trunc { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-table .cell-sub { display: block; font-size: .76rem; color: var(--sf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.msg-table .subject { color: var(--sf-navy); font-weight: 500; }
.msg-table .cell-from { display: flex; align-items: center; gap: .35rem; }
.msg-table .cell-via { flex: none; font-size: .72rem; color: var(--sf-muted); opacity: .7; cursor: help; }
.msg-table .cell-to { display: flex; align-items: center; gap: .35rem; }
.msg-table .cell-to i { flex: none; font-size: .62rem; }
.msg-table .cell-to-addr { overflow: hidden; text-overflow: ellipsis; }
.msg-table .cell-more { flex: none; font-size: .68rem; font-weight: 700; background: #eef1f6; border-radius: 999px; padding: 0 .4rem; line-height: 1.5; cursor: help; }
.list-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: .9rem 1rem; border-top: 1px solid var(--sf-line); font-size: .85rem; color: var(--sf-muted); }
.bulk-bar { display: none; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--sf-blue-soft); border-bottom: 1px solid #cfdcf7; font-size: .85rem; font-weight: 600; color: var(--sf-blue-dark); }
.bulk-bar.show { display: flex; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--sf-muted); }
.empty-state i { font-size: 2.2rem; color: #c3cee0; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.05rem; }

/* Status badges */
.status { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.status i { font-size: .68rem; }
.status-blocked { background: var(--sf-red-soft); color: var(--sf-red); }
.status-virus { background: var(--sf-purple-soft); color: var(--sf-purple); }
.status-tagged { background: var(--sf-orange-soft); color: var(--sf-orange); }
.status-deferred { background: var(--sf-amber-soft); color: var(--sf-amber); }
.status-delivered { background: var(--sf-green-soft); color: var(--sf-green); }
.status-released { background: var(--sf-blue-soft); color: var(--sf-blue); }
.status-other, .status-quarantined { background: #eef1f6; color: #475569; }

.score { display: inline-block; min-width: 46px; text-align: center; padding: .15rem .45rem; border-radius: 6px; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-high { background: var(--sf-red-soft); color: var(--sf-red); }
.score-medium { background: var(--sf-orange-soft); color: var(--sf-orange); }
.score-low { background: var(--sf-amber-soft); color: var(--sf-amber); }
.score-clean { background: var(--sf-green-soft); color: var(--sf-green); }

/* Messages page with detail panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.detail-panel { display: none; }
@media (min-width: 1400px) {
    .split.has-panel { grid-template-columns: minmax(0, 1fr) 460px; }
    .split.has-panel .detail-panel { display: block; position: sticky; top: calc(var(--topbar-h) + 1.25rem); max-height: calc(100vh - var(--topbar-h) - 2.5rem); overflow-y: auto; background: #fff; border: 1px solid var(--sf-line); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); }
    .split.has-panel .msg-table .hide-panel { display: none; }
    .split.has-panel .msg-table .cell-trunc, .split.has-panel .msg-table .cell-sub { max-width: 190px; }
    .split.has-panel .msg-table td, .split.has-panel .msg-table th { padding-left: .75rem; padding-right: .75rem; }
}
@media (min-width: 1700px) { .split.has-panel { grid-template-columns: minmax(0, 1fr) 560px; } }
.offcanvas.detail-offcanvas { width: min(560px, 100vw); }
.detail-empty { padding: 4rem 1.5rem; text-align: center; color: var(--sf-muted); }
.detail-empty i { font-size: 2rem; color: #c3cee0; margin-bottom: .75rem; display: block; }
.detail-loading { padding: 4rem; text-align: center; color: var(--sf-muted); }

.detail { padding: 1.25rem; }
.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .85rem; font-size: .82rem; color: var(--sf-muted); }
.detail h2 { font-size: 1.2rem; font-weight: 700; line-height: 1.35; word-break: break-word; margin-bottom: .9rem; }
.detail-meta { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .85rem; margin-bottom: 1.1rem; }
.detail-meta dt { color: var(--sf-muted); font-weight: 500; }
.detail-meta dd { margin: 0; color: var(--sf-navy); word-break: break-all; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.25rem; }
.detail-actions .btn-release { grid-column: 1 / -1; }
.detail-actions .btn { padding: .65rem; }
.detail .nav-tabs { border-bottom: 1px solid var(--sf-line); gap: .25rem; margin-bottom: 1rem; }
.detail .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--sf-muted); font-weight: 600; font-size: .86rem; padding: .6rem .8rem; }
.detail .nav-tabs .nav-link.active { color: var(--sf-blue); border-bottom-color: var(--sf-blue); background: none; }
.preview-frame { width: 100%; height: 520px; border: 1px solid var(--sf-line); border-radius: 10px; background: #fff; }
.source-view { max-height: 520px; overflow: auto; font-size: .75rem; background: #f8fafc; border: 1px solid var(--sf-line); border-radius: 10px; padding: 1rem; white-space: pre-wrap; word-break: break-all; color: #334155; }
.header-table { font-size: .78rem; }
.header-table th { white-space: nowrap; color: var(--sf-navy); font-weight: 600; width: 1%; vertical-align: top; }
.header-table td { word-break: break-all; color: #334155; }
.note { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 10px; background: var(--sf-bg); font-size: .82rem; color: var(--sf-muted); }
.note i { font-size: 1.05rem; margin-top: .1rem; color: #7b8aa3; }

/* Score gauge */
.gauge { margin-bottom: 1.1rem; }
.gauge-track { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #22c55e 0%, #22c55e 26%, #eab308 26%, #eab308 40%, #f97316 40%, #f97316 60%, #ef4444 60%); }
.gauge-marker { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--sf-navy); transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(15, 27, 61, .25); }
.gauge-labels { position: relative; height: 1rem; font-size: .7rem; color: var(--sf-muted); margin-top: .4rem; }
.gauge-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.gauge-labels span:first-child { transform: none; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; font-size: .82rem; color: var(--sf-muted); font-weight: 600; }
.gauge-head strong { font-size: 1.25rem; color: var(--sf-navy); font-weight: 800; }

/* Reasons */
.reason { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .7rem 0; border-bottom: 1px solid #eef1f6; }
.reason:last-child { border-bottom: 0; }
.reason-name { font-weight: 600; font-size: .82rem; color: var(--sf-navy); font-family: SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.reason-desc { grid-column: 1 / -1; font-size: .8rem; color: var(--sf-muted); }
.reason-options { grid-column: 1 / -1; font-size: .74rem; color: #94a3b8; word-break: break-all; }
.reason-score { font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; }
.reason-score.pos { color: var(--sf-red); }
.reason-score.neg { color: var(--sf-green); }
.reason-score.zero { color: #94a3b8; }
.reason-group { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; margin: 1rem 0 .2rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.check-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 6px; border: 1px solid var(--sf-line); color: var(--sf-ink); }
.check-pill.ok i { color: var(--sf-green); }
.check-pill.bad i { color: var(--sf-red); }
.check-pill.unknown i { color: #94a3b8; }

/* Pagination */
.pagination { margin: 0; gap: .3rem; }
.page-link { border-radius: 8px !important; border-color: var(--sf-line); color: var(--sf-ink); font-weight: 600; font-size: .85rem; min-width: 34px; text-align: center; }
.page-item.active .page-link { background: var(--sf-blue); border-color: var(--sf-blue); }

/* Tables in cards */
.table-clean { margin: 0; font-size: .875rem; }
.table-clean th { font-size: .78rem; font-weight: 700; color: var(--sf-navy); background: #fafbfd; padding: .75rem 1rem; white-space: nowrap; }
.table-clean td { padding: .75rem 1rem; vertical-align: middle; border-color: #eef1f6; }

.domain-card { background: #fff; border: 1px solid var(--sf-line); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow); padding: 1.25rem; height: 100%; }
.domain-card h3 { font-size: 1.1rem; margin: 0; word-break: break-all; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .86rem; margin: 1rem 0; }
.kv dt { color: var(--sf-muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--sf-navy); word-break: break-all; }
.mx-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; }

.chart-box { position: relative; height: 300px; }
.bar-list { list-style: none; padding: 0; margin: 0; }
.bar-list li { padding: .5rem 0; font-size: .84rem; }
.bar-list .bar-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; }
.bar-list .bar-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--sf-navy); }
.bar-list .bar { height: 6px; border-radius: 3px; background: #eef2f7; overflow: hidden; }
.bar-list .bar span { display: block; height: 100%; background: var(--sf-blue); border-radius: 3px; }

.help-steps { counter-reset: step; list-style: none; padding: 0; }
.help-steps li { position: relative; padding-left: 2.75rem; margin-bottom: 1.25rem; line-height: 1.6; }
.help-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--sf-blue-soft); color: var(--sf-blue); font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
pre.code { background: var(--sf-navy); color: #dbe6ff; padding: 1rem 1.1rem; border-radius: 10px; font-size: .8rem; }

.alert { border-radius: 10px; font-size: .9rem; }
.toast-container { z-index: 1090; }
.toast { border: 0; border-radius: 10px; box-shadow: 0 12px 32px -8px rgba(15, 27, 61, .3); }

.sidebar-toggle { display: none; }

@media (max-width: 1199.98px) {
    .stats { grid-template-columns: repeat(3, 1fr); }
    .stat:nth-child(4) { border-left: 0; }
    .stat:nth-child(n+4) { border-top: 1px solid var(--sf-line); }
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s var(--sf-ease); box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(15, 27, 61, .2); }
    .sidebar-toggle { display: inline-flex; }
    .portal-main { margin-left: 0; padding: calc(var(--topbar-h) + 1.25rem) 1rem 1.5rem; }
}

@media (max-width: 575.98px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat + .stat { border-left: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--sf-line); }
    .stat:nth-child(n+3) { border-top: 1px solid var(--sf-line); }
    .stat:nth-child(4) { border-left: 1px solid var(--sf-line); }
    .page-head h1 { font-size: 1.5rem; }
    .filter-bar .form-select { flex: 1 1 140px; }
    .topbar .user-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
