/* Definir a fonte e o fundo geral */
body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #121212, #1f1f1f);
    color: #ffffff !important;
}

/* Garantir que todos os textos sejam brancos */
h1, h2, h3, h4, h5, h6, p, span, div, label, input, select, textarea, button, a, th, td {
    color: #ffffff !important;
}

/* Navbar com texto claro */
.navbar {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #007bff;
}

.navbar .nav-link, .navbar .navbar-brand {
    color: #ffffff !important;
    transition: color 0.3s;
}

.navbar .nav-link:hover {
    color: #00b7ff !important;
}

/* Cards com fundo mais claro e texto branco */
.card {
    background: #282828;
    border: 1px solid #555;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.5);
}

/* Botões com texto claro */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #00b7ff);
    border: none;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #0091cc);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.3s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-secondary {
    background: #555;
    border: none;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: #777;
}

.btn-danger {
    background: #dc3545;
    border: none;
    color: #ffffff !important;
}

.btn-danger:hover {
    background: #b02a37;
}

.btn-warning {
    background: #ffc107;
    border: none;
    color: #ffffff !important;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Formulários com texto branco brilhante */
.form-control, .form-select, .form-control:focus, .form-select:focus {
    background: #333;
    color: #ffffff !important;
    border: 1px solid #666;
    transition: border-color 0.3s, background 0.3s;
}

.form-control:focus, .form-select:focus {
    background: #3a3a3a;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

.form-control::placeholder {
    color: #cccccc !important;
}

.form-label {
    color: #ffffff !important;
}

/* Tabelas com texto claro */
.table-dark {
    background: #222;
}

.table-dark th, .table-dark td {
    border-color: #555;
    color: #ffffff !important;
}

.table-dark tr:hover {
    background: #2a2a2a;
}

/* Modais com fundo claro e texto branco */
.modal-content {
    background: #282828 !important;
    border: 1px solid #666;
    color: #ffffff !important;
}

.modal-header, .modal-body, .modal-footer {
    background: #282828 !important;
    color: #ffffff !important;
}

.modal-title, .modal-body label, .modal-body input, .modal-body select, .modal-body textarea {
    color: #ffffff !important;
}

.btn-close {
    filter: invert(1);
    background-color: transparent;
}

.modal-dialog {
    max-width: 500px;
}

/* Gráficos */
canvas {
    max-width: 100%;
    background: #1e1e1e;
    padding: 10px;
    border-radius: 8px;
}

/* Links */
a {
    color: #00b7ff !important;
    transition: color 0.3s;
}

a:hover {
    color: #007bff !important;
}

/* Alertas */
.alert {
    color: #ffffff !important;
}

.alert-success {
    background: #28a745;
}

.alert-danger {
    background: #dc3545;
}

/* Animações sutis */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    animation: fadeIn 0.5s ease-in;
}

/* Animação de carregamento */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #007bff;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 576px) {
    .table {
        font-size: 0.9rem;
        overflow-x: auto;
        display: block;
    }
    .card {
        margin-bottom: 1rem;
    }
    .form-control, .form-select {
        font-size: 0.95rem;
    }
    .modal-dialog {
        margin: 1rem;
        max-width: 95%;
    }
}