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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.login-form p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 0px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 30%;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    width: 30%;
    display: inline-block;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
}

.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

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

.header nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Identidade visual única da MedixHub em telas legadas e autenticação. */
.medixhub-logo { display: block; width: auto; max-width: 100%; height: auto; }
.header-logo { width: 190px; }
.dashboard-logo { width: 180px; }
.login-logo { width: 230px; margin: 0 auto 18px; }
.landing-logo { width: 330px; margin: 0 auto 18px; }
.section-logo { width: 185px; margin-bottom: 12px; }

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
}

/* Upload Area */
.upload-area {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-box:hover {
    border-color: #667eea;
}

.upload-box.has-image {
    border-color: #28a745;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
}

/* Analysis Results */
.results-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.scale-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.scale-value {
    font-weight: bold;
    color: #667eea;
}

.recommendations {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.procedure-list {
    list-style-type: none;
}

.procedure-list li {
    padding: 10px;
    margin-bottom: 5px;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para os gráficos */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin: 20px 0;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.chart-card h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    font-size: 0.9em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.chart-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-chart {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-chart:hover {
    background: #f8f9fa;
}

.checkbox-label {
    display: inline-flex;       /* NÃO ocupa 100% da largura */
    align-items: center;
    gap: 12 px;                  /* ajuste entre 10 e 20px */
    width: 10%;
}

@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
}
