/* equipo.css - DISEÑO APILADO PC Y TARJETAS MÓVIL */

/* ⚡ OCULTAR RAYA DRAG EN PC */
#equipo-drag-handle {
    display: none !important;
}

/* ⚡ DISEÑO PC: BLOQUES RECTANGULARES APILADOS (1 COLUMNA) */
#grid-equipo {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 30px;
}

.equipo-card-pro {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: row;
    /* ⚡ Horizontal en PC */
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    transition: all 0.25s ease;
}

.equipo-card-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
    /* Morado sutil */
}

/* TAMAÑOS DE COLUMNA PC */
.eq-header {
    flex: 1.5;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.eq-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Avatares y Estado */
.eq-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.avatar-superadmin {
    background: linear-gradient(135deg, #8e44ad, #a259ff);
}

.avatar-admin {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.avatar-manicurista {
    background: linear-gradient(135deg, #ff6b9d, #e84393);
}

.eq-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    border: 2px solid var(--card-bg);
}

.eq-names {
    min-width: 0;
    flex: 1;
}

.eq-names h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eq-names span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eq-role-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-superadmin {
    background: #f4eaff;
    color: #8e44ad;
    border-color: #ebd9ff;
}

.badge-admin {
    background: #eaf5fc;
    color: #3498db;
    border-color: #d6eaf8;
}

.badge-manicurista {
    background: #fdf0f5;
    color: var(--primary-pink);
    border-color: #fadbd8;
}

/* Contraseña PC */
.eq-security-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eq-sec-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.eq-password-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
}

.pwd-text {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1.5px;
}

.pwd-actions {
    display: flex;
    gap: 6px;
}

.btn-pwd-icon {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.btn-pwd-icon:hover {
    color: #7b61ff;
    border-color: #7b61ff;
    background: #f0f0ff;
}

.pwd-locked {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    font-style: italic;
}

/* Salario PC */
.eq-salary-grid {
    flex: 1;
    display: flex;
    gap: 20px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.salary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.salary-item label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.salary-item strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.salary-item strong.highlight-money {
    color: #27ae60;
}

/* Botones PC */
.eq-footer-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.btn-eq-action {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-eq-action:hover:not(:disabled) {
    background: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-eq-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-color);
}

body.dark-theme .equipo-card-pro,
body.dark-theme .eq-password-row,
body.dark-theme .btn-pwd-icon {
    background: #181924;
    border-color: #2a2b3d;
}

body.dark-theme .eq-security-box {
    background: transparent;
}

body.dark-theme .btn-eq-action {
    background: #12131c;
    border-color: #2a2b3d;
}

/* ========================================= */
/* 📱 VERSIÓN MÓVIL: TARJETAS VERTICALES CLÁSICAS */
/* ========================================= */
@media (max-width: 900px) {

    /* ⚡ MOSTRAR RAYA DRAG EN MÓVIL */
    #equipo-drag-handle {
        display: flex !important;
    }

    .equipo-modal-header {
        flex-direction: column;
        align-items: stretch !important;
        padding: 20px !important;
    }

    .equipo-modal-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .equipo-modal-actions #btn-close-gestion-equipo {
        position: absolute;
        top: 15px;
        right: 15px;
        margin: 0 !important;
    }

    #btn-pagar-todas-nominas,
    #btn-add-equipo {
        width: 100%;
        justify-content: center;
        padding: 12px 10px !important;
        font-size: 0.75rem !important;
    }

    /* ⚡ GRID MÓVIL: Múltiples columnas automáticas según el ancho de la pantalla */
    #grid-equipo {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }

    /* ⚡ Convertir el Row a Column para Móvil */
    .equipo-card-pro {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 20px !important;
        gap: 16px !important;
    }

    .eq-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .eq-salary-grid {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid var(--border-color) !important;
        padding-top: 14px !important;
        grid-template-columns: 1fr !important;
    }

    .eq-footer-actions {
        margin-top: auto !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .btn-eq-action {
        flex-direction: column !important;
        padding: 10px 5px !important;
        font-size: 0.65rem !important;
        gap: 4px !important;
    }
}

@media (max-width: 400px) {
    #grid-equipo {
        grid-template-columns: 1fr !important;
    }

    .eq-salary-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* ========================================== */
/* ⚡ ESTILOS EXTRA Y BOTONES DE NÓMINA */
/* ========================================== */

#modal-gestion-equipo-box {
    background: var(--bg-color);
    /* Fondo oscuro natural para PC/Móvil */
}

#btn-pagar-todas-nominas {
    background: linear-gradient(135deg, #10b981 0%, #2ecc71 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25) !important;
    transition: all 0.2s ease;
}

#btn-pagar-todas-nominas:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4) !important;
}

/* Reducción de espacio extra en PC para el contenedor interno */
#modal-gestion-equipo-box>div:last-child {
    padding-bottom: 25px !important;
}