/* Estilos compartilhados para área administrativa - RAT ATMs */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    --text-primary: #1F2937;
    --muted-text: #4B5563;
    --card-border: #E5E7EB;
    --input-bg: #FFFFFF;
    --input-border: #D1D5DB;
    --input-text: #1F2937;
    --input-placeholder: #9CA3AF;
    --input-focus-shadow: rgba(30, 58, 138, 0.1);
    --chart-header-bg: #F8FAFC;
    --chart-header-border: #E5E7EB;
    font-family: 'Inter', sans-serif;
    background-color: #F8FAFC;
    color: var(--text-primary);
    line-height: 1.6;
    /* Cores institucionais - Azul corporativo */
    --cor--siber: #1E3A8A !important;
    --header-bg: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%) !important;
    --fundo_sideber: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    --box-siber: 0 2px 8px rgba(30, 58, 138, 0.08);
    --card: #FFFFFF;
    --fundo-cursor-siber: #EFF6FF;
    --box-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    --color-cursor-siber: #1E3A8A;
    --borda-cursor-siber: #3B82F6;
    --ative-fundo: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    --color-ative: #FFFFFF;
    --ative-borda: #1E40AF;
    --page-h1-cor: #1E3A8A;
    --page-p-color: #4B5563;
    --fundo-tabela: #FFFFFF;
    --tabela-borda: 0 2px 8px rgba(0, 0, 0, 0.04);
    --fundo-tabela-th: #F1F5F9;
    --tabela-th-cor: #1E3A8A;
    --tabela-color-td: #1F2937;
    --tabela-cursor-fundo: #F8FAFC;
    --filtro-fundo: #FFFFFF;
    --filtro-borda: 0 2px 8px rgba(0, 0, 0, 0.04);
    --fundo-stat-card: #FFFFFF !important;
    --borda-stat-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    --color-stat-content: #6B7280;
    --color-stat-number: #1E3A8A;
    --color-label-filtro: #4B5563;
    --fundo-modal: rgba(30, 58, 138, 0.4);
    --fundo-modal-content: #FFFFFF;
    --fundo--modal-header: #F1F5F9;
    --modal-header-border-butrton: 1px solid #E5E7EB;
    --color-modal-h3: #1E3A8A;
    --view-detalhes: #F8FAFC;
}

