:root {
    --sidebar-width: 272px;
    --header-height: 73px;
    --content-max-width: 1900px;
    --bg-color: #F5F5F5;
    --bg-color: #F7F8F8;
    --bg-color: #F4F6F9;
    --bg-color: #F7F8F8;
    --bg-color: #F4F6F9;
    --bg-light: #F9FAF8;
    --primary-50: #F0FAFB;
    --primary-100: #D9F1F4;
    --primary-200: #B8E3E9;
    --primary-300: #87CED9;
    --primary-400: #69BCCB;
    --primary-500: #3394A7;
    --primary-600: #2D788D;
    --primary-700: #2A6274;
    --primary-800: #2A5260;
    --primary-900: #274552;
    --primary-950: #152C37;
    --gray-50: #F6F6F6;
    --gray-100: #E7E7E7;
    --gray-200: #D1D1D1;
    --gray-300: #B0B0B0;
    --gray-400: #888888;
    --gray-500: #6D6D6D;
    --gray-600: #5D5D5D;
    --gray-700: #4F4F4F;
    --gray-800: #454545;
    --gray-900: #3D3D3D;
    --gray-950: #111111;
    --text-danger: #E02E2A;
    --text-danger-hover:#ba2623;
    --text-success: rgb(22, 163, 74);
    --font-medium: 500;
    --font-semibold: 600;
    --table-border-color: var(--gray-100);
    --sidebar-bg-color: white;
    --sidebar-logo-bb-color: var(--gray-100);
    --sidebar-nav-item-hover-bg-color: var(--gray-100);
    --sidebar-nav-item-active-bg-color: var(--primary-100);
    --sidebar-nav-item-active-color: var(--primary-700);
    --sidebar-nav-item-active-font-weight: 600;
    --sidebar-nav-link-font-weight: normal;
    --sidebar-nav-link-color: var(--gray-950);
    --sidebar-nav-link-svg-color: var(--primary-700);
    --sidebar-nav-link-active-svg-color: var(--primary-700);
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-style: normal;
    height: 100vh;
    background-color: var(--bg-color);
    background-color: lightgray;
    background-color: rgb(245, 247, 249);
}

@view-transition {
  navigation: auto;
}

.text-primary {
    color: var(--primary-600)
}

.text-primary-50 {
    color: var(--primary-50)
}

.text-primary-100 {
    color: var(--primary-100)
}

.text-primary-200 {
    color: var(--primary-200)
}

.text-primary-300 {
    color: var(--primary-300)
}

.text-primary-400 {
    color: var(--primary-400)
}

.text-primary-500 {
    color: var(--primary-500)
}

.text-primary-600 {
    color: var(--primary-600)
}

.text-primary-700 {
    color: var(--primary-700)
}

.text-primary-800 {
    color: var(--primary-800)
}

.text-primary-900 {
    color: var(--primary-900)
}

.text-primary-950 {
    color: var(--primary-950)
}

.text-gray-50 {
    color: var(--gray-50);
}

.text-gray-100 {
    color: var(--gray-100);
}

.text-gray-200 {
    color: var(--gray-200);
}

.text-gray-300 {
    color: var(--gray-300);
}

