/* Estilos gerais */
:root {
    --primary-color: #0F9D9D;
    --secondary-color: #9F9F9F;
    --success-color: #16A34A;
    --danger-color: #DC2626;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #FEF3EA;
    --dark-color: #0F0F0F;
    --surface-color: #FEF3EA;
    --text-primary: #0F0F0F;
    --text-secondary: #9F9F9F;
    --divider-color: #E5E7EB;
    --button-fill: #E6E6E6;
    --hero-gradient-start: #FEF3EA;
    --hero-gradient-end: #FEF3EA;
    --hero-gradient-strong-start: #F2E2D6;
    --hero-gradient-strong-end: #F2E2D6;
    --auth-gradient-start: #FEF3EA;
    --auth-gradient-end: #FEF3EA;
    --sidebar-text-color: var(--text-color);
    --bs-primary: #0F9D9D;
    --bs-secondary: #9F9F9F;
    --bs-success: #16A34A;
    --bs-danger: #DC2626;
    --bs-body-bg: #FEF3EA;
    --bs-body-color: #0F0F0F;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--light-color);
    color: var(--text-primary);
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
}

/* Efeito hover para cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Layout do aplicativo */
.page {
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow: hidden; /* Impede o estouro de conteúdo */
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.sidebar-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-logo {
    display: block;
    margin: 0 auto;
    max-height: 64px;
}

.sidebar-marketplace {
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.sidebar-brand {
    color: var(--sidebar-text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.sidebar-brand:hover {
    color: var(--sidebar-text-color);
    text-decoration: none;
}

.nav-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--sidebar-text-color);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.sidebar-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Adicionando padding específico para os itens dentro da sidebar (exceto o título) */
.sidebar .px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

main {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 250px);
    padding-top: 1rem; /* Espaçamento superior em vez da faixa cinza */
    background-color: var(--light-color);
}

.content {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* Estilos da barra lateral */
.navbar-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--sidebar-text-color);
    padding: 1rem 1rem 1rem 0;
    margin-bottom: 0;
    margin-left: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Sombra para melhorar legibilidade */
}

.nav-scrollable {
    height: calc(100vh - 120px); /* Ajustado para considerar o espaço do logo e informações do usuário */
    overflow-y: auto;
}

/* Cabeçalho do menu lateral */
.top-row.ps-3.navbar.navbar-dark,
.top-row.navbar.navbar-dark {
    padding: 0;
    background-color: rgba(0, 0, 0, 0.1); /* Fundo levemente escuro para o cabeçalho */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.5rem;
}

/* Estilos para as informações do usuário */
.top-row.ps-3.navbar.navbar-dark .text-light,
.top-row.navbar.navbar-dark .text-light {
    background-color: rgba(255, 255, 255, 0.1); /* Fundo levemente mais claro */
    padding: 0.5rem;
    border-radius: 4px;
    width: 100%;
    margin: 0 0.5rem;
    max-width: calc(100% - 1rem);
}

.top-row.ps-3.navbar.navbar-dark .text-light div,
.top-row.navbar.navbar-dark .text-light div {
    color: var(--sidebar-text-color);
    font-weight: 500; /* Texto um pouco mais forte */
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3); /* Sombra para melhorar contraste */
}

/* Itens do menu */
.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-item a {
    color: var(--sidebar-text-color);
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    text-decoration: none;
    padding-left: 1rem;
    font-weight: 500; /* Um pouco mais forte para melhor legibilidade */
    transition: all 0.2s ease;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2); /* Sombra para melhorar legibilidade */
}

.nav-item a.active {
    background-color: rgba(255, 255, 255, 0.25); /* Fundo mais claro para o item ativo */
    color: var(--sidebar-text-color);
    font-weight: 600; /* Mais forte para o item ativo */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--sidebar-text-color);
    padding-left: 1.25rem; /* Pequena animação ao passar o mouse */
}

/* Container para o conteúdo */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

/* Estilo dos cards */
.card {
    background-color: var(--surface-color);
    border: 1px solid var(--divider-color);
}

.card.shadow {
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
    margin-bottom: 1.5rem;
}

.card-header.bg-white,
.bg-white {
    background-color: var(--surface-color) !important;
}

.card-body {
    border-radius: 10px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(15, 157, 157, 0.25);
}

