/*
    Estilos globais

    1. Estilos da barra de rolagem
*/

/* Start:: 2. Estilos da barra de rolagem */
/* Start:: 2. Estilos da barra de rolagem */
/* Start:: 2. Estilos da barra de rolagem */

/* Estiliza a barra de rolagem geral da página */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0.25rem;
    height: 0.25rem;
    -webkit-transition: all ease 0.05s;
    transition: all ease 0.05s;
    background: rgb(var(--light-rgb));
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: var(--primary05);
    -webkit-transition: background 0.3s ease;
    transition: background 0.3s ease;
}

    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover {
        background: rgb(var(--primary-rgb));
    }

/* Mantém o estilo das barras de rolagem de elementos internos */
body *::-webkit-scrollbar {
    width: 0.35rem;
    height: 0.35rem;
    -webkit-transition: all ease 0.05s;
    transition: all ease 0.05s;
    background: rgb(var(--light-rgb));
}

body *::-webkit-scrollbar-thumb {
    background: var(--primary05);
    -webkit-transition: background 0.3s ease;
    transition: background 0.3s ease;
}

    body *::-webkit-scrollbar-thumb:hover {
        background: rgb(var(--primary-rgb));
    }


.tv-scrollbar::-webkit-scrollbar,
body.tv-scrollbar *::-webkit-scrollbar {
    width: 0.7rem;
    height: 0.7rem;
}

.tv-scrollbar::-webkit-scrollbar-thumb,
body.tv-scrollbar *::-webkit-scrollbar-thumb {
    background: var(--primary05);
}

/* End:: 2. Estilos da barra de rolagem */
/* End:: 2. Estilos da barra de rolagem */
/* End:: 2. Estilos da barra de rolagem */

.pedido-itens-scroll {
    max-height: 600px;
    overflow: auto;
}

.pedido-itens-scroll .table {
    border-collapse: separate;
    border-spacing: 0;
}

.pedido-itens-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--custom-white, var(--bs-body-bg));
    box-shadow: inset 0 -1px 0 var(--default-border, var(--bs-border-color));
}

/* Home */
.home-page {
    --home-radius-lg: 1.25rem;
    --home-radius-md: 1rem;
    padding-bottom: 2rem;
}

.home-page-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: rgb(var(--primary-rgb));
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.home-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0 1.35rem;
    border-bottom: 1px solid var(--default-border);
}

.home-intro-icon {
    display: grid;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    place-items: center;
    color: rgb(var(--primary-rgb));
    background: var(--primary01);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 0.9rem;
}

.home-intro-icon i {
    font-size: 1.45rem;
}

.home-intro-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.home-intro-copy h1 {
    margin: 0;
    color: var(--default-text-color);
    font-family: "Montserrat", var(--default-font-family);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.home-intro-copy p {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.home-intro-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    color: rgb(var(--primary-rgb));
    background: var(--primary01);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.home-intro-count i {
    font-size: 1rem;
}

.home-hero {
    position: relative;
    isolation: isolate;
    min-height: 20rem;
    padding: clamp(2rem, 5vw, 3.75rem);
    overflow: hidden;
    color: var(--default-text-color);
    background: linear-gradient(115deg, var(--custom-white) 0%, var(--custom-white) 45%, rgba(var(--primary-rgb), 0.11) 100%);
    border: 1px solid var(--default-border);
    border-radius: var(--home-radius-lg);
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.06);
}

.home-hero::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.3rem;
    background: linear-gradient(180deg, rgb(var(--primary-rgb)), rgb(var(--secondary-rgb)));
    content: "";
}

.home-hero-glow {
    position: absolute;
    z-index: -1;
    top: -8rem;
    right: -6rem;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.18), transparent 68%);
    border-radius: 50%;
    pointer-events: none;
}

.home-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.15rem;
    padding: 0.45rem 0.75rem;
    color: rgb(var(--primary-rgb));
    background: var(--primary01);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.home-hero-kicker i {
    font-size: 1rem;
}

