@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
    --pf-ink: #10212b;
    --pf-muted: #647481;
    --pf-line: #dbe7ea;
    --pf-soft: #f3faf9;
    --pf-teal: #04766d;
    --pf-coral: #ff6b4a;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(219, 231, 234, .82);
    box-shadow: 0 14px 40px rgba(16, 33, 43, .06);
    backdrop-filter: blur(18px);
    font-family: "Poppins", Arial, sans-serif;
}

body:has(.public-header) {
    display: block;
    place-items: initial;
    padding: 0;
}

body:has(.public-header) .login-container {
    margin: 32px auto 56px;
}

.public-header *,
.public-header *::before,
.public-header *::after {
    box-sizing: border-box;
}

.public-header a {
    color: inherit;
    text-decoration: none;
}

.public-header .container {
    width: min(1280px, calc(100% - 32px));
    min-height: 82px;
    display: grid;
    grid-template-columns: 154px minmax(220px, 330px) minmax(0, 1fr) max-content;
    gap: 16px;
    align-items: center;
    margin-inline: auto;
}

.public-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pf-ink);
    font-weight: 800;
    white-space: nowrap;
}

.public-header .logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(4, 118, 109, .18));
}

.public-header .logo-text {
    font-size: 1.28rem;
    letter-spacing: 0;
}

.public-header .search-form {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(4, 118, 109, .18);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
    box-shadow: 0 12px 30px rgba(16, 33, 43, .08);
}

.public-header .search-form:focus-within {
    border-color: rgba(4, 118, 109, .46);
    box-shadow: 0 0 0 4px rgba(4, 118, 109, .10), 0 16px 34px rgba(16, 33, 43, .10);
}

.public-header .form-control {
    width: 100%;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    padding: 0 14px 0 17px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--pf-ink);
    font: inherit;
    line-height: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-header .form-control::placeholder {
    color: #4f6470;
    opacity: 1;
}

.public-header .search-button {
    width: 52px;
    min-width: 52px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pf-teal), #11a796);
    cursor: pointer;
    font-size: 0;
}

.public-header .search-button::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.public-header .menu {
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
    padding-left: 8px;
}

.public-header .menu-list {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-header .menu-item {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.public-header .menu-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: #425460;
    font-size: .84rem;
    font-weight: 700;
}

.public-header .menu-link:hover,
.public-header .menu-link.active {
    color: var(--pf-teal);
}

.public-header .menu-login-item,
.public-header .menu-actions-item {
    display: none;
}

.public-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    width: max-content;
    white-space: nowrap;
}

.public-header .btn {
    min-width: 68px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 13px;
    background: linear-gradient(135deg, var(--pf-teal), #12a594);
    color: #ffffff;
    font-size: .88rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(4, 118, 109, .18);
}

.public-header .btn.is-authenticated {
    max-width: 88px;
    min-width: 74px;
    overflow: hidden;
    border-color: rgba(4, 118, 109, .18);
    background: #e6f6f3;
    color: var(--pf-teal);
    text-overflow: ellipsis;
    box-shadow: none;
}

.public-header .public-logout-link {
    min-width: 52px;
    padding-inline: 12px;
    border-color: rgba(4, 118, 109, .14);
    background: #ffffff;
    color: #425460;
    box-shadow: 0 10px 22px rgba(16, 33, 43, .06);
}

.public-header .icon-badge {
    position: relative;
    width: 38px;
    min-width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(4, 118, 109, .14);
    border-radius: 12px;
    background: #ffffff;
    color: var(--pf-ink);
    font-size: 0;
    box-shadow: 0 10px 24px rgba(16, 33, 43, .06);
}

.public-header .header-actions .icon-badge:nth-child(2) {
    border-color: rgba(4, 118, 109, .28);
    background: linear-gradient(135deg, var(--pf-teal), #12a594);
    color: #ffffff;
}

.public-header .icon-badge i {
    color: currentColor;
    font-size: 16px;
    line-height: 1;
}

.public-header .icon-badge.has-count::after,
.public-header .menu-action-link.has-count::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--pf-coral);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.public-header .customer-notification-button[hidden] {
    display: none !important;
}

.public-header .menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border: 1px solid rgba(4, 118, 109, .14);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbfa 100%);
    color: var(--pf-ink);
    cursor: pointer;
}

.public-header .menu-toggle::before {
    content: "\f0c9";
    font-family: "Font Awesome 6 Free";
    font-size: 18px;
    font-weight: 900;
}

.public-header .menu-toggle[aria-expanded="true"]::before {
    content: "\f00d";
}

