/* style.css - Versão completa com estilos para login e admin */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== HEADER COMUM ========== */
header {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* ========== FORMULÁRIO PÚBLICO ========== */
.form-section {
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.legend {
    background: #f0f4f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9em;
}

.binary-legend { color: #2c7da0; font-weight: bold; }
.scale-legend { color: #2a9d8f; font-weight: bold; }

.question-card {
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.question-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.question-number {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.question-text {
    font-size: 1.05em;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.question-options {
    margin-top: 10px;
}

.radio-label {
    display: inline-block;
    margin-right: 25px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input {
    margin-right: 6px;
    transform: scale(1.1);
    cursor: pointer;
}

.scale-options {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.scale-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.scale-label:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.scale-label input {
    margin-bottom: 5px;
    cursor: pointer;
}

.scale-label span {
    font-weight: bold;
    font-size: 1.1em;
}

.scale-description {
    margin-left: 20px;
    font-size: 0.85em;
    color: #666;
    display: flex;
    gap: 30px;
}

.form-actions {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
}

.btn-submit, .btn-reset, .btn, .btn-logout, .btn-view, .btn-delete, .btn-back {
    padding: 12px 30px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0 10px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-reset {
    background: #6c757d;
    color: white;
}

.btn-reset:hover {
    background: #5a6268;
}

.success-message, .error-message {
    padding: 20px;
    margin: 20px;
    border-radius: 10px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

/* ========== PÁGINA DE LOGIN ========== */
.login-box {
    max-width: 450px;
    margin: 60px auto;
    background: white;
    padding: 40px 35px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.login-box .form-group {
    text-align: left;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

.login-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.login-box .btn-submit {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    font-size: 1.1em;
}

/* ========== PAINEL ADMIN ========== */
.admin-container {
    background: white;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    padding: 20px 30px;
    color: white;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.6em;
}

.admin-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9em;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.submissions-list, .submission-detail {
    padding: 30px;
}

.submissions-list h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
    padding-left: 15px;
}

.empty-message {
    text-align: center;
    padding: 50px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #7f8c8d;
    font-size: 1.1em;
}

.submissions-table, .answers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.submissions-table th, .answers-table th,
.submissions-table td, .answers-table td {
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    text-align: left;
}

.submissions-table th, .answers-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.submissions-table th:hover {
    background: #5a67d8;
}

.submissions-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.submissions-table tr:hover {
    background-color: #f1f5f9;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-view {
    background: #2c7da0;
    color: white;
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
}

.btn-view:hover, .btn-delete:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Detalhe da submissão */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.detail-header h2 {
    color: #2c3e50;
    margin: 0;
}

.btn-back {
    background: #6c757d;
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
}

.detail-info {
    background: #f0f4f8;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-info p {
    margin: 0;
    font-size: 1em;
}

.detail-info strong {
    color: #2c3e50;
}

.answers-table {
    font-size: 0.9em;
}

.answers-table td:first-child,
.answers-table th:first-child {
    width: 50px;
    text-align: center;
}

.answers-table td:nth-child(3) {
    font-weight: 500;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .scale-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .scale-description {
        flex-direction: column;
        gap: 5px;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .question-card {
        padding: 15px;
    }
    
    .submissions-table, .answers-table {
        font-size: 0.85em;
    }
    
    .submissions-table th, .submissions-table td {
        padding: 8px 10px;
    }
    
    .actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .login-box {
        margin: 30px 20px;
        padding: 25px;
    }
}