/* Security center, two-step sign-in pages and the dashboard security card (Sky & Navy). */

.sec-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
.sec-nav a { border: 1px solid var(--line); border-radius: 999px; padding: .32rem .9rem; color: #475569; text-decoration: none; font-size: .88rem; font-weight: 500; background: #fff; }
.sec-nav a:hover { border-color: #9CC5FA; color: var(--navy); }
.sec-nav a.active { background: var(--sky-100); border-color: #9CC5FA; color: var(--sky-600); font-weight: 600; }

.sec-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.sec-kpis .stat .value { font-size: 1.5rem; }

.sec-table { width: 100%; font-size: .88rem; }
.sec-table th { color: #475569; font-weight: 600; font-size: .78rem; padding: .55rem .6rem; border-bottom: 1px solid var(--line); background: #F8FAFD; white-space: nowrap; }
.sec-table td { padding: .55rem .6rem; border-bottom: 1px solid #EEF3FA; vertical-align: top; }
.sec-table tr:last-child td { border-bottom: 0; }
.sec-ok { color: #127A57; font-weight: 600; }
.sec-bad { color: #B42318; font-weight: 600; }
.sec-muted { color: var(--muted); font-size: .8rem; }
.sec-flag { display: inline-block; font-size: .72rem; border-radius: 6px; padding: .1rem .45rem; background: #FDEFD9; color: #8A520A; margin: 0 .2rem .2rem 0; white-space: nowrap; }
.sec-chan { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 6px; padding: .08rem .4rem; background: #E8EDF5; color: #475569; }
.sec-chan.App { background: var(--sky-100); color: var(--sky-600); }
.sec-here { font-size: .7rem; font-weight: 600; background: #D7F5EA; color: #127A57; border-radius: 6px; padding: .1rem .45rem; }
.sec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2FBF8F; margin-right: .35rem; box-shadow: 0 0 0 3px rgba(47,191,143,.18); }
.sec-dot.idle { background: #CBD5E1; box-shadow: none; }

.sec-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: .5rem; }
.sec-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 10px; }
.sec-bar .ok { background: linear-gradient(180deg, #7DB8FF, #2F80ED); border-radius: 4px 4px 0 0; }
.sec-bar .bad { background: #F28B82; border-radius: 0 0 4px 4px; }
.sec-bar .d { text-align: center; font-size: .65rem; color: #94A3B8; margin-top: 3px; }

.sec-device { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-bottom: 1px solid #EEF3FA; }
.sec-device:last-child { border-bottom: 0; }
.sec-device > i { font-size: 1.4rem; color: var(--sky); margin-top: .1rem; }
.sec-device .grow { flex: 1; min-width: 0; }
.sec-place { border-radius: 8px; padding: .3rem .4rem; }
.sec-place:hover { background: var(--sky-50); }

/* Two-step switches */
.sec-switch { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid #EEF3FA; }
.sec-switch:last-of-type { border-bottom: 0; }
.sec-switch .form-check-input { width: 2.6em; height: 1.4em; margin-top: .1rem; cursor: pointer; flex: 0 0 auto; }
.sec-switch .form-check-input:checked { background-color: var(--sky); border-color: var(--sky); }
.sec-switch .form-check-input:disabled { opacity: .85; }
.sec-meter { height: 6px; border-radius: 3px; background: #E8EDF5; overflow: hidden; margin-top: .35rem; max-width: 220px; }
.sec-meter > span { display: block; height: 100%; background: var(--mint); }

/* Two-step set-up */
.sec-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 .5rem; }
.sec-steps > li { position: relative; padding: 0 0 1.25rem 2.6rem; }
.sec-steps > li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: -.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--sky-100); color: var(--sky-600); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.sec-qr { width: 196px; height: 196px; margin: .75rem 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sec-qr svg { width: 100%; height: 100%; display: block; }
.sec-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1rem; letter-spacing: .04em; word-break: break-all; background: var(--sky-50); border: 1px dashed #9CC5FA; border-radius: 10px; padding: .55rem .75rem; margin-top: .35rem; }
.sec-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.6rem; letter-spacing: .45em; text-align: center; padding: .55rem .5rem; }
.sec-code-text { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-align: center; }
.sec-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.sec-codes code { display: block; text-align: center; font-size: 1rem; color: var(--navy); background: var(--sky-50); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; }
.sec-actions details { border-top: 1px solid #EEF3FA; padding: .7rem 0; }
.sec-actions summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.sec-actions summary i { margin-right: .3rem; }
.sec-confirm { margin-top: .6rem; max-width: 420px; }

@media (max-width: 768px) { .sec-hide-sm { display: none; } }
@media print {
    .fc-navbar, footer, .sec-noprint { display: none !important; }
    .auth-card { box-shadow: none; border: 0; }
}
