/* ===== FONTES GLOBAIS ELEGANTES (INTER) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Configuração avançada da fonte Inter */
:root {
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif !important;
    --bs-body-font-family: var(--bs-font-sans-serif) !important;

    /* Melhorar legibilidade */
    --bs-body-line-height: 1.6;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
}

/* Aplicar Inter globalmente com recursos avançados */
html,
body,
* {
    font-family: var(--bs-font-sans-serif) !important;
    /* Recursos OpenType do Inter para melhor renderização */
    font-feature-settings: 'cv01', 'cv03', 'cv04', 'cv11' !important;
    font-optical-sizing: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Headings com espaçamento refinado */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--bs-font-sans-serif) !important;
    font-weight: 600 !important;
    letter-spacing: var(--letter-spacing-tight) !important;
    line-height: 1.2 !important;
}

/* Texto de corpo refinado */
p,
span,
div,
td,
th,
li {
    font-family: var(--bs-font-sans-serif) !important;
    letter-spacing: var(--letter-spacing-normal) !important;
}

/* Botões e elementos interativos */
.btn,
button,
.form-control,
.form-select {
    font-family: var(--bs-font-sans-serif) !important;
    font-weight: 500 !important;
    letter-spacing: var(--letter-spacing-wide) !important;
}

/* Tabular nums para números */
.badge,
.price,
.number,
.id-badge,
.table-numeric {
    font-feature-settings: 'tnum', 'zero' !important;
}

/* ===== HEADER MODERNO MINIMALISTA ===== */

/* Container principal do header */
.page-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0 0 15px 15px;
    /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);*/
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    margin-left: 1rem;
    margin-right: 1rem;
    width: calc(100% - 2rem);
}

/* Ajuste do container principal */
.main-container {
    overflow: visible;
    transition: all 0.3s ease;
    width: 100%;
}

/* Garantir espaçamento adequado do conteúdo */
.content-wrapper {
    padding-top: 0;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
}

/* Prevenir overflow horizontal */
body {
    overflow-x: hidden;
}

.page-wrapper {
    width: 100%;
    overflow-x: hidden;
    padding-left: 1.7rem;
    padding-right: 1.7rem;
}

/* ===== CONTROLE DO SIDEBAR ===== */