.text-gray-400 {
    color: var(--gray-400);
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-gray-700 {
    color: var(--gray-700);
}

.text-gray-800 {
    color: var(--gray-800);
}

.text-gray-900 {
    color: var(--gray-900);
}

.text-gray-950 {
    color: var(--gray-950);
}

.text-black {
    color: black;
}

.text-secondary {
    color: var(--gray-500);
}

.text-success {
    color: var(--text-success);
}

.text-danger {
    color: var(--text-danger);
}

.bg-lightgray {
    background-color: lightgray;
}

.bg-color {
    background-color: var(--bg-color);
}

.bg-primary-50 {
    background-color: var(--primary-50);
}

.bg-primary-100 {
    background-color: var(--primary-100);
}

.bg-primary-200 {
    background-color: var(--primary-200);
}

.bg-primary-300 {
    background-color: var(--primary-300);
}

.bg-primary-400 {
    background-color: var(--primary-400);
}

.bg-primary-500 {
    background-color: var(--primary-500);
}

.bg-primary-600 {
    background-color: var(--primary-600);
}

.bg-primary-700 {
    background-color: var(--primary-700);
}

.bg-primary-800 {
    background-color: var(--primary-800);
}

.bg-primary-900 {
    background-color: var(--primary-900);
}

.bg-primary-950 {
    background-color: var(--primary-950);
}

.bg-gray-50 {
    background-color: var(--gray-50);
}

.bg-gray-100 {
    background-color: var(--gray-100);
}

.bg-gray-200 {
    background-color: var(--gray-200);
}

.bg-gray-300 {
    background-color: var(--gray-300);
}

.bg-gray-400 {
    background-color: var(--gray-400);
}

.bg-gray-500 {
    background-color: var(--gray-500);
}

.bg-gray-600 {
    background-color: var(--gray-600);
}

.bg-gray-700 {
    background-color: var(--gray-700);
}

.bg-gray-800 {
    background-color: var(--gray-800);
}

.bg-gray-900 {
    background-color: var(--gray-900);
}

.bg-gray-950 {
    background-color: var(--gray-950);
}

.bg-success {
    background-color: var(--text-success);
}
.bg-light {
    background-color: var(--bg-light);
}

.border-gray-100 {
    border: 1px solid var(--gray-100) !important;
}

.login-card {
    width: 95vw;
    max-width: 480px;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.login-error-card {
    width: 95vw;
    max-width: 480px;
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-color);
    color: #CC3333;
    color: var(--text-danger);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.login-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;

    > img {
        width: 72px;
        margin-bottom: 0.375rem;
    }
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;

    .eye-closed {
        display: block;
    }
    
    .eye-open {
        display: none;
    }

    &.active {
        .eye-open {
            display: block;
        }
    
        .eye-closed {
            display: none;
        }
    }
}

/* "Lembrar de min" e "Esqueceu a senha?" */
.login-card-options {
    display: flex;
    justify-content: space-between;
    padding: 0rem 1rem;

    input[type="checkbox"] {
        accent-color: var(--primary-600);
        margin-right: 0.5rem;
        width: 1.2rem;
    }

    a {
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-600);
    color: white;
    font-weight: var(--font-semibold);
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;

    &:hover,
    &:focus {
        background-color: var(--primary-700);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /*0 4px 10px rgba(0, 0, 0, 0.15);*/
        outline: none;   
    }

    /* Clique (ativo) */
    &:active {
        transform: translateY(1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Botão desabilitado */
    &:disabled,
    &.disabled {
        cursor: not-allowed;
        opacity: 0.7;
        box-shadow: none;    
    }

    svg {
        margin-right: 0.5rem;
    }
}

.btn-inactive {
    opacity: 0.7;
    box-shadow: none;
}

.btn-secondary {
    background-color: rgb(108, 117, 125);
    color: white;

    &:hover,
    &:focus {
        background-color: #5c636a;
        outline: none;
    }
}

.btn-danger {
    background-color: var(--text-danger);
    color: white;

    &:hover,
    &:focus {
        background-color: var(--text-danger-hover);
        outline: none;
    }
}

.btn-sm {
    border-radius: 6px;
    padding: 0.25rem 0.625rem;
    font-size: var(--text-1);
    line-height: var(--text-1--line-height);
}

.btn-md {
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 16px;
}

.btn-lg {
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    background-color: inherit;

    &:hover,
    &:focus {
        outline: none;    
    }

    &:active {
        transform: translateY(1px);
    }
    
    &.disabled,
    &:disabled {
        cursor: not-allowed;
        opacity: 0.6;
        box-shadow: none;
        transform: none;
    }
}

.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: inherit;
    color: var(--gray-950);
    padding: 0;
    margin: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    opacity: 0.7;

    &:focus,
    &:hover {
        opacity: 1;    
    }

    &.disabled,
    &:disabled {
        cursor: not-allowed;
        transform: none;
    }
}

.btn-icon-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    background-color: var(--primary-600);
    border-radius: 6px;
    padding: 9px;

    &:hover,
    &:focus {
        outline: none;    
    }

    &:active {
        transform: translateY(1px);
    }

    &.disabled,
    &:disabled {
        cursor: not-allowed;
        opacity: 0.7;
        box-shadow: none;
        transform: none;
    }
}

.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    color: var(--primary-600);
    font-weight: bold;
    background-color: inherit;
    opacity: 0.9;

    &:hover,
    &:focus {
        outline: none;
        color: var(--primary-700);
        opacity: 1; 
    }

    &:active {
        transform: translateY(1px);
    }
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    background-color: var(--sidebar-bg-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-right: 1px solid var(--gray-100);

    .logo {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--sidebar-logo-bb-color);

        img {
            width: 72px;
        }
    }
}

