/* Admin Security tab (12 Nov 2026) - Pages/Admin/AdminSecurity.razor. sec- prefix: global sheet.
   The tab sits inside .admin-shell (#293239), so cards are INSET: the page ground (#222) with a
   hairline, not another #293239 panel that disappears into the shell. */
.sec-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font-size: 14px; color: #ced4da; flex-wrap: wrap; }
.sec-live { display: inline-flex; align-items: center; gap: 8px; color: #20c997; font-weight: 500; }
.sec-live.paused { color: #ced4da; }
.sec-dot { width: 9px; height: 9px; border-radius: 50%; background: #20c997; box-shadow: 0 0 0 4px rgba(32,201,151,.18); }
.sec-live.paused .sec-dot { background: #667C8E; box-shadow: none; }
.sec-btn { background: transparent; border: 1px solid #667C8E; border-radius: 6px; height: 36px; padding: 0 14px; color: #fff; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.sec-btn:hover { border-color: #fec52d; color: #fec52d; }
.sec-btn:focus-visible { outline: 2px solid #0dcaf0; outline-offset: 2px; }
.sec-btn:disabled { opacity: .5; cursor: default; }
.sec-bar .sec-btn:first-of-type { margin-left: auto; }

.sec-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.sec-tile { background: #222222; border: 1px solid #3a454d; border-radius: 10px; padding: 14px 16px; min-height: 104px; display: flex; flex-direction: column; }
.sec-tile .k { font-size: 14px; line-height: 18px; color: #ced4da; }
.sec-tile b { display: block; font-family: 'Borda', sans-serif; font-weight: 500; font-size: 32px; line-height: 1; margin: 8px 0 6px; color: #fff; }
.sec-tile small { font-size: 12px; font-weight: 500; color: #adb5bd; line-height: 16px; overflow-wrap: anywhere; margin-top: auto; }
.sec-tile.warn { border-color: #fec52d; box-shadow: inset 3px 0 0 #fec52d; } .sec-tile.warn b { color: #fec52d; }
.sec-tile.bad { border-color: #ff6b6b; box-shadow: inset 3px 0 0 #ff6b6b; } .sec-tile.bad b { color: #ff6b6b; }

.sec-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sec-panel { background: #222222; border: 1px solid #3a454d; border-radius: 10px; padding: 18px 20px; }
.sec-panel h2 { font-family: 'Borda', sans-serif; font-weight: 500; font-size: 24px; line-height: 1; margin: 0 0 6px; color: #fff; display: flex; align-items: center; gap: 10px; }
.sec-panel .sub { margin: 0 0 12px; font-size: 12px; font-weight: 500; color: #adb5bd; }

.sec-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; color: #e9edf0; }
.sec-table th { text-align: left; font-weight: 500; color: #ced4da; padding: 8px; border-bottom: 1px solid #667C8E; font-size: 13px; }
.sec-table td { padding: 10px 8px; border-bottom: 1px solid #343e46; vertical-align: top; }
.sec-table tr:last-child td { border-bottom: 0; }
.sec-table .c-time { width: 84px; }
.sec-table .c-user { width: 26%; }
.sec-table .c-addr { width: 136px; }
.sec-table .c-act { width: 72px; }
.sec-user { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-mono { font-family: Consolas, ui-monospace, monospace; font-size: 14px; color: #ced4da; white-space: nowrap; }
.sec-org { font-size: 12px; line-height: 16px; color: #adb5bd; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-why { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-pill { display: inline-block; border-radius: 6px; padding: 3px 8px; font-size: 12px; line-height: 16px; font-weight: 500; border: 1px solid; color: #fff; max-width: 100%; }
.sec-pill.warn { border-color: rgba(254,197,45,.6); background: rgba(254,197,45,.12); }
.sec-pill.bad { border-color: rgba(255,107,107,.7); background: rgba(255,107,107,.14); }
.sec-pill.info { border-color: #667C8E; color: #ced4da; }
.sec-kind { display: inline-block; font-size: 12px; font-weight: 500; line-height: 16px; padding: 1px 6px; border-radius: 4px; margin-top: 3px; background: #343e46; color: #ced4da; }
.sec-kind.bad { background: rgba(255,107,107,.18); color: #fff; }
.sec-kind.warn { background: rgba(254,197,45,.16); color: #fff; }
.sec-act { display: flex; gap: 6px; justify-content: flex-end; }
.sec-act a, .sec-act button { width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #667C8E; border-radius: 5px; color: #fff; font-size: 13px; background: transparent; cursor: pointer; text-decoration: none; }
.sec-act a:hover, .sec-act button:hover { border-color: #fec52d; color: #fec52d; }
.sec-act button.copied { border-color: #20c997; color: #20c997; }
.sec-empty { color: #adb5bd; font-size: 14px; padding: 12px 0 4px; }
.sec-change-bad td { background: rgba(255,107,107,.10); }
.sec-changes td.c-time { width: 84px; }

@media (max-width: 1399.98px) {
    .sec-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sec-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: the bar wraps, tiles go two-up, and each "suspicious" row becomes a card -
   time and buttons on top, then user, address and the reasons, all full width. */
@media (max-width: 575.98px) {
    .sec-bar .sec-btn:first-of-type { margin-left: 0; }
    .sec-bar > span:nth-child(2) { flex-basis: 100%; order: 3; }
    .sec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sec-tile { min-height: 92px; padding: 12px; }
    .sec-tile b { font-size: 28px; }
    .sec-panel { padding: 14px 12px; }
    .sec-panel h2 { font-size: 20px; }

    .sec-table.sec-cards, .sec-table.sec-cards tbody { display: block; table-layout: auto; }
    .sec-table.sec-cards thead { display: none; }
    .sec-table.sec-cards tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "time act" "user user" "addr addr" "why why";
        gap: 4px 8px;
        padding: 12px 0;
        border-bottom: 1px solid #343e46;
    }
    .sec-table.sec-cards tr:last-child { border-bottom: 0; }
    .sec-table.sec-cards td { display: block; padding: 0; border: 0; width: auto; }
    .sec-table.sec-cards td.c-time { grid-area: time; align-self: center; }
    .sec-table.sec-cards td.c-act { grid-area: act; }
    .sec-table.sec-cards td.c-user { grid-area: user; }
    .sec-table.sec-cards td.c-addr { grid-area: addr; display: flex; gap: 8px; align-items: baseline; }
    .sec-table.sec-cards td.c-addr .sec-org { margin: 0; }
    .sec-table.sec-cards td.c-why { grid-area: why; margin-top: 4px; }
    .sec-user, .sec-org { white-space: normal; overflow-wrap: anywhere; }
}

/* ── Wall display (12 Nov 2026): the Security tab in full screen, for the IT room screen. ──
   Only the tab's own container goes full screen (security-wall.js), so the portal's menu and
   admin tabs are simply not there. Bigger type for reading across a room; new events pulse. */
.sec-wall-head { display: none; }
#sec-root:fullscreen { background: #1b2025; padding: 28px 40px; overflow: auto; }
#sec-root:fullscreen .sec-wall-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
#sec-root:fullscreen .sec-wall-head h1 { font-family: 'Borda', sans-serif; font-weight: 500; font-size: 32px; line-height: 1; margin: 0; color: #fff; }
#sec-root:fullscreen .sec-wall-head img { height: 44px; }
#sec-root:fullscreen .sec-wall-clock { margin-left: auto; font-family: Consolas, ui-monospace, monospace; font-size: 32px; color: #fff; }
#sec-root:fullscreen .sec-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#sec-root:fullscreen .sec-tile { min-height: 140px; padding: 18px 20px; }
#sec-root:fullscreen .sec-tile .k { font-size: 18px; line-height: 22px; }
#sec-root:fullscreen .sec-tile b { font-size: 56px; margin: 12px 0 8px; }
#sec-root:fullscreen .sec-tile small { font-size: 14px; line-height: 18px; }
#sec-root:fullscreen .sec-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
#sec-root:fullscreen .sec-table { font-size: 16px; }
#sec-root:fullscreen .sec-pill { font-size: 14px; line-height: 18px; }
#sec-root:fullscreen .sec-org { font-size: 14px; line-height: 18px; }
.sec-table tr.sec-new td:first-child { box-shadow: inset 3px 0 0 #fec52d; }
#sec-root:fullscreen .sec-table tr.sec-new td { animation: sec-flash 2.4s ease-in-out 3; }
@keyframes sec-flash { 50% { background: rgba(254,197,45,.12); } }
@media (prefers-reduced-motion: reduce) { #sec-root:fullscreen .sec-table tr.sec-new td { animation: none; } }

/* ── Board A (12 Nov 2026): live overview - online tile, logins-per-hour chart, online by
   country, live activity feed. Chart is inline SVG from AdminSecurity.razor; each hour has a
   full-height hit area carrying a <title>, so the hover tooltip works on thin bars too. ── */
.sec-tile.live { border-color: #20c997; box-shadow: inset 3px 0 0 #20c997; }
.sec-tile .k .sec-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; vertical-align: 1px; }
.sec-row { margin-bottom: 16px; align-items: stretch; }
.sec-chart { width: 100%; height: auto; display: block; }
.sec-chart .axis { stroke: #667C8E; stroke-width: 1; }
.sec-chart .grid { stroke: #343e46; stroke-width: 1; stroke-dasharray: 3 4; }
.sec-chart .lbl { fill: #adb5bd; font: 500 13px Roboto, sans-serif; }
.sec-chart .bar .fill { fill: #fec52d; }
.sec-chart .bar.bad .fill { fill: #ff6b6b; }
.sec-chart .bar .hit { fill: transparent; }
.sec-chart .bar:hover .hit { fill: rgba(255,255,255,.05); }
.sec-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.sec-key.bad { background: #ff6b6b; }

.sec-countries { list-style: none; margin: 0; padding: 0; }
.sec-countries li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 32px; gap: 12px; align-items: center; padding: 5px 0; font-size: 14px; }
.sec-countries .name { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-countries .track { height: 10px; }
.sec-countries .track span { display: block; height: 100%; min-width: 4px; background: #fec52d; border-radius: 0 4px 4px 0; }
.sec-countries .num { text-align: right; color: #ced4da; font-family: Consolas, ui-monospace, monospace; }

.sec-stack { display: grid; gap: 16px; min-width: 0; }
.sec-feed { list-style: none; margin: 0; padding: 0; }
.sec-feed li { display: grid; grid-template-columns: 84px 20px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #343e46; font-size: 14px; }
.sec-feed li:last-child { border-bottom: 0; }
.sec-feed .txt { color: #e9edf0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-feed .ok { color: #20c997; } .sec-feed .bad { color: #ff6b6b; } .sec-feed .dl { color: #fec52d; }
.sec-feed li.sec-new { box-shadow: inset 3px 0 0 #fec52d; padding-left: 6px; }

@media (max-width: 575.98px) {
    .sec-countries li { grid-template-columns: 96px minmax(0, 1fr) 28px; gap: 8px; }
    .sec-feed li { grid-template-columns: 80px 18px minmax(0, 1fr); }
    .sec-feed .txt { white-space: normal; overflow-wrap: anywhere; }
}

/* Wall: one screen, no scrolling - the Suspicious list is cut to what fits and the 7-day
   Security changes (desk work, not wall work) is left out. */
#sec-root:fullscreen .sec-changes-panel { display: none; }
#sec-root:fullscreen .sec-scroll { max-height: 400px; overflow: hidden; }
#sec-root:fullscreen .sec-countries li, #sec-root:fullscreen .sec-feed li { font-size: 17px; }
#sec-root:fullscreen .sec-countries .track { height: 14px; }
#sec-root:fullscreen .sec-chart .lbl { font-size: 15px; }

/* ── Track and block (12 Nov 2026): look-up card, Blocked now, confirm dialog. All of it is
   desk work - .sec-desk is left off the wall display. ── */
#sec-root:fullscreen .sec-desk { display: none !important; }
.sec-lookup { margin-bottom: 16px; }
.sec-search { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-search input { flex: 1 1 260px; min-width: 0; height: 40px; background: #1b2025; border: 1px solid #667C8E; border-radius: 6px; color: #fff; padding: 0 12px; font-size: 16px; }
.sec-search input:focus-visible, .sec-field input:focus-visible { outline: 2px solid #0dcaf0; outline-offset: 1px; }
.sec-btn.gold { background: #fec52d; border-color: #fec52d; color: #222; font-weight: 500; }
.sec-btn.gold:hover { background: #ffd75e; color: #222; }
.sec-btn.red { border-color: #ff6b6b; color: #ff8f8f; }
.sec-btn.red:hover { border-color: #ff6b6b; color: #fff; background: rgba(255,107,107,.14); }
.sec-btn.redfill { background: #e35d5d; border-color: #e35d5d; color: #fff; font-weight: 500; }
.sec-btn.redfill:hover { background: #ef6f6f; color: #fff; }
.sec-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.sec-flash { display: flex; gap: 8px; align-items: center; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; color: #fff; }
.sec-flash.ok { background: rgba(32,201,151,.12); border: 1px solid rgba(32,201,151,.5); }
.sec-flash.bad { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.6); }
.sec-flash.warn { background: rgba(254,197,45,.10); border: 1px solid rgba(254,197,45,.55); }

.sec-who { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #343e46; margin-bottom: 12px; flex-wrap: wrap; }
.sec-who .who-txt { flex: 1 1 200px; min-width: 0; }
.sec-who .who-txt b { display: block; font-size: 18px; font-weight: 500; color: #fff; overflow-wrap: anywhere; }
.sec-av { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #343e46; display: flex; align-items: center; justify-content: center; font-family: 'Borda', sans-serif; font-size: 18px; color: #fec52d; }
.sec-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sec-facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-facts > div { background: #1b2025; border-radius: 8px; padding: 9px 12px; }
.sec-facts span { display: block; font-size: 12px; font-weight: 500; color: #adb5bd; }
.sec-facts b { display: block; font-size: 16px; font-weight: 500; color: #fff; margin-top: 2px; }
.sec-facts b.ok, .sec-tried .ok { color: #20c997; } .sec-facts b.warn { color: #fec52d; } .sec-facts b.bad { color: #ff8f8f; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.sec-tl { list-style: none; margin: 0; padding: 0; }
.sec-tl li { display: grid; grid-template-columns: 110px 20px minmax(0, 1fr) 32px; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid #343e46; font-size: 14px; }
.sec-tl li:last-child { border-bottom: 0; }
.sec-tl .d { color: #e9edf0; overflow-wrap: anywhere; }
.sec-tl .d .sec-pill { margin-left: 6px; }
.sec-tl .d small { display: block; color: #adb5bd; font-size: 12px; line-height: 16px; margin-top: 2px; }
.sec-tl .ok, .sec-tl .bi.ok { color: #20c997; } .sec-tl .warn { color: #fec52d; } .sec-tl .bad { color: #ff6b6b; }
.sec-icon, .sec-act button.sec-desk { width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #667C8E; border-radius: 5px; color: #fff; font-size: 13px; background: transparent; cursor: pointer; }
.sec-icon:hover { border-color: #fec52d; color: #fec52d; }
.sec-tried { margin-bottom: 4px; }
.sec-tried .c-n { width: 76px; } .sec-tried .c-last { width: 120px; } .sec-tried .c-act { width: 44px; }
.sec-blocked .c-what { width: 92px; } .sec-blocked .c-user { width: 22%; } .sec-blocked .c-since { width: 120px; }
.sec-blocked .c-by { width: 150px; overflow-wrap: anywhere; } .sec-blocked .c-btn { width: 116px; text-align: right; }

.sec-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1060; }
.sec-modal { position: fixed; z-index: 1061; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: #293239; border: 1px solid #3a454d; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); color: #e9edf0; font-size: 14px; }
.sec-modal .mh { display: flex; gap: 10px; align-items: center; padding: 16px 20px; border-bottom: 1px solid #3a454d; }
.sec-modal .mh .bi { font-size: 20px; } .sec-modal .mh .bad { color: #ff6b6b; } .sec-modal .mh .ok { color: #20c997; }
.sec-modal h3 { font-family: 'Borda', sans-serif; font-weight: 500; font-size: 22px; margin: 0; color: #fff; overflow-wrap: anywhere; }
.sec-modal .mb { padding: 16px 20px; line-height: 21px; }
.sec-modal .mb ul { margin: 4px 0 12px; padding-left: 18px; }
.sec-modal .mf { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #3a454d; }
.sec-field { display: block; margin-top: 10px; font-size: 12px; font-weight: 500; color: #ced4da; }
.sec-field input { display: block; box-sizing: border-box; width: 100%; margin-top: 4px; height: 38px; background: #1b2025; border: 1px solid #667C8E; border-radius: 6px; padding: 0 12px; color: #fff; font-size: 14px; font-weight: 400; }
.sec-check { display: flex; gap: 8px; align-items: center; margin-top: 10px; cursor: pointer; }
.sec-check input { width: 16px; height: 16px; accent-color: #fec52d; }
.sec-seg { display: flex; width: max-content; max-width: 100%; margin-top: 4px; border: 1px solid #667C8E; border-radius: 6px; overflow: hidden; }
.sec-seg button { background: transparent; border: 0; color: #fff; padding: 7px 12px; font-size: 14px; cursor: pointer; }
.sec-seg button + button { border-left: 1px solid #667C8E; }
.sec-seg button.on { background: #fec52d; color: #222; font-weight: 500; }
.sec-seg button:focus-visible { outline: 2px solid #0dcaf0; outline-offset: -2px; }
.sec-note { background: rgba(13,202,240,.08); border: 1px solid rgba(13,202,240,.35); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: #ced4da; margin: 12px 0 0; }

@media (max-width: 575.98px) {
    .sec-facts, .sec-facts.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Time on its own line above the event: 'dd Mon hh:mm' does not fit a narrow column. */
    .sec-tl li { grid-template-columns: 18px minmax(0, 1fr) 30px; gap: 2px 6px; }
    .sec-tl li > .sec-mono { grid-column: 1 / -1; font-size: 12px; }
    .sec-tried .c-last { display: none; }
    .sec-table.sec-cards.sec-blocked tr { grid-template-areas: none; grid-template-columns: minmax(0, 1fr) auto; }
    .sec-table.sec-cards.sec-blocked td { grid-area: auto; }
    .sec-table.sec-cards.sec-blocked td.c-user, .sec-table.sec-cards.sec-blocked td.c-why,
    .sec-table.sec-cards.sec-blocked td.c-since, .sec-table.sec-cards.sec-blocked td.c-by { grid-column: 1 / -1; }
    .sec-table.sec-cards.sec-blocked td.c-btn { text-align: right; }
}

/* Times in narrow columns (13 Nov 2026): "today" is just a time, but anything older is the full
   date and time ("11/12/2026 11:57 PM"), which overflowed the fixed time column into the names
   beside it after midnight. Let it wrap - date on one line, time under it - and top-align the row. */
.sec-table td.c-time, .sec-feed li > .sec-mono, .sec-tl li > .sec-mono { white-space: normal; line-height: 18px; }
/* Room for "11/12/2026" on one line beside the cell padding; wraps only at the spaces. */
.sec-table .c-time, .sec-changes td.c-time { width: 104px; }
.sec-feed li { align-items: start; }
