:root {
    --sidebar-width: 270px;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 8, 18, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: opacity .25s ease;
    opacity: 0;
    pointer-events: none;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.loading-overlay .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    text-align: center;
    color: #eef3ff;
}

.loading-overlay .loading-caption {
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .9rem;
    color: #f8f9ff;
}

.loading-spinner {
    width: 96px;
    height: 96px;
    position: relative;
}

.loading-spinner span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #d3dcff;
    box-shadow: 0 0 8px rgba(222, 230, 255, 0.4);
    transform-origin: 0 38px;
    opacity: 0;
    animation: loading-dots 1.1s linear infinite;
}

.loading-spinner span:nth-child(1) {
    transform: rotate(0deg) translate(0, -38px);
    animation-delay: -1s;
}

.loading-spinner span:nth-child(2) {
    transform: rotate(30deg) translate(0, -38px);
    animation-delay: -.9s;
}

.loading-spinner span:nth-child(3) {
    transform: rotate(60deg) translate(0, -38px);
    animation-delay: -.8s;
}

.loading-spinner span:nth-child(4) {
    transform: rotate(90deg) translate(0, -38px);
    animation-delay: -.7s;
}

.loading-spinner span:nth-child(5) {
    transform: rotate(120deg) translate(0, -38px);
    animation-delay: -.6s;
}

.loading-spinner span:nth-child(6) {
    transform: rotate(150deg) translate(0, -38px);
    animation-delay: -.5s;
}

.loading-spinner span:nth-child(7) {
    transform: rotate(180deg) translate(0, -38px);
    animation-delay: -.4s;
}

.loading-spinner span:nth-child(8) {
    transform: rotate(210deg) translate(0, -38px);
    animation-delay: -.3s;
}

.loading-spinner span:nth-child(9) {
    transform: rotate(240deg) translate(0, -38px);
    animation-delay: -.2s;
}

.loading-spinner span:nth-child(10) {
    transform: rotate(270deg) translate(0, -38px);
    animation-delay: -.1s;
}

.loading-spinner span:nth-child(11) {
    transform: rotate(300deg) translate(0, -38px);
    animation-delay: 0s;
}

.loading-spinner span:nth-child(12) {
    transform: rotate(330deg) translate(0, -38px);
    animation-delay: .1s;
}

@keyframes loading-dots {
    0%,
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

body.landing-page {
    background: radial-gradient(140% 140% at 15% 0%, #f1f5ff 0%, #ffffff 45%, #f8fbff 100%);
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #0d6efd 0%, #031633 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    padding: 1rem .75rem;
    overflow-y: hidden;
    font-size: .9rem;
}

.sidebar nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: .25rem;
    padding-bottom: .5rem;
}

.sidebar .sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
}

.sidebar .sidebar-footer .nav-link {
    margin-bottom: 0;
}

.sidebar .logo {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .9rem;
}

.sidebar .user-meta {
    font-size: .85rem;
    line-height: 1.25;
    margin-bottom: 1rem !important;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: .45rem;
    padding: .35rem .6rem;
    margin-bottom: .15rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
    font-size: .84rem;
}

.sidebar .nav-link i {
    font-size: .95rem;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

@media (max-height: 860px) {
    .sidebar {
        padding: .85rem .65rem;
    }

    .sidebar .logo {
        font-size: 1.05rem;
        margin-bottom: .75rem;
    }

    .sidebar .user-meta {
        font-size: .8rem;
        margin-bottom: .75rem !important;
    }

    .sidebar .nav-link {
        padding: .32rem .55rem;
        gap: .45rem;
        font-size: .8rem;
    }
}

@media (max-height: 720px) {
    .sidebar {
        padding: .7rem .55rem;
    }

    .sidebar .logo {
        margin-bottom: .6rem;
    }

    .sidebar .user-meta {
        font-size: .76rem;
        margin-bottom: .65rem !important;
    }

    .sidebar .nav-link {
        padding: .28rem .5rem;
        font-size: .78rem;
    }
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 1040;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding-top: 4.5rem;
    }
}

.hero {
    background: #05193c;
    color: #fff;
    position: relative;
    padding-top: 7rem;
    min-height: 34rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(5, 25, 60, 0.82), rgba(13, 110, 253, 0.55));
    z-index: 1;
}