.sidebar-footer {
    display: flex;
    padding: 1rem;
    gap: 0.5rem;
    align-items: baseline;
    border-top: 1px solid var(--sidebar-logo-bb-color);
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    color: var(--sidebar-nav-link-color);
    font-weight: var(--sidebar-nav-link-font-weight);
}

.sidebar-dark {
    --sidebar-bg-color: #0A0A0A;
    --sidebar-logo-bb-color: #4D4D4D;
    --sidebar-nav-item-hover-bg-color: rgba(105, 188, 203, 0.2);
    --sidebar-nav-item-active-bg-color: rgba(105, 188, 203, 0.08);
    --sidebar-nav-item-active-color: var(--primary-400);
    --sidebar-nav-link-color: var(--gray-300);
    --sidebar-nav-link-svg-color: var(--gray-300);
    --sidebar-nav-item-active-font-weight: var(--font-medium);
    --sidebar-nav-link-font-weight: var(--font-medium);
    --sidebar-nav-link-active-svg-color: var(--primary-400);
}

.nav-sidebar {
    display: flex;
    flex-direction: column;
    /*height: 100%;*/
    padding: 0rem 0.75rem 0 0.75rem;
    margin-top: 1rem;
    overflow-y: auto; /* habilita scroll vertical */
    overflow-x: hidden; /* evita scroll horizontal */

    ul {
        list-style: none;
        padding: 0;    
    }
}

.nav-item {
    border-radius: 8px;
    margin-bottom: 4px;

    a:hover {
        background-color: var(--sidebar-nav-item-hover-bg-color);
        border: 0;
        outline: none;    
    }

    &.active {
        > a {
            background-color: var(--sidebar-nav-item-active-bg-color);
            color: var(--sidebar-nav-item-active-color);
            font-weight: var(--sidebar-nav-item-active-font-weight);

            svg {
                color: var(--sidebar-nav-link-active-svg-color);
            }
        }
    }

    &.open {
        .nav-treeview {
            display: block;
        }

        .toggle-nav-treeview {
            transform: rotate(180deg);
        }
    }
}

.nav-link {
    display: flex;
    width: 100%;
    padding: 0.75rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    color: var(--sidebar-nav-link-color);
    font-weight: var(--sidebar-nav-link-font-weight);

    p {
        display: inline-flex;
        width: 100%;    
    }

    img, svg {
        margin-right: 0.75rem;
        color: var(--sidebar-nav-link-svg-color);
    }
}

.nav-treeview {
    display: none;

    li {
        margin-top: 4px;
        padding-left: 1rem;
    }
}

.toggle-nav-treeview {
    transition: transform 0.25s ease;
}

.layout-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    justify-content: end;
    padding: 0.75rem 1.5rem;
    z-index: 10;
    background-color: var(--bg-color);
    margin: 0 auto;
}

.content {
    position: relative;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    background-color: var(--bg-color);
}

.content-inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.content-header {
    outline: none;
}

.user-panel {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);

    img {
        margin-right: 0.5rem;
        width: 32px;
        height: 32px;
    }

    /* Container do nome e tipo de usuário */
    div:nth-child(2) {
        display: flex;
        flex-direction: column;
        margin-right: 1.5rem;
    }
}

