:root {
    --brand-blue-900: #0f2d52;
    --brand-blue-700: #1b4d86;
    --brand-graphite-900: #1f2937;
    --brand-graphite-700: #374151;
    --brand-surface: #ffffff;
    --brand-background: #f3f6fb;
    --brand-border: #d8e1ee;
    --brand-muted: #64748b;
    --brand-accent: #3abff8;
    --brand-shadow: 0 6px 20px rgba(15, 45, 82, 0.08);
    --brand-radius: 8px;
    --brand-focus: 0 0 0 0.2rem rgba(27, 77, 134, 0.22);
}

body {
    font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--brand-graphite-900);
    background: var(--brand-background);
    line-height: 1.55;
}

.wrapper,
.container,
.container-fluid {
    max-width: 100%;
}

.content,
.content-md,
.content-lg,
.content-sm {
    padding-top: 24px;
    padding-bottom: 24px;
}

.header-v8 .blog-topbar,
.header .topbar,
.header .topbar ul {
    background: var(--brand-blue-900);
}

.header-v8 .navbar,
.header .navbar-responsive-collapse,
.header .navbar {
    background: linear-gradient(90deg, var(--brand-blue-700), var(--brand-blue-900));
    box-shadow: var(--brand-shadow);
}

.navbar-nav > li > a,
.header .navbar-nav > li > a,
.header-v8 .navbar-nav > li > a {
    color: #f8fafc;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
    color: var(--brand-accent);
}

.panel,
.card,
.white-box,
.well,
.app-card,
.kpi-card,
.form-card {
    border-radius: var(--brand-radius);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
    background: var(--brand-surface);
}

.panel-heading,
.card-header,
.box-header,
.modal-header {
    border-bottom: 1px solid var(--brand-border);
    background: #f8fbff;
    border-top-left-radius: var(--brand-radius);
    border-top-right-radius: var(--brand-radius);
}

.btn {
    border-radius: var(--brand-radius);
    font-weight: 500;
    transition: all .2s ease;
}

.btn-primary,
.btn-info {
    background: var(--brand-blue-700);
    border-color: var(--brand-blue-700);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus {
    background: var(--brand-blue-900);
    border-color: var(--brand-blue-900);
    box-shadow: 0 6px 14px rgba(15, 45, 82, 0.2);
}

.btn-default,
.btn-outline-secondary {
    border-color: var(--brand-border);
    color: var(--brand-graphite-700);
    background: #fff;
}

.btn-warning {
    color: #fff;
}

.form-control,
.form-select,
.select2-container .select2-choice,
.select2-container-multi .select2-choices,
.sky-form .input input,
.sky-form .input textarea,
.sky-form .select select {
    border-radius: var(--brand-radius);
    border: 1px solid #c5d2e4;
    box-shadow: none;
    min-height: 38px;
}

.form-control:focus,
.form-select:focus,
.select2-container-active .select2-choice,
.select2-container-multi.select2-container-active .select2-choices {
    border-color: var(--brand-blue-700);
    box-shadow: var(--brand-focus);
}

label,
.control-label,
.form-group label {
    color: var(--brand-graphite-700);
    font-weight: 600;
}

.table {
    background: #fff;
    border-radius: var(--brand-radius);
    overflow: hidden;
}

.table > thead > tr > th,
.table thead th {
    background: #eef4fb;
    color: #17324d;
    border-bottom: 1px solid var(--brand-border);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table > tbody > tr:nth-child(odd),
.table-striped > tbody > tr:nth-child(odd) {
    background-color: #fafcff;
}

.table-hover > tbody > tr:hover {
    background-color: #f0f6ff;
}

.badge,
.label,
.status-badge,
.badge-status {
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-badge.validado,
.badge-status.validado {
    background: #dcfce7;
    color: #166534;
}

.status-badge.enviado,
.badge-status.enviado {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.erro_validacao,
.badge-status.erro_validacao {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.processado,
.badge-status.processado {
    background: #cffafe;
    color: #155e75;
}

.modal-content,
.dropdown-menu,
.alert {
    border-radius: var(--brand-radius);
    border-color: var(--brand-border);
}

.footer-v1 .footer,
.footer-v1 .copyright {
    background: var(--brand-graphite-900);
}

@media (max-width: 991px) {
    .navbar-toggle {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

    .content,
    .content-md,
    .content-lg,
    .content-sm {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}


.ecip-layout-footer-branding {
    padding: 10px 16px 14px;
    text-align: center;
}

.ecip-official-branding {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--brand-muted);
    opacity: 0.9;
    letter-spacing: 0.1px;
}

.ecip-official-branding__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.ecip-official-branding--login {
    margin-top: 16px;
}

.ecip-official-branding--footer {
    margin: 0 auto;
}

/* Premium auth screen */
.ecip-auth {
    position: relative;
    min-height: calc(100vh - 120px);
    display: grid;
    grid-template-columns: minmax(600px, 1fr) minmax(360px, 460px);
    background: linear-gradient(120deg, #082346 0%, #0b3558 55%, #13556a 100%);
    overflow: hidden;
}

.ecip-auth::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .08), transparent 40%),
        radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .08), transparent 30%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 8px);
    pointer-events: none;
}

.ecip-auth::after {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: calc(100% - 520px);
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(173, 216, 255, .85), transparent);
    box-shadow: 0 0 24px rgba(118, 180, 255, .55);
    pointer-events: none;
}

.ecip-auth,
.ecip-auth * {
    box-sizing: border-box;
}

.ecip-auth svg {
    max-width: none;
}

.ecip-auth__hero,
.ecip-auth__panel {
    position: relative;
    z-index: 1;
    padding: 56px 48px;
}

.ecip-auth__hero {
    display: flex;
    align-items: center;
}

.ecip-auth__hero-content {
    max-width: 560px;
    color: #f4f8fc;
}

.ecip-auth__title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.1;
    color: #ffffff;
}