.modal-processar {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    margin: 0;
    height: 100%;
    background-color: rgba(43, 42, 42, 0.384);

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.conteudo {

    color: white;
    margin:400px auto ;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.conteudo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    animation: zoomEffect 1s infinite alternate ease-in-out;
}
/*Dark thema  */
body[data-theme="dark"]{
    --text-primary: #FFFFFF;
    --muted-text: #E5E7EB;
    --card-border: rgba(255, 255, 255, 0.15);
    --input-bg: #1F2937;
    --input-border: #4B5563;
    --input-text: #FFFFFF;
    --input-placeholder: #9CA3AF;
    --input-focus-shadow: rgba(59, 130, 246, 0.3);
    --chart-header-bg: rgba(255, 255, 255, 0.05);
    --chart-header-border: rgba(255, 255, 255, 0.1);
    background-color: #111827 !important;
    color: var(--text-primary) !important;
    --header-bg: linear-gradient(135deg, #1c2746 0%, #243c70 50%, #2a4f8a 100%) !important;
    --fundo_sideber: linear-gradient(180deg, #1F2937 0%, #111827 100%);
    --card : #1F2937 !important;
    --cor--siber: #E5E7EB !important;
    --fundo-cursor-siber: #374151;
    --color-cursor-siber: #E5E7EB;
    --borda-cursor-siber: #3B82F6;
    --box-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --ative-fundo: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
    --color-ative: #FFFFFF;
   --ative-borda: #3B82F6;
    --page-h1-cor: #FFFFFF;
    --page-p-color: #E5E7EB;
   --fundo-tabela: #1F2937;
   --tabela-borda: 0 4px 6px rgba(0, 0, 0, 0.3);
   --fundo-tabela-th: #374151;
    --tabela-th-cor: #FFFFFF;
    --tabela-color-td: #E5E7EB;
  --tabela-cursor-fundo: #374151;
  --filtro-fundo:  #1F2937;
  --filtro-borda: 0 4px 6px rgba(0, 0, 0, 0.3);
  --fundo-stat-card: #1F2937 !important;
  --borda-stat-card: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    --color-stat-content: #D1D5DB;
    --color-stat-number: #FFFFFF;
    --color-label-filtro: #E5E7EB;
  --fundo-modal: rgba(0, 0, 0, 0.6);
  --fundo-modal-content: #1F2937 !important;
  --fundo--modal-header: #011a41 !important;
  --modal-header-border-butrton: 1px solid #4B5563;
    --color-modal-h3: #FFFFFF;
  --view-detalhes: #374151;
  }

/*Dark thema  final */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--header-bg) ;
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.logo i {
    font-size: 24px;
    color: #FACC15;
}

.admin-name {
    font-size: 16px;
    font-weight: 500;
}

.profile-button {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.profile-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.profile-button i {
    font-size: 18px;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--fundo_sideber) ;
    box-shadow: var(--box-siber); 
    color : var(--cor--siber);
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: var(--cor--siber);
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    border-radius: 0 8px 8px 0;
}

.sidebar-nav li a:hover {
    background-color: var(--fundo-cursor-siber);
    color: var(--color-cursor-siber);
    border-right-color: var(--borda-cursor-siber);
}

.sidebar-nav .link.active a {
    background: var(--ative-fundo);
    color: var(--color-ative);
    border-right-color: var(--ative-borda) !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.15);
}

.sidebar-nav .link.active a i {
    color: var(--color-ative);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #3B82F6;
    transition: color 0.3s;
}

.sidebar-nav li a span {
    font-size: 14px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background-color: #F8FAFC;
    min-height: calc(100vh - 70px);
}



.header-actions {
    display: flex;
    gap: 15px;
}

/* Cards */
.card {
    background-color: var(--card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--box-card);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background-color: #1E3A8A;
    color: white;
}

.btn-primary:hover {
    background-color: #1E40AF;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6B7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4B5563;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #10B981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: #F59E0B;
    color: white;
}

.btn-warning:hover {
    background-color: #D97706;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #EF4444;
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 16px;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: #DCFCE7;
    color: #16A34A;
}

.status-inactive {
    background-color: #FEE2E2;
    color: #DC2626;
}

.status-pending {
    background-color: #FEF3C7;
    color: #D97706;
}

.status-operational {
    background-color: #DCFCE7;
    color: #16A34A;
}

.status-maintenance {
    background-color: #FEF3C7;
    color: #D97706;
}

.status-offline {
    background-color: #FEE2E2;
    color: #DC2626;
}

/* Tables */
.table-container {
    background-color: var(--fundo-tabela);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tabela-borda) ;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: var(--fundo-tabela-th);
    padding: 10px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--tabela-th-cor) ;
    border-bottom: var(--modal-header-border-butrton) !important;
    font-size: 14px;
}

.table td {
    padding: 10px 15px;
    border-bottom: 1px var(--modal-header-border-butrton) !important;
    font-size: 14px;
    color: var(--tabela-color-td);
}

.table tbody tr:hover {
    background-color: var(--tabela-cursor-fundo) ;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var( --color-stat-number);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--input-text);
    background-color: var(--input-bg);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--input-text);
    background-color: var(--input-bg);
    transition: border-color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--input-placeholder);
}

/* Filters */
.filters-section {
    background-color: var(--filtro-fundo);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow:var(--filtro-borda) ;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-label-filtro) ;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    background-color: white;
    color: #6B7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}

.pagination button.active {
    background-color: #1E3A8A;
    color: white;
    border-color: #1E3A8A;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--fundo-modal);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--fundo-modal-content);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: var(--fundo--modal-header) !important;
    padding: 20px 25px;
    border-bottom: var(--modal-header-border-butrton) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-modal-h3) !important;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6B7280;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: #E5E7EB;
    color: #1F2937;
}

.modal-body {
    padding: 25px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    background-color: var(--fundo-modal-content);
    color: var(--text-primary);
}