.home-hero-title {
    max-width: 39rem;
    margin-bottom: 1rem;
    color: var(--default-text-color);
    font-family: "Montserrat", var(--default-font-family);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.home-hero-title span {
    color: rgb(var(--primary-rgb));
}

.home-hero-description {
    max-width: 36rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.home-hero-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.home-hero-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.home-hero-details i {
    color: rgb(var(--primary-rgb));
    font-size: 1.05rem;
}

.home-hero-map {
    position: relative;
    width: min(100%, 28rem);
    height: 14rem;
    margin-left: auto;
}

.home-hero-map::before,
.home-hero-map::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.home-hero-map::before {
    inset: 1.25rem 2.25rem;
    border: 1px dashed rgba(var(--primary-rgb), 0.28);
    border-radius: 50%;
    transform: rotate(-7deg);
}

.home-hero-map::after {
    top: 50%;
    left: 50%;
    width: 6.5rem;
    height: 6.5rem;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.home-hero-hub {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transform: translate(-50%, -50%);
}

.home-hero-hub span {
    display: grid;
    width: 4.25rem;
    height: 4.25rem;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, rgb(var(--primary-rgb)), rgb(var(--secondary-rgb)));
    border: 0.35rem solid var(--custom-white);
    border-radius: 1.25rem;
    box-shadow: 0 0.9rem 2rem rgba(var(--primary-rgb), 0.25);
    transform: rotate(-6deg);
}

.home-hero-hub i {
    font-size: 1.75rem;
    transform: rotate(6deg);
}

.home-hero-hub small {
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero-route {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 8.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--custom-white);
    border: 1px solid var(--default-border);
    border-radius: 0.85rem;
    box-shadow: 0 0.7rem 1.6rem rgba(15, 23, 42, 0.09);
}

.home-hero-route:nth-child(2) {
    top: 0;
    right: 1rem;
}

.home-hero-route:nth-child(3) {
    right: 0;
    bottom: 0.25rem;
}

.home-hero-route:nth-child(4) {
    bottom: 0;
    left: 0.5rem;
}

.home-hero-route:nth-child(5) {
    top: 0.5rem;
    left: 0;
}

.home-route-icon {
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.65rem;
}

.home-route-icon i {
    font-size: 1.15rem;
}

.home-hero-route strong {
    overflow: hidden;
    color: var(--default-text-color);
    font-size: 0.72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-access-section {
    padding-top: 1.5rem;
}

.home-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.home-section-heading h2 {
    margin: 0;
    color: var(--default-text-color);
    font-family: "Montserrat", var(--default-font-family);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.home-section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.home-feature-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 8.5rem;
    padding: 1.35rem;
    overflow: hidden;
    color: inherit;
    background: var(--custom-white);
    border: 1px solid var(--default-border);
    border-radius: var(--home-radius-md);
    box-shadow: 0 0.45rem 1.2rem rgba(15, 23, 42, 0.035);
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-feature-card::after {
    position: absolute;
    right: -2.25rem;
    bottom: -3.5rem;
    width: 7.5rem;
    height: 7.5rem;
    background: radial-gradient(circle, var(--primary01), transparent 68%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.home-feature-card:hover {
    color: inherit;
    border-color: rgba(var(--primary-rgb), 0.28);
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.09);
    transform: translateY(-0.25rem);
}

.home-feature-card:focus-visible {
    outline: 0.18rem solid rgba(var(--primary-rgb), 0.34);
    outline-offset: 0.2rem;
}

.home-feature-icon {
    display: grid;
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 0.95rem;
    transition: transform 180ms ease;
}

.home-feature-card:hover .home-feature-icon {
    transform: scale(1.06) rotate(-3deg);
}

.home-feature-icon i {
    font-size: 1.55rem;
}

.home-feature-content {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.35rem;
}

.home-feature-content strong {
    color: var(--default-text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.home-feature-content > span {
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.home-feature-arrow {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: rgb(var(--primary-rgb));
    background: var(--primary01);
    border-radius: 50%;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.home-feature-card:hover .home-feature-arrow {
    color: #fff;
    background: rgb(var(--primary-rgb));
    transform: translateX(0.2rem);
}

.home-feature-arrow i {
    font-size: 1.2rem;
}

.home-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--custom-white);
    border: 1px dashed rgba(var(--warning-rgb), 0.45);
    border-radius: var(--home-radius-md);
}

.home-empty-icon {
    display: grid;
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    color: rgb(var(--warning-rgb));
    background: rgba(var(--warning-rgb), 0.12);
    border-radius: 0.95rem;
}

.home-empty-icon i {
    font-size: 1.5rem;
}

.home-empty-state h3 {
    margin-bottom: 0.25rem;
    color: var(--default-text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.home-empty-state p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

@media (max-width: 767.98px) {
    .home-intro {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-top: 1.25rem;
    }

    .home-intro-count {
        margin-left: 4rem;
    }

    .home-hero {
        min-height: auto;
        padding: 2rem 1.4rem;
    }

    .home-hero-title br {
        display: none;
    }

    .home-section-heading {
        align-items: start;
        flex-direction: column;
    }

    .home-section-heading p {
        margin-top: -0.5rem;
    }
}

@media (max-width: 575.98px) {
    .home-intro-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    .home-intro-count {
        margin-left: 3.75rem;
    }

    .home-feature-card {
        min-height: 7.75rem;
        padding: 1.15rem;
    }

    .home-feature-arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-feature-card,
    .home-feature-icon,
    .home-feature-arrow {
        transition: none;
    }
}

/* Home - Portal do Cliente */
.home-portal {
    --home-portal-radius: 0.9rem;
    width: 100%;
    max-width: 112rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 3.25rem) clamp(1.25rem, 2.5vw, 2.75rem) clamp(3rem, 7vh, 5.5rem);
}

.home-portal-brand {
    min-height: 10.5rem;
    padding: clamp(2rem, 3vw, 2.75rem) clamp(1.75rem, 3vw, 3rem);
    color: #fff;
    background: rgb(var(--primary-rgb));
    border-radius: 1.25rem 1.25rem 0 0;
}

.home-portal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-portal-kicker i { font-size: 1rem; }

.home-portal-brand h1 {
    margin: 0;
    color: #fff;
    font-family: "Montserrat", var(--default-font-family);
    font-size: clamp(1.55rem, 2.35vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.home-portal-panel {
    position: relative;
    margin-top: -1.25rem;
    padding: clamp(1.25rem, 1.8vw, 1.75rem);
    background: var(--custom-white);
    border: 1px solid var(--default-border);
    border-radius: var(--home-portal-radius);
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.08);
}

.home-portal-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.home-portal-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: rgb(var(--primary-rgb));
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-theme-mode="dark"] .home-portal-eyebrow { color: rgba(255, 255, 255, 0.78); }

.home-portal-heading h2 {
    margin: 0;
    color: var(--default-text-color);
    font-family: "Montserrat", var(--default-font-family);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.home-portal-heading > small {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.home-portal-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-portal-item {
    display: flex;
    min-height: 7.25rem;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    color: inherit;
    background: rgb(var(--light-rgb));
    border: 1px solid transparent;
    border-radius: 0.85rem;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-portal-item:hover {
    color: inherit;
    background: var(--custom-white);
    border-color: rgba(var(--primary-rgb), 0.25);
    transform: translateY(-0.12rem);
}

.home-portal-item:focus-visible {
    outline: 0.18rem solid rgba(var(--primary-rgb), 0.36);
    outline-offset: 0.18rem;
}

.home-portal-icon {
    display: grid;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border-radius: 0.75rem;
}

.home-portal-icon i { font-size: 1.15rem; }

.home-portal-copy {
    min-width: 0;
    flex: 1;
}

.home-portal-copy strong,
.home-portal-copy small { display: block; }

.home-portal-copy strong {
    color: var(--default-text-color);
    font-size: 0.86rem;
    font-weight: 600;
}

.home-portal-copy small {
    margin-top: 0.24rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.5;
}

.home-portal-arrow {
    flex: 0 0 auto;
    color: var(--text-muted);
}

.home-portal-permissions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    color: var(--text-muted);
    border-top: 1px solid var(--default-border);
    font-size: 0.68rem;
}

.home-portal-permissions i {
    color: rgb(var(--primary-rgb));
    font-size: 0.95rem;
}

.home-portal-empty {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    color: var(--text-muted);
    background: rgb(var(--light-rgb));
    border-radius: 0.75rem;
}

.home-portal-empty > i {
    color: rgb(var(--primary-rgb));
    font-size: 1.4rem;
}

.home-portal-empty h3 {
    margin: 0 0 0.2rem;
    color: var(--default-text-color);
    font-size: 0.82rem;
}

.home-portal-empty p {
    margin: 0;
    font-size: 0.68rem;
}

@media (max-width: 991.98px) {
    .home-portal { padding-inline: 1.25rem; }
    .home-portal-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .home-portal {
        padding: 1rem 0.65rem 2.5rem;
    }

    .home-portal-brand {
        min-height: 8.5rem;
        padding: 1.5rem 1.25rem;
    }

    .home-portal-panel {
        margin-top: -0.75rem;
        padding: 1rem;
    }
    .home-portal-heading { align-items: flex-start; flex-direction: column; }
    .home-portal-items { grid-template-columns: 1fr; }
    .home-portal-item { min-height: 6.25rem; padding: 0.9rem; }
}

@media (min-width: 1600px) and (min-height: 850px) {
    .home-portal-brand { min-height: 11.5rem; }
    .home-portal-item { min-height: 8.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .home-portal-item { transition: none; }
}

/* Logo do sidebar: limita largura sem alterar logos com proporção normal.
   Logos muito horizontais (ex.: Erva Daninha 295x26) estouravam com height: 2rem fixo. */
.app-sidebar .main-sidebar-header .header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
}

.app-sidebar .main-sidebar-header .header-logo img {
    max-width: 100%;
    max-height: 2rem;
    width: auto;
    height: auto;
    object-fit: contain;
}