.hero > .container {
    position: relative;
    z-index: 3;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carousel .carousel-inner,
.hero-carousel .carousel-item,
.hero-carousel .hero-slide {
    height: 100%;
}

.hero-carousel .carousel-item {
    transition: opacity 1.25s ease-in-out;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: saturate(75%) brightness(0.78);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 3rem;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 0 0.5rem rgba(5, 25, 60, 0.5));
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-prev:focus,
.hero-carousel .carousel-control-next:hover,
.hero-carousel .carousel-control-next:focus {
    background: rgba(255, 255, 255, 0.5);
}

.card-service {
    transition: transform .2s ease, box-shadow .2s ease;
    border: none;
    border-radius: 1rem;
}

.card-service .service-icon {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-service .service-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 60%);
    opacity: .9;
    mix-blend-mode: screen;
}

.card-service .service-icon i {
    font-size: 2.25rem;
    position: relative;
    z-index: 1;
}

.service-icon--dedetizacao {
    background: linear-gradient(135deg, #f97316, #fb923c);
    box-shadow: 0 1.5rem 3rem rgba(249, 115, 22, 0.3);
}

.service-icon--descupinizacao {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    box-shadow: 0 1.5rem 3rem rgba(245, 158, 11, 0.28);
}

.service-icon--desratizacao {
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 1.5rem 3rem rgba(220, 38, 38, 0.32);
}

.service-icon--fauna {
    background: linear-gradient(135deg, #6d28d9, #a855f7);
    box-shadow: 0 1.5rem 3rem rgba(104, 49, 215, 0.28);
}

.service-icon--agua {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    box-shadow: 0 1.5rem 3rem rgba(2, 132, 199, 0.3);
}

.service-icon--hidrojateamento {
    background: linear-gradient(135deg, #1d4ed8, #60a5fa);
    box-shadow: 0 1.5rem 3rem rgba(29, 78, 216, 0.3);
}

.service-icon--desentupimento {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.4);
}

.service-icon--programas {
    background: linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 1.5rem 3rem rgba(21, 128, 61, 0.32);
}

.card-service:hover {
    transform: translateY(-6px);
    box-shadow: 0 1.5rem 3rem rgba(13, 110, 253, 0.15);
}

.top-nav {
    background: rgba(5, 25, 60, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 0.75rem 2rem rgba(5, 25, 60, 0.2);
}

.top-nav .navbar-brand {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.top-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.top-nav .nav-link:hover,
.top-nav .nav-link:focus {
    color: #fff;
}

.top-nav .btn {
    box-shadow: 0 .5rem 1.5rem rgba(13, 110, 253, 0.25);
}

.whatsapp-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 1.5rem 3rem rgba(37, 211, 102, 0.35);
    transition: transform .2s ease, box-shadow .2s ease;
    z-index: 1050;
}

.whatsapp-fab:hover {
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 2rem 3.5rem rgba(37, 211, 102, 0.4);
}

.table-responsive {
    background-color: #fff;
    border-radius: .75rem;
    padding: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.05);
}

.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-list li:last-child {
    margin-bottom: 0;
}

.contact-list__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.08);
    font-size: 1.1rem;
}

.contact-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    font-size: 1.1rem;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.contact-social-link:hover {
    color: #0a58ca;
    background: rgba(13, 110, 253, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 2rem rgba(13, 110, 253, 0.15);
}

.kpi-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.2rem;
    box-shadow: 0 1.5rem 3rem rgba(13, 110, 253, 0.1);
}

.badge-status {
    text-transform: uppercase;
    letter-spacing: .05em;
}

.landing-page p {
    text-align: justify;
}

.landing-page .section {
    position: relative;
    overflow: hidden;
}

.landing-page .section .container {
    position: relative;
    z-index: 2;
}

.landing-page .section-services {
    border-radius: 2.5rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(99, 102, 241, 0.12) 55%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 2.5rem 4.5rem rgba(15, 23, 42, 0.16);
    margin: 0 1.25rem 4rem;
}

.landing-page .section-services::before,
.landing-page .section-services::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
}

.landing-page .section-services::before {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 65%);
    top: -140px;
    left: -120px;
}