.form-control:not([readonly]):not(:disabled),
.form-select:not(:disabled) {
    background-color: #ffffff;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0c8b8b;
    border-color: #0b7f7f;
}

/* Estilo do botão de sair */
.btn-outline-light {
    color: var(--sidebar-text-color);
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(0, 0, 0, 0.1);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--sidebar-text-color);
    color: var(--sidebar-text-color);
}

footer {
    padding: 1rem 0;
    margin-top: auto;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .page {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    main {
        margin-left: 0;
        width: 100%;
    }
    
    .nav-scrollable {
        height: auto;
        max-height: none;
    }
    
    .top-row.auth {
        justify-content: space-between;
    }

    .sidebar-body.collapse {
        display: none;
    }

    .sidebar .px-2.mb-2 {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .sidebar-body.collapse {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .table-mobile thead {
        display: none;
    }

    .table-mobile,
    .table-mobile tbody,
    .table-mobile tr,
    .table-mobile td {
        display: block;
        width: 100%;
    }

    .table-mobile tr {
        border-bottom: 1px solid #dee2e6;
        padding: 0.75rem;
    }

    .table-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.35rem 0;
    }

    .table-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        flex: 0 0 auto;
    }

    .table-mobile td[data-label=""]::before {
        content: "";
    }

    .table-mobile td.table-mobile-actions {
        justify-content: flex-end;
    }

    .table-mobile td.table-mobile-actions::before {
        margin-right: auto;
    }

    .table-mobile .text-center {
        text-align: left !important;
    }

    .table-mobile .input-group {
        max-width: 100% !important;
    }
}

/* Corrigindo a visualização do status do usuário */
.top-row span {
    color: var(--sidebar-text-color);
    font-size: 0.9rem;
}

/* Estilos para a barra superior no NavMenu */
.sidebar .top-row {
    background-color: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    height: 3.5rem;
    justify-content: space-between;
    padding: 0 1rem;
}

/* Estilos para a saudação do usuário */
.user-greeting {
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    word-break: break-word;
    color: var(--sidebar-text-color);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-greeting strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: var(--sidebar-text-color);
}

/* Estilo para o botão de logout no final da barra lateral */
.logout-button-container {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
}

.accordion-dark .accordion-item {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accordion-dark .accordion-button {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.accordion-dark .accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
    box-shadow: none;
}

.accordion-dark .accordion-button::after {
    filter: invert(1);
}

.accordion-dark .accordion-body {
    background-color: rgba(255, 255, 255, 0.05);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toolbar-centered {
    justify-content: center;
}

.toolbar-centered .toolbar-actions {
    justify-content: center;
}

.toolbar-split {
    width: 100%;
    align-items: center;
}

.toolbar-split .toolbar-left,
.toolbar-split .toolbar-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.toolbar-split .toolbar-left {
    justify-content: flex-start;
}

.toolbar-split .toolbar-center {
    flex: 2;
    justify-content: center;
}

.toolbar-split .toolbar-right {
    justify-content: flex-end;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar-actions .input-group,
.toolbar-actions .form-select,
.toolbar-actions .form-control {
    min-width: 160px;
}

.toolbar-actions-compact .input-group,
.toolbar-actions-compact .form-select,
.toolbar-actions-compact .form-control {
    min-width: 120px;
    max-width: 180px;
}

.toolbar-actions-compact .form-select {
    min-width: 160px;
}

.toolbar-actions-compact .input-group {
    width: auto;
    flex-wrap: nowrap;
}

@media (min-width: 992px) {
    .toolbar-actions-compact {
        flex-wrap: nowrap;
    }
}

.text-white,
.text-white-50 {
    color: var(--text-color) !important;
}

.login-title {
    user-select: none;
}

@media print {
    .sidebar,
    .nav-toggle,
    .nav-scrollable,
    .footer,
    .toast-container,
    .toast,
    .alert,
    .modal,
    .modal-backdrop,
    .no-print {
        display: none !important;
    }

    .page,
    main,
    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        background-color: #fff !important;
    }
}

@media (max-width: 767.98px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions > * {
        width: 100%;
    }

    .toolbar-actions .input-group {
        width: 100%;
    }
}

/* Estilos para o modal de Termos de Uso */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog-scrollable .modal-content {
    max-height: 90vh;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    padding-right: 1rem;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
} 