.public-header .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .public-header .container {
        grid-template-columns: auto 1fr auto;
    }

    .public-header .search-form {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .public-header .header-actions {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .public-header .menu {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        overflow-x: auto;
    }
}

@media (max-width: 820px) {
    .public-header .container {
        grid-template-columns: auto 1fr auto;
        min-height: auto;
        padding: 12px 0;
    }

    .public-header .menu {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-height: 0;
        display: block;
        overflow: hidden;
        padding-left: 0;
        transition: max-height .24s ease, padding-top .24s ease;
    }

    .public-header .menu.active {
        max-height: 440px;
        padding-top: 10px;
    }

    .public-header .menu-list {
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid rgba(4, 118, 109, .14);
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 16px 38px rgba(16, 33, 43, .10);
    }

    .public-header .menu-link {
        width: 100%;
        justify-content: flex-start;
        min-height: 48px;
        padding: 0 14px;
        border-radius: 8px;
        font-size: 1rem;
    }

    .public-header .menu-login-item {
        display: block;
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px solid var(--pf-line);
    }

    .public-header .menu-login-link {
        justify-content: center;
        background: linear-gradient(135deg, var(--pf-teal), #12a594);
        color: #ffffff;
        box-shadow: 0 14px 30px rgba(4, 118, 109, .20);
    }

    .public-header .menu-login-link.is-authenticated {
        background: #e6f6f3;
        color: var(--pf-teal);
        box-shadow: none;
    }

    .public-header .menu-login-item .public-logout-link {
        justify-content: center;
        border: 1px solid rgba(4, 118, 109, .14);
        background: #ffffff;
        color: #425460;
        box-shadow: 0 8px 18px rgba(16, 33, 43, .05);
    }

    .public-header .menu-actions-item {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding-top: 10px;
    }

    .public-header .menu-action-link {
        position: relative;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(4, 118, 109, .16);
        border-radius: 8px;
        background: #f7fbfa;
        color: var(--pf-ink);
        font-size: .9rem;
        font-weight: 800;
    }

    .public-header .menu-actions-item .menu-action-link:nth-child(2) {
        border-color: rgba(4, 118, 109, .30);
        background: linear-gradient(135deg, var(--pf-teal), #12a594);
        color: #ffffff;
    }

    .public-header .menu-toggle {
        display: grid;
    }

    .public-header .header-actions .btn {
        display: none;
    }
}

@media (max-width: 560px) {
    .public-header .container {
        width: min(100% - 22px, 1180px);
        gap: 10px;
    }

    .public-header .search-form {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 100%;
    }

    .public-header .menu {
        grid-row: 3;
    }

    .public-header .logo-text {
        font-size: 1.08rem;
    }

    .public-header .logo img {
        width: 48px;
        height: 48px;
    }

    .public-header .header-actions {
        gap: 8px;
    }

    .public-header .icon-badge,
    .public-header .menu-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}

/* Renovação visual — 29/10/2026. Os seletores e estados do cabeçalho são preservados. */
.public-header {
    background: #ffffff;
    border-bottom-color: #e7eeec;
    box-shadow: 0 3px 16px rgba(16, 33, 43, .035);
    backdrop-filter: none;
}

.public-header .container {
    width: min(1280px, calc(100% - 64px));
    min-height: 0;
    grid-template-columns: 180px minmax(240px, 1fr) max-content;
    grid-template-areas: "brand search actions" "nav nav nav";
    gap: 0 32px;
    padding: 12px 0 0;
}

.public-header .logo {
    grid-area: brand;
    gap: 9px;
    min-height: 54px;
}

.public-header .logo img {
    width: 48px;
    height: 48px;
    filter: none;
}

.public-header .logo-text {
    color: #13372f;
    font-size: 1.46rem;
    font-weight: 800;
    letter-spacing: -.055em;
}

.public-header .search-form {
    grid-area: search;
    min-width: 0;
    border-color: #e1e8e5;
    border-radius: 8px;
    background: #f7f9f8;
    box-shadow: inset 0 1px 2px rgba(16, 33, 43, .025);
}

.public-header .search-form:focus-within {
    border-color: var(--pf-teal);
    box-shadow: 0 0 0 3px rgba(4, 118, 109, .10);
}

.public-header .search-form .form-control {
    min-height: 44px;
    height: 44px;
    padding-left: 15px;
    line-height: 44px;
    font-size: .8rem;
}

.public-header .search-form .form-control::placeholder {
    color: #75847e;
}

.public-header .search-button {
    position: relative;
    width: 46px;
    min-width: 46px;
    height: 44px;
    border-radius: 0 7px 7px 0;
    background: var(--pf-teal);
}

.public-header .search-button::before {
    content: "";
    width: 13px;
    height: 13px;
    margin: -3px 0 0 -3px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.public-header .search-button::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    top: 27px;
    left: 26px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.public-header .header-actions {
    grid-area: actions;
    gap: 12px;
    padding-left: 4px;
}

.public-header .header-actions .btn {
    gap: 7px;
    min-height: 42px;
    border-color: #e0ebe7;
    border-radius: 7px;
    background: #ffffff;
    color: var(--pf-teal);
    padding: 0 13px;
    font-size: .8rem;
    font-weight: 600;
    box-shadow: none;
}

.public-header .header-actions .btn-primary::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free";
    font-size: 15px;
    font-weight: 400;
}

.public-header .header-actions .btn.is-authenticated {
    max-width: 140px;
    background: #f0f7f4;
}

.public-header .header-actions .public-logout-link {
    min-width: auto;
    padding-inline: 7px;
    border-color: transparent;
    color: var(--pf-muted);
    font-size: .74rem;
}

.public-header .icon-badge,
.public-header .header-actions .icon-badge:nth-child(2) {
    width: 40px;
    min-width: 40px;
    height: 42px;
    flex-basis: 40px;
    border-color: transparent;
    border-radius: 7px;
    background: transparent;
    color: #213d35;
    box-shadow: none;
}

.public-header .icon-badge i,
.public-header .header-actions .icon-badge i {
    color: currentColor;
    font-size: 19px;
}

.public-header .icon-badge.has-count::after {
    top: 0;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid #fff;
    font-size: 9px;
}

.public-header .menu {
    grid-area: nav;
    width: 100%;
    margin-top: 9px;
    padding: 0;
    border-top: 1px solid #f0f3f1;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d5e4dc transparent;
    justify-content: flex-start;
}

.public-header .menu-list {
    width: max-content;
    min-width: 100%;
    justify-content: space-between;
    gap: clamp(8px, 1.7vw, 26px);
}

.public-header .menu-link {
    position: relative;
    min-height: 43px;
    padding: 0 2px;
    color: #31463e;
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}

.public-header .menu-link.active::after {
    content: "";
    position: absolute;
    height: 2px;
    right: 2px;
    bottom: 0;
    left: 2px;
    border-radius: 2px;
    background: var(--pf-teal);
}

.public-header .menu-toggle {
    border-color: transparent;
    border-radius: 7px;
    background: transparent;
    color: #213d35;
}

.public-header .menu-toggle::before {
    content: "☰";
    font: 24px/1 Arial, sans-serif;
}

.public-header .menu-toggle[aria-expanded="true"]::before {
    content: "×";
    font-size: 30px;
}

.public-header :is(a, button):focus-visible {
    outline: 3px solid var(--pf-coral);
    outline-offset: 3px;
}

@media (hover: hover) {
    .public-header .icon-badge:hover,
    .public-header .menu-toggle:hover,
    .public-header .header-actions .btn:hover {
        background: #edf6f2;
        color: var(--pf-teal);
    }
    .public-header .search-button:hover {
        background: #045a54;
    }
}

@media (max-width: 1050px) and (min-width: 821px) {
    .public-header .container {
        width: calc(100% - 40px);
        grid-template-columns: 165px minmax(180px, 1fr) max-content;
        gap: 0 20px;
    }
    .public-header .header-actions { gap: 5px; }
    .public-header .menu-list { gap: 19px; }
}

@media (max-width: 820px) {
    .public-header .container {
        width: calc(100% - 32px);
        grid-template-columns: minmax(0, 1fr) max-content;
        grid-template-areas: "brand actions" "search search" "nav nav";
        gap: 8px 12px;
        padding: 8px 0 10px;
    }
    .public-header .logo { min-height: 44px; gap: 6px; }
    .public-header .logo img { width: 42px; height: 42px; }
    .public-header .logo-text { font-size: 1.3rem; }
    .public-header .header-actions { gap: 3px; padding-left: 0; }
    .public-header .icon-badge,
    .public-header .header-actions .icon-badge:nth-child(2),
    .public-header .menu-toggle {
        width: 38px;
        min-width: 38px;
        height: 40px;
        flex-basis: 38px;
    }
    .public-header .header-actions .btn { display: none; }
    .public-header .search-form { min-width: 0; }
    .public-header .search-form .form-control { font-size: .76rem; }
    .public-header .menu {
        display: block;
        max-height: 0;
        margin: -8px 0 0;
        padding: 0;
        border: 0;
        overflow: hidden;
    }
    .public-header .menu.active {
        max-height: min(68dvh, 600px);
        margin-top: 0;
        padding: 4px 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .public-header .menu-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 4px 8px;
        padding: 10px;
        border-color: #e4ece8;
        border-radius: 8px;
        box-shadow: none;
    }
    .public-header .menu-item:not(.menu-category-item) { grid-column: 1 / -1; }
    .public-header .menu-link { min-height: 44px; padding: 0 12px; font-size: .84rem; }
    .public-header .menu-link.active { background: #edf6f2; }
    .public-header .menu-link.active::after { display: none; }
    .public-header .menu-login-item { margin-top: 5px; padding-top: 8px; }
    .public-header .menu-login-link { background: var(--pf-teal); color: #fff; box-shadow: none; }
    .public-header .menu-login-link.is-authenticated { color: var(--pf-teal); }
    .public-header .menu-actions-item { padding-top: 5px; }
    .public-header .menu-action-link { font-size: .8rem; font-weight: 600; }
    .public-header .menu-toggle { display: grid; }
}

@media (max-width: 380px) {
    .public-header .container { width: calc(100% - 24px); gap: 8px 4px; }
    .public-header .logo img { width: 35px; height: 38px; }
    .public-header .logo-text { font-size: 1.1rem; }
    .public-header .header-actions { gap: 0; }
    .public-header .icon-badge,
    .public-header .header-actions .icon-badge:nth-child(2),
    .public-header .menu-toggle { width: 35px; min-width: 35px; flex-basis: 35px; }
}

@media (prefers-reduced-motion: reduce) {
    .public-header .menu { transition: none; }
}
