/* Estilos compartilhados para área administrativa - RAT ATMs */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    --text-primary: #1F2937;
    --muted-text: #6B7280;
    --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: #F3F4F6;
    color: var(--text-primary);
    line-height: 1.6;
    --cor--siber: #2e3136!important;
    --header-bg: linear-gradient(135deg, #6f5b26 10%, #66552d 80%) !important;
    --fundo_sideber:linear-gradient(135deg, #8a5e39 10%, #a1948b 50%, #a2643f 100%);
    --box-siber : 2px 0 10px rgba(0, 0, 0, 0.1);
    --card : white;
    --fundo-cursor-siber:#981e69;
    --box-card:0 4px 6px rgba(0, 0, 0, 0.05);
    --color-cursor-siber: #ffffffd2;
    --borda-cursor-siber: #1E3A8A;
    --ative-fundo: #981e69;
    --color-ative: #ffffffd2;
    --ative-borda:#981e69;;
    --page-h1-cor: var(--text-primary);
    --page-p-color: var(--muted-text);
    --fundo-tabela:white;
    --tabela-borda: 0 4px 6px rgba(0, 0, 0, 0.05);
    --fundo-tabela-th:white;
    --tabela-th-cor: var(--text-primary);
    --tabela-color-td: var(--text-primary);
    --tabela-cursor-fundo: #F9FAFB;
    --filtro-fundo: white;
    --filtro-borda: 0 4px 6px rgba(0, 0, 0, 0.05);
    --fundo-stat-card: rgb(255, 255, 255) !important;
    --borda-stat-card: 0 4px 6px rgba(0, 0, 0, 0.05);
    --color-stat-content: var(--muted-text);
    --color-stat-number: var(--text-primary);
    --color-label-filtro: var(--muted-text);
   --fundo-modal: rgba(0, 0, 0, 0.5);
   --fundo-modal-content:white;
   --fundo--modal-header: #F8FAFC;
   --modal-header-border-butrton: 1px solid #E5E7EB;
    --color-modal-h3: var(--text-primary);
   --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: #F9FAFB;
    --muted-text: #D1D5DB;
    --card-border: rgba(255, 255, 255, 0.12);
    --input-bg: #111827;
    --input-border: #374151;
    --input-text: #F9FAFB;
    --input-placeholder: #9CA3AF;
    --input-focus-shadow: rgba(59, 130, 246, 0.25);
    --chart-header-bg: rgba(255, 255, 255, 0.04);
    --chart-header-border: rgba(255, 255, 255, 0.08);
    background-color: #0e0e0e !important;
    color: var(--text-primary) !important;
    --header-bg: linear-gradient(135deg, #221f17 10%, #202019 80%) !important;
    --fundo_sideber:linear-gradient(135deg, rgb(41, 40, 39) 10%, rgba(51, 45, 37, 0.863) 50%, rgb(65, 61, 58) 100%);
    --card : rgb(26, 25, 25) !important;
    --cor--siber: rgb(201, 200, 200) !important;
    --fundo-cursor-siber:#000000e0;
    --color-cursor-siber: rgb(201, 200, 200);
    --borda-cursor-siber: #5c0250;
    --box-card: 0 4px 6px rgba(0, 0, 0, 0.815);
    --ative-fundo: #000000e0;
    --color-ative: rgb(201, 200, 200);
   --ative-borda: #981e69; ;
    --page-h1-cor: var(--text-primary);
    --page-p-color: var(--muted-text);
   --fundo-tabela: rgb(26, 25, 25);
   --tabela-borda: 0 4px 6px rgba(0, 0, 0, 0.829);
   --fundo-tabela-th:rgb(29, 28, 28);
    --tabela-th-cor: var(--text-primary);
    --tabela-color-td: var(--text-primary);
  --tabela-cursor-fundo: #000000e0;
  --filtro-fundo:  rgb(26, 25, 25);
  --filtro-borda: 0 4px 6px rgba(0, 0, 0, 0.692);
  --fundo-stat-card: rgb(26, 25, 25) !important;
  --borda-stat-card: 0 4px 6px rgba(0, 0, 0, 0.692) !important;
    --color-stat-content: var(--muted-text);
    --color-stat-number: var(--text-primary);
    --color-label-filtro: var(--muted-text);
  --fundo-modal: rgba(90, 90, 90, 0.144);
  --fundo-modal-content:rgb(36, 35, 35) !important;
  --fundo--modal-header: rgb(80, 80, 80) !important;
  --modal-header-border-butrton: 1px solid #000000;
    --color-modal-h3: var(--text-primary);
  --view-detalhes: #1b1b1b;
  }

/*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);
}

/* Botão esconder/expandir — na borda direita do menu */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: fixed;
    left: calc(280px - 18px);
    top: calc(70px + 20px);
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    color: #374151;
    font-size: 14px;
    z-index: 950;
    transition: left 0.3s ease, background-color 0.2s, box-shadow 0.2s;
}

.sidebar-toggle-btn:hover {
    background: #f3f4f6;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

body.sidebar-collapsed .sidebar-toggle-btn {
    left: 10px;
    z-index: 1001;
}

body[data-theme="dark"] .sidebar-toggle-btn {
    background: #374151;
    color: #f9fafb;
}

body[data-theme="dark"] .sidebar-toggle-btn:hover {
    background: #4b5563;
}

/* 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;
    transition: transform 0.3s ease;
    z-index: 900;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
    padding: 0 12px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 15px 2px;
    color: var( --cor--siber) ;
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    border-radius: 10px;
}

.sidebar-nav li a:hover {
    background-color: var(--fundo-cursor-siber) ;
    color: var(--color-cursor-siber);
    border-right-color: var(--borda-cursor-siber);
    border-radius: 10px;
}

.sidebar-nav li a.active,
.sidebar-nav .active {
    background-color: var(--ative-fundo);
    color: var(--color-ative);
    border-right-color: var(--ative-borda) !important;
    border-radius: 10px;
    font-weight: 500;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: none;
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav li a span {
    font-size: 14px;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}



.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;
}

/* Ordenação de colunas nas tabelas */
th.th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.th-sortable:hover {
    filter: brightness(0.95);
}

.th-sort-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    vertical-align: middle;
    width: 10px;
    height: 14px;
    position: relative;
    top: -1px;
}

.th-sort-icon::before,
.th-sort-icon::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.th-sort-icon::before {
    border-bottom: 5px solid #c0c4cc;
    margin-bottom: 2px;
}

.th-sort-icon::after {
    border-top: 5px solid #c0c4cc;
}

th.th-sortable.sort-asc .th-sort-icon::before {
    border-bottom-color: #2563eb;
}

th.th-sortable.sort-desc .th-sort-icon::after {
    border-top-color: #2563eb;
}

.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;
}