.modal-footer {
    background-color: var(--fundo--modal-header) ;
    padding: 20px 25px;
    border-top: var(--modal-header-border-butrton);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex: 0 0 auto;
}

/* Melhorias para modais no modo claro - garantir visibilidade */
body:not([data-theme="dark"]) .modal-content {
    background-color: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

body:not([data-theme="dark"]) .modal-header {
    background: linear-gradient(135deg, #50422f 0%, #61583b 100%) !important;
    color: white !important;
}

body:not([data-theme="dark"]) .modal-header h3 {
    color: white !important;
}

body:not([data-theme="dark"]) .modal-close {
    color: white !important;
}

body:not([data-theme="dark"]) .modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

body:not([data-theme="dark"]) .modal-body {
    background-color: #FFFFFF !important;
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) .modal-body label {
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) .modal-body input,
body:not([data-theme="dark"]) .modal-body select,
body:not([data-theme="dark"]) .modal-body textarea {
    background-color: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) .modal-body input:focus,
body:not([data-theme="dark"]) .modal-body select:focus,
body:not([data-theme="dark"]) .modal-body textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

body:not([data-theme="dark"]) .modal-body input[readonly] {
    background-color: #F3F4F6 !important;
    color: #6B7280 !important;
}

body:not([data-theme="dark"]) .modal-body small {
    color: #6B7280 !important;
}

/* Estilos específicos para modal de Novo Voo e outros modais VIPAERO */
body:not([data-theme="dark"]) #modalNovoVoo .modal-content,
body:not([data-theme="dark"]) .modal-content[style*="max-width: 900px"] {
    background-color: #FFFFFF !important;
}

body:not([data-theme="dark"]) #modalNovoVoo .form-group input,
body:not([data-theme="dark"]) #modalNovoVoo .form-group select {
    background-color: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) #modalNovoVoo .form-group label {
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) #modalNovoVoo .form-group small {
    color: #6B7280 !important;
}

/* Estilos para modais em consulta-voos.php e outros arquivos */
body:not([data-theme="dark"]) .modal-content[style*="background: rgba(10, 24, 41"] {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

body:not([data-theme="dark"]) .modal-header[style*="border-bottom: 1px solid rgba(255, 255, 255, 0.08)"] {
    background: linear-gradient(135deg, #50422f 0%, #61583b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body:not([data-theme="dark"]) .modal-header h3[style*="color: #fefefe"] {
    color: white !important;
}

body:not([data-theme="dark"]) .modal-close[style*="color: #fefefe"] {
    color: white !important;
}

body:not([data-theme="dark"]) .modal-close[style*="color: #fefefe"]:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

body:not([data-theme="dark"]) input[style*="background: rgba(6, 15, 29"],
body:not([data-theme="dark"]) select[style*="background: rgba(6, 15, 29"],
body:not([data-theme="dark"]) textarea[style*="background: rgba(6, 15, 29"] {
    background: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) .voo-info-text[style*="color: #94b5d8"] {
    color: #6B7280 !important;
}

body:not([data-theme="dark"]) .btn-secondary[style*="background: rgba(6, 15, 29"] {
    background: #F3F4F6 !important;
    border: 1px solid #D1D5DB !important;
    color: #1F2937 !important;
}

body:not([data-theme="dark"]) .btn-secondary[style*="background: rgba(6, 15, 29"]:hover {
    background: #E5E7EB !important;
    border-color: #9CA3AF !important;
}
.stat-card {
    background-color: var(--fundo-stat-card) !important;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--borda-stat-card) !important;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid transparent;
}
.stat-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-stat-content) !important;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-stat-number) !important;
    margin-bottom: 8px;
}

.view-details-modern p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--view-detalhes) !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.view-details-modern p:hover {
    background: #f1f5f9;
}

.view-details-modern strong {
    min-width: 140px;
    color: var( --color-stat-number);
    font-weight: 600;
}
.delete-warning {
    font-size: 1.1rem;
    color: var(--color-label-filtro) !important;
    margin-bottom: 1.5rem;
}

.company-detail-item label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-label-filtro) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: block;
}

