* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #111, #222);
}

.login-box {
    background: white;
    padding: 35px;
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #0b0b0b, #1c1c1c);
    position: fixed;
    top: 0;
    left: 0;
    padding: 25px 15px;
    box-shadow: 4px 0 15px rgba(0,0,0,0.25);
}

.sidebar h2 {
    color: white;
    text-align: center;
    margin-bottom: 35px;
    font-size: 30px;
    font-weight: bold;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.sidebar a {
    display: block;
    color: #ddd;
    text-decoration: none;
    padding: 14px 18px;
    margin-bottom: 12px;
    font-size: 17px;
    border-radius: 12px;
    transition: 0.3s;
}

.sidebar a:hover {
    background: white;
    color: #111;
    transform: translateX(5px);
}

/* CONTENIDO */
.main-content {
    margin-left: 240px;
    padding: 40px;
    width: calc(100% - 240px);
}

.main-content h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 48px;
    font-weight: bold;
    color: #222;
}

/* DASHBOARD */
.dashboard-welcome {
    text-align: center;
    margin-bottom: 45px;
}

.dashboard-welcome h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
}

.dashboard-welcome p {
    font-size: 18px;
    color: #666;
}

.dashboard-cards {
    max-width: 1300px;
    margin: 0 auto;
}

.dashboard-card {
    background: white;
    width: 100%;
    height: 260px;
    border: none;
    border-radius: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: 0.3s;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.dashboard-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.dashboard-icon {
    font-size: 55px;
    margin-bottom: 18px;
}

.dashboard-card h3 {
    font-size: 34px;
    font-weight: bold;
    margin-bottom: 12px;
}

.dashboard-card p {
    font-size: 17px;
    color: #666;
    margin-bottom: 22px;
}

.dashboard-card .btn {
    width: 130px;
    border-radius: 10px;
    font-weight: bold;
}

/* COLORES TARJETAS */
.card-clientes {
    border-top: 6px solid #0d6efd;
}

.card-productos {
    border-top: 6px solid #198754;
}

.card-ventas {
    border-top: 6px solid #ffc107;
}

.card-qr {
    border-top: 6px solid #212529;
}

/* FORMULARIOS */
.form-box,
.card {
    background: white;
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.form-box {
    padding: 20px;
    margin-bottom: 30px;
}

.form-box input,
.form-box select,
.form-box button {
    padding: 12px;
    margin: 5px;
    border-radius: 10px;
}

.form-box button {
    background: #111;
    color: white;
    border: none;
    cursor: pointer;
}

/* TABLAS */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
}

th, td {
    padding: 14px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background: #111;
    color: white;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* BOTONES */
.btn-delete {
    background: red;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 8px;
}

/* STOCK */
.stock-rojo {
    background: red;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
}

.stock-amarillo {
    background: orange;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
}

.stock-verde {
    background: green;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
}

/* ALERTAS */
.alerta {
    background: #dff0d8;
    color: #2d6a2d;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
}

/* TICKET */
.ticket-container {
    width: 330px;
    background: white;
    padding: 20px;
    margin: 20px auto 35px auto;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.20);
    text-align: center;
    border: 1px solid #ddd;
}

.ticket-header h2 {
    margin: 5px 0;
    font-size: 24px;
}

.ticket-header p {
    margin: 0;
    font-size: 15px;
    color: #555;
}

.ticket-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 8px;
}

.ticket-body {
    text-align: left;
    margin-top: 15px;
}

.ticket-body p {
    margin: 7px 0;
    font-size: 15px;
}

.gracias {
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
}

/* IMPRIMIR */
@media print {

    body * {
        visibility: hidden !important;
    }

    #ticket,
    #ticket * {
        visibility: visible !important;
    }

    #ticket {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        margin: 0;
        padding: 15px;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: white;
    }

    #ticket button {
        display: none !important;
    }

    .ticket-logo {
        width: 70px;
        height: 70px;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
    }

   .sidebar h2 {
    color: white;
    text-align: center;
    margin-bottom: 35px;
    font-size: 30px;
    font-weight: bold;
    padding-bottom: 22px;

    border-bottom: 2px solid rgba(255,255,255,0.15);

    text-shadow: 0 2px 8px rgba(255,255,255,0.10);

    position: relative;
}