.landing-page .section-services::after {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.55), transparent 65%);
    bottom: -120px;
    right: -80px;
}

.landing-page .card-service {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(6px);
}

.landing-page .card-service:hover {
    box-shadow: 0 1.75rem 3.5rem rgba(37, 99, 235, 0.18);
}

.landing-page .card-service h3 {
    color: #0f172a;
}

.landing-page .card-service p {
    color: #475569 !important;
}

.landing-page .section-about,
.landing-page .section-conformidade,
.landing-page .section-contato,
.landing-page .section-diferenciais {
    border-radius: 2.5rem;
    margin: 0 1.25rem 4rem;
    box-shadow: 0 2rem 3.5rem rgba(15, 23, 42, 0.1);
}

.landing-page .section-about {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.85), rgba(255, 255, 255, 0.92));
}

.landing-page .section-diferenciais {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.16), rgba(255, 255, 255, 0.94));
}

.landing-page .section-conformidade {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(255, 255, 255, 0.94));
}

.landing-page .section-contato {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(255, 255, 255, 0.95));
}

.landing-page .section-about::before,
.landing-page .section-diferenciais::before,
.landing-page .section-conformidade::before,
.landing-page .section-contato::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, 0.4), transparent 55%);
    opacity: 0.6;
    z-index: 1;
}

.landing-page .section-about::after,
.landing-page .section-diferenciais::after,
.landing-page .section-conformidade::after,
.landing-page .section-contato::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 90% 100%, rgba(255, 255, 255, 0.35), transparent 55%);
    opacity: 0.6;
    z-index: 1;
}

.landing-page .section-about .kpi-card,
.landing-page .section-conformidade .doc-card,
.landing-page .section-contato .card,
.landing-page .section-diferenciais .card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(4px);
}

.landing-page .section-contato .contact-list__icon {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e !important;
}

.landing-page .section-contato .contact-social-link {
    background: rgba(14, 165, 233, 0.15);
    color: #2563eb;
}

.landing-page .section-contato .contact-social-link:hover {
    background: rgba(14, 165, 233, 0.25);
    color: #1d4ed8;
}

.landing-page footer {
    border-radius: 2rem 2rem 0 0;
    margin: 4rem 0 0;
    box-shadow: 0 -1.5rem 3.5rem rgba(15, 23, 42, 0.25);
}

@media (max-width: 991px) {
    .landing-page .section,
    .landing-page .section-services,
    .landing-page .section-about,
    .landing-page .section-diferenciais,
    .landing-page .section-conformidade,
    .landing-page .section-contato {
        margin: 0 0 3rem;
        border-radius: 1.5rem;
    }
}

.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: .3rem;
    width: 2px;
    background: #0d6efd;
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    width: .75rem;
    height: .75rem;
    background: #0d6efd;
    border-radius: 50%;
    left: -.05rem;
    top: .3rem;
}

.doc-card {
    border-radius: 1rem;
    border: 1px solid rgba(13, 110, 253, .15);
    background: #fff;
    padding: 1.25rem;
    height: 100%;
}

.site-footer {
    background: #031633;
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
}

.signature-link a {
    color: #66b2ff;
    font-weight: 600;
    text-decoration: none;
}

.signature-link a:hover,
.signature-link a:focus {
    color: #fff;
    text-decoration: underline;
}

.app-footer {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1030;
    pointer-events: none;
}

.app-footer__text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
    opacity: 0.8;
    pointer-events: auto;
}

.app-footer__text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.app-footer__text a:hover,
.app-footer__text a:focus {
    opacity: 0.9;
}

body.bg-dark .app-footer__text,
body.landing-page .app-footer__text,
body.dev-login .app-footer__text {
    color: rgba(226, 232, 240, 0.7);
}

@media (max-width: 575px) {
    .app-footer {
        bottom: 0.75rem;
    }

    .app-footer__text {
        font-size: 0.7rem;
        letter-spacing: 0.14em;
    }
}

@media (max-width: 575px) {
    .hero {
        padding-top: 6rem;
        min-height: 28rem;
    }

    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        display: none;
    }

    .top-nav .btn {
        margin-top: .75rem;
        width: 100%;
    }
}