.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;
}
.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 (modo claro — cabeçalhos com fundo colorido) */
#modalRegistrarOcorrencia .modal-header,
#modalVisualizarOcorrencia .modal-header,
#modalEncaminharOcorrencia .modal-header,
#modalConfirmarExclusao .modal-header {
    color: #fff !important;
    border-bottom-color: transparent !important;
}

#modalRegistrarOcorrencia .modal-header h3,
#modalVisualizarOcorrencia .modal-header h3,
#modalEncaminharOcorrencia .modal-header h3,
#modalConfirmarExclusao .modal-header h3 {
    color: #fff !important;
}

#modalRegistrarOcorrencia .modal-header h3 i,
#modalVisualizarOcorrencia .modal-header h3 i,
#modalEncaminharOcorrencia .modal-header h3 i,
#modalConfirmarExclusao .modal-header h3 i {
    color: #fff !important;
}

/* Modais - Pessoal (modo claro — cabeçalhos com fundo colorido) */
#modalParceiro .modal-header,
#modalUsuario .modal-header,
#modalVisualizarParceiro .modal-header,
#modalVisualizarUsuario .modal-header {
    color: #fff !important;
    border-bottom-color: transparent !important;
}

#modalParceiro .modal-header h3,
#modalUsuario .modal-header h3,
#modalVisualizarParceiro .modal-header h3,
#modalVisualizarUsuario .modal-header h3 {
    color: #fff !important;
}

#modalParceiro .modal-header h3 i,
#modalUsuario .modal-header h3 i,
#modalVisualizarParceiro .modal-header h3 i,
#modalVisualizarUsuario .modal-header h3 i,
#modalParceiro .modal-header button,
#modalUsuario .modal-header button,
#modalVisualizarParceiro .modal-header button,
#modalVisualizarUsuario .modal-header button {
    color: #fff !important;
}

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, #1b0a15 0%, #3f0127 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, #1b0a15 0%, #3f0127 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) {
    .sidebar-toggle-btn {
        display: none;
    }

    /* 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;
}