/*
 * WinPass UI System — 24/10/2026
 * Camada visual aditiva para padronização do ambiente /admin.
 * Não contém regras de negócio, permissões, rotas ou processamento PHP.
 */
:root {
    --wp-brand: #7c3aed;
    --wp-brand-strong: #5b21b6;
    --wp-brand-soft: #a78bfa;
    --wp-accent: #22c55e;
    --wp-bg: #07101f;
    --wp-surface: #111c2e;
    --wp-surface-2: #172337;
    --wp-line: #334155;
    --wp-text: #f8fafc;
    --wp-muted: #94a3b8;
    --wp-danger: #ef4444;
    --wp-warning: #f59e0b;
    --wp-radius-sm: 10px;
    --wp-radius: 14px;
    --wp-radius-lg: 20px;
    --wp-shadow: 0 18px 48px rgba(2, 6, 23, .24);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

/* Identidade comum — não substitui a navegação de nenhuma página. */
.wp-global-brandbar {
    width: min(calc(100% - 24px), 1160px);
    min-height: 52px;
    margin: 10px auto 4px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 28, 46, .96), rgba(17, 24, 39, .91));
    box-shadow: 0 10px 28px rgba(2, 6, 23, .16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    z-index: 35;
    color: var(--wp-text);
}
.wp-global-brandbar__logo {
    display: block;
    width: 112px;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
}
.wp-global-brandbar__separator {
    width: 1px;
    height: 26px;
    background: rgba(148, 163, 184, .22);
    flex: 0 0 1px;
}
.wp-global-brandbar__context {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.wp-global-brandbar__eyebrow {
    color: #a78bfa;
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 800;
}
.wp-global-brandbar__title {
    color: #e5e7eb;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Páginas centralizadas (login, cadastro, recuperação): marca sem alterar fluxo. */
body.flex.items-center.justify-center > .wp-global-brandbar,
body[class*="min-h-screen"][class*="items-center"][class*="justify-center"] > .wp-global-brandbar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: min(calc(100% - 24px), 440px);
    z-index: 70;
}

/* Foco consistente e acessível. */
:where(a, button, input, select, textarea, [role="button"]):focus-visible {
    outline: 3px solid rgba(167, 139, 250, .62) !important;
    outline-offset: 2px !important;
}
:where(button, .btn, a[class*="btn"], [role="button"]) {
    touch-action: manipulation;
}
:where(input, select, textarea) {
    accent-color: var(--wp-brand);
}

/* Bootstrap: tokens WinPass sem mudar markup ou funções. */
.btn-primary {
    --bs-btn-bg: #7c3aed;
    --bs-btn-border-color: #7c3aed;
    --bs-btn-hover-bg: #6d28d9;
    --bs-btn-hover-border-color: #6d28d9;
    --bs-btn-active-bg: #5b21b6;
    --bs-btn-active-border-color: #5b21b6;
}
.btn-success {
    --bs-btn-bg: #16a34a;
    --bs-btn-border-color: #16a34a;
    --bs-btn-hover-bg: #15803d;
    --bs-btn-hover-border-color: #15803d;
}
.card, .modal-content, .dropdown-menu, .offcanvas {
    border-radius: var(--wp-radius-lg);
}
.form-control, .form-select, .input-group-text {
    border-radius: 12px;
}
.alert { border-radius: 14px; }
.badge { letter-spacing: .02em; }
.table > :not(caption) > * > * { vertical-align: middle; }
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--wp-brand);
}

/* Elementos recorrentes do ambiente WinPass. */
.wp-card, .card-option {
    box-shadow: var(--wp-shadow);
}
:is(button, a).bg-purple-600:hover,
:is(button, a).bg-purple-500:hover {
    filter: brightness(1.06);
}

/* Ajuda mobile sem reordenar a página. */
@media (max-width: 640px) {
    .wp-global-brandbar {
        width: calc(100% - 20px);
        min-height: 48px;
        margin-top: 8px;
        border-radius: 14px;
        padding: 8px 10px;
    }
    .wp-global-brandbar__logo { width: 94px; max-height: 29px; }
    .wp-global-brandbar__title { font-size: 11px; }
    .wp-global-brandbar__eyebrow { font-size: 8px; }
    :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        font-size: 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .wp-global-brandbar { display: none !important; }
}
