:root {
    --primary: #00862F;
    --primary-dark: #006624;
    --bg: #f4f6f9;
    --text-main: #333;
    --card-bg: #ffffff;
    --border-radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
}

/* Topbar */

.topbar {
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.topbar-content {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
}

.topbar-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.system-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.org-name {
    font-size: 0.8rem;
    opacity: 0.85;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.btn-logout {
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

/* Main / Footer */

.main-content {
    min-height: calc(100vh - 120px);
    padding: 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #666;
}

/* Login */

.login-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.login-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fbff 50%, #eef7f1 100%);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo {
    height: 60px;
    margin-bottom: 0.75rem;
}

.login-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.login-header p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #666;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    border: 1px solid #ccd3da;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(0,134,47,0.15);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.15s ease-in-out, transform 0.05s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.full-width {
    width: 100%;
}

.validation-summary {
    color: #b3261e;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* Survey */

.survey-container {
    width: 100%;
    max-width: 1100px;
}

.survey-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.survey-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.survey-instructions {
    font-size: 01rem;
    color: #555;
    background: #f5faf7;
    border-left: 4px solid var(--primary);
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.survey-section {
    border-top: 1px solid #e2e6ec;
    padding-top: 1rem;
    margin-top: 1rem;
}

.survey-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.survey-section h3 {
    margin: 0 0 0.6rem;
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.question-block {
    margin-bottom: 0.9rem;
}

.question-text {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.options-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem; 
    font-size: 1rem;
}


.options-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.options-group input[type="radio"] {
    accent-color: var(--primary);
}

.submit-area {
    text-align: right;
    margin-top: 1.3rem;
}

/* Already answered / Thank you */

.already-answered p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}


.auto-expand-textarea {
    width: 100% !important;
    min-height: 120px; /* Altura equivalente a ~3 parágrafos */
    resize: vertical; /* Permite redimensionar manualmente */
    box-sizing: border-box; /* Inclui padding e border na largura */
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s, height 0.2s ease-out;
}

    .auto-expand-textarea:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

.textarea-container {
    position: relative;
    width: 100%;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
}

    .char-counter.warning {
        color: #ff9800;
    }

    .char-counter.error {
        color: #f44336;
    }