/* ===================================
   PANEL CSS - Admin Dashboard & Tools
   =================================== */

.panel-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Mobile Base) */
.panel-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--color-secundario), #001d3d);
    z-index: 999;
    padding: 20px 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-sidebar.active {
    display: block;
    transform: translateX(0);
}

.panel-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}
.panel-sidebar-overlay.active { display: block; }

.sidebar-logo {
    padding: 16px 24px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
}
.sidebar-logo img {
    max-width: 80px;
    margin: 0 auto 8px;
    border-radius: 12px;
}
.sidebar-logo h3 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #fff;
}
.nav-link i { width: 24px; text-align: center; }

/* Topbar */
.panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.panel-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border: none;
    background: var(--color-fondo);
    border-radius: 10px;
    font-size: 1.3rem;
    color: var(--color-secundario);
    cursor: pointer;
}
.panel-breadcrumb h2 { font-size: 1.2rem; margin: 0; }

.panel-content {
    padding: 16px;
    flex: 1;
}

/* Dashboard Stats */
.stat-card {
    background: #fff;
    border-radius: var(--borde-radius);
    padding: 20px;
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}
.stat-info h4 {
    font-size: 0.85rem;
    color: var(--color-texto-claro);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-texto);
}

/* Gestión de Áreas */
.grid-areas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.area-card-admin {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.area-card-title {
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.sentimiento-tabs {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.sentimiento-tab {
    flex: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.sentimiento-tab i { font-size: 1.8rem; }
.sentimiento-tab[data-sentimiento="bien"] i { color: #2ecc71; }
.sentimiento-tab[data-sentimiento="neutro"] i { color: #f39c12; }
.sentimiento-tab[data-sentimiento="malo"] i { color: #e74c3c; }

.sentimiento-tab span { font-weight: 600; font-size: 0.9rem; color: var(--color-texto-claro); }

.sentimiento-tab.active {
    background: #fff;
}
.sentimiento-tab.active[data-sentimiento="bien"] { border-color: #2ecc71; box-shadow: 0 4px 12px rgba(46,204,113,0.2); }
.sentimiento-tab.active[data-sentimiento="neutro"] { border-color: #f39c12; box-shadow: 0 4px 12px rgba(243,156,18,0.2); }
.sentimiento-tab.active[data-sentimiento="malo"] { border-color: #e74c3c; box-shadow: 0 4px 12px rgba(231,76,60,0.2); }

.pregunta-editor-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}
.pregunta-editor-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.pregunta-editor-drag {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.btn-reorder {
    background: none;
    border: 1px solid #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    color: var(--color-texto-claro);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-reorder:hover {
    background: #f1f5f9;
    color: var(--color-primario);
    border-color: var(--color-primario);
}

.pregunta-editor-tipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.pregunta-editor-tipo span { font-size: 0.65rem; font-weight: 700; margin-top: 4px; }

.pregunta-editor-texto { flex: 1; }
.pregunta-editor-texto input {
    border: 1px solid transparent;
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 500;
}
.pregunta-editor-texto input:focus {
    background: #fff;
    border-color: var(--color-primario);
}

.pregunta-editor-acciones { flex-shrink: 0; }

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-secundario) 0%, var(--color-primario) 100%);
}
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal.active { display: flex; }
.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-texto-claro);
}
