/* ============================= */
/* RESET GENERAL */
/* ============================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI', sans-serif;
}

body{
    background:#0e0e0e;
    color:white;
}

/* ============================= */
/* HEADER */
/* ============================= */

.header{
    background:#000;
    padding:20px 60px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:2px solid #c4002f;
}

.logo{
    height:55px;
}

.logout{
    color:white;
    text-decoration:none;
    font-size:14px;
    transition:0.3s;
}

.logout:hover{
    color:#c4002f;
}
/* ============================= */
/* LOGIN */
/* ============================= */

.login-container{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    background:linear-gradient(135deg,#0e0e0e,#1a1a1a);
    padding:20px;
}

.login-box{
    background:#1b1b1b;
    padding:40px 30px;
    border-radius:18px;
    width:100%;
    max-width:380px;
    box-shadow:0 0 40px rgba(196,0,47,0.25);
    animation:fadeIn 0.8s ease;
    position:relative;
    text-align:center;
}

.login-box::before{
    content:'';
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:4px;
    background:#c4002f;
    border-top-left-radius:18px;
    border-top-right-radius:18px;
}

/* Logo login */
.logo-container{
    display:flex;
    justify-content:center;
    margin-bottom:25px;
}

.login-logo{
    width:150px;
    height:auto;
}

/* Inputs login */
.login-box input{
    width:100%;
    padding:14px;
    margin:10px 0;
    border:none;
    border-radius:8px;
    background:#2a2a2a;
    color:white;
    font-size:14px;
    transition:0.3s;
}

.login-box input:focus{
    outline:none;
    background:#333;
    box-shadow:0 0 8px rgba(196,0,47,0.6);
}

/* Botón login */
.login-box button{
    width:100%;
    padding:14px;
    margin-top:12px;
    border:none;
    border-radius:8px;
    background:#c4002f;
    color:white;
    font-weight:bold;
    font-size:15px;
    cursor:pointer;
    transition:0.3s;
}

.login-box button:hover{
    background:#ff003c;
    transform:scale(1.03);
    box-shadow:0 0 15px rgba(255,0,60,0.5);
}

/* Error login */
.login-error{
    background:#2a0008;
    color:#ff4d6d;
    padding:10px;
    margin-top:15px;
    border-radius:6px;
    text-align:center;
    font-size:14px;
}
/* ============================= */
/* CONTENEDOR GENERAL */
/* ============================= */

.container{
    width:1400px;
    max-width:95%;
    margin:50px auto;
}
.lazy-img{
    filter: blur(10px);
    transition: all .4s ease;
}

.lazy-img.loaded{
    filter: blur(0);
}
/* ============================= */
/* GRID GENERAL */
/* ============================= */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
    gap:35px;
    margin-top:40px;
}

/* ============================= */
/* TARJETAS GENERALES */
/* ============================= */

.card{
    background:#1a1a1a;
    border-radius:18px;
    overflow:hidden;
    transition:0.4s;
    animation:fadeUp 0.6s ease;
    box-shadow:0 10px 25px rgba(0,0,0,0.4);
    display:flex;
    flex-direction:column;
}

.card:hover{
    transform:translateY(-8px);
    box-shadow:0 15px 40px rgba(0,0,0,0.6);
}

/* ============================= */
/* PANEL CLIENTE (AJUSTE REAL) */
/* ============================= */

.cliente-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
    gap:30px;
}

/* Imagen tamaño uniforme */
.cliente-grid .card img{
    width:100%;
    height:320px;        /* 🔥 tamaño fijo uniforme */
    object-fit:cover;    /* 🔥 zoom automático */
    display:block;
}

/* Botón corregido */
.cliente-grid .card a{
    margin:15px;
    padding:12px;
    text-align:center;
    background:#c4002f;
    color:white !important;
    border-radius:25px;
    text-decoration:none !important;
    font-weight:600;
    transition:0.3s;
    display:block;
}

.cliente-grid .card a:hover{
    background:#ff003c;
    transform:scale(1.05);
}

/* ============================= */
/* ADMIN LAYOUT */
/* ============================= */

.admin-layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:#0a0a0a;
    padding:30px 20px;
    border-right:2px solid #c4002f;
}

.sidebar img{
    width:150px;
    margin-bottom:40px;
}

.sidebar a{
    display:block;
    padding:12px 15px;
    margin-bottom:15px;
    color:#bbb;
    text-decoration:none;
    border-radius:8px;
    transition:0.3s;
}

.sidebar a:hover{
    background:#c4002f;
    color:white;
    transform:translateX(5px);
}

.sidebar a.active{
    background:#c4002f;
    color:white;
}

.admin-content{
    flex:1;
    padding:40px;
    animation:fadeIn 0.6s ease;
}

.admin-card{
    background:#1a1a1a;
    padding:30px;
    border-radius:15px;
    box-shadow:0 0 20px rgba(0,0,0,0.4);
}

.admin-title{
    font-size:24px;
    margin-bottom:20px;
    color:#c4002f;
}



/* ============================= */
/* ANIMACIONES */
/* ============================= */

@keyframes fadeIn{
    from{opacity:0}
    to{opacity:1}
}

@keyframes fadeUp{
    from{opacity:0; transform:translateY(20px);}
    to{opacity:1; transform:translateY(0);}
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

/* ============================= */
/* MODAL PROFESIONAL */
/* ============================= */

.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.95);
    justify-content:center;
    align-items:center;
    flex-direction:column;
    z-index:2000;
    padding:20px;
}

.modal img{
    max-width:100%;
    max-height:85vh;
    object-fit:contain;
    border-radius:12px;
    animation:zoomIn 0.3s ease;
}

.modal-btn{
    margin-top:25px;
    padding:14px 30px;
    background:#c4002f;
    color:white;
    border-radius:30px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.modal-btn:hover{
    background:#ff003c;
}

@keyframes zoomIn{
    from{transform:scale(0.8); opacity:0;}
    to{transform:scale(1); opacity:1;}
}

@media (max-width:768px){

    .header{
        flex-direction:column;
        gap:10px;
        text-align:center;
        padding:15px;
    }

    .logo{
        height:40px;
    }

    .grid{
        grid-template-columns:1fr;
    }

    .cliente-grid{
        grid-template-columns:1fr 1fr;
    }

    .cliente-grid .card img{
        height:220px;
    }

    .sidebar{
        width:100%;
        border-right:none;
        border-bottom:2px solid #c4002f;
    }

    .admin-layout{
        flex-direction:column;
    }
}