/* ticket-monitor admin UI (feature 012, D-26).
   Only var(--…) tokens of the EasyAdmin theme (DESIGN.md). Registered with configureAssets()->addCssFile() (T-41). */

/* U-7 KpiTile */
.admin-kpi-tile {
    background-color: var(--body-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    gap: var(--ea-sp-2);
    padding: var(--ea-sp-8);
}

.admin-kpi-tile-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--ea-sp-4);
}

.admin-kpi-tile-value {
    font-size: var(--font-size-xxxl);
    font-variant-numeric: tabular-nums;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

.admin-kpi-tile-label {
    font-weight: var(--font-weight-medium);
}

.admin-kpi-tile-sub {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* U-8 ProgressBar */
.admin-progress {
    display: flex;
    flex-direction: column;
    gap: var(--ea-sp-2);
}

.admin-progress-text {
    align-items: baseline;
    display: flex;
    gap: var(--ea-sp-4);
    justify-content: space-between;
}

.admin-progress-percent {
    font-variant-numeric: tabular-nums;
    font-weight: var(--font-weight-medium);
}

.admin-progress-started {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.admin-progress-bar {
    accent-color: var(--color-info);
    appearance: none;
    background-color: var(--border-color);
    border: 0;
    border-radius: var(--border-radius-pill);
    color: var(--color-info);
    height: var(--ea-sp-4);
    overflow: hidden;
    width: 100%;
}

.admin-progress-bar::-webkit-progress-bar {
    background-color: var(--border-color);
}

.admin-progress-bar::-webkit-progress-value {
    background-color: var(--color-info);
    border-radius: var(--border-radius-pill);
}

.admin-progress-bar::-moz-progress-bar {
    background-color: var(--color-info);
    border-radius: var(--border-radius-pill);
}

/* Indeterminate (max null or 0): the bare track, no motion and no gradient (DESIGN.md §1, §7); the label says what runs.
   Chrome paints ::-webkit-progress-bar over the element, so a moving segment on the element was never visible there. */

/* U-3 TOTP step and setup, inside the EasyAdmin login frame (T-12) */
.admin-auth-alert {
    margin-block-end: var(--ea-sp-8);
}

.login-wrapper .form-widget input.admin-auth-code {
    block-size: auto;
    font-family: var(--font-family-monospace);
    font-size: var(--font-size-xxl);
    letter-spacing: var(--ea-sp-4);
    padding-block: var(--ea-sp-4);
    text-align: center;
}

.admin-auth-qr-wrap {
    display: flex;
    justify-content: center;
    margin-block-end: var(--ea-sp-8);
}

.admin-auth-qr {
    background-color: var(--white);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--ea-sp-2);
}

.admin-auth-secret-row {
    align-items: center;
    display: flex;
    gap: var(--ea-sp-4);
}

.admin-auth-secret-box {
    flex: 1 1 auto;
    min-inline-size: 0;
}

.admin-auth-secret {
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--font-family-monospace);
    font-size: var(--font-size-base);
    overflow-wrap: anywhere;
    padding: 0;
    user-select: all;
}

.admin-auth-links {
    margin: var(--ea-sp-8) 0 0;
    text-align: center;
}

.admin-auth-link {
    color: var(--text-color);
    text-decoration: underline;
}

/* U-6 tap button: an urgent action on a phone (turning a real-money rule OFF) gets a 44px touch target (NFR-9, T-34) */
.btn.admin-tap-button {
    --button-font-size: var(--font-size-lg);
    --button-height: var(--ea-sp-22);
    --button-padding-x: var(--ea-sp-10);
    flex-shrink: 0;
    justify-content: center;
    min-inline-size: var(--ea-sp-22);
}

/* U-9 on a phone (ux S-9: full-screen sheet, confirm button at the bottom): the body takes the free height and
   scrolls, so the footer sits at the bottom edge instead of floating under a short text (T-39). The breakpoint is
   Bootstrap's sm, the one modal-fullscreen-sm-down uses. */
@media (max-width: 575.98px) {
    [data-type-to-confirm-modal] .modal-fullscreen-sm-down .modal-content {
        display: flex;
        flex-direction: column;
    }

    [data-type-to-confirm-modal] .modal-fullscreen-sm-down .modal-body {
        min-block-size: 0;
    }

    /* the confirm of an urgent action (TẮT) keeps the 44px touch target of U-6 */
    [data-type-to-confirm-modal] .modal-fullscreen-sm-down .modal-footer .btn {
        --button-height: var(--ea-sp-22);
    }
}