.user-panel-details {
    position: fixed !important;
    top: var(--header-height) !important;
    right: 1.5rem !important;
    transform: none !important;
    left: initial !important;
    display: none;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 16px;
    width: 335px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: all 0.5s allow-discrete;

    > * {
        margin-bottom: 1rem;
    }

    > :last-child {
        margin-bottom: 0;
    }

    .btn-close {
        align-self: flex-end;
    }

    /* E-mail container */
    > div:first-of-type {
        padding: 0.75rem 1.5rem;
        border: 1px solid var(--gray-100);
        border-radius: 22px;
    }

    /* E-mail */
    > div:first-of-type p {
        color: var(--gray-950);
        font-size: var(--text-2);
        line-height: var(--text-2--line-height);
        font-weight: 500;
    }

    > div:nth-of-type(2) a {
        background-color: white;
        color: var(--gray-950);
        padding: 0.75rem 1.5rem;
        border: 1px solid var(--gray-100);
        margin-top: 0.25rem;
    }

    .btn-editar {
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border-bottom-left-radius: 6px;
        border-bottom-right-radius: 6px;
    }

    .btn-sair {
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    > div:nth-of-type(2) a:hover,
    > div:nth-of-type(2) a:focus {
        background-color: var(--primary-700);
        color: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        outline: none;
        font-weight: 500;
    }

    /* Clique (ativo) */
    > div:nth-of-type(2) a:active {
        transform: translateY(1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    > div:nth-of-type(2) a:hover svg,
    > div:nth-of-type(2) a:focus svg {
        fill: white;
    }

    &.active {
        opacity: 1;
        display: flex;
        
        @starting-style {
            opacity: 0;
        }
    }
}

.card-link {
    cursor: pointer;

    .clicked {
        transform: translateY(1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
}

.cards-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    gap: 2rem;

    .card {
        display: flex;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        background-color: white;
        width: 100%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .card:last-child {
        margin-right: 0;
    }

    .card img {
        margin-right: 1rem;
    }

    .card p:nth-child(1) {
        font-size: var(--text-2);
        line-height: var(--text-2--line-height);
        color: var(--gray-500);
    }

    .card p:nth-child(2) {
        font-weight: 600;
        font-size: var(--text-4);
        line-height: var(--text-4--line-height);
    }
}

.chart-wrapper {
    background-color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;

    nav {
        button {
            margin-left: 1.5rem;
            font-size: var(--text-1);
            line-height: var(--text-1--line-height);
            color: var(--gray-500);
            padding: 0 1rem 1rem 1rem;
            cursor: pointer;
            background-color: white;
            border: none;
        }

        button.active {
            border-bottom: 2px solid var(--primary-400);
            color: var(--primary-400);
        }
    }
}

.chart-body {
    width: 100%;
    height: 200px;
}

.char-view-switch {
    display: flex;
}

.pubs-stat {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.pub-stat {
    display: flex;
    padding-right: 2rem;

    img {
        margin-right: 1rem;
        width: 40px;
    }
}

.pubs-recentes-list {
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pubs-recentes-empty-list {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 250px;
}

.pubs-recentes-empty-list-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;

    /* Container do ícone SVG */
    > div:first-of-type {
        background-color: var(--primary-50);
        display: grid;
        place-items: center;
        width: 72px;
        height: 72px;
        border-radius: 50%;
    }

    /* Container do segundo paragráfo */
    > div:nth-of-type(2) {
        text-align: center;
        width: 80%;
    }
}

.pub-recente {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-100);
    margin-bottom: 0.5rem;

    a {
        align-self: self-start;
    }
}

.pub-recente-info p:nth-child(1) {
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    font-weight: 600;
}

.pub-recente-info p:nth-child(2) {
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    color: var(--gray-400);
}

.pagination {
    display: flex;
    background-color: white;
    background-color: inherit;
    border-radius: 8px;
    padding: 0.5rem 0.5rem 0.5rem 0rem;

    span {
        margin-bottom: 0.5rem;
        font-size: var(--text-2);
        line-height: var(--text-2--line-height);
        color: var(--gray-950);
    }

    ul {
        list-style: none;
        display: flex;
        padding: 0;
    }
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    border: 1px solid var(--primary-200);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;

    &:first-child {
        margin-right: 0;
    }

    &:nth-child(2):not(.disabled) {
        margin-left: 0.5rem;
    }

    &:last-child {
        margin-right: 0;    
    }

    &:hover {
        cursor: pointer;
        background-color: var(--primary-200);    
    }

    a {
        display: block;
        text-decoration: none;
        color: var(--gray-950);
        font-size: var(--text-2);
        line-height: var(--text-2--line-height);
    }

    &.active {
        background-color: var(--primary-700);    

        a {
            color: white;
            border: none;
            font-weight: 500;
        }
    }

    &.disabled {
        cursor: default;

        a {
            cursor: default;
            color: var(--gray-400);
        }

        &:hover {
            background-color: initial;        
        }
    }
}

.search-input-container {
    position: relative;
    display: inline-block;

    input {
        padding-left: 48px;
        padding-right: 1rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        background-color: white;
        border: 1px solid var(--gray-100);
        border-radius: 10px;
        color: var(--gray-500);
        font-size: var(--text-2);
        line-height: var(--text-2--line-height);
        font-weight: var(--font-medium);
        width: 300px;
    }

    input:focus {
        border-color: var(--primary-600);
        outline: 0;
        box-shadow: 0 0 0 .2rem rgba(45, 120, 141, .15);
    }

    svg {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }
}

.table-scrollable {
    display: block;
    width: 100%;
    border: 1px solid var(--table-border-color);
    border-radius: 12px;
    padding: 0rem 0rem 1rem 0rem;
    padding: 0rem 1rem 1rem 1rem;
    padding-bottom: 1rem;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;

    &:has(.table-loading:not(.hidden)) {
        pointer-events: none;
        min-height: 250px;

        tbody {
            filter: blur(2px);
        }
    }
}

.table-layout-fixed {
    table-layout: fixed !important;
}

.table-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 1.5rem;

    .spinner {
        width: 48px;
        height: 48px;
        border: 4px solid #e2dcdc; /* Static border */
        border-top: 4px solid var(--primary-400); 
    }
}

.table {
    table-layout: auto;
    border-collapse: collapse;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 12px;
    background-color: white;

    /* Linhas do corpo (tbody) */
    /*tr, th {
        border-bottom: 1px solid #E7E7E7;
    }*/

    thead {
        th {
            position: sticky;
            top: 0;
            background-color: white;
            z-index: 1;
            padding: 1rem 1rem;
        }
        
        tr {
            text-align: left;
            font-weight: var(--font-medium);
            color: var(--gray-950);
        }
    }

    th, td {
        padding: 12px 16px;
        font-size: var(--text-1);
        font-size: 12px; /*13px*/
        line-height: var(--text-1--line-height);
        border-bottom: 1px solid var(--table-border-color)
    }

    tbody {
        tr {
            color: var(--gray-950);
            opacity: 1;
            height: auto;
            transition:
                opacity 300ms ease,
                height 300ms ease,
                transform 300ms ease;

            &.fade {
                opacity: 0;
                height: 0;
                transform: translateX(-10px);
                transition:
                    opacity 300ms ease,
                    height 300ms ease,
                    transform 300ms ease;
            }
        }
    }

    .table-striped tbody tr:nth-of-type(odd) {
        background-color: #f3f3f3;
    }

    tbody tr:hover {
        background-color: var(--gray-50);
        cursor: default;
    }

    &.row-selection {
        tbody {
            tr {
                cursor: pointer;
            }

            tr:hover {
                cursor: pointer;
            }
        }
    }
}

@media screen and (width >= 100rem) {
    .table {
        th, td {
            font-size: var(--text-2);
            line-height: var(--text-2--line-height);
        }
    }
}

.table.table-bordered th,
.table.table-bordered td {
    border: 1px solid var(--table-border-color);
}

th.col-fit,
td.col-fit {
    width: 1%;
    white-space: nowrap;
}

.th-content {
    display: inline-flex;
    align-items: center;
    /*justify-content: space-between;*/
    gap: 0.5rem;
    width: 100%;
}

.col-fit > .th-content {
    display: inline-flex;
    width: max-content;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th.sortable {
    cursor: pointer;
}

th.sortable {
    .btn-sort {
        cursor: pointer;
        background-repeat: no-repeat;
        background-position: center;
        width: 16px;
        height: 16px;
        border: 1px solid var(--primary-100);
        border: none;
        border-radius: 6px;
        border-radius: 0;
        background-color: var(--primary-50);
        background-color: initial;
        transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
        text-decoration: none;
        user-select: none;
        outline: none;
        padding: 10px;
        opacity: 0.5;

        &:active {
            background-color: var(--primary-100);
            transform: translateY(1px);
        }
        
        &:hover {
            background-color: var(--primary-100);
            opacity: 1;
        }
    }

    &.unsorted .btn-sort {
        background-image: url("/img/unsorted-2.svg");
    }

    &.sorted-asc .btn-sort {
        background-image: url("/img/sorted-asc-2.svg");
        opacity: 1;
    }

    &.sorted-desc .btn-sort {
        background-image: url("/img/sorted-desc-2.svg");
        opacity: 1;
    }
}

input[type="checkbox"] {
    accent-color: var(--primary-600);
}

textarea.form-control,
input.form-control,
select.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--gray-200);

    &:focus,
    &:focus-visible,
    &:active,
    &:focus-within {
        border: 1px solid var(--primary-600);
        outline: 0;
        box-shadow: 0 0 0 .2rem rgba(45, 120, 141, .15);
    }

    &.is-invalid {
        border: 1px solid #CC3333;

        &:active,
        &:focus,
        &:focus-visible,
        &:focus-within {
            outline: 0;
            border: 1px solid #CC3333 !important;
            box-shadow: 0 0 0 .2rem rgb(from #CC3333 r g b / 0.15);    
        }

        &:hover {
            outline: 0;
            border: 1px solid #CC3333 !important;
        }
    }

    &:disabled {
        box-shadow: none;
        outline: 0;
        border: 1px solid var(--gray-200);

        &:active,
        &:focus,
        &:focus-visible,
        &:focus-within,
        &:hover {
            outline: 0;
            border: 1px solid var(--gray-200);
            box-shadow: none;   
        }
    }
}

textarea.form-control,
input.form-control {
    &:read-only {
        &:focus,
        &:focus-visible,
        &:hover,
        &:active {
            border: 1px solid var(--gray-200);
            box-shadow: none;
        }        
    }
}

.form-control-lg {
    font-size: var(--text-base) !important;
    line-height: var(--text-base--line-height) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 15px !important;
}

.form-label {
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    font-weight: var(--font-medium);
}

.form-field {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    padding: 1rem 2rem;
    border: none;

    > label {
        margin-bottom: 0.5rem;    
    }

    &.invalid {
        .invalid-feedback {
            display: block;
        }

        input,
        select {
            border: 1px solid #CC3333;
            
            &:focus {
                outline: 0;
                border: 1px solid #CC3333;
                box-shadow: 0 0 0 .2rem rgb(from #CC3333 r g b / 0.15);    
            }
        }
    }
}

.invalid-feedback {
    color: #CC3333;
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    font-weight: 500;
    margin-top: 0.25rem;
    display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  
  border: 2px solid #f3f3f3; /* Static border */
  border-top: 2px solid var(--primary-400); /* Spinning part of the border */
  border-radius: 50%;
  
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
  margin-left: 0;
  padding: 0;
}

.spinner-xl {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3; /* Static border */
    border-top: 4px solid var(--primary-400); /* Spinning part of the border */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*prompt: select2 selected color change css*/

.select2-container .select2-selection {
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    line-height: 100%;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    background-color: var(--bg-color);
    color: var(--gray-700);
}

.select2-container--default .select2-selection.select2-selection--multiple {
    border: 1px solid var(--gray-200);
}

/* For multiple select */
.select2-container--default .select2-selection--multiple:focus,
.select2-container--default .select2-selection--multiple:focus-visible,
.select2-container--default .select2-selection--multiple:focus-within {
    border-color: var(--primary-600);
    outline: 0; 
}

.select2-container--default .select2-selection--single:focus-within {
    border-color: var(--primary-600);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(45, 120, 141, .15);   
}

/* Styles of individual selected tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: 1px solid var(--primary-600);
    background-color: var(--bg-color);
    padding: 4px 0rem 4px 20px;
}

.select2-selection__choice__remove {
    top: initial !important;
}

/* 3. Change the hover/highlight color in the dropdown list */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-600) !important; /* Default highlight blue */
}

ul.nav-tabs {
    display: flex;
    list-style: none;
    border-bottom: 1px solid var(--primary-600);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
}

.nav-tab-item {
    padding: 0.5rem 1rem;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    background-color: var(--bg-color);
    border: none;

    &.active {
        opacity: 1;
        margin-bottom: -1px;
        border-left: 1px solid var(--primary-600);
        border-top: 1px solid var(--primary-600);
        border-right: 1px solid var(--primary-600);
        background-color: var(--primary-50);
        border-color: var(--gray-200);
        border-bottom: 1px solid transparent;

        .nav-tab-link {
            color: var(--primary-600);
            font-weight: var(--font-semibold);
        }
    }
}

.nav-tab-link {
    display: flex;
    border: 1px solid transparent;
    text-decoration: none;
    outline: none;
    color: var(--gray-800);
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    font-weight: var(--font-semibold);
}

.tab-content {
    padding: 0;
    height: 100%;
}

.tab-pane {
    display: none;
    height: 100%;

    &.show {
        display: block;
    }
}

.tab-content-inline {
    padding: 0.5rem 0rem;
    padding: 0;
}

.tab-pane-inline {
    display: none;

    &.show {
        display: block;
    }
}

.nav-tabs-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.tab-item-inline {
    opacity: 0.6;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;

    &.active {
        opacity: 1;
        border-color: var(--primary-600);

        .tab-link-inline {
            color: var(--primary-600);
        }
    }
}

.tab-link-inline {
    text-decoration: none;
    outline: none;
    color: var(--gray-800);
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
    font-weight: var(--font-semibold);
}

.advogados-oabs-card {
    background-color: white;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.advogados-oabs-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /*border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.5rem;*/
}

.pesquisa-advogados-resultado {
    > h2 {
        color: var(--gray-950);
        font-size: var(--text-base);
        line-height: var(--text-base-line-height)
    }

    > p {
        color: var(--gray-800);
        font-size: var(--text-2);
        line-height: var(--text-2-line-height);
    }
}

.oab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.oab-list-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-50);
    color: var(--primary-600);
    border: 1px solid var(--primary-600);
    border: 1px solid var(--gray-300);
    font-size: var(--text-1);
    font-weight: var(--font-medium);
    line-height: var(--text-1--line-height);
    border-radius: 12px;
    padding: 0.25rem 0.625rem;
}

.separator {
    border-bottom: 1px solid var(--gray-200);
}

.status-processamento-card {
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    background-color: white;
    border-color: var(--table-border-color);
}

.column-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: fit-content;
    border-radius: 8px;
}

.progress {
    width: 100%;
    height: 0.75rem;
    border-radius: 1rem;
    overflow: hidden;

    &.progress-download {
        background-color: rgb(224, 242, 247);

        .progress-bar {
            background-color: var(--primary-600);
        }
    }

    &.progress-validacao {
        background-color: rgb(220, 252, 231);

        .progress-bar {
            background-color: var(--text-success);
        }
    }

    &.progress-pesquisa {
        background-color: rgb(207, 250, 254);

        .progress-bar {
            background-color: var(--primary-500);
        }
    }
}

.progress-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.tribunal-status-cards-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.tribunal-status-card {
    padding: 1rem;
    background-color: white;
    border-radius: 10px;
    max-width: 380px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 0 12px 0;
        border-bottom: 1px solid var(--gray-200);
    }

    &:hover {
        outline: 1px solid var(--primary-600);
    }
}