.ecip-auth__subtitle {
    margin: 16px 0 0;
    font-size: clamp(1.05rem, 1.9vw, 1.45rem);
    color: rgba(238, 248, 255, .95);
    max-width: 500px;
}

.ecip-auth__eyebrow {
    margin: 14px 0 8px;
    color: rgba(221, 237, 255, .9);
    font-weight: 600;
    letter-spacing: .03em;
}

.ecip-auth__benefits {
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 16px;
}

.ecip-auth__benefits li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #f7fbff;
    padding: 6px 0;
}

.ecip-auth__benefits svg {
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px;
    fill: #8cd5ff;
    flex: 0 0 20px;
    filter: drop-shadow(0 0 6px rgba(140, 213, 255, .35));
}

.ecip-auth__panel {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: clamp(64px, 9vh, 92px);
}

.ecip-auth__card {
    width: min(100%, 430px);
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(3, 14, 30, .22);
    padding: 32px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ecip-auth__card:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 46px rgba(3, 14, 30, .24);
}

@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .ecip-auth__card {
        background: rgba(255, 255, 255, .8);
        backdrop-filter: blur(8px) saturate(120%);
        -webkit-backdrop-filter: blur(8px) saturate(120%);
    }
}

.ecip-auth__brand {
    text-align: center;
    margin-bottom: 24px;
}

.ecip-auth__logo,
.ecip-auth__logo-placeholder {
    width: min(100%, 160px);
    max-height: 44px;
    margin-bottom: 12px;
}

.ecip-auth__logo {
    object-fit: contain;
    object-position: center;
}

.ecip-auth__logo-placeholder {
    border-radius: 8px;
    border: 1px dashed #7b94b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #476285;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.ecip-auth__brand h2 {
    margin: 0;
    color: #0b2f52;
    font-size: 1.65rem;
}

.ecip-auth__brand p {
    margin: 8px 0 0;
    color: #35506d;
}

.ecip-auth__form {
    display: grid;
    gap: 18px;
}

.ecip-auth__validation .validation-summary-errors {
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid #f0c9cd;
    background: #fff5f6;
    color: #7f1d2a;
    padding: 10px 12px;
}

.ecip-auth__validation .validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.ecip-auth__field {
    display: grid;
    gap: 8px;
}

.ecip-auth__label {
    margin: 0;
    color: #102d4b;
    font-size: .94rem;
    font-weight: 600;
}

.form-control.ecip-auth__input {
    border-radius: 10px;
    border: 1px solid #c1cfdf;
    min-height: 44px;
    color: #112d48;
}

.form-control.ecip-auth__input:focus {
    border-color: #0b61d8;
    box-shadow: 0 0 0 3px rgba(11, 97, 216, .22);
    outline: 2px solid #0b61d8;
    outline-offset: 1px;
}

.ecip-auth__help {
    color: #516a86;
    font-size: .82rem;
}

.ecip-auth__error {
    color: #b42332;
    font-size: .84rem;
    font-weight: 600;
}

