/* RESET */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #fff1f2;
}

/* APP */
.app {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 80px;
    background: linear-gradient(180deg, #ec4899, #f9a8d4);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
}

/* LOGO */
.logo {
    margin-bottom: 10px;
}

.logo img {
    width: 45px;
}

/* MENU */
.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* BOTONES */
.menu-btn {
    width: 55px;
    height: 55px;

    border-radius: 50%;
    border: none;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    color: #be185d;

    cursor: pointer;
    transition: all 0.3s ease;

    position: relative;
}

/* ICONOS */
.menu-btn i {
    color: #be185d;
    transition: 0.3s;
}

/* HOVER */
.menu-btn:hover {
    transform: translateY(-3px) scale(1.05);

    box-shadow:
        0 0 10px #ec4899,
        0 0 20px #f9a8d4;
}

.menu-btn:hover i {
    color: white;
}

/* ACTIVO */
.menu-btn.active {
    background: linear-gradient(135deg, #ec4899, #f9a8d4);

    box-shadow:
        0 0 10px #ec4899,
        0 0 20px #f9a8d4;
}

.menu-btn.active i {
    color: white;
}

/* TOOLTIP */
.menu-btn::after {
    content: attr(data-tooltip);
    position: absolute;

    left: 70px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);

    background: #ffffff;
    color: #be185d;

    padding: 6px 12px;
    border-radius: 8px;

    font-size: 12px;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: 0.2s;

    box-shadow: 0 5px 15px rgba(236,72,153,0.2);
}

.menu-btn:hover::after {
    opacity: 1;
    left: 80px;
    transform: translateY(-50%) scale(1);
}

/* USER */
.sidebar-user {
    margin-top: auto;
    margin-bottom: 10px;
}

.sidebar-user img {
    border-radius: 50%;
}

/* MAIN */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */
.topbar {
    background: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar input {
    padding: 8px;
    width: 250px;
    border: 1px solid #fda4af;
    border-radius: 8px;
    background: #ffe4e6;
}

/* MODULES */
.modules {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* CARDS */
.card {
    padding: 20px;
    border-radius: 16px;
    color: white;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    box-shadow: 0 10px 25px rgba(236,72,153,0.15);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* HEADER CARD */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 14px;
    opacity: 0.9;
}

.card-top i {
    font-size: 18px;
}

/* TEXTO */
.card h3 {
    font-size: 28px;
    margin-top: 15px;
}

/* COLORES TG */
.card-blue {
    background: linear-gradient(135deg, #ec4899, #f9a8d4);
}

.card-green {
    background: linear-gradient(135deg, #f472b6, #fbcfe8);
}

.card-orange {
    background: linear-gradient(135deg, #fb7185, #fda4af);
}

.card-purple {
    background: linear-gradient(135deg, #be185d, #ec4899);
}

/* FORMULARIO */
.form-container {
    background: linear-gradient(145deg, #fff1f2, #ffe4e6);
    padding: 35px;
    border-radius: 18px;

    width: 100%;
    max-width: 1100px;   /* 🔥 MÁS ANCHO */
    margin: auto;

    box-sizing: border-box;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;

    width: 100%; /* 🔥 evita cortes */
}
.grid textarea {
    grid-column: span 2;
}

/* INPUTS */
.form-container input,
.form-container select,
.form-container textarea {
    background: #ffe4e6;
    border: 1px solid #fda4af;
    color: #881337;

    padding: 12px;
    border-radius: 10px;

    transition: 0.2s;
}

/* FOCUS */
.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
    outline: none;

    border: 1px solid #ec4899;

    box-shadow: 0 0 8px rgba(236,72,153,0.4);
}

/* CHECKS */
.checks {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checks label {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BOTÓN */
.btn-save {
    margin-top: 20px;
    padding: 14px;
    width: 100%;

    border: none;
    border-radius: 12px;

    background: linear-gradient(90deg, #ec4899, #f9a8d4);

    color: white;
    font-weight: bold;

    cursor: pointer;
    transition: 0.3s;
}

.btn-save:hover {
    transform: scale(1.02);

    box-shadow:
        0 0 10px #ec4899,
        0 0 20px #f9a8d4;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .modules {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .modules {
        grid-template-columns: 1fr;
    }
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* CARD */
.item-card {
    display: flex;
    gap: 20px;

    min-height: 140px; /* 🔥 más alto */
    padding: 18px;

    background: white;
    border-radius: 18px;

    box-shadow: 0 12px 30px rgba(236,72,153,0.15);
    transition: 0.3s;

    cursor: pointer;
}

.item-card:hover {
    transform: translateY(-6px) scale(1.01);
}

/* INFO */
.item-info {
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-info h3 {
    margin: 0;
    font-size: 16px;
    color: #be185d;
}

/* TIPO */
.tipo {
    font-size: 12px;
    color: #ec4899;
}

/* PRECIO */
.precio {
    font-size: 15px;
    font-weight: bold;
    color: #be185d;
}

.item-img {
    width: 180px;   /* 🔥 más ancho */
    height: 140px;  /* 🔥 más alto */

    border-radius: 12px;
    overflow: hidden;

    background: #ffe4e6;
}

.item-img img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* SIN IMAGEN */
.no-img {
    font-size: 11px;
    color: #be185d;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}


/* RESPONSIVE */
@media (max-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
}


/* INPUTS */
.form-container input,
.form-container select,
.form-container textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #fda4af;

    background: #fff;
    color: #881337;

    transition: 0.2s;
}

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
    border: 1px solid #ec4899;
    box-shadow: 0 0 6px rgba(236,72,153,0.4);
    outline: none;
}

/* BOTÓN */
.btn-save {
    margin-top: 20px;
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(90deg, #ec4899, #f9a8d4);

    color: white;
    font-weight: bold;

    cursor: pointer;
}

.img-preview img {
    width: 100%;
    height: 100%;

    object-fit: contain; /* 🔥 IMPORTANTE */
}

.img-preview {
    width: 100%;
    height: 180px; /* 🔥 más alto */

    border-radius: 12px;
    background: #ffe4e6;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}



.img-upload {
    grid-column: span 2;
    width: 100%;
}

.form-header {
    margin-bottom: 10px;
}

.btn-back {
    background: none;
    border: none;

    color: #be185d;
    font-weight: bold;

    cursor: pointer;
    font-size: 14px;

    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-back:hover {
    text-decoration: underline;
}

.btn-save {
    margin-top: 20px;
    width: 100%;
    padding: 14px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(90deg, #ec4899, #f9a8d4);

    color: white;
    font-weight: bold;

    cursor: pointer;

    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* ✨ hover */
.btn-save:hover {
    transform: translateY(-2px) scale(1.02);

    box-shadow:
        0 10px 20px rgba(236,72,153,0.3),
        0 0 10px rgba(249,168,212,0.4);
}

/* 💥 click */
.btn-save:active {
    transform: scale(0.97);
}

.btn-save::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);

    transition: 0.5s;
}

.btn-save:hover::before {
    left: 100%;
}

.item-actions button {
    border: none;

    width: 36px;
    height: 36px;

    border-radius: 10px;

    background: #ffe4e6;
    color: #be185d;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

/* ✨ hover */
.item-actions button:hover {
    transform: scale(1.15);

    background: linear-gradient(135deg, #ec4899, #f9a8d4);
    color: white;

    box-shadow: 0 5px 15px rgba(236,72,153,0.4);
}

/* 💥 click */
.item-actions button:active {
    transform: scale(0.9);
}

.btn-back {
    background: none;
    border: none;

    color: #be185d;
    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}

/* hover */
.btn-back:hover {
    transform: translateX(-5px);
    color: #ec4899;
}


.menu-btn {
    transition: all 0.25s ease;
}

/* hover */
.menu-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

/* activo */
.menu-btn.active {
    transform: scale(1.15);
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo label {
    font-size: 12px;
    font-weight: 600;
    color: #be185d;
}

.campo input,
.campo select,
.campo textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #fda4af;

    background: #fff;
    color: #881337;

    font-size: 14px;

    transition: 0.2s;
}

/* 🔥 FOCUS PRO */
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;

    border-color: #ec4899;

    box-shadow: 0 0 0 3px rgba(236,72,153,0.2);
}

.form-container {
    max-height: 85vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.img-preview {
    width: 100%;
    height: 220px;

    border-radius: 12px;
    background: #ffe4e6;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}