.company-detail-item .value {
    font-size: 14px;
    color: var(--color-label-filtro) !important;
    font-weight: 500;
}
/* Scrollbar do conteúdo do modal */
.modal-body::-webkit-scrollbar { width: 8px; height: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
.modal-body { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }

/* Scrollbar global para dark mode */
body[data-theme="dark"] ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgb(26, 25, 25);
    border-radius: 6px;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgb(60, 60, 60);
    border-radius: 6px;
    border: 2px solid rgb(26, 25, 25);
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgb(80, 80, 80);
}

body[data-theme="dark"] {
    scrollbar-width: thin;
    scrollbar-color: rgb(60, 60, 60) rgb(26, 25, 25);
}

body[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb {
    background: rgb(60, 60, 60);
}

body[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgb(80, 80, 80);
}

body[data-theme="dark"] .modal-body {
    scrollbar-color: rgb(60, 60, 60) rgb(26, 25, 25);
}

/* Modais - Linha SOS */
body[data-theme="dark"] #modalRegistrarOcorrencia .modal-content,
body[data-theme="dark"] #modalVisualizarOcorrencia .modal-content,
body[data-theme="dark"] #modalEncaminharOcorrencia .modal-content,
body[data-theme="dark"] #modalConfirmarExclusao .modal-content {
    background-color: rgb(26, 25, 25) !important;
    color: #e0e0e0;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] #modalRegistrarOcorrencia .modal-header,
body[data-theme="dark"] #modalEncaminharOcorrencia .modal-header {
    background: linear-gradient(135deg, #524127 0%, #443726 100%) !important;
    border-bottom-color: transparent !important;
    color: #fff;
}

body[data-theme="dark"] #modalVisualizarOcorrencia .modal-header,
body[data-theme="dark"] #modalConfirmarExclusao .modal-header {
    background: linear-gradient(135deg, #3f1f01 0%, #523513 100%) !important;
    border-bottom-color: transparent !important;
    color: #fff;
}

body[data-theme="dark"] #modalRegistrarOcorrencia .modal-body,
body[data-theme="dark"] #modalVisualizarOcorrencia .modal-body,
body[data-theme="dark"] #modalEncaminharOcorrencia .modal-body,
body[data-theme="dark"] #modalConfirmarExclusao .modal-body {
    background: rgb(24, 24, 24) !important;
    color: #e0e0e0;
}

body[data-theme="dark"] #modalRegistrarOcorrencia .modal-footer,
body[data-theme="dark"] #modalVisualizarOcorrencia .modal-footer,
body[data-theme="dark"] #modalEncaminharOcorrencia .modal-footer,
body[data-theme="dark"] #modalConfirmarExclusao .modal-footer {
    background: rgb(22, 22, 22) !important;
    border-top-color: #333 !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia .form-group label,
body[data-theme="dark"] #modalVisualizarOcorrencia .form-group label,
body[data-theme="dark"] #modalEncaminharOcorrencia .form-group label {
    color: #e0e0e0 !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia .form-control,
body[data-theme="dark"] #modalRegistrarOcorrencia .form-select,
body[data-theme="dark"] #modalVisualizarOcorrencia .form-control,
body[data-theme="dark"] #modalVisualizarOcorrencia .form-select,
body[data-theme="dark"] #modalEncaminharOcorrencia .form-control,
body[data-theme="dark"] #modalEncaminharOcorrencia .form-select {
    background: rgb(36, 35, 35) !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia .form-control:focus,
body[data-theme="dark"] #modalRegistrarOcorrencia .form-select:focus,
body[data-theme="dark"] #modalEncaminharOcorrencia .form-control:focus,
body[data-theme="dark"] #modalEncaminharOcorrencia .form-select:focus {
    background: rgb(40, 39, 39) !important;
    border-color: #2563eb !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia h4,
body[data-theme="dark"] #modalRegistrarOcorrencia h3,
body[data-theme="dark"] #modalEncaminharOcorrencia h3,
body[data-theme="dark"] #modalConfirmarExclusao h3,
body[data-theme="dark"] #modalVisualizarOcorrencia h3 {
    color: #f9fafb !important;
}

