/* Fondo general */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 0;
}

/* Contenedor general */
.container {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo-container {
    text-align: center;
    padding: 20px 0 10px;
}

.logo {
    max-width: 180px;
}

/* Títulos */
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Formulario */
input[type="text"],
input[type="number"],
input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 6px;
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Animación sutil para botón */
.boton-animado {
    transition: transform 0.2s ease;
}

.boton-animado:hover {
    transform: scale(1.03);
}

/* Preguntas */
.pregunta-card {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.titulo-respuesta {
    margin-top: 15px;
    font-weight: 600;
}

.opcion {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
    cursor: pointer;
    line-height: 1.4;
}

.opcion input[type="radio"] {
    transform: scale(1.2);
    margin-top: 4px;
}

/* --- Tabla del panel admin --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;              /* Permite scroll horizontal sin romper diseño */
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;           /* Fuerza ancho fijo por columna */
    word-wrap: break-word;         /* Permite salto de línea en textos largos */
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    white-space: normal;           /* Permite que el texto haga salto de línea */
    overflow-wrap: break-word;     /* Evita que textos largos se salgan */
    word-break: break-word;
    font-size: 14px;
}

.admin-table th {
    background-color: #007BFF;
    color: white;
}

.admin-table td a.btn-download {
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

.admin-table td a.btn-download:hover {
    text-decoration: underline;
}

/* --- Scroll horizontal elegante --- */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* Botón cerrar sesión */
.logout-button {
    display: inline-block;
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    margin-bottom: 20px;
    border: none;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

.logout-button:hover {
    background-color: #d32f2f;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .pregunta-card {
        padding: 15px;
        font-size: 14px;
    }

    .opcion {
        flex-direction: column;
        align-items: flex-start;
    }

    .radio-input {
        transform: scale(1.3);
        margin-bottom: 5px;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    button {
        font-size: 16px;
    }

    .admin-table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .logo {
        max-width: 140px;
    }

    h2 {
        font-size: 20px;
    }

    /* Panel administrativo modernizado */
.admin-panel {
    background: #f7fafc;
    border-radius: 14px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
}

.admin-panel .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-admin {
    width: 100px;
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #00bcd4);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #0097a7);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-danger:hover {
    background-color: #b02a37;
}

.btn-download {
    background-color: #28a745;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    text-decoration: none;
}

.btn-download:hover {
    background-color: #1e7e34;
}

}
