:root {
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --primary-100: #c4d8f3;
    --primary-500: #1C519B;
    --primary-700: #173e77;
    --primary-900: #102144;
    --secondary-500: #1a3560;
    --error-500: #dd4b39;
    --error-700: #962b1c;
    --page: #fff;
    --container: #f2f2f2;
    --header: #ffffff;
    --footer: var(--secondary-500);
    --text-color: var(--gray-900);
    --text-header: var(--gray-700);
    --text-footer: var(--gray-100);
    --color-footer: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: "Libre Franklin", "Roboto", sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
}

#box-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background-color: var(--container);
}

/* ===== HEADER ===== */
.box-header {
    background-color: var(--header);
    color: var(--text-header);
    min-height: 1.875rem;
    position: relative;
}

/*noinspection CssUnusedSymbol*/
.box-header.header-desenvol {
    --header: #d32f2f;
    --text-header: #fff;
    --primary-100: rgba(255, 255, 255, 0.15);
    --primary-700: #fff;
    --primary-900: #fff;
}

/*noinspection CssUnusedSymbol*/
.box-header.header-aceite {
    --header: #388e3c;
    --text-header: #fff;
    --primary-100: rgba(255, 255, 255, 0.15);
    --primary-700: #fff;
    --primary-900: #fff;
}

.ambiente-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 0.75rem;
    vertical-align: middle;
}

.box-header>.container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.container {
    max-width: 1275px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.box-logo {
    height: 60px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.box-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.box-logo img {
    width: auto;
    max-height: 40px;
}

.box-header-right {
    display: flex;
    padding: 0 0 0 15px;
    align-items: center;
}

.language-selector {
    display: flex;
    gap: 10px;
    margin-right: 15px;
    position: relative;
}

.flag-button {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--primary-700);
}


.flag-icon {
    display: inline-flex;
    align-items: center;
}

.flag-icon svg {
    width: 24px;
    height: 24px;
}

.arrow-icon {
    font-size: 0.7em;
    margin-left: 2px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.8s ease;
}

/*noinspection CssUnusedSymbol*/
.arrow-icon.rotate {
    transform: rotate(180deg);
}

.language-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 180px;
    z-index: 2000;
    list-style: none;
}

/*noinspection CssUnusedSymbol*/
.language-menu.open {
    display: block;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
    background: transparent;
    color: #212529;
}

.language-item:hover,
.language-item.active {
    background: rgba(0, 123, 255, 0.06);
}

.language-item svg {
    width: 24px;
    height: 24px;
}

.menu-links {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.menu-links a {
    color: var(--primary-700);
    text-decoration: none;
    padding: 8px 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}

.menu-links a:hover {
    color: var(--primary-900);
}

.menu-links svg {
    flex-shrink: 0;
}

/* ===== CONTEÚDO CENTRAL ===== */
#box-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--container);
    padding: 2rem 1rem;
}

/* ===== CARD DE ERRO ===== */
.error-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.error-icon {
    color: var(--error-500);
    font-size: 56px;
    margin-bottom: 1rem;
}

.error-title {
    font-family: "Roboto", sans-serif;
    color: var(--error-700);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-contact {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.8;
}

.error-contact strong {
    color: var(--primary-500);
    font-size: 1rem;
}

.btn-voltar {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.8rem;
    background-color: var(--primary-500);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.btn-voltar:hover {
    background-color: var(--primary-700);
}

/* ===== FOOTER ===== */
.box-footer {
    background-color: var(--footer);
    color: var(--text-footer);
    padding: 30px 15px 20px 15px;
    flex-shrink: 0;
}

.box-footer-bottom {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 15px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 60%;
    gap: 20px;
}

.footer-left svg {
    width: 100%;
    max-width: 260px;
    height: 40px;
}

.footer-mission {
    font-size: 14px;
    color: var(--text-footer);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    text-align: right;
    gap: 20px;
}

.social-title {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffc72e;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons a {
    color: var(--color-footer);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.social-icons a svg {
    width: 26px;
    height: 26px;
}

.social-icons a:hover {
    opacity: 0.7;
}

/* ===== TOOLTIP ===== */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-text {
    visibility: hidden;
    background-color: var(--gray-800);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: pre-line;
    font-size: 0.8rem;
    line-height: 1.4;
    min-width: 220px;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--gray-800) transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== RESPONSIVO ===== */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: 8px;
    color: var(--primary-700);
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-menu-btn:hover {
    border-color: var(--primary-100);
    background-color: var(--primary-100);
}

.mobile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 200px;
    z-index: 2000;
    list-style: none;
}

/*noinspection CssUnusedSymbol*/
.mobile-menu.open {
    display: block;
}

.mobile-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    color: #1C519B;
    text-decoration: none;
    font-size: 16px;
}

.mobile-menu a:hover {
    background: rgba(0, 123, 255, 0.06);
    color: #173e77;
}

.logo-full {
    display: inline;
}

.logo-simple {
    display: none;
}

@media (max-width: 992px) {
    .menu-links {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .logo-full {
        display: none;
    }

    .logo-simple {
        display: inline;
    }
}

@media (max-width: 768px) {
    .box-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding-top: 16px;
        padding-bottom: 10px;
    }

    .footer-left,
    .footer-right {
        align-items: center;
        text-align: center;
        max-width: 100%;
        width: 100%;
    }

    .footer-right {
        margin-top: 0;
        justify-content: center;
    }

    .social-icons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .box-footer {
        padding: 24px 12px 16px;
    }

    .footer-left svg {
        max-width: 220px;
        height: auto;
    }

    .error-card {
        padding: 1.5rem 1rem;
    }

    .box-logo img {
        max-height: 30px;
    }
}

@media (max-width: 480px) {
    .box-footer {
        padding: 20px 10px 14px;
    }

    .box-footer-bottom {
        gap: 12px;
        padding-top: 14px;
    }

    .error-card {
        padding: 1.2rem 0.8rem;
    }

    .error-title {
        font-size: 1.1rem;
    }

    .social-icons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-left svg {
        max-width: 180px;
    }
}