.processos-grid-max-height {
    max-height: 410px;

    @media (height > 56rem) {
        max-height: 605px;
    }

    @media (height > 59rem) {
        max-height: 620px;
    }
}

.advogados-grid-max-height {
    max-height: 410px;

    @media (width > 96rem) {
        max-height: 620px;
    }
}

.oabs-grid-max-height {
    max-height: 410px;

    @media (width > 96rem) {
        max-height: 620px;
    }
}

.partes-grid-max-height {
    max-height: 410px;

    @media (width > 96rem) {
        max-height: 620px;
    }
}

.ocorrencias-processos-grid-max-height {
    max-height: 410px;

    @media (height > 56rem) {
        max-height: 575px;
    }

    @media (width > 96rem) {
        max-height: 610px;
    }
}

.cna-grid-1-max-height {
    max-height: 300px;

    @media (width > 96rem) {
        max-height: 420px;
    }
}

.max-height-250px {
    max-height: 250px;
}

.max-height-270px {
    max-height: 270px;
}

.max-height-380px {
    max-height: 380px;
}

.max-height-410px {
    max-height: 410px;
}

.max-height-445px {
    max-height: 445px;
}

.max-height-458px {
    max-height: 458px;
}

.max-height-480px {
    max-height: 480px;
}

.max-height-xxl-595px {
    @media (width > 96rem) {
        max-height: 595px;
    }
}

