/* Restore look: shared with Pulse and Lens (Keysoft brand). The brand tokens, Bootstrap re-pointing and sidebar shell below are copied
 * from Pulse's style.css so the three apps stay visually identical; Restore-specific pieces are at the end. */
/* ---------- Keysoft brand (1.61.0) ----------
 * Colours are from the KeysoftBrand folder (brand-skill.md and the ecosystem infographic): primary blue #0082D5,
 * navy #14222F for the sidebar, #00598F as the text-safe blue (brand blue on white is only about 4.1:1).
 * Headings are Poppins, body is Open Sans. Bootstrap's own primary is re-pointed here once so every
 * btn-primary, link, focus ring and checked control follows. */
:root {
    --kb-blue: #0082D5;
    --kb-blue-ink: #00598F;
    --kb-blue-soft: #DCEEFA;
    --kb-blue-light: #3AA4EC;
    --kb-navy: #14222F;
    --kb-navy-line: #2B4256;
    --kb-navy-ink: #9DB3C5;
    --kb-navy-hi: #E8F1F8;
    --kb-navy-mute: #8FA9BC;
    --kb-ink: #17232F;
    --kb-page: #F3F7FB;
    --kb-line: #D6E0EA;
    --sb-w: 13rem;
    --sb-w-narrow: 4.25rem;

    --bs-primary: #0082D5;
    --bs-primary-rgb: 0, 130, 213;
    --bs-link-color: #00598F;
    --bs-link-color-rgb: 0, 89, 143;
    --bs-link-hover-color: #003F66;
    --bs-link-hover-color-rgb: 0, 63, 102;
    --bs-primary-bg-subtle: #DCEEFA;
    --bs-primary-border-subtle: #99CDEE;
    --bs-primary-text-emphasis: #00598F;
    --bs-body-font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --bs-body-color: #17232F;
    --bs-body-color-rgb: 23, 35, 47;
    --bs-border-color: #D6E0EA;
    --bs-heading-color: #17232F;
}
body { background: var(--kb-page); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Poppins', 'Open Sans', sans-serif; font-weight: 600; }

.btn-primary {
    --bs-btn-bg: #0082D5; --bs-btn-border-color: #0082D5;
    --bs-btn-hover-bg: #006FB5; --bs-btn-hover-border-color: #00669F;
    --bs-btn-active-bg: #00598F; --bs-btn-active-border-color: #00598F;
    --bs-btn-disabled-bg: #0082D5; --bs-btn-disabled-border-color: #0082D5;
    --bs-btn-focus-shadow-rgb: 0, 130, 213;
}
.btn-outline-primary {
    --bs-btn-color: #00598F; --bs-btn-border-color: #0082D5;
    --bs-btn-hover-bg: #0082D5; --bs-btn-hover-border-color: #0082D5;
    --bs-btn-active-bg: #00598F; --bs-btn-active-border-color: #00598F;
    --bs-btn-disabled-color: #00598F; --bs-btn-disabled-border-color: #0082D5;
    --bs-btn-focus-shadow-rgb: 0, 130, 213;
}
.btn-link { --bs-btn-color: #00598F; --bs-btn-hover-color: #003F66; }
.text-primary { --bs-text-opacity: 1; color: #00598F !important; }
.form-control:focus, .form-select:focus { border-color: #66B4E6; box-shadow: 0 0 0 .25rem rgba(0, 130, 213, .25); }
.form-check-input:checked, .form-check-input[type="checkbox"]:indeterminate { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.form-check-input:focus { border-color: #66B4E6; box-shadow: 0 0 0 .25rem rgba(0, 130, 213, .25); }
.progress { --bs-progress-bar-bg: #0082D5; }
.dropdown-menu { --bs-dropdown-link-active-bg: #0082D5; }
.list-group { --bs-list-group-active-bg: #0082D5; --bs-list-group-active-border-color: #0082D5; }
.nav-pills { --bs-nav-pills-link-active-bg: #0082D5; }
.nav-tabs .nav-link { color: #00598F; }
.nav-tabs .nav-link.active { color: var(--kb-ink); }
.pagination { --bs-pagination-color: #00598F; --bs-pagination-hover-color: #003F66; --bs-pagination-active-bg: #0082D5; --bs-pagination-active-border-color: #0082D5; }

/* ---------- Sidebar shell (1.61.0) ---------- */
.pulse-shell { display: flex; min-height: 100vh; }
.pulse-main { flex: 1 1 auto; min-width: 0; }
.pulse-content { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.pulse-sidebar {
    background: var(--kb-navy); color: var(--kb-navy-ink); width: var(--sb-w); flex: none;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    transition: width .2s ease; z-index: 1040;
}
.pulse-brand {
    display: block; padding: 1rem 1rem .5rem; color: var(--kb-navy-hi); text-decoration: none;
    font-family: Skia, 'Poppins', sans-serif; font-size: 1.25rem; letter-spacing: .06em; line-height: 1.1;
}
.pulse-brand:hover { color: #fff; }
.pulse-brand b { color: var(--kb-blue-light); font-weight: inherit; }
.pulse-brand-k { display: none; }
.pulse-appname {
    display: block; margin-top: .2rem; font-family: 'Open Sans', sans-serif; font-size: .7rem;
    letter-spacing: .14em; text-transform: uppercase; color: var(--kb-navy-mute);
}
.pulse-nav { flex: 1 1 auto; overflow-y: auto; padding: .25rem .5rem; }
.pulse-link {
    display: flex; align-items: center; gap: .75rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: .4rem;
    background: none; color: var(--kb-navy-ink); text-decoration: none; text-align: left; font: inherit;
    white-space: nowrap; position: relative;
}
.pulse-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; flex: none; }
.pulse-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.pulse-link.active { background: rgba(255, 255, 255, .12); color: #fff; }
.pulse-link.active::before {
    content: ""; position: absolute; left: -.5rem; top: .4rem; bottom: .4rem; width: 3px;
    border-radius: 0 2px 2px 0; background: var(--kb-blue);
}
.pulse-link:focus-visible, .pulse-group-btn:focus-visible, .pulse-iconbtn:focus-visible, .pulse-brand:focus-visible {
    outline: 2px solid #8CCBF5; outline-offset: -2px; box-shadow: none;
}
.pulse-group-btn {
    display: flex; align-items: center; width: 100%; padding: .85rem .6rem .25rem; border: 0; background: none;
    color: var(--kb-navy-mute); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.pulse-group-btn:hover { color: var(--kb-navy-hi); }
.pulse-group-btn[aria-expanded="false"] .bi-chevron-down { transform: rotate(-90deg); }
.pulse-foot { border-top: 1px solid var(--kb-navy-line); padding: .5rem; }
.pulse-ver { display: flex; align-items: center; justify-content: space-between; padding: .4rem .6rem .2rem; font-size: .7rem; color: var(--kb-navy-mute); }
.pulse-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 0;
    border-radius: .4rem; background: none; color: var(--kb-navy-ink); font-size: 1.15rem;
}
.pulse-iconbtn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.pulse-topbar { background: var(--kb-navy); display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; position: sticky; top: 0; z-index: 1030; }
.pulse-topbar--plain { justify-content: center; position: static; padding: .75rem; }
.pulse-brand--bar { padding: 0; }
.pulse-appname--inline { display: inline; margin: 0 0 0 .5rem; }
.pulse-backdrop { position: fixed; inset: 0; background: rgba(10, 18, 26, .5); z-index: 1039; }

@media (max-width: 991.98px) {
    .pulse-shell { display: block; }
    .pulse-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: 16rem; transform: translateX(-100%);
        visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
    }
    .pulse-sidebar.is-open { transform: none; visibility: visible; transition-delay: 0s; }
    .pulse-content { padding: 1rem; }
}
@media (min-width: 992px) {
    html.sb-narrow .pulse-sidebar { width: var(--sb-w-narrow); }
    html.sb-narrow .pulse-label {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
    }
    html.sb-narrow .pulse-link { justify-content: center; padding-left: 0; padding-right: 0; }
    html.sb-narrow .pulse-group-btn { display: none; }
    html.sb-narrow .pulse-group { border-top: 1px solid var(--kb-navy-line); margin-top: .5rem; padding-top: .5rem; }
    html.sb-narrow .pulse-group > .collapse { display: block !important; height: auto !important; }
    html.sb-narrow .pulse-brand { text-align: center; padding: 1rem 0 .5rem; }
    html.sb-narrow .pulse-brand-full, html.sb-narrow .pulse-appname { display: none; }
    html.sb-narrow .pulse-brand-k { display: inline; }
    html.sb-narrow .pulse-ver { flex-direction: column; gap: .35rem; padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .pulse-sidebar { transition: none; } }

/* Dashboard tiles */
.pulse-tile { border: 1px solid var(--kb-line); color: inherit; transition: border-color .15s ease; }
.pulse-tile:hover { border-color: var(--kb-blue); color: inherit; }
.pulse-tile-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--kb-blue-soft); color: var(--kb-blue-ink);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: none;
}
.pulse-tile-num { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.6rem; line-height: 1.1; color: var(--kb-ink); }

/*
 * Bootstrap's default placeholder color is dark enough that a placeholder
 * (a hint, never actually submitted) can be mistaken for a real saved value
 * at a glance - see Settings > ISPConfig's Endpoint field, 2026-08-27.
 * Force it visibly lighter and italic so hint text never reads as content.
 */
.form-control::placeholder {
    color: #6c757d !important;
    font-style: italic;
    opacity: 1;
}
/* ---------- accessibility follow-ups (Build 1.8.0 review) ---------- */
.text-danger, .invalid-feedback { color: #b02a37 !important; }
:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus, .nav-link:focus-visible, .form-select:focus { box-shadow: none; }
.blocker-line { min-height: 1.5rem; }
@media print { .badge { color: #000 !important; background: none !important; border: 1px solid #000; } }

/* ---------- Mobile table affordances (Build 1.25, mobile audit) ---------- */
/*
 * A `.table-responsive` table genuinely too wide to fit a phone screen needs a visible cue that it
 * scrolls - otherwise it reads as "broken"/"cut off" rather than "swipe for more" (found live,
 * 2026-10-01, servers list). Opt in with `.table-scroll-hint` on the `.table-responsive` wrapper.
 */
.table-scroll-hint { position: relative; }
.table-scroll-hint::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1.5rem; pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(0,0,0,.08));
}
.table-scroll-hint-text { display: none; }
@media (max-width: 767.98px) {
    .table-scroll-hint-text { display: block; }
}

/* A column kept in the DOM for a comparison table but hidden on narrow screens to reduce clutter -
   the data's still one tap/scroll away, this just isn't the default view. Pair with a "Show all
   columns" toggle where the hidden data matters enough to recover without resizing the window. */
@media (max-width: 767.98px) {
    .table-mobile-secondary { display: none; }
}

/* Keeps row identity (e.g. hostname) visible while scrolling a wide table horizontally. */
.table-sticky-col { position: sticky; left: 0; background: inherit; }

/* Bootstrap's default btn-sm/badge sizing in dense table rows is under the ~44px touch-target
   guideline - only widen on narrow screens, a dense desktop toolbar is fine as-is. */
@media (max-width: 767.98px) {
    .table-responsive .btn-sm { min-height: 2.25rem; padding-top: .5rem; padding-bottom: .5rem; }
}


[hidden] { display: none !important; }

/* ---------- Restore-specific ---------- */
.min-w-0 { min-width: 0; }
.restore-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #4b5d6d; white-space: nowrap; }
.restore-table td { vertical-align: middle; }
.restore-table .item-link { color: var(--kb-ink); text-decoration: none; }
.restore-table .item-link:hover { color: var(--kb-blue-ink); text-decoration: underline; }
.restore-table .item-link .bi { color: var(--kb-blue-ink); margin-right: .25rem; }
.breadcrumb-bar { font-size: .875rem; margin-bottom: 1rem; }
.role-badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; background: var(--kb-blue-soft); color: var(--kb-blue-ink); padding: .15rem .5rem; border-radius: .25rem; }
.stat-tile { text-decoration: none; color: inherit; border: 1px solid var(--kb-line); transition: border-color .15s ease; }
.stat-tile:hover { border-color: var(--kb-blue); color: inherit; }
.stat-tile .stat-number { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 2rem; line-height: 1; color: var(--kb-blue-ink); }
.stat-tile .stat-icon { font-size: 2rem; line-height: 1; color: var(--kb-blue-ink); }
.card { border-color: var(--kb-line); }
.card-header { background: #fff; font-family: 'Poppins', 'Open Sans', sans-serif; font-weight: 600; }
.card-danger { border-color: #b02a37; }
.card-danger .card-header { color: #b02a37; }
.totp-code { letter-spacing: .3em; }
.login-wrap { max-width: 26rem; margin: 2.5rem auto 0; }
.pw-group .btn { flex: none; }
.app-footer { font-size: .75rem; color: #5b6d7c; text-align: right; padding: .5rem 1.5rem 1.5rem; }
@media (max-width: 575.98px) {
  .restore-table th, .restore-table td { padding-left: .5rem; padding-right: .5rem; }
  .login-wrap { margin-top: 1rem; }
}
@media print { .no-print { display: none !important; } }
