/* =============================================================================
   POS Login — Standard Light Theme
   Batidos Pitaya | pos.batidospitaya
   Archivo: /core/assets/css/pos_login.css
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --pitaya-teal: #51B8AC;
    --pitaya-dark-teal: #0E544C;
    --bg: #F6F6F6;
    --surface: #FFFFFF;
    --surface-hover: #F9FAFB;
    --border: #E2E8F0;
    --text: #333333;
    --text-muted: #64748B;
    --error: #E05555;
    --error-bg: #FFF5F5;
    --success: #51B8AC;
    --shadow-soft: 0 1px 6px rgba(0, 0, 0, .05), 0 10px 30px rgba(0, 0, 0, .03);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: 'Outfit', 'Calibri', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: auto;
    /* Permite scroll si la pantalla es pequeña */
}

/* ── Wrapper principal ─────────────────────────────────────── */
.pos-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    gap: 20px;
}

/* ── Tarjeta Estándar ───────────────────────────────────────── */
.pos-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    animation: slideUp .5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Logo / Encabezado ─────────────────────────────────────── */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.pos-logo {
    display: block;
    width: 120px;
    margin: 0 auto;
}

.pos-title {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -.3px;
    color: var(--pitaya-teal);
}

.pos-subtitle {
    font-size: .9rem;
    font-weight: 400;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
    margin-bottom: 32px;
}

/* ── Alert de dispositivo/error ────────────────────────────── */
.pos-alert {
    display: none;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.pos-alert.error {
    background: var(--error-bg);
    border: 1px solid rgba(224, 85, 85, .2);
    color: var(--error);
}

.pos-alert.show {
    display: block;
    animation: shake .4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ── Campos de formulario ──────────────────────────────────── */
.pos-field {
    margin-bottom: 20px;
}

.pos-label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 8px;
}

.pos-input {
    width: 100%;
    background: #fff;
    border: 1.5px solid #475569;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.pos-input::placeholder {
    color: #94A3B8;
}

.pos-input:focus {
    border-color: var(--pitaya-teal);
    box-shadow: 0 0 0 3px rgba(81, 184, 172, .15);
}

/* ── Botón principal ───────────────────────────────────────── */
.pos-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: var(--pitaya-teal);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.pos-btn:hover {
    background: var(--pitaya-dark-teal);
    transform: translateY(-1px);
}

.pos-btn:active {
    transform: translateY(0);
}

/* ── PIN Pad / Numeric Input ───────────────────────────────── */
/* Nota: Aunque ahora usamos password estándar en Stage 2, mantenemos estilos básicos por compatibilidad */
.pos-pin-display {
    background: #f8fafc;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--pitaya-dark-teal);
    margin-bottom: 20px;
}

/* ── Badge de sucursal / footer ────────────────────────────── */
.pos-badge {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid #F1F5F9;
    font-size: .8rem;
    color: var(--text-muted);
    text-align: center;
}

.pos-badge i {
    margin-right: 5px;
    color: var(--pitaya-teal);
}

.pos-badge span {
    color: var(--pitaya-dark-teal);
    font-weight: 700;
}

/* ── Dashboard: header ─────────────────────────────────────── */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.pos-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pitaya-dark-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.pos-btn-exit {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid #CBD5E1;
    background: #fff;
    color: #475569;
    transition: all .2s;
    text-decoration: none;
}

.pos-btn-exit:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
    color: #1E293B;
}

.pos-btn-exit.danger:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .pos-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
}