/**
 * e-SIC — visual alinhado ao site institucional (azul Câmara, painéis escuros, rodapé).
 */
:root {
    --esic-azul: #063a7d;
    --esic-azul-suave: #60a5fa;
    --esic-azul-ice: #93c5fd;
    --esic-slate-900: #0f172a;
    --esic-slate-800: #1e293b;
    --esic-text: #e2e8f0;
    --esic-text-muted: #94a3b8;
}

/* Fundo geral da área e-SIC */
body.esic-contrast.d-flex.flex-column {
    background: linear-gradient(180deg, #0f172a 0%, #172554 28%, #1e293b 55%, #0f172a 100%);
    color: var(--esic-text);
}

/* Cabeçalho (faixa branca removida) */
.esic-header-wrap {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(96, 165, 250, 0.15);
    backdrop-filter: blur(8px);
}

/* Faixa de sessão (logado / convidado) */
.esic-user-strip {
    background: rgba(5, 150, 105, 0.12);
    border-bottom: 1px solid rgba(96, 165, 250, 0.18);
    font-size: 0.875rem;
}

.esic-user-strip-text {
    color: #cbd5e1;
}

.esic-user-strip-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
    flex-shrink: 0;
}

/* Hero do layout e-SIC */
.layout-esic-hero {
    background: linear-gradient(135deg, #063a7d 0%, #1e3a5f 42%, #172554 100%);
    color: #f1f5f9;
    padding: 2.5rem 0 2.75rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.layout-esic-hero .esic-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}

.layout-esic-hero .esic-title {
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 2.1rem);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.layout-esic-hero .esic-description {
    color: #cbd5e1;
    font-size: 1.02rem;
    max-width: 720px;
}

.layout-esic-hero .esic-action-box {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 14px;
    padding: 1.35rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: #e2e8f0;
}

.layout-esic-hero .esic-action-box .fw-semibold {
    color: #f8fafc;
}

.layout-esic-hero .esic-action-box small.text-muted {
    color: #94a3b8 !important;
}

.btn-esic-action {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    color: #fff !important;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-esic-action:hover {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #fff !important;
    transform: translateY(-1px);
}

/* Área principal */
main#conteudo.esic-main {
    flex: 1 0 auto;
}

/* Cards e blocos de conteúdo */
.esic-main .card,
.esic-main .esic-card {
    background: linear-gradient(168deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    border-radius: 14px;
}

.esic-main .card-header {
    background: rgba(6, 58, 125, 0.25);
    border-bottom: 1px solid rgba(96, 165, 250, 0.15);
    color: #f1f5f9;
}

.esic-main .text-muted {
    color: #94a3b8 !important;
}

.esic-main h1, .esic-main h2, .esic-main h3, .esic-main h4, .esic-main h5, .esic-main h6,
.esic-main .fw-bold {
    color: #f1f5f9;
}

.esic-main .text-primary {
    color: var(--esic-azul-suave) !important;
}

.esic-main a:not(.btn):not(.site-footer-link):not(.site-footer-map-links a):not(.site-footer-bottom-inner a) {
    color: var(--esic-azul-ice);
}

.esic-main a:not(.btn):hover {
    color: #fff;
}

.esic-main .esic-link {
    color: var(--esic-azul-ice);
    text-decoration: none;
}

.esic-main .esic-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Formulários */
.esic-main .form-control,
.esic-main .form-select {
    background-color: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #f1f5f9;
}

.esic-main .form-control:focus,
.esic-main .form-select:focus {
    background-color: rgba(15, 23, 42, 0.85);
    border-color: var(--esic-azul-suave);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.2);
}

.esic-main .form-floating > label {
    color: #94a3b8;
}

.esic-main .form-floating > .form-control:focus ~ label,
.esic-main .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--esic-azul-ice);
}

.esic-main .form-label {
    color: #cbd5e1;
}

/* Botões Bootstrap no tema escuro */
.esic-main .btn-primary {
    background: linear-gradient(180deg, #1d4ed8 0%, var(--esic-azul) 100%);
    border-color: rgba(96, 165, 250, 0.4);
    color: #fff;
}

.esic-main .btn-primary:hover {
    background: linear-gradient(180deg, #2563eb 0%, #082f5c 100%);
    border-color: var(--esic-azul-suave);
    color: #fff;
}

.esic-main .btn-outline-primary {
    color: var(--esic-azul-ice);
    border-color: rgba(96, 165, 250, 0.55);
}

.esic-main .btn-outline-primary:hover {
    background: rgba(6, 58, 125, 0.45);
    border-color: var(--esic-azul-suave);
    color: #fff;
}

.esic-main .btn-outline-secondary {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.5);
}

.esic-main .btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #fff;
    border-color: #94a3b8;
}

/* Alertas */
.esic-main .alert-info {
    background: rgba(6, 58, 125, 0.35);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #e0f2fe;
}

.esic-main .alert-warning {
    background: rgba(180, 83, 9, 0.25);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fef3c7;
}

.esic-main .alert-danger {
    background: rgba(127, 29, 29, 0.35);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fecaca;
}

.esic-main .alert-success {
    background: rgba(6, 78, 59, 0.35);
    border-color: rgba(52, 211, 153, 0.35);
    color: #d1fae5;
}

/* Validação */
.esic-main .text-danger {
    color: #fca5a5 !important;
}

/* Tabela / list-group se houver */
.esic-main .table {
    color: #e2e8f0;
    --bs-table-bg: transparent;
}

