:root {
    --es-bg: #f4f7fb;
    --es-surface: #ffffff;
    --es-surface-soft: #eef7f6;
    --es-ink: #17212b;
    --es-muted: #647384;
    --es-line: #d9e2ec;
    --es-brand: #1769aa;
    --es-brand-strong: #0f4f86;
    --es-teal: #0f9f8f;
    --es-danger: #c9344c;
    --es-warning: #b66b00;
    --es-success: #13845f;
    --es-shadow: 0 14px 34px rgba(23, 33, 43, 0.08);
    --es-shadow-soft: 0 8px 22px rgba(23, 33, 43, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--es-bg);
    color: var(--es-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

a {
    color: var(--es-brand);
}

a:hover {
    color: var(--es-brand-strong);
}

.esurvey-page-spacer {
    height: 88px;
}

.esurvey-navbar.navbar {
    min-height: 72px;
    padding: 0.45rem 1rem;
    border-bottom: 1px solid rgba(217, 226, 236, 0.9);
    box-shadow: 0 10px 26px rgba(23, 33, 43, 0.08);
}

.esurvey-navbar.bg-light {
    background: rgba(255, 255, 255, 0.96) !important;
}

.esurvey-navbar.bg-dark {
    background: #17212b !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.esurvey-navbar .container-fluid {
    width: 100%;
    max-width: none;
    gap: 1rem;
}

.esurvey-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 58px;
    padding: 0;
}

.esurvey-navbar .navbar-brand img {
    width: 150px;
    height: 58px;
    object-fit: contain;
}

.esurvey-navbar .navbar-nav {
    align-items: center;
    gap: 0.15rem;
}

.esurvey-navbar .nav-link {
    min-height: 40px;
    padding: 0.55rem 0.8rem !important;
    border-radius: 8px;
    color: #2f3b48;
    font-weight: 650;
    line-height: 1.2;
}

.esurvey-navbar.navbar-dark .nav-link,
.esurvey-navbar.bg-dark .nav-link {
    color: rgba(255, 255, 255, 0.82);
}

.esurvey-navbar .nav-link:hover,
.esurvey-navbar .nav-link:focus {
    background: rgba(23, 105, 170, 0.09);
    color: var(--es-brand-strong);
}

.esurvey-navbar.navbar-dark .nav-link:hover,
.esurvey-navbar.navbar-dark .nav-link:focus,
.esurvey-navbar.bg-dark .nav-link:hover,
.esurvey-navbar.bg-dark .nav-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.esurvey-navbar .nav-link.active {
    background: var(--es-surface-soft);
    color: var(--es-brand-strong);
}

.esurvey-navbar.navbar-dark .nav-link.active,
.esurvey-navbar.bg-dark .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.esurvey-navbar .dropdown-menu {
    padding: 0.45rem;
    border: 1px solid var(--es-line);
    border-radius: 8px;
    box-shadow: var(--es-shadow-soft);
}

.esurvey-navbar .dropdown-item {
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    color: var(--es-ink);
    font-weight: 600;
}

.esurvey-navbar .dropdown-item:hover,
.esurvey-navbar .dropdown-item:focus {
    background: var(--es-surface-soft);
    color: var(--es-brand-strong);
}

.container,
.container-fluid {
    width: min(calc(100% - 24px), 1220px);
}

body > .container,
center > .container,
center > div[style*="width:90%"] {
    margin-top: 1.25rem;
}

center > h3,
center > h4,
.container > h2,
.container > h3,
.container > h4 {
    color: var(--es-ink);
    font-weight: 800;
    letter-spacing: 0;
}

center > h4 {
    margin: 0.5rem 0 1.25rem;
}

font[color="red"] {
    color: var(--es-teal) !important;
}

.card,
.form-container,
.folha-a4,
body > .container > form,
.container > form#meuFormulario {
    border: 1px solid var(--es-line) !important;
    border-radius: 8px !important;
    background: var(--es-surface) !important;
    box-shadow: var(--es-shadow-soft);
}

.card {
    overflow: hidden;
}

.card-body {
    padding: 1.35rem;
}

.card-title {
    margin-bottom: 0.75rem;
    color: var(--es-ink);
    font-weight: 800;
}

.card-text {
    color: var(--es-muted);
    font-size: 1.75rem;
    font-weight: 800;
}

.esurvey-dashboard-card {
    position: relative;
}

.esurvey-dashboard-card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--es-brand), var(--es-teal));
}

canvas {
    padding: 1rem;
    border: 1px solid var(--es-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--es-shadow-soft);
}

#myChart,
#myChart2 {
    height: 320px !important;
}

.esurvey-chart-panel {
    height: 330px;
    padding: 0.25rem;
    border: 1px solid var(--es-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--es-shadow-soft);
}

.esurvey-chart-panel canvas {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    box-shadow: none;
}

.esurvey-chart-grid {
    margin-bottom: 2rem;
}

body > .container > form,
.container > form#meuFormulario {
    padding: 1.25rem;
}

label,
.form-label {
    margin-bottom: 0.35rem;
    color: #364554;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-control,
.form-select,
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
textarea,
select {
    min-height: 42px;
    border: 1px solid var(--es-line);
    border-radius: 8px;
    color: var(--es-ink);
    background-color: #ffffff;
    box-shadow: none;
}

textarea.form-control,
textarea {
    min-height: 96px;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(23, 105, 170, 0.58);
    box-shadow: 0 0 0 0.2rem rgba(23, 105, 170, 0.12);
    outline: none;
}

.btn,
button.btn,
input[type="submit"].btn {
    min-height: 40px;
    width: auto;
    border-radius: 8px;
    border: 0;
    font-weight: 750;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(23, 33, 43, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover,
button.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(23, 33, 43, 0.12);
}

.btn:disabled,
.btn.disabled {
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--es-brand) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--es-brand-strong) !important;
}