.sidebar-wrapper {
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger-line {
    transition: all 0.3s ease;
}

/* Overlay para mobile quando sidebar está aberto */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

/* Quando o page-wrapper tiver a classe, mostra a overlay no body */
body .page-wrapper.sidebar-mobile-open~.sidebar-overlay,
body .sidebar-overlay.page-open,
body.sidebar-mobile-open .sidebar-overlay {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsividade do sidebar */
@media (max-width: 768px) {
    .sidebar-wrapper {
        position: fixed;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 1100 !important;
        width: 280px !important;
        transform: translateX(-100%) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.12) !important;
        border-radius: 0 !important;
    }

    .page-wrapper.sidebar-mobile-open .sidebar-wrapper {
        transform: translateX(0) !important;
        left: 0 !important;
    }

    .main-container {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* Seções esquerda e direita */
.header-left-section,
.header-right-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ===== TOGGLE SIDEBAR MODERNO - DESIGN SYSTEM 100% VOCÊ ===== */
.toggle-modern {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    /* Removida borda visual para estilo mais clean; usamos box-shadow sutil para foco/hover */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    gap: 3px;
    margin: 0 2px;
}

.toggle-modern:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.hamburger-line {
    width: 16px;
    height: 2px;
    background: #7a6a57;
    /* tom neutro próximo à cor da marca */
    border-radius: 1px;
    transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    margin: 0;
    transform-origin: center;
}

.toggle-modern:hover .hamburger-line {
    background: #8c7a5b;
    /* cor da marca */
    opacity: 1;
    transform: scaleX(1.06);
}

.toggle-modern:active {
    transform: translateY(0) scale(0.99);
}

/* Focus state seguindo o Design System */
.toggle-modern:focus {
    outline: none;
    /* Indicação de foco sem borda: glow sutil para acessibilidade */
    box-shadow: 0 0 0 4px rgba(140, 122, 91, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ===== LOGO MODERNO ===== */
.logo-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.logo-modern:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.logo-modern img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #343a40;
    letter-spacing: -0.02em;
}

/* ===== BREADCRUMB MODERNO ===== */
.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.breadcrumb-item-modern {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.breadcrumb-link:hover {
    color: #495057;
    background: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-separator {
    color: #adb5bd;
    font-weight: 300;
    font-size: 0.9rem;
}

.breadcrumb-current .breadcrumb-text {
    color: #495057;
    font-weight: 600;
}

.breadcrumb-text {
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

/* ===== PERFIL DO USUÁRIO MODERNO ===== */
.user-profile-modern {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name-modern {
    font-size: 0.95rem;
    font-weight: 600;
    color: #343a40;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.user-role {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
    margin-top: 2px;
}

.avatar-modern {
    position: relative;
    width: 40px;
    height: 40px;
}

.avatar-modern img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.online {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.5);
}

/* ===== DROPDOWN MODERNO ===== */
.dropdown-menu-modern {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    padding: 0;
    margin-top: 0.5rem;
    min-width: 280px;
    overflow: hidden;
}

.dropdown-header-modern {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-large {
    width: 50px;
    height: 50px;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.user-info-dropdown {
    flex: 1;
}

.user-name-dropdown {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    margin: 0;
    line-height: 1.3;
}

.user-email {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    margin-top: 2px;
}

.dropdown-divider-modern {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0;
}

.dropdown-body-modern {
    padding: 0.5rem;
}

.dropdown-item-modern {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item-modern:hover {
    background: rgba(248, 249, 250, 0.8);
    color: #343a40;
    text-decoration: none;
    transform: translateX(4px);
}

.dropdown-item-modern.logout-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.item-text {
    font-size: 0.9rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 0.75rem 1rem;
        border-radius: 0 0 16px 16px;
        margin-left: 1rem;
        margin-right: 1rem;
        width: calc(100% - 2rem);
    }

    .header-left-section,
    .header-right-section {
        gap: 1rem;
    }

    .user-details {
        display: none;
    }

    .breadcrumb-modern {
        display: none !important;
    }

    .logo-text {
        font-size: 1rem;
    }
}

/* ===== ESTILOS DE LOGIN E LAYOUT ===== */

/* Centraliza a caixa de login verticalmente */
.login-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Define estilos para o formulário de login */
.login-form {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para a logo do login */
.login-logo img {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Estilos para o texto de boas-vindas */
.login-welcome {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
    color: #333;
}

/* Centraliza o conteúdo dentro do container */
.text-center {
    text-align: center;
}

/* Centraliza a logo e o texto de boas-vindas */
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

/* Estilos para os botões */
.btn-primary {
    background-color: #8c7a5b !important;
    border-color: #8c7a5b !important;
    color: #fff !important;
}

.btn-primary:hover {
    background-color: #736145 !important;
    border-color: #736145 !important;
}

.btn-link {
    background-color: transparent;
    color: #8c7a5b !important;
}

.btn-link:hover {
    color: #736145 !important;
}

/* Adicional: Estilos para os campos de formulário */
.form-label {
    font-weight: bold;
    color: #333;
}

.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px;
}

.form-control:focus {
    border-color: #8c7a5b !important;
    box-shadow: 0 0 5px rgba(140, 122, 91, 0.5) !important;
}

/* Estilos para o texto de links adicionais */
.additional-link a {
    color: #8c7a5b;
}

.additional-link a:hover {
    color: #736145;
}

/* Estilos para o ícone no botão */
.btn .icon {
    background: #000 !important;
    border-radius: 50px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 7px 0 0;
}

.btn .icon i {
    color: #fff !important;
}

.breadcrumb .breadcrumb-item i {
    font-size: 2rem;
    margin-right: 15px;
    color: #8c7a5b !important;
}

.sidebar-menu ul li.active-page-link a {
    color: #8c7a5b !important;
}

.sidebar-menu ul li.active-page-link a i {
    color: #8c7a5b !important;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    border-radius: 50px;
}

.sidebar-menu ul li.active a i {
    color: #8c7a5b !important;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    border-radius: 50px;
}

.sidebar-menu ul li.active a.current-page {
    position: relative;
    color: #8c7a5b !important;
}

.custom-toogle-sidebar {
    background: #8c7a5b !important;
}

.currency-symbol {
    font-size: 0.7em;
    vertical-align: super;
}

.container-section {
    padding-top: 20px;
    padding-bottom: 20px;
}

small,
.small {
    font-size: 0.700em !important;
}