.esic-main .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ---------- Rodapé institucional (mesma linguagem visual do site) ---------- */
.esic-layout-footer.site-footer {
    --camara-azul: #063a7d;
    --camara-azul-claro: #3b82f6;
    --camara-azul-suave: #60a5fa;
    --camara-azul-ice: #93c5fd;
    --footer-titulo: #e8eef9;
    --footer-texto: #c5d5e9;
    --footer-texto-suave: #9eb8d9;
    position: relative;
    overflow: hidden;
    background-color: #2c2f50;
    flex-shrink: 0;
    width: 100%;
    color: var(--footer-texto);
}

.esic-layout-footer .site-footer-top-accent {
    position: relative;
    z-index: 3;
    height: 5px;
    background: linear-gradient(90deg,
        var(--camara-azul) 0%,
        #1d4ed8 22%,
        var(--camara-azul-suave) 50%,
        #1d4ed8 78%,
        var(--camara-azul) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.esic-layout-footer .site-footer-decoration {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #172554;
    background-image:
        url("/images/site-footer-atmosphere.svg"),
        radial-gradient(ellipse 110% 85% at 8% 15%, rgba(6, 58, 125, 0.45) 0%, transparent 52%),
        radial-gradient(ellipse 90% 70% at 92% 75%, rgba(37, 99, 235, 0.22) 0%, transparent 48%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(6, 58, 125, 0.35) 0%, transparent 55%),
        linear-gradient(168deg,
            rgba(22, 36, 86, 0.92) 0%,
            rgba(44, 47, 80, 0.88) 38%,
            rgba(6, 58, 125, 0.28) 100%);
    background-size: cover, auto, auto, auto, auto;
    background-position: center 35%, center, center, center, center;
    background-repeat: no-repeat;
}

.esic-layout-footer .site-footer-inner,
.esic-layout-footer .site-footer-bottom {
    position: relative;
    z-index: 2;
}

.esic-layout-footer .site-footer-inst-panel {
    background: linear-gradient(168deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 72, 0.94) 45%, rgba(15, 23, 42, 0.97) 100%);
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-left: 4px solid var(--camara-azul);
    border-radius: 14px;
    padding: 1.35rem 1.35rem 1.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.esic-layout-footer .site-footer-brand {
    padding-left: 0;
    margin-left: 0;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-title {
    color: #f8fafc;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.esic-layout-footer .site-footer-inst-panel .site-footer-tagline {
    color: #cbd5e1;
    line-height: 1.6;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-tagline .fw-semibold {
    color: var(--camara-azul-ice);
    opacity: 1;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-contact li > span:not(.site-footer-icon) {
    color: #e2e8f0;
}

.esic-layout-footer .site-footer-icon {
    color: var(--camara-azul-suave);
    width: 1.35rem;
    flex-shrink: 0;
    text-align: center;
    margin-top: 2px;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-link {
    color: #7dd3fc !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-link:hover {
    color: #fff !important;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-social-label {
    color: #94a3b8;
    letter-spacing: 0.08em;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-social-link {
    color: #f1f5f9;
}

.esic-layout-footer .site-footer-inst-panel .site-footer-social-link:hover {
    color: var(--camara-azul-suave);
    transform: translateY(-2px);
}

.esic-layout-footer .site-footer-map-title {
    color: var(--footer-titulo);
}

.esic-layout-footer .site-footer-map-ico {
    color: #93c5fd;
}

.esic-layout-footer .site-footer-map-btn {
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.55) !important;
    background: rgba(15, 23, 42, 0.55) !important;
    font-weight: 600;
}

.esic-layout-footer .site-footer-map-btn:hover {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: #cbd5e1 !important;
    color: #fff !important;
}

.esic-layout-footer .site-footer-map-panel {
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.72) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-radius: 14px;
    padding: 1.35rem 1.5rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    height: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 32px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.esic-layout-footer .site-footer-map-heading {
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.esic-layout-footer .site-footer-map-links a {
    color: #f1f5f9;
    text-decoration: none;
    font-size: 0.9rem;
}

.esic-layout-footer .site-footer-map-links a:hover {
    color: #bfdbfe;
    padding-left: 4px;
}

.esic-layout-footer .site-footer-bottom {
    background: linear-gradient(180deg, rgba(6, 58, 125, 0.2) 0%, rgba(0, 0, 0, 0.35) 100%);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.esic-layout-footer .site-footer-bottom-inner {
    color: var(--footer-texto-suave);
}

.esic-layout-footer .site-footer-bottom-inner a {
    color: var(--camara-azul-ice);
}

.esic-layout-footer .site-footer-bottom-inner a:hover {
    color: #f0f9ff;
    text-decoration: underline !important;
}

@media (max-width: 991.98px) {
    .esic-layout-footer .site-footer-inst-panel {
        border-left: none;
        border-top: 4px solid var(--camara-azul);
        padding-top: 1.25rem;
    }

    .esic-layout-footer .site-footer-inst-panel .site-footer-title {
        font-size: 1.1rem;
    }

    .esic-layout-footer .site-footer-map-panel {
        padding: 1.1rem 1.15rem 1.25rem;
    }

    .esic-layout-footer .site-footer-map-toolbar {
        text-align: center;
    }

    .esic-layout-footer .site-footer-map-title {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .layout-esic-hero {
        padding: 1.75rem 0 2rem;
    }

    .layout-esic-hero .esic-action-box {
        margin-top: 1rem;
    }

    .esic-layout-footer .site-footer-contact li {
        font-size: 0.9rem;
    }

    .esic-layout-footer .site-footer-bottom-inner {
        font-size: 0.8rem;
    }
}
