:root {
    --win-gray: #E9E9E1;
    --win-border: #999;
    --pos-blue: #003399;
    --pos-blue-light: #0066CC;
    --pos-green: #C2EBC3;
    --pos-yellow: #FFFFE1;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', sans-serif; background: var(--win-gray); font-size: 13px; overflow: hidden; }

#app-wrapper { height: 100vh; display: flex; flex-direction: column; }

/* HEADER & NAV */
.main-header { background: white; padding: 5px 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--win-border); }
.brand { display: flex; align-items: center; color: var(--pos-blue); }
.brand h1 { margin: 0; font-size: 22px; line-height: 1; text-transform: uppercase; }
.brand span { font-size: 10px; font-weight: bold; }
.user-box { border: 1px solid #CCC; padding: 3px 10px; background: #F5F5F5; margin-top: 2px; }

.main-nav { display: flex; background: #EEE; border-bottom: 1px solid var(--win-border); padding-left: 5px; }
.nav-item { border: 1px solid var(--win-border); border-bottom: none; background: white; margin: 5px 2px 0 0; padding: 8px 15px; cursor: pointer; }
.nav-item.active { background: var(--win-gray); font-weight: bold; border-top: 3px solid var(--pos-blue); }
.nav-item.exit { margin-left: auto; color: #B00; }

/* TABS */
.ticket-tabs { display: flex; padding: 5px 10px 0; background: #D6D6CC; gap: 2px; }
.tab { padding: 6px 20px; background: #BDBDB3; border: 1px solid var(--win-border); border-bottom: none; cursor: pointer; }
.tab.active { background: var(--pos-blue); color: white; font-weight: bold; }
.btn-add-tab { background: #EEE; border: 1px solid var(--win-border); border-bottom: none; padding: 0 10px; cursor: pointer; }

/* WORK AREA */
.work-area { flex: 1; padding: 8px; display: flex; flex-direction: column; }
.blue-panel { background: linear-gradient(to bottom, var(--pos-blue-light), var(--pos-blue)); color: white; padding: 8px 12px; border-radius: 3px 3px 0 0; }

.input-bar { background: #D6D6CC; padding: 10px; border: 1px solid var(--win-border); border-top: none; display: flex; justify-content: space-between; }
.input-group input { border: 1px solid #333; height: 35px; width: 350px; font-size: 22px; font-weight: bold; padding: 0 5px; }
.quick-tools { display: flex; gap: 5px; }
.tool-btn { background: white; border: 1px solid var(--win-border); padding: 5px 12px; cursor: pointer; }

/* TABLE */
.table-container { flex: 1; background: white; border: 1px solid var(--win-border); margin-top: 5px; overflow-y: auto; }
.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th { background: #E0E0D5; border: 1px solid var(--win-border); padding: 8px; font-size: 12px; text-align: left; position: sticky; top: 0; }
.pos-table td { border: 1px solid #EEE; padding: 6px; border-right: 1px solid #DDD; height: 32px; }
.bg-green { background-color: var(--pos-green) !important; font-weight: bold; }

/* TOTALS */
.summary-panel { display: flex; justify-content: space-between; align-items: flex-end; padding: 10px 0; }
.total-display { font-size: 75px; color: #0000CC; font-weight: bold; line-height: 0.8; }
.btn-pay { background: #008800; color: white; border: none; padding: 15px 30px; font-size: 20px; font-weight: bold; border-radius: 4px; cursor: pointer; }
.f-btn { background: white; border: 1px solid var(--win-border); padding: 5px 10px; margin-right: 5px; }

/* MODAL */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.modal-header { background: var(--pos-blue); color: white; padding: 10px; font-size: 20px; font-weight: bold; }
.form-group { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.form-group input { font-size: 30px; width: 200px; text-align: right; border: 1px solid #333; }
.change-amount { font-size: 40px; color: #D00; font-weight: bold; }

/* FOOTER */
.status-bar { background: var(--pos-yellow); border-top: 1px solid var(--win-border); padding: 4px 15px; display: flex; justify-content: space-between; font-size: 12px; }
/* --- ESTILOS DEL LOGIN (WINDOWS 11 STYLE) --- */
/* --- LOGIN PROFESIONAL --- */
#login-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #004a99 linear-gradient(135deg, #004a99 0%, #002147 100%);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.win-window {
    width: 480px;
    background: #f0f0f0;
    border: 1px solid #005a9e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.win-titlebar {
    background: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
}

.win-title { font-size: 12px; color: #333; display: flex; align-items: center; gap: 8px; }
.win-title i { color: #005a9e; }

.win-controls button {
    background: transparent;
    border: none;
    padding: 0 10px;
    font-size: 14px;
    cursor: pointer;
}

.win-content {
    display: flex;
    padding: 25px;
    gap: 20px;
    background: white;
}

.login-big-icon {
    font-size: 60px;
    color: #005a9e;
    opacity: 0.8;
}

.login-main { flex: 1; }
.login-instruction { font-size: 13px; margin-bottom: 20px; color: #444; line-height: 1.4; }

.login-field { margin-bottom: 12px; display: flex; align-items: center; }
.login-field label { width: 80px; font-weight: 600; font-size: 13px; }
.login-field input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #8a8a8a;
    border-radius: 2px;
    outline: none;
}
.login-field input:focus { border: 2px solid #005a9e; padding: 5px 9px; }

.login-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Botones estilo Windows */
.btn-win-default, .btn-win-secondary {
    padding: 6px 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #8a8a8a;
    border-radius: 3px;
    transition: all 0.2s;
}

.btn-win-default {
    background: #e1e1e1;
    font-weight: 600;
}

.btn-win-default:hover {
    background: #cce4f7;
    border-color: #005499;
}

.win-status-bar {
    background: #f3f3f3;
    padding: 5px 12px;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #ccc;
}
/* Pestañas de la ventana */
.win-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

.win-tab {
    padding: 5px 15px;
    background: #e1e1e1;
    border: 1px solid #ccc;
    border-bottom: none;
    cursor: pointer;
    font-size: 12px;
    margin-right: 2px;
}

.win-tab.active {
    background: white;
    font-weight: bold;
    border-top: 2px solid #005a9e;
    margin-top: -1px;
}

.auth-form {
    min-height: 120px;
}
/* Capa oscura que bloquea el fondo */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
}

.btn-finalizar {
    background: #28a745;
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 20px;
    margin-top: 10px;
    cursor: pointer;
}
.btn-verde {
    position: relative; /* Permite que el z-index funcione */
    z-index: 999;       /* Lo pone por encima de cualquier otro div */
    cursor: pointer !important; /* Fuerza a que aparezca la "manito" al pasar el ratón */
    pointer-events: auto !important; /* Asegura que reciba clics */
}.modal-body-pago {
    display: flex;
    padding: 20px;
    gap: 20px;
    background: #fff;
}

.pago-seccion-total {
    flex: 1;
    border-right: 1px solid #ddd;
    text-align: center;
    padding-right: 20px;
}

.monto-grande {
    font-size: 3.5rem;
    color: #0000ff;
    margin: 10px 0;
}

.pago-controles {
    flex: 1;
}

.campo-pago {
    margin-bottom: 15px;
}

.win-input-pago {
    width: 100%;
    font-size: 2rem;
    text-align: right;
    border: 2px solid #0078d7;
}

.monto-cambio {
    font-size: 2rem;
    font-weight: bold;
    text-align: right;
    padding: 5px;
    background: #f0f0f0;
}
.lista-resultados-estilo {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    margin-top: 10px;
}
.item-busqueda {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.item-busqueda:hover {
    background: #e0f0ff;
}
/* Cambia el contenedor para que use Flexbox */
#contenedor-pestañas {
    display: flex;
    flex-direction: row; /* Alineación horizontal */
    gap: 5px;
    border-bottom: 2px solid #ccc;
    padding: 5px 10px;
    background-color: #f1f1f1;
}

.ticket-tab {
    padding: 8px 20px;
    cursor: pointer;
    background-color: #ddd;
    border: 1px solid #bbb;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}

.ticket-tab.active {
    background-color: #fff;
    font-weight: bold;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
}
/* Contenedor de los botones Ticket 1, Ticket 2... */
/* Contenedor en la parte superior */
.nav-tabs {
    display: flex !important;
    flex-direction: row !important; /* Alineación horizontal */
    align-items: flex-end;
    gap: 4px;
    padding: 10px 15px 0 15px;
    background: #f8f9fa; /* Color de fondo suave */
    border-bottom: 2px solid #0078d7;
    width: 100%;
}

.ticket-tab {
    padding: 8px 20px;
    background: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 6px 6px 0 0; /* Bordes redondeados arriba */
    cursor: pointer;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
    transition: all 0.2s ease;
}

.ticket-tab.active {
    background: #0078d7 !important;
    color: white !important;
    border-color: #0078d7;
    height: 40px; /* Un poco más alta para resaltar */
}

.ticket-tab:hover:not(.active) {
    background: #d0d0d0;
}
/* =========================================
   LOGIN PROFESIONAL PREMIUM
========================================= */

#login-screen {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.65)),
        url('https://images.unsplash.com/photo-1556740749-887f6717d7e4?q=80&w=1974&auto=format&fit=crop') center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

/* Caja principal */
.win-window {
    width: 950px;
    max-width: 95%;
    min-height: 560px;
    display: flex;
    flex-direction: row;
    border-radius: 18px;
    overflow: hidden;
    background: white;
    border: none;
    box-shadow:
        0 20px 60px rgba(0,0,0,.45),
        0 0 0 1px rgba(255,255,255,.1);
    animation: aparecerLogin .4s ease;
}

/* Animación */
@keyframes aparecerLogin {
    from {
        transform: translateY(20px) scale(.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Panel izquierdo */
.login-aside {
    width: 45%;
    background:
        linear-gradient(135deg, #003b75 0%, #005bb5 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Decoración */
.login-aside::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    top: -120px;
    right: -120px;
}

.login-aside::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    bottom: -100px;
    left: -80px;
}

.login-big-icon {
    font-size: 90px;
    margin-bottom: 25px;
    z-index: 2;
}

.login-brand-title {
    font-size: 38px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
    margin: 0;
}

.login-brand-subtitle {
    font-size: 14px;
    letter-spacing: 2px;
    opacity: .9;
    margin-top: 8px;
    z-index: 2;
}

/* Panel derecho */
.login-main {
    flex: 1;
    background: white;
    padding: 55px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Encabezado */
.login-header-title {
    font-size: 32px;
    font-weight: 700;
    color: #003b75;
    margin-bottom: 8px;
}

.login-header-subtitle {
    color: #666;
    margin-bottom: 35px;
    font-size: 14px;
}

/* Tabs */
.win-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.win-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: .2s;
    border-bottom: 3px solid transparent;
}

.win-tab.active {
    color: #005bb5;
    border-bottom: 3px solid #005bb5;
}

/* Inputs */
.login-field {
    margin-bottom: 22px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.login-field input {
    width: 100%;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    transition: .2s;
    background: #fafafa;
}

.login-field input:focus {
    outline: none;
    border-color: #005bb5;
    box-shadow: 0 0 0 4px rgba(0,91,181,.12);
    background: white;
}

/* Botones */
.login-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-win-default {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #005bb5, #0078d7);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.btn-win-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,91,181,.25);
}

.btn-win-secondary {
    width: 120px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.btn-win-secondary:hover {
    background: #f5f5f5;
}

/* Footer */
.win-status-bar {
    display: none;
}

/* Responsive */
@media(max-width: 850px) {

    .win-window {
        flex-direction: column;
        width: 95%;
        min-height: auto;
    }

    .login-aside {
        width: 100%;
        padding: 35px;
    }

    .login-main {
        padding: 35px 25px;
    }

    .login-big-icon {
        font-size: 60px;
    }

    .login-brand-title {
        font-size: 28px;
    }
}
/* =========================================
   MODAL COBRO PROFESIONAL
========================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.modal-content-win {
    width: 820px;
    max-width: 95%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
    animation: modalShow .25s ease;
}

/* Animación */
@keyframes modalShow {
    from {
        opacity: 0;
        transform: scale(.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header */
.win-header {
    height: 65px;
    background: linear-gradient(135deg, #005bb5, #0078d7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    font-size: 20px;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

/* BODY */
.modal-body-pago {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    padding: 35px;
    background: #ffffff;
}

/* TOTAL */
.pago-seccion-total {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #e5e5e5;
    padding-right: 30px;
}

.pago-seccion-total label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
}

.monto-grande {
    font-size: 4.5rem;
    font-weight: 800;
    color: #0055cc;
    line-height: 1;
    word-break: break-word;
}

/* CONTROLES */
.pago-controles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

/* CAMPOS */
.campo-pago {
    width: 100%;
}

.campo-pago label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
}

/* INPUTS */
.win-input-pago,
.win-select {
    width: 100%;
    height: 55px;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 18px;
    background: #fafafa;
    transition: .2s;
}

.win-input-pago:focus,
.win-select:focus {
    outline: none;
    border-color: #0078d7;
    background: white;
    box-shadow: 0 0 0 4px rgba(0,120,215,.12);
}

/* CAMBIO */
.monto-cambio {
    height: 60px;
    border-radius: 10px;
    border: 2px solid #0055cc;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 18px;
    font-size: 2rem;
    font-weight: 800;
    color: #003399;
}

/* FOOTER */
.win-footer {
    padding: 22px;
    background: #f7f7f7;
    border-top: 1px solid #ddd;
}

.btn-finalizar {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.btn-finalizar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(34,197,94,.25);
}

/* RESPONSIVE */
@media(max-width: 780px){

    .modal-body-pago{
        grid-template-columns: 1fr;
    }

    .pago-seccion-total{
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding-right: 0;
        padding-bottom: 20px;
    }

    .monto-grande{
        font-size: 3.2rem;
    }
}