/* =======================================
   Custom Stylesheet - Tema Escuro
   Autor: Marcelo Macedo (Farol Operacional)
   Descrição: CSS completo com estilos para tema dark, estruturado por seções comentadas
   ======================================= */

body {
    background-color: #111111;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #58a6ff;
}

a {
    color: #58a6ff;
    text-decoration: none;
}

hr {
    border-top: 1px solid #30363d;
}

.container {
    max-width: 1200px;
    margin: auto;
}

.section {
    margin-bottom: 40px;
}

.card {
    background-color: rgba(30, 30, 30, 0.6);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    color: #ddd;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.label {
    font-weight: bold;
    color: #e3a008;
}

.comment {
    background-color: rgba(31, 41, 51, 0.5);
    border-left: 4px solid #58a6ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #ddd;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(88, 166, 255, 0.15);
}

.comment .responsavel {
    font-style: italic;
    color: #00cc66;
    font-weight: bold;
}

button,
.btn,
.dbc-btn {
    background: linear-gradient(
        135deg,
        rgba(13, 110, 253, 0.8),
        rgba(0, 90, 213, 0.9)
    ) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 8px 16px;
    border: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(88, 166, 255, 0.15);
    transition: all 0.3s ease;
}

input[type='text'],
input[type='number'] {
    background-color: rgba(31, 31, 31, 0.7);
    color: #fff;
    border: 1px solid rgba(68, 68, 68, 0.4);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

input[type='text']:focus,
input[type='number']:focus {
    background-color: rgba(31, 31, 31, 0.9);
    border: 1px solid rgba(88, 166, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

input::placeholder {
    color: #888;
}

.light-switch .form-check-input {
    background-color: #e0e0e0 !important;
    border-color: #ccc !important;
}

.light-switch .form-check-input:checked {
    background-color: #0d6efd !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-indicator {
    height: 6px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
    border-radius: 3px;
}

:root {
    --barra-entrega-texto: #fff;
}

.accordion-title {
    background-color: #009999 !important;
    color: white !important;
    font-weight: 600;
    font-size: 14px;
}

.accordion-value {
    font-size: 14px;
    color: #198754;
    margin: 2px 0;
    cursor: pointer;
}

.dark-mode .dash-table-container {
    background-color: #111111 !important;
    color: #ffffff !important;
    border: 1px solid #444 !important;
}

.dark-mode .dash-table-container .dash-header {
    background-color: #0d1117 !important;
    color: #58a6ff !important;
    font-weight: bold;
}

.dark-mode .dash-table-container .dash-cell {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #30363d !important;
}

.dark-mode .dash-table-container .dash-cell.focused {
    background-color: #22272e !important;
}

.dark-mode .dash-table-container .dash-cell:hover {
    background-color: #2a2f36 !important;
}

.dark-mode .dash-cell:focus {
    box-shadow: none !important;
}

.dash-table-tooltip {
    background-color: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    font-size: 15px;
    padding: 8px 10px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInTooltip 0.2s ease-in-out;
    overflow-wrap: break-word;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dash-table-tooltip::after {
    display: none !important;
}

.card-hover {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px 16px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
}

.card-hover:hover {
    transform: scale(1.04);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.card-hover small {
    display: block;
    font-size: 13px;
    line-height: 16px;
    margin-bottom: 2px;
    white-space: normal !important;
    word-break: break-word;
    text-align: center;
    max-width: 100%;
    color: #ddd;
}

.card-hover h5 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.card-borda-verde-escuro {
    border: 2px solid #198754 !important;
}
.card-borda-azul {
    border: 2px solid #0d6efd !important;
}
.card-borda-amarelo {
    border: 2px solid #ffc107 !important;
}
.card-borda-cinza {
    border: 2px solid #adb5bd !important;
}
.card-borda-roxo {
    border: 2px solid #9b59b6 !important;
}
.card-borda-vermelho {
    border: 2px solid #dc3545 !important;
}
.card-borda-verde-claro {
    border: 2px solid #28a745 !important;
}

.card-borda-sem-problema {
    background-color: #28a745;
    border: 3px solid #28a745;
    box-shadow: 0 0 5px 10px rgba(40, 167, 69, 0.4);
}

.card-borda-com-problema {
    background-color: #ffc107;
    border: 3px solid #ffc107;
    box-shadow: 0 0 5px 10px rgba(255, 193, 7, 0.4);
}

.card-borda-problema-crítico {
    background-color: #dc3545;
    border: 3px solid #dc3545;
    box-shadow: 0 0 5px 10px rgba(220, 53, 69, 0.4);
}

.card-borda-indefinido {
    background-color: #6c757d;
    border: 3px solid #6c757d;
    box-shadow: 0 0 5px 10px rgba(108, 117, 125, 0.4);
}

.theme-dark .card-borda-sem-problema,
.theme-dark .card-borda-com-problema,
.theme-dark .card-borda-problema-crítico,
.theme-dark .card-borda-indefinido {
    color: #fff !important;
}

.card-farol {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.card-farol:hover {
    transform: scale(1.15);
    box-shadow: 0 0 5px 10px #111111;
}

.theme-dark .Select-control,
.theme-dark .Select-menu-outer,
.theme-dark .Select-menu {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

.theme-dark .Select-placeholder,
.theme-dark .Select-value,
.theme-dark .Select-option,
.theme-dark .Select-option:hover,
.theme-dark .Select-option.is-focused,
.theme-dark .Select-option.is-selected {
    background-color: #1f1f1f !important;
    color: #ffffff !important;
}

.theme-dark .Select-option.is-selected {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.theme-dark .navbar-custom {
    background-color: var(--bs-primary) !important;
}

.theme-dark .user-label {
    color: white !important;
}

.theme-dark .navbar-custom .nav-link,
.theme-dark .navbar-custom .navbar-brand,
.theme-dark .user-label,
.theme-dark #theme-status,
.theme-dark .light-switch span {
    color: black !important;
}

.theme-dark .navbar-custom,
.theme-dark .navbar-custom * {
    color: black !important;
}
