/* ================= RESET ================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Segoe UI',sans-serif;
    background:#f8fafc;
    color:#1e293b;
    min-height:100vh;
    line-height:1.5;
}

/* ================= VARIABLES ================= */
:root{
    --primary:#2563eb;
    --primary-dark:#1d4ed8;
    --success:#16a34a;
    --danger:#dc2626;
    --warning:#f59e0b;

    --sidebar:#0f172a;
    --sidebar-hover:#1e293b;

    --card:#ffffff;
    --bg:#f8fafc;
    --border:#e2e8f0;
    --text:#1e293b;
    --text-light:#64748b;

    --radius:14px;
    --shadow:0 10px 25px rgba(0,0,0,0.06);
}

/* ================= HEADER ================= */
.header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:72px;
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--border);
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 25px;
    z-index:1000;
    box-shadow:0 4px 15px rgba(0,0,0,0.04);
}

.header-left,
.header-right{
    display:flex;
    align-items:center;
    gap:14px;
}

.logo{
    font-size:22px;
    font-weight:700;
    color:var(--primary);
}

/* usuario */
.user-box,
.branch-box{
    background:#eff6ff;
    color:var(--primary-dark);
    padding:8px 14px;
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    white-space:nowrap;
}

/* botón menú */
.menu-btn{
    background:none;
    border:none;
    font-size:24px;
    cursor:pointer;
    color:var(--text);
}

/* SIDEBAR */
.sidebar{
    position: fixed;
    top: 72px;
    left: 0;
    width: 250px;
    height: calc(100vh - 72px);
    background: #0f172a;
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar{
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb{
    background: #334155;
    border-radius: 10px;
}
.sidebar h2{
    text-align:center;
    padding:15px;
    border-bottom:1px solid rgba(255,255,255,0.1);
}

.sidebar a{
    display:block;
    padding:14px 20px;
    color:#cbd5e1;
    text-decoration:none;
}

.sidebar a:hover{
    background:#1e293b;
    color:white;
}

/* ================= MAIN ================= */
.main{
    margin-left:250px;
    margin-top:72px;
    padding:28px;
    min-height:100vh;
}

.content{
    width:100%;
}

/* ================= CONTAINERS ================= */
.container{
    background:white;
    padding:24px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    border:1px solid var(--border);
    margin-bottom:20px;
}

/* ================= CARDS ================= */
.card{
    background:var(--card);
    border-radius:var(--radius);
    padding:24px;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
    margin-bottom:20px;
}

.card h2,
.card h3{
    margin-bottom:14px;
}

/* ================= BOTONES ================= */
.btn{
    background:#3EE059;
    color:white;
    padding:12px 18px;
    border:none;
    border-radius:10px;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
    text-decoration:none;
    display:inline-block;
}

.btn:hover{
    background:var(--primary-dark);
    transform:translateY(-2px);
}

.btn-danger{
    background:var(--danger);
}

/* ================= FORM ================= */
form{
    width:100%;
}

label{
    display:block;
    font-size:14px;
    font-weight:600;
    margin-bottom:5px;
    color:var(--text);
}

input,
select,
textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:10px;
    margin-bottom:14px;
    font-size:15px;
    background:white;
    transition:.25s;
}

input:focus,
select:focus,
textarea:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
    outline:none;
}

/* ================= TABLE ================= */
.table-responsive{
    width:100%;
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:700px;
    background:white;
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
}

th{
    background:var(--primary);
    color:white;
    font-weight:600;
}

th,td{
    padding:14px;
    text-align:center;
    border-bottom:1px solid var(--border);
}

tr:hover{
    background:#f8fafc;
}

/* ================= POS ================= */
.pos-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px;
}

.productos,
.carrito{
    background:white;
    padding:15px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    border:1px solid var(--border);
}

/* ================= LOGIN ================= */
.login-container{
    width:100%;
    max-width:430px;
    margin:80px auto;
    padding:35px;
    background:white;
    border-radius:20px;
    box-shadow:var(--shadow);
    border:1px solid var(--border);
}

.login-container h2{
    text-align:center;
    margin-bottom:25px;
    color:var(--primary);
    font-size:28px;
}

.login-container .btn{
    width:100%;
}

.login-container input,
.login-container select{
    width:100%;
    max-width:100%;
}

/* ================= MOBILE ================= */
/* ================= MOBILE ================= */
@media (max-width: 768px) {

    body {
        font-size: 15px;
    }

    /* HEADER */
    .header {
        height: 60px;
        padding: 0 12px;
    }

    .logo {
        font-size: 16px;
    }

    .user-box,
    .branch-box {
        display: none; /* ocultar en móvil */
    }

    /* SIDEBAR */
        .sidebar{
        left:-260px; /* oculto */
    }

    .sidebar.active{
        left:0; /* visible */
    }

    .main{
        margin-left:0 !important;
    }


    /* MAIN */
    .main {
        margin-left: 0 !important;
        margin-top: 70px;
        width: 100%;
        padding: 12px;
    }

    /* POS */
    .pos-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

/*.pos-container {
    display: flex;
    flex-direction: column;
}*/

    .productos,
    .carrito {
        width: 100%;
    }

    .card,
    .container {
        padding: 14px;
        border-radius: 14px;
    }

    /* FORM */
    input,
    select,
    textarea,
    button {
        font-size: 16px;
        padding: 14px;
        width: 100%;
    }

    /* TABLAS */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 13px;
    }

    th, td {
        padding: 10px;
    }

    /* BOTONES */
    .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: 12px;
    }

    h1, h2 {
        font-size: 20px;
    }
}

.login-container {
    width: 95%;
    max-width: 420px;
    margin: 20px auto;
    padding: 22px;
}