.max-height-xxl-605px {
    @media (width > 96rem) {
        max-height: 605px;
    }
}

.max-height-xxl-620px {
    @media (width > 96rem) {
        max-height: 620px;
    }
}

.max-height-xxl-640px {
    @media (width > 96rem) {
        max-height: 640px;
    }
}

.max-height-xl-605px {
    @media (height > 56rem) {
        max-height: 605px;
    }
}

.max-height-xxl-620px {
    @media (height > 59rem) {
        max-height: 620px;
    }
}

.max-height-xxl-650px {
    @media (height > 59rem) {
        max-height: 650px;
    }
}

.max-height-xxl-670px {
    @media (width > 96rem) {
        max-height: 670px;
    }
}

.fixed-size-number {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.pdf-viewer-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    width: 750px !important;
    height: 90vh !important;
    border-radius: 6px !important;

    &.active {
        display: block;
    }

    .modal-header  {
        padding: 0.25rem 0.5rem;
    }

    iframe {
        width: 100%;
        height: 100%;
    }
}

.btn-limpar-filtro {
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    cursor: pointer;
    margin-right: 0.5rem;
    color: var(--primary-600);
    text-decoration: underline;

    /* Clique (ativo) */
    &:active {
        transform: translateY(1px);
    }
}

.error-message-container {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-radius: 12px;
    border: 1px solid var(--table-border-color);
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);

    svg {
        margin-right: 0.5rem;
    }
}

