@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap');

/*
 * Estilo customizado para o painel - V2 com Bootstrap 5
 * Baseado no "Mockup 1"
 */

:root {
    --bs-primary-rgb: 13, 110, 253;
    --bs-body-font-family: 'Montserrat', sans-serif;
    --bs-body-bg: #f8f9fa;
    --bs-link-decoration: none;
}

body {
    font-family: var(--bs-body-font-family);
    background-color: var(--bs-body-bg);
    color: #212529; /* Cor de texto padrão do BS5 */
}

/* --- Layout Principal --- */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05); /* Sombra sutil */
}

.sidebar-header .logo {
    max-width: 130px;
    margin: 0 auto 2rem auto;
    display: block;
}

.main-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020; /* Acima do sidebar offcanvas */
}

/* --- Navegação da Sidebar --- */
.sidebar-nav .nav-link {
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.375rem;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 24px; /* Garante alinhamento dos textos */
    text-align: center;
    color: #adb5bd;
    transition: color 0.2s;
}

.sidebar-nav .nav-link:hover {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.sidebar-nav .nav-link.active {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    font-weight: 600;
}

.sidebar-nav .nav-link.active i {
    color: var(--bs-primary);
}

.nav-separator {
    font-size: 0.75rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0 1rem;
}

/* --- Componentes Gerais --- */
.content-header {
    border-bottom: 1px solid #dee2e6;
}

.content-header h1 {
    font-weight: 700;
    color: #343a40;
}

.card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05) !important;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Tabelas */
.table {
    border-color: #dee2e6;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Formulários */
.form-label {
    font-weight: 600;
    color: #495057;
}

.form-control:focus, .custom-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Classes de status (reutilizadas) */
.status-ativo { color: #198754; font-weight: bold; }
.status-inativo { color: #dc3545; font-weight: bold; }
.status-finalizada { color: #6c757d; font-weight: bold; }

/* Botão de notificação ativo */
#btn-subscribe-notifications.notifications-active i {
    color: var(--bs-primary);
}
#btn-subscribe-notifications.notifications-active span {
    color: var(--bs-primary);
    font-weight: 600;
}

#btn-ativar-notificacoes-push.notifications-active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* Modal */
.modal-header .btn-close {
    padding: 0.5rem 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}
.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Ajustes Finais */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}
.pagination-container {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.btn-pagination {
    padding: 0.5rem 0.875rem;
    border-radius: 0.25rem;
}
.custom-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

#form-send-notification .custom-select {
    color: #212529;
}
#modal-historico-detalhes .modal-dialog {
    max-width: 800px;
}
.radio-button-group {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}
.radio-button-group input[type="radio"] {
    display: none;
}
.radio-button-group label {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    background-color: #e9ecef;
    color: #6c757d;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    margin: 0;
    border-left: 1px solid #dee2e6;
}
.radio-button-group label:first-of-type {
    border-left-width: 0;
}
.radio-button-group label:hover {
    background-color: #dee2e6;
}
.radio-button-group input[type="radio"]:checked + label {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* --- Estilos da P�gina de Login --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box .logo {
    max-width: 150px;
    margin: 0 auto 1.5rem auto;
    display: block;
}

.login-box h2 {
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 1.75rem; /* Ajustado para ser menor */
}

.login-box .form-label {
    font-weight: 600;
    text-align: left;
    display: block;
    margin-bottom: 0.5rem;
}

.login-box .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-footer a {
    color: #6c757d;
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--bs-primary);
}

/* --- Gallery Preview (Upload de Fotos) --- */
.gallery-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--bs-danger, #dc3545);
    color: #fff;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    opacity: 0.85;
}

.gallery-preview-item .remove-btn:hover {
    opacity: 1;
}

.gallery-preview-item .spinner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.gallery-preview-item .spinner::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid #dee2e6;
    border-top-color: var(--bs-primary, #0d6efd);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