.ecip-auth__submit {
    position: relative;
    min-height: 46px;
    border: 1px solid #0b3d91;
    border-radius: 10px;
    background: linear-gradient(90deg, #0b3d91, #155ab8);
    color: #ffffff;
    font-weight: 700;
}

.ecip-auth__submit:hover,
.ecip-auth__submit:focus {
    background: linear-gradient(90deg, #0a357c, #124c9b);
    color: #ffffff;
}

.ecip-auth__submit:focus-visible,
.ecip-auth__link:focus-visible {
    outline: 2px solid #0b61d8;
    outline-offset: 2px;
}

.ecip-auth__submit-loading {
    display: none;
}

.ecip-auth__submit.is-loading {
    cursor: wait;
}

.ecip-auth__submit.is-loading .ecip-auth__submit-label {
    display: none;
}

.ecip-auth__submit.is-loading .ecip-auth__submit-loading {
    display: inline;
}

.ecip-auth__links {
    text-align: center;
}

.ecip-auth__link {
    font-size: .88rem;
    color: #27548d;
}

.ecip-auth__secondary-action {
    text-align: center;
    margin-top: 4px;
}

.ecip-auth__secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .86rem;
    color: #385778;
    border: 1px solid #d4deeb;
    background: #f7faff;
    border-radius: 999px;
    padding: 6px 12px;
    text-decoration: none;
}

.ecip-auth__secondary-link:hover,
.ecip-auth__secondary-link:focus {
    color: #133f72;
    border-color: #adc3e0;
    background: #eef5ff;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .ecip-auth {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .ecip-auth::after {
        display: none;
    }

    .ecip-auth__hero,
    .ecip-auth__panel {
        padding: 28px 20px;
    }

    .ecip-auth__hero {
        padding-bottom: 8px;
    }

    .ecip-auth__card {
        width: min(100%, 520px);
        margin: 0 auto;
    }
}

/* Account/Login federal premium refresh */
html,
body,
body.ecip-auth-body {
    height: 100%;
}

body.ecip-auth-body {
    margin: 0;
}

.login-wrapper.ecip-auth {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(380px, 460px);
    align-items: stretch;
    background: linear-gradient(128deg, #072447 0%, #0f3b65 58%, #15567e 100%);
    overflow: hidden;
}

.login-wrapper.ecip-auth::before {
    display: block;
}

.login-wrapper.ecip-auth::after {
    display: block;
    left: auto;
    right: 460px;
}

.login-wrapper .ecip-auth__hero {
    display: flex;
    align-items: center;
    padding: 56px 52px;
}

.login-wrapper .ecip-auth__panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-wrapper .ecip-auth__card {
    width: min(100%, 450px);
    background: rgba(255, 255, 255, .9);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(2, 28, 55, .26);
    border: 1px solid rgba(255, 255, 255, .65);
    padding: 34px;
}

.login-wrapper .ecip-auth__brand-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #d8e3f3;
    background: #f3f7ff;
    color: #1f4f8f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.login-wrapper .ecip-auth__brand .ecip-auth__title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #0d2d4d;
}

.login-wrapper .ecip-auth__brand p {
    font-size: .94rem;
    color: #516882;
}

.login-wrapper .ecip-auth__submit {
    width: 100%;
    min-height: 48px;
    background: linear-gradient(90deg, #0a4b97, #1763be);
    border-color: #0a4b97;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 24px rgba(10, 75, 151, .24);
}

.login-wrapper .ecip-auth__submit:hover,
.login-wrapper .ecip-auth__submit:focus {
    background: linear-gradient(90deg, #083f80, #124e99);
    border-color: #083f80;
    box-shadow: 0 12px 26px rgba(8, 63, 128, .28);
}

.login-wrapper .ecip-auth__secondary-link {
    padding: 7px 13px;
}

@media (max-width: 1200px) {
    .login-wrapper.ecip-auth {
        grid-template-columns: minmax(420px, 1fr) minmax(340px, 430px);
    }

    .login-wrapper .ecip-auth__hero {
        padding: 44px 36px;
    }
}

@media (max-width: 991px) {
    .login-wrapper.ecip-auth {
        grid-template-columns: 1fr;
        min-height: 100vh;
        padding: 18px;
    }

    .login-wrapper.ecip-auth::after {
        display: none;
    }

    .login-wrapper .ecip-auth__hero {
        display: none;
    }

    .login-wrapper .ecip-auth__panel {
        padding: 0;
    }

    .login-wrapper .ecip-auth__card {
        width: min(100%, 460px);
        margin: 0 auto;
        padding: 24px 20px;
    }
}