.ocorrencia-text-danger {
    background-color: rgb(233, 124, 124);

    &:hover {
        background-color: rgb(233, 102, 102) !important;
        cursor: default;
    }
}

.processo-detalhes-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    font-size: var(--text-2);
    line-height: var(--text-2--line-height);
    color: var(--primary-600);
    background-color: inherit;
    opacity: 0.9;

    &:hover,
    &:focus {
        outline: none;
        color: var(--primary-700);
        opacity: 1; 
    }

    &:active {
        transform: translateY(1px);
    }
}

.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100%;

    .spinner {
        width: 48px;
        height: 48px;
        border: 4px solid #e2dcdc; /* Static border */
        border-top: 4px solid var(--primary-400); /* Spinning part of the border */
    }
}

.error-state {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100%;

    svg {
        color: var(--text-danger);
    }
}

.btn-ver-todas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
    color: var(--primary-600);
    font-weight: var(--font-semibold);
    background-color: inherit;

    &:hover,
    &:focus {
        outline: none;
        color: var(--primary-700);
    }

    &:active {
        transform: translateY(1px);
    }
}

.atualizacao-lote-stats {
    display: flex;
}

.disclaimer-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    border-radius: 6px !important;
    z-index: 2000;

    &.active {
        display: block;
    }
}