.btn-success {
    background: var(--es-success) !important;
    color: #ffffff !important;
}

.btn-danger {
    background: var(--es-danger) !important;
    color: #ffffff !important;
}

.btn-warning {
    background: var(--es-warning) !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    border: 1px solid var(--es-line) !important;
    color: var(--es-ink) !important;
    background: #ffffff !important;
}

.btn-outline-secondary:hover {
    background: var(--es-surface-soft) !important;
    color: var(--es-brand-strong) !important;
}

.input-group .btn {
    min-width: 92px;
    width: auto !important;
    box-shadow: none;
}

#submitButton,
#finishButton,
#proximoButton,
#finalizarButton {
    width: 100%;
}

.table {
    overflow: hidden;
    border: 1px solid var(--es-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--es-shadow-soft);
}

.table thead th {
    border-bottom: 1px solid var(--es-line) !important;
    color: #425160;
    background: #f7fafc;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.table tbody td {
    color: var(--es-ink);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #f9fbfd;
}

div.dt-container .dt-input,
div.dataTables_wrapper .dataTables_filter input,
div.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 1px solid var(--es-line);
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--es-brand) !important;
    color: #ffffff !important;
}

.progress {
    height: 12px;
    border-radius: 999px;
    background: #e7edf3;
}

.progress-bar {
    background: var(--es-teal);
    font-size: 0.72rem;
    font-weight: 800;
}

.alert {
    border: 0;
    border-radius: 8px;
    box-shadow: var(--es-shadow-soft);
}

.modal-content {
    border: 1px solid var(--es-line);
    border-radius: 8px;
    box-shadow: var(--es-shadow);
}

iframe {
    border-radius: 8px;
    box-shadow: var(--es-shadow-soft);
}

.spinner-border {
    color: var(--es-brand) !important;
}

.esurvey-login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(23, 105, 170, 0.12) 0%, rgba(244, 247, 251, 0) 44%),
        linear-gradient(315deg, rgba(15, 159, 143, 0.12) 0%, rgba(244, 247, 251, 0) 42%),
        var(--es-bg);
}

.esurvey-login-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 440px);
    width: min(100%, 980px);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(217, 226, 236, 0.92);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(23, 33, 43, 0.14);
}

.esurvey-login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(23, 105, 170, 0.96), rgba(15, 79, 134, 0.96)),
        #1769aa;
}

.esurvey-login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.68), transparent 72%);
    pointer-events: none;
}

.esurvey-login-brand img {
    position: relative;
    z-index: 1;
    width: 168px;
    max-height: 74px;
    object-fit: contain;
}

.esurvey-login-brand > div {
    position: relative;
    z-index: 1;
}

.esurvey-login-kicker {
    margin: 0 0 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esurvey-login-brand h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.35rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 0;
}

.esurvey-login-panel.card {
    display: flex;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none;
}

.esurvey-login-panel .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 46px 42px;
}

.esurvey-login-logo img {
    max-height: 82px;
    object-fit: contain;
    margin-bottom: 1.1rem;
}

.esurvey-login-heading {
    margin-bottom: 1.2rem;
    text-align: center;
}

.esurvey-login-heading h2 {
    margin: 0 0 0.35rem;
    color: var(--es-ink);
    font-size: 1.45rem;
    font-weight: 900;
}

.esurvey-login-heading p {
    margin: 0;
    color: var(--es-muted);
    font-size: 0.94rem;
}

.esurvey-login .form-control {
    min-height: 48px;
    padding: 0.72rem 0.9rem;
}

.esurvey-login .form-label {
    margin-bottom: 0.45rem;
}

.esurvey-login-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;
    font-size: 1rem;
}

.esurvey-login .btn-primary {
    width: 100%;
}

.esurvey-finalization-card {
    min-height: 154px;
}

.esurvey-finalization-card svg {
    color: var(--es-success);
}

@media (max-width: 991.98px) {
    .esurvey-login-shell {
        grid-template-columns: 1fr;
        width: min(100%, 460px);
        min-height: auto;
    }

    .esurvey-login-brand {
        min-height: 168px;
        padding: 28px;
    }

    .esurvey-login-brand img {
        width: 142px;
    }

    .esurvey-login-brand h1 {
        font-size: 2.35rem;
    }

    .esurvey-login-panel.card {
        border-radius: 0 !important;
    }

    .esurvey-navbar .navbar-nav {
        align-items: stretch;
        padding-top: 0.75rem;
    }

    .esurvey-navbar .nav-link {
        width: 100%;
    }

    .esurvey-page-spacer {
        height: 82px;
    }
}

@media (max-width: 575.98px) {
    .esurvey-login {
        padding: 14px;
    }

    .esurvey-login-shell {
        width: 100%;
        min-height: calc(100vh - 28px);
    }

    .esurvey-login-brand {
        min-height: 136px;
        padding: 22px;
    }

    .esurvey-login-brand h1 {
        font-size: 2rem;
    }

    .esurvey-login-panel .card-body {
        padding: 28px 20px;
    }

    body {
        font-size: 14px;
    }

    .container,
    .container-fluid {
        width: min(calc(100% - 16px), 1220px);
    }

    .card-body {
        padding: 1rem;
    }

    .btn,
    button.btn {
        min-height: 42px;
        white-space: normal;
    }
}