body[data-theme="dark"] #modalVisualizarOcorrencia .modal-body,
body[data-theme="dark"] #modalConfirmarExclusao .modal-body {
    color: #e0e0e0;
}

body[data-theme="dark"] #modalRegistrarOcorrencia div[style*="box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2)"],
body[data-theme="dark"] #modalRegistrarOcorrencia div[style*="border: 1px solid rgba(5, 5, 5"],
body[data-theme="dark"] #modalEncaminharOcorrencia div[style*="border:1px solid #374151"],
body[data-theme="dark"] #modalEncaminharOcorrencia div[style*="border-left:4px solid #3b82f6"] {
    background: rgba(36, 36, 36, 0.9) !important;
    border-color: #3f3f3f !important;
    color: #e0e0e0 !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia #btnFecharModalOcorrencia,
body[data-theme="dark"] #modalEncaminharOcorrencia #btnCancelarEncaminhar,
body[data-theme="dark"] #modalEncaminharOcorrencia #btnConfirmarEncaminhar,
body[data-theme="dark"] #modalConfirmarExclusao #btnCancelarExclusao,
body[data-theme="dark"] #modalConfirmarExclusao #btnConfirmarExclusao {
    background: #374151 !important;
    color: #f9fafb !important;
    border: 1px solid #4b5563 !important;
}

body[data-theme="dark"] #modalRegistrarOcorrencia #btnFecharModalOcorrencia:hover,
body[data-theme="dark"] #modalEncaminharOcorrencia #btnCancelarEncaminhar:hover,
body[data-theme="dark"] #modalEncaminharOcorrencia #btnConfirmarEncaminhar:not([disabled]):hover,
body[data-theme="dark"] #modalConfirmarExclusao #btnCancelarExclusao:hover,
body[data-theme="dark"] #modalConfirmarExclusao #btnConfirmarExclusao:hover {
    background: #4b5563 !important;
}

body[data-theme="dark"] #modalEncaminharOcorrencia #btnConfirmarEncaminhar[disabled] {
    background: #2d3748 !important;
    border-color: #2d3748 !important;
    color: #9ca3af !important;
}

/* Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botão do menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
}

/* Overlay para menu mobile */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 20px;
    }

    .logo span {
        display: none;
    }

    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .table th,
    .table td {
        padding: 10px 15px;
        font-size: 13px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    /* Mostrar botão do menu mobile */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Esconder elementos do header em mobile */
    .user-info .user-name {
        display: none;
    }
    
    /* Sidebar mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 20px;
    }
    
    .logo span {
        display: none;
    }
    
    .nome_user {
        display: none !important;
    }
    #profileBtn {
        display: none;
    }
    .main-content {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

/* Responsividade para tabela de ocorrências */
.table-container,
div[style*="overflow-x"] {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
}

.linha-sos-table {
    min-width: 900px;
}

/* Prevenir scroll horizontal na página */
body, html {
    overflow-x: hidden;
    max-width: 100%;
}

.main-content {
    max-width: 100%;
    overflow-x: hidden;
}

@media screen and (max-width: 1024px) {
    .linha-sos-table {
        font-size: 12px;
        min-width: 800px;
    }
    
    .linha-sos-table th,
    .linha-sos-table td {
        padding: 6px !important;
    }
    
    .linha-sos-table .btn-icon {
        padding: 4px 8px !important;
        font-size: 12px;
    }
}

@media screen and (max-width: 768px) {
    .filters-section,
    .filters-section > div,
    .filter-row {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
    
    .linha-sos-table {
        font-size: 12px;
        min-width: 700px;
    }
    
    .linha-sos-table th,
    .linha-sos-table td {
        padding: 6px !important;
    }
    
    .linha-sos-table .btn-icon {
        padding: 4px 6px !important;
        margin: 0 1px !important;
    }
    
    .linha-sos-table .btn-icon i {
        font-size: 11px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select,
    .filter-group button {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Estilos para Modais Personalizados */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.custom-modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.custom-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
    border-top: 4px solid #3B82F6;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.custom-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6B7280;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.custom-modal-close:hover {
    color: #1F2937;
}

.custom-modal-body {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.custom-modal-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.custom-modal-message {
    margin: 0;
    color: #4B5563;
    font-size: 16px;
    line-height: 1.5;
    flex: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.custom-modal-footer {
    padding: 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.custom-modal-btn-primary {
    background-color: #2563EB;
    color: white;
}

.custom-modal-btn-primary:hover {
    background-color: #1D4ED8;
}

.custom-modal-btn-secondary {
    background-color: #F3F4F6;
    color: #374151;
}

.custom-modal-btn-secondary:hover {
    background-color: #E5E7EB;
}

/* Modo escuro */
body[data-theme="dark"] .custom-modal-content {
    background: var(--card);
    color: var(--cor--siber);
}

body[data-theme="dark"] .custom-modal-header {
    border-bottom-color: #374151;
}

body[data-theme="dark"] .custom-modal-title {
    color: var(--cor--siber);
}

body[data-theme="dark"] .custom-modal-message {
    color: var(--page-p-color);
}

body[data-theme="dark"] .custom-modal-footer {
    border-top-color: #374151;
}

body[data-theme="dark"] .custom-modal-btn-secondary {
    background-color: #374151;
    color: var(--cor--siber);
}

body[data-theme="dark"] .custom-modal-btn-secondary:hover {
    background-color: #4B5563;
}

.custom-prompt-input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.custom-prompt-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body[data-theme="dark"] .custom-prompt-input {
    background-color: var(--card);
    color: var(--cor--siber);
    border-color: #374151;
}

body[data-theme="dark"] .custom-prompt-input:focus {
    border-color: #806902;
    box-shadow: 0 0 0 3px rgba(128, 105, 2, 0.1);
}

/* Responsividade */
@media (max-width: 480px) {
    .custom-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .custom-modal-header {
        padding: 15px;
    }
    
    .custom-modal-title {
        font-size: 18px;
    }
    
    .custom-modal-body {
        padding: 15px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .custom-modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .custom-modal-btn {
        width: 100%;
    }
}

/* Estilos para Modal de Perfil */
#profileModal .modal-content {
    background-color: var(--fundo-modal-content);
    color: var(--page-h1-cor);
}

#profileModal .modal-header {
    background: linear-gradient(135deg, #6d4509 10%, #57300c 80%) !important;
    color: #e7e3e3;
}

#profileModal .modal-body {
    background-color: var(--fundo-modal-content);
}

#profileModal .modal-body #profileInfo {
    color: var(--page-h1-cor);
}

#profileModal .modal-body #profileName {
    color: var(--page-h1-cor);
}

#profileModal .modal-body #profileCategory {
    color: var(--page-p-color);
}

#profileModal .modal-body span[style*="color:#6B7280"] {
    color: var(--page-p-color) !important;
}

#profileModal .modal-body span[style*="color:#1F2937"] {
    color: var(--page-h1-cor) !important;
}

#profileModal .modal-footer {
    background-color: var(--fundo--modal-header);
    border-top: var(--modal-header-border-butrton);
}

/* Tema escuro para modal de perfil */
body[data-theme="dark"] #profileModal .modal-content {
    background-color: var(--card);
}

body[data-theme="dark"] #profileModal .modal-body {
    background-color: var(--card);
}

body[data-theme="dark"] #profileModal .modal-body #profileInfo {
    color: var(--page-h1-cor);
}

body[data-theme="dark"] #profileModal .modal-body #profileName {
    color: var(--page-h1-cor);
}

body[data-theme="dark"] #profileModal .modal-body #profileCategory {
    color: var(--page-p-color);
}

body[data-theme="dark"] #profileModal .modal-body div[style*="border-bottom:1px solid #f3f4f6"] {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-theme="dark"] #profileModal .modal-body div[style*="border-top:1px solid #e5e7eb"] {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Estilos específicos para informações do perfil */
.profile-info-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

body[data-theme="dark"] .profile-info-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

body[data-theme="dark"] .profile-info-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.profile-info-label {
    color: var(--page-p-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info-label i {
    color: #091f99;
    width: 16px;
}

.profile-info-value {
    color: var(--page-h1-cor);
    font-weight: 500;
}