.disclaimer-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.disclaimer-inner {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border: 1px solid oklch(0.924 0.12 95.746);
    border-radius: 4px;
    background-color: oklch(0.987 0.022 95.277);

    svg {
        color: oklch(0.769 0.188 70.08);
    }

    span {
        color: oklch(0.555 0.163 48.998);
    }
}

.secure-mask {
    -webkit-text-security: disc; /* Chrome, Safari, Edge */
    text-security: disc;         /* Firefox / Standard fallback */
}

.aviso-teste {
    border-radius: 12px;
    background-color: rgb(255, 247, 237);
    padding: 12px;
}

.aviso-lote-card {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
}

.aviso-lote-card p {
    font-weight: var(--font-semibold);
    font-size: var(--text-2);
    line-height: var(--text-2-line-height);
}

.aviso-lote-card.cancelar {
    &:hover {
        color: oklch(0.505 0.213 27.518);
        background-color: oklch(0.971 0.013 17.38);
    }
}

.aviso-lote-card.manter {
    &:hover {
        color: var(--primary-600);
        background-color: var(--primary-50);
    }
}

.html-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.html-modal.show {
    display: flex;
}

.html-modal-content {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}

.html-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.html-modal-title {
    font-size: 18px;
    font-weight: bold;
}

.html-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#html-btnDownload {
    padding: 8px 14px;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

#html-btnDownload:hover {
    background: #0b5ed7;
}

.html-btn-close {
    border: none;
    background: #dc3545;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
}

.html-btn-close:hover {
    background: #bb2d3b;
}

#html-iframeDocumento {
    flex: 1;
    width: 100%;
    border: none;
}

.cadastro-sistema-card {
    display: flex;
    justify-content: space-between;
    border: 1px solid rgb(226, 232, 240);
    padding: 12px 16px;
    background-color: rgb(247, 249, 252);
    border-radius: 6px;
}

.cadastro-ultima-comunicacao-card {
    border: 1px solid var(--primary-600);
    padding: 12px 16px;
    background-color: var(--primary-50);
    border-radius: 6px;
}

.inconsistencias-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(247, 249, 252);
    padding: 8px 0px 8px 16px;
}

.inconsistencias-modal-conclusao {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
}

.inconsistencias-modal-conclusao svg {
    margin-bottom: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-50);
}

.switch {
  --switch-width: 45px;
  --switch-height: 22px;
  --thumb-size: calc(var(--switch-height) - 6px);
  --thumb-offset: 3px;

  position: relative;
  display: inline-block;
  width: var(--switch-width);
  height: var(--switch-height);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--text-danger);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  width: var(--thumb-size);
  height: var(--thumb-size);
  left: var(--thumb-offset);
  bottom: var(--thumb-offset);
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-600);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-600);
}

input:checked + .slider:before {
  transform: translateX(
    calc(
      var(--switch-width)
      - var(--thumb-size)
      - (var(--thumb-offset) * 2)
    )
  );
}

.slider.round {
  border-radius: var(--switch-height);
}

.slider.round:before {
  border-radius: 50%;
}