/* LINEA PREMIUM */
.sidebar h2::after {
    content: "";
    display: block;
    width: 90px;
    height: 4px;
    margin: 14px auto 0 auto;
    border-radius: 20px;

    background: linear-gradient(
        90deg,
        #ffffff,
        #888,
        #ffffff
    );

    box-shadow: 0 0 10px rgba(255,255,255,0.25);
}

    .sidebar a {
        text-align: center;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .dashboard-card {
        height: 240px;
    }

    .form-box {
        padding: 15px;
    }

    .form-box input,
    .form-box select,
    .form-box button {
        width: 100%;
        margin: 6px 0;
    }

    table {
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 24px;
    }

    .login-box {
        padding: 25px 20px;
    }

    .dashboard-card h3 {
        font-size: 28px;
    }

    .dashboard-icon {
        font-size: 42px;
    }
}
/* ARREGLO FINAL SIDEBAR + LOGO */

.sidebar {
    width: 240px !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    padding: 18px 15px !important;
    background: linear-gradient(180deg, #050505, #171717) !important;
    overflow: hidden !important;
    z-index: 1000 !important;
}

.logo-container {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid #333 !important;
}

.gym-logo {
    width: 70px !important;
    height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 10px auto !important;
    border-radius: 50% !important;
    background: #000 !important;
    padding: 5px !important;
    border: 2px solid #555 !important;
}

.logo-container h2 {
    font-size: 22px !important;
    color: white !important;
    margin: 0 !important;
    font-weight: bold !important;
}

.sidebar a {
    font-size: 16px !important;
    padding: 12px 16px !important;
    margin-bottom: 9px !important;
}

.main-content {
    margin-left: 240px !important;
    width: calc(100% - 240px) !important;
    padding: 40px !important;
}
@media print {

    body * {
        visibility: hidden !important;
    }

    #ticket,
    #ticket * {
        visibility: visible !important;
    }

    #ticket {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 280px !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 10px !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        page-break-after: avoid !important;
        page-break-before: avoid !important;
    }

    #ticket button {
        display: none !important;
    }

    .ticket-logo {
        width: 60px !important;
        height: 60px !important;
        object-fit: contain !important;
    }

    @page {
        margin: 5mm;
    }
}
/* ============================= */
/* DISEÑO PREMIUM + ANIMACIONES */


:root{
    --premium-dark:#020617;
    --premium-blue:#2563eb;
    --premium-card:#ffffff;
    --premium-shadow:0 18px 40px rgba(0,0,0,0.12);
    --premium-radius:20px;
}

body{
    background:
        radial-gradient(circle at top right, rgba(37,99,235,0.10), transparent 35%),
        linear-gradient(135deg, #f8fafc, #eef2ff) !important;
}

.main-content{
    animation: premiumFadeUp .45s ease both;
}

@keyframes premiumFadeUp{
    from{
        opacity:0;
        transform:translateY(18px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.sidebar{
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 30%),
        linear-gradient(180deg, #020617, #111827) !important;
    box-shadow:10px 0 35px rgba(0,0,0,0.32) !important;
}

.sidebar a{
    position:relative;
    overflow:hidden;
    transition:all .25s ease !important;
}

.sidebar a::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:4px;
    height:100%;
    background:#60a5fa;
    opacity:0;
    transition:.25s ease;
}

.sidebar a:hover{
    background:rgba(255,255,255,0.12) !important;
    color:#fff !important;
    transform:translateX(7px) !important;
}

.sidebar a:hover::before{
    opacity:1;
}

.gym-logo{
    box-shadow:0 0 25px rgba(255,255,255,0.20) !important;
    transition:.3s ease !important;
}

.gym-logo:hover{
    transform:scale(1.08) rotate(3deg);
}

.card,
.ticket-container,
.login-box{
    border:none !important;
    border-radius:var(--premium-radius) !important;
    box-shadow:var(--premium-shadow) !important;
    animation: premiumScale .35s ease both;
}

@keyframes premiumScale{
    from{
        opacity:0;
        transform:scale(.97);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

.card{
    transition:.25s ease !important;
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 22px 45px rgba(0,0,0,0.15) !important;
}

.main-content h1{
    font-weight:900 !important;
    letter-spacing:-1.5px;
    background:linear-gradient(135deg,#111827,#2563eb);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.dashboard-welcome h1{

    background:none !important;
    -webkit-text-fill-color:#000 !important;

    color:#000 !important;

    font-weight:900 !important;

    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff,
         0 0 10px rgba(255,255,255,0.7);

    letter-spacing:-1px;

    animation:none !important;
}

.dashboard-welcome p{

    color:#000 !important;

    font-weight:700 !important;

    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;

    font-size:20px !important;
}

.dashboard-welcome{
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::before{
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -120px;
    right: -80px;
}
.dashboard-welcome h1{
    animation: glowText 2s infinite alternate;
}

@keyframes glowText{

    from{
        text-shadow:
        0 0 2px #ff3b3b,
        0 0 4px rgba(255,0,0,0.35);
    }

    to{
        text-shadow:
        0 0 6px #ff3b3b,
        0 0 12px rgba(255,0,0,0.55);
    }

}
.dashboard-card{
    transition: all .35s ease;
}

.dashboard-card:hover{

    transform: translateY(-10px) scale(1.03);

    box-shadow:
        0 20px 40px rgba(0,0,0,0.18),
        0 0 20px rgba(37,99,235,0.15);

}

.dashboard-card{
    position:relative;
    overflow:hidden;
}

.dashboard-card::after{
    content:"";
    position:absolute;
    width:160px;
    height:160px;
    border-radius:50%;
    background:rgba(37,99,235,0.10);
    top:-60px;
    right:-60px;
    transition:.35s ease;
}

.dashboard-card:hover::after{
    transform:scale(1.4);
}

.dashboard-card:hover{
    transform:translateY(-10px) scale(1.02) !important;
}

.btn{
    border-radius:13px !important;
    font-weight:800 !important;
    transition:.25s ease !important;
}

.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 24px rgba(0,0,0,0.18);
}

.form-control,
.form-select{
    border-radius:14px !important;
    border:1px solid #dbeafe !important;
    transition:.25s ease !important;
}

.form-control:focus,
.form-select:focus{
    border-color:#2563eb !important;
    box-shadow:0 0 0 4px rgba(37,99,235,0.16) !important;
}

.table{
    border-radius:16px;
    overflow:hidden;
}

.table thead th,
th{
    background:linear-gradient(135deg,#111827,#1f2937) !important;
    color:#fff !important;
}

.table tbody tr{
    transition:.18s ease;
}

.table tbody tr:hover{
    background:#eef2ff !important;
    transform:scale(1.003);
}

.alert,
.alerta{
    border-radius:16px !important;
    border:none !important;
    box-shadow:0 8px 25px rgba(0,0,0,0.10);
}

.stock-rojo{
    background:#fee2e2 !important;
    color:#991b1b !important;
    padding:8px 14px !important;
    border-radius:999px !important;
    font-weight:900 !important;
}

.stock-amarillo{
    background:#fef3c7 !important;
    color:#92400e !important;
    padding:8px 14px !important;
    border-radius:999px !important;
    font-weight:900 !important;
}

.stock-verde{
    background:#dcfce7 !important;
    color:#166534 !important;
    padding:8px 14px !important;
    border-radius:999px !important;
    font-weight:900 !important;
}

.login-body{
    background:
        radial-gradient(circle at top, rgba(37,99,235,0.35), transparent 35%),
        linear-gradient(135deg,#020617,#111827) !important;
}

.login-box{
    backdrop-filter:blur(10px);
}

.login-box h2{
    font-weight:900;
}

/* Animación suave en inputs */
input,
select,
button,
a{
    -webkit-tap-highlight-color:transparent;
}

/* Responsive premium */
@media(max-width:768px){
    .main-content{
        animation: premiumFadeUp .35s ease both;
    }

    .dashboard-welcome{
        padding:25px !important;
    }

    .main-content h1{
        font-size:34px !important;
    }
}
/* SUCURSAL ACTUAL */

.sucursal-sidebar{
    margin: 14px auto 20px auto;
    width: 85%;
    text-align: center;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 10px 25px rgba(37,99,235,0.35);
    letter-spacing: .3px;
}

.sucursal-sidebar::before{
    content: "Sucursal";
    display: block;
    font-size: 11px;
    font-weight: 600;
    opacity: .85;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}