/* CusKIT Admin console. Bootstrap 5.3 does the heavy lifting; this is only the
   app shell and the few widgets Bootstrap has no primitive for. */

:root {
    --admin-sidebar-bg: #1f2937;
    --admin-sidebar-fg: #cbd5e1;
    --admin-sidebar-active: #0d6efd;
    --admin-sidebar-width: 15rem;
}

body {
    background-color: #f6f7f9;
}

/* ---------------------------------------------------------------- app shell */

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    flex: 0 0 var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-fg);
    padding: 1rem 0;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .25rem 1.25rem 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
}

.admin-brand .bi {
    font-size: 1.3rem;
    color: #60a5fa;
}

.admin-sidebar .nav-link {
    color: var(--admin-sidebar-fg);
    border-radius: 0;
    padding: .55rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .925rem;
}

.admin-sidebar .nav-link:hover:not(.disabled) {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.admin-sidebar .nav-link.active {
    background: rgba(13, 110, 253, .18);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--admin-sidebar-active);
}

.admin-sidebar .nav-link.disabled {
    color: #64748b;
    cursor: default;
}

.badge-soon {
    margin-left: auto;
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    border: 1px solid #475569;
    border-radius: .75rem;
    padding: 0 .4rem;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.admin-content {
    padding: 1.5rem;
    flex: 1 1 auto;
}

@media (max-width: 767.98px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-basis: auto;
    }
}

/* -------------------------------------------------------------- login pages */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #eef1f5;
}

.login-panel {
    width: 100%;
    max-width: 26rem;
    padding: 1.5rem;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1f2937;
}

.login-brand .bi {
    font-size: 1.5rem;
    color: #0d6efd;
}

/* Click-to-set value pills under a text input (billing status). */
.preset-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
}

.preset-pills .btn {
    border-radius: 2rem;
    padding: .1rem .7rem;
    font-family: var(--bs-font-monospace);
    font-size: .8rem;
}

.preset-pills [data-preset-effect] {
    flex-basis: 100%;
}

/* Authenticator codes: fixed width, generously spaced, hard to mistype. */
.code-input {
    font-family: var(--bs-font-monospace);
    font-size: 1.35rem;
    letter-spacing: .35em;
    text-align: center;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem .9rem;
    font-family: var(--bs-font-monospace);
    font-size: .95rem;
}

.totp-secret {
    font-family: var(--bs-font-monospace);
    letter-spacing: .08em;
    word-break: break-all;
}

.qr-frame {
    display: inline-block;
    padding: .5rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
}

/* Certificate search: wide enough for a customs code plus a name, without
   crowding the filter chips on a narrow window. */
.cert-search {
    width: 18rem;
    max-width: 100%;
}
