/* ─── AppPersonero — Estilos globales ──────────────────────────────────────── */

/* Pantallas de auth centradas verticalmente */
.auth-screen {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background-color: #f0f2f5;
}

.auth-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

.auth-logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.5px;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
}

.login-brand-logo {
    height: 200px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.login-brand-name {
    font-size: 1.85rem;
    line-height: 1.1;
    font-weight: 900;
    text-align: center;
    color: #0d6efd;
    letter-spacing: -.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.auth-logo .brand-logo {
    height: 44px;
}

.navbar-brand .brand-logo {
    height: 30px;
}

/* ─── Mesa: botones de conteo (Fase 4) ──────────────────────────────────────*/
.btn-count {
    min-height: 64px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.btn-count-minus {
    min-height: 64px;
    font-size: 1.25rem;
}

/* ─── Indicador de estado de sincronización ─────────────────────────────────*/
.sync-badge {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ─── Barra inferior de conteo — safe area para notch iOS ────────────────── */
.bottom-bar {
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
}

/* ─── Utilidades ─────────────────────────────────────────────────────────── */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mesa-item.active {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, .05);
}

.mesa-item {
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: .75rem;
    text-align: left;
}

.mesa-item-main {
    width: 100%;
    color: inherit;
}

.mesa-item .card-body {
    padding-bottom: .9rem;
}

.mesa-item-actions .btn {
    min-width: 0;
}

.user-avatar {
    width: 48px;
    height: 48px;
    font-size: .95rem;
}

.user-role-badge {
    font-size: .72rem;
    line-height: 1;
    white-space: nowrap;
}

.user-row:last-child {
    border-bottom: 0 !important;
}

.mesa-admin-card {
    border-radius: .95rem;
}

.mesa-badges .badge {
    max-width: 100%;
    white-space: nowrap;
}

.filters-meta {
    font-size: .78rem;
    color: #6c757d;
}

@media (max-width: 767.98px) {
    #users-filters .card,
    #mesas-filters .card {
        margin-bottom: .5rem;
    }
}

/* ─── Inputs: tamaño mínimo táctil en móvil ─────────────────────────────── */
@media (max-width: 576px) {
    .form-control, .form-select {
        min-height: 48px;
    }
}

/* ─── PWA: ocultar barra de navegación del navegador en standalone ────────── */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* ─── Impresión ──────────────────────────────────────────────────────────── */
@media print {
    .bottom-bar,
    #app-offline-banner,
    .navbar { display: none !important; }
    body    { padding-bottom: 0 !important; }
}
