/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tipografía y fondo general */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2C3E50;
    background: #ECF0F1;
    min-height: 100vh;
}

/* Contenedor base (compatible con Bootstrap) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #2C3E50;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Tarjetas genéricas (compatibles con .card de Bootstrap) */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: none;
}

.card h3,
.card h5 {
    color: #2C3E50;
}

/* Grid de dashboard propio (cuando no uses Bootstrap row/col) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Métricas destacadas */
.metric {
    font-size: 2.2rem;
    font-weight: bold;
    color: #27AE60;
    margin-bottom: 0.5rem;
}

/* Chat IA */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: #fff;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    font-size: 0.95rem;
}

.message.user {
    background: #27AE60;
    color: #fff;
    margin-left: auto;
    text-align: right;
}

.message.ai {
    background: #fff;
    border: 1px solid #e1e8ed;
    margin-right: auto;
}

.chat-input {
    display: flex;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e1e8ed;
    gap: 0.75rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    outline: none;
    font-size: 0.95rem;
}

.chat-input input:focus {
    border-color: #27AE60;
}

.chat-input button {
    padding: 0.75rem 1.5rem;
    background: #27AE60;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.chat-input button:hover {
    background: #219A52;
}

/* Formularios */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.95rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #27AE60;
    box-shadow: 0 0 0 2px rgba(39,174,96,0.15);
}

/* Botones */
.btn {
    background: #27AE60;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: #219A52;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.btn-danger {
    background: #E74C3C;
}

.btn-danger:hover {
    background: #C0392B;
}

.btn-secondary {
    background: #95A5A6;
}

.btn-secondary:hover {
    background: #7F8C8D;
}

/* Badges de estado */
.status-pending {
    background: #F39C12;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-approved {
    background: #27AE60;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-rejected {
    background: #E74C3C;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Contenedores de encuestas propios */
.surveys-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.7rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
}

.page-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.survey-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.survey-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.survey-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.survey-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.survey-status {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 0.9rem 1rem;
    border-radius: 6px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.status-checkmark {
    font-size: 1.2rem;
    color: #22c55e;
    flex-shrink: 0;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.result-label {
    color: #666;
    font-weight: 500;
}

.result-value {
    color: #22c55e;
    font-weight: 600;
}

.result-date {
    color: #999;
    font-size: 0.8rem;
    margin-top: 2px;
}

.survey-action-btn {
    background: #22c55e;
    color: #fff;
    padding: 0.6rem 1.3rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    transition: background 0.3s;
}

.survey-action-btn:hover {
    background: #16a34a;
}

.survey-completion-message {
    background: #f3f4f6;
    border-left: 4px solid #6b7280;
    padding: 0.9rem 1rem;
    border-radius: 6px;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.question-block {
  margin-bottom: 20px;
  padding: 15px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.option-item input[type="radio"] {
  flex-shrink: 0;
  margin: 0;
}

.option-item label {
  margin: 0;
  cursor: pointer;
}


/* Sección de progreso propia */
.progress-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.3rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.progress-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

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

    .nav {
        justify-content: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .survey-status {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}
