/* Estilos compartilhados para área administrativa - RAT ATMs */
@font-face{
    font-family: 'trebuc' ;
    src: url("../fonts/trebuc.ttf");
  }
  @font-face{
    font-family: 'Trebuchet';
    src: url("../fonts/Trebuchet-MS-Italic.ttf");
  }
/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'trebuc', Tahoma, Geneva, Verdana, sans-serif !important;
    background-color: #F8FAFC;
    color: #0F172A;
    line-height: 1.6;
    
    /* Modern Design Tokens - Enhanced */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --secondary: #64748B;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #06B6D4;
    
    /* Glassmorphism Tokens - Premium */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-blur: blur(10px);
    --sidebar-width: 280px;

    /* Legacy Variables mapped to modern ones */
    --cor--siber: var(--secondary) !important;
    --header-bg: #1E40AF;
    --fundo_sideber: #FFFFFF;
    --box-siber: 4px 0 24px rgba(0, 0, 0, 0.04);
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
}

/* Header Modernization */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: var(--header-bg);
    color: white;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.glass {
    background: rgba(30, 64, 175, 0.8) !important; /* Semi-transparent blue */
}

body[data-theme="dark"] .header.glass {
    background: rgba(15, 23, 42, 0.8) !important; 
}

/* Sidebar Modernization */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    background: var(--fundo_sideber);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.sidebar.glass {
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed span, 
.sidebar.collapsed .menu-section-label,
.sidebar.collapsed .submenu-arrow {
    display: none;
}

.sidebar.collapsed .link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .link i {
    margin-right: 0;
    font-size: 20px;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: all 0.3s ease;
    min-height: calc(100vh - 70px);
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

.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;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-profile-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.user-profile-container:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.profile-button {
    width: 40px;
    height: 40px;
    background-color: rgba(135, 206, 235, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.profile-button:hover {
    background-color: rgba(135, 206, 235, 0.3);
}

.profile-button i {
    font-size: 18px;
}

.user-shield-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-shield-icon .fa-user {
    font-size: 20px;
    color: #fff;
    z-index: 1;
}

.user-shield-icon .shield-overlay {
    position: absolute;
    font-size: 10px;
    color: #fff;
    right: -3px;
    bottom: 1px;
    background-color: #87CEEB;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Estilos para o modal de perfil do usuário */
body[data-theme="dark"] #userProfileModal .modal-content {
    background: var(--fundo-modal-content) !important;
    color: var(--color-modal-h3) !important;
}

body[data-theme="dark"] #userProfileModal .modal-header {
    background: var(--fundo--modal-header) !important;
    border-bottom-color: var(--modal-header-border-butrton) !important;
}

body[data-theme="dark"] #userProfileModal .modal-header h3 {
    color: var(--color-modal-h3) !important;
}

body[data-theme="dark"] #userProfileModal .modal-close {
    color: #9CA3AF !important;
}

body[data-theme="dark"] #userProfileModal .modal-close:hover {
    background-color: #2d2f33 !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #userProfileModal .modal-body {
    background-color: var(--fundo-modal-content) !important;
    color: var(--tabela-color-td) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body * {
    color: var(--tabela-color-td) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body label,
body[data-theme="dark"] #userProfileModal .modal-body .label {
    color: #CBD5E1 !important;
}

body[data-theme="dark"] #userProfileModal .modal-body strong {
    color: var(--color-stat-content) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body p {
    color: var(--tabela-color-td) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body input,
body[data-theme="dark"] #userProfileModal .modal-body select,
body[data-theme="dark"] #userProfileModal .modal-body textarea {
    background-color: #191b1f !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] #userProfileModal .modal-body input:focus,
body[data-theme="dark"] #userProfileModal .modal-body select:focus,
body[data-theme="dark"] #userProfileModal .modal-body textarea:focus {
    border-color: #1E40AF !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body input::placeholder {
    color: #6B7280 !important;
}

body[data-theme="dark"] #userProfileModal .modal-footer {
    background-color: var(--fundo-modal-content) !important;
    border-top-color: var(--modal-header-border-butrton) !important;
}

body[data-theme="dark"] #userProfileModal .modal-body > div {
    border-top-color: var(--modal-header-border-butrton) !important;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: 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;
}

.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 .active  {
    background-color: var(--ative-fundo);
    color: var(--color-ative);
    border-right-color: var(--ative-borda)  !important;
    
    font-weight: 500;


}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav li a span {
    font-size: 14px;
    font-weight: 500;
}

/* Sub-menu Styles */
.sidebar-nav li.has-submenu {
    position: relative;
}

.sidebar-nav li.has-submenu > a {
    cursor: pointer;
    justify-content: space-between;
}

.sidebar-nav .submenu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    width: auto;
}

.sidebar-nav li.has-submenu.active > a .submenu-arrow {
    transform: rotate(90deg);
}

.sidebar-nav .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-nav li.has-submenu.active .submenu {
    max-height: 1000px;
}

.sidebar-nav .submenu li {
    margin-bottom: 0;
}

.sidebar-nav .submenu li a {
    padding-left: 50px;
    padding-right: 25px;
    font-size: 13px;
}

.sidebar-nav .submenu li a i {
    font-size: 14px;
}

/* Dark mode para sub-menu */
body[data-theme="dark"] .sidebar-nav .submenu {
    background-color: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .sidebar-nav .submenu li a {
    color: var(--cor--siber);
}

body[data-theme="dark"] .sidebar-nav .submenu li a:hover {
    background-color: var(--fundo-cursor-siber);
    color: var(--color-cursor-siber);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--page-h1-cor) #1F2937;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    color: var(--page-p-color) #6B7280;
}

.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: 15px 20px;
    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: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    font-size: 14px;
    color: var(--tabela-color-td);
}

.table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Cores alternadas para linhas (zebra striping) */
.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table tbody tr:nth-child(odd) {
    background-color: transparent;
}

/* Hover diferente para linhas pares e ímpares */
.table tbody tr:nth-child(even):hover {
    background-color: rgba(30, 58, 138, 0.15) !important;
    transform: scale(1.001);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table tbody tr:nth-child(odd):hover {
    background-color: rgba(59, 130, 246, 0.12) !important;
    transform: scale(1.001);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Divisores mais visíveis entre linhas */
.table tbody tr:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* Modo escuro - ajustar cores dos divisores e hover */
body[data-theme="dark"] .table tbody tr:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .table tbody tr:nth-child(even):hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

body[data-theme="dark"] .table tbody tr:nth-child(odd):hover {
    background-color: rgba(96, 165, 250, 0.18) !important;
}

/* 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 #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    color: #1F2937;
    background-color: #ffffff;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    color: #1F2937;
    background-color: white;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* ====== DARK MODE - Inputs, selects, textareas ====== */
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background-color: #1e1d1d !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .form-control::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: #888888 !important;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus,
body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus {
    background-color: #252424 !important;
    border-color: #806902 !important;
    box-shadow: 0 0 0 3px rgba(128, 105, 2, 0.2) !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] select option {
    background-color: #1e1d1d !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] .form-select:disabled,
body[data-theme="dark"] .form-control:disabled,
body[data-theme="dark"] input:disabled,
body[data-theme="dark"] select:disabled,
body[data-theme="dark"] textarea:disabled {
    background-color: #2a2929 !important;
    color: #666666 !important;
    cursor: not-allowed;
}

/* ====== DARK MODE - Cards ====== */
body[data-theme="dark"] .card {
    background-color: rgb(26, 25, 25) !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] .card h3,
body[data-theme="dark"] .card h4,
body[data-theme="dark"] .card h5,
body[data-theme="dark"] .card p,
body[data-theme="dark"] .card span:not(.status-badge):not(.status-active):not(.status-inactive):not(.status-pending) {
    color: inherit;
}

/* ====== DARK MODE - Paginação ====== */
body[data-theme="dark"] .pagination button {
    background-color: #1e1d1d !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .pagination button:hover {
    background-color: #000000e0 !important;
    border-color: #806902 !important;
}

body[data-theme="dark"] .pagination button.active {
    background-color: #1E3A8A !important;
    color: white !important;
    border-color: #1E3A8A !important;
}

/* ====== DARK MODE - Modal Tickets e Perfil (inline styles) ====== */
body[data-theme="dark"] #ticketsModal .modal-content,
body[data-theme="dark"] #userProfileModal .modal-content {
    background-color: rgb(36, 35, 35) !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-header,
body[data-theme="dark"] #userProfileModal .modal-header {
    background-color: rgb(50, 49, 49) !important;
    border-bottom-color: #3a3939 !important;
}

body[data-theme="dark"] #ticketsModal .modal-header h3,
body[data-theme="dark"] #userProfileModal .modal-header h3 {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-close,
body[data-theme="dark"] #userProfileModal .modal-close {
    color: #9CA3AF !important;
}

body[data-theme="dark"] #ticketsModal .modal-close:hover,
body[data-theme="dark"] #userProfileModal .modal-close:hover {
    background-color: #2d2f33 !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body,
body[data-theme="dark"] #userProfileModal .modal-body {
    background-color: rgb(36, 35, 35) !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body *,
body[data-theme="dark"] #userProfileModal .modal-body * {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body label,
body[data-theme="dark"] #ticketsModal .modal-body .label,
body[data-theme="dark"] #userProfileModal .modal-body label,
body[data-theme="dark"] #userProfileModal .modal-body .label {
    color: #CBD5E1 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body strong,
body[data-theme="dark"] #userProfileModal .modal-body strong {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body p,
body[data-theme="dark"] #userProfileModal .modal-body p {
    color: #CBD5E1 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body input,
body[data-theme="dark"] #ticketsModal .modal-body select,
body[data-theme="dark"] #ticketsModal .modal-body textarea,
body[data-theme="dark"] #userProfileModal .modal-body input,
body[data-theme="dark"] #userProfileModal .modal-body select,
body[data-theme="dark"] #userProfileModal .modal-body textarea {
    background-color: #191b1f !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] #ticketsModal .modal-body input:focus,
body[data-theme="dark"] #ticketsModal .modal-body select:focus,
body[data-theme="dark"] #ticketsModal .modal-body textarea:focus,
body[data-theme="dark"] #userProfileModal .modal-body input:focus,
body[data-theme="dark"] #userProfileModal .modal-body select:focus,
body[data-theme="dark"] #userProfileModal .modal-body textarea:focus {
    border-color: #1E40AF !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1) !important;
}

body[data-theme="dark"] #ticketsModal .modal-body input::placeholder,
body[data-theme="dark"] #userProfileModal .modal-body input::placeholder {
    color: #6B7280 !important;
}

body[data-theme="dark"] #ticketsModal .modal-footer,
body[data-theme="dark"] #userProfileModal .modal-footer {
    background-color: rgb(36, 35, 35) !important;
    border-top-color: #3a3939 !important;
}

/* Modal de Tickets - Estrutura dividida (split) */
body[data-theme="dark"] #ticketsModal .modal-content-split {
    background-color: rgb(36, 35, 35) !important;
}

body[data-theme="dark"] #ticketsModal .modal-left {
    background-color: rgb(36, 35, 35) !important;
    border-right-color: #3a3939 !important;
}

body[data-theme="dark"] #ticketsModal .modal-right {
    background-color: rgb(36, 35, 35) !important;
    border-left-color: #3a3939 !important;
}

/* Itens de ticket na lista */
body[data-theme="dark"] #ticketsModal .ticket-item,
body[data-theme="dark"] #ticketsModal .ticket-list-item,
body[data-theme="dark"] #ticketsModal [class*="ticket-item"] {
    background-color: #191b1f !important;
    border-color: #3a3939 !important;
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .ticket-item:hover,
body[data-theme="dark"] #ticketsModal .ticket-list-item:hover,
body[data-theme="dark"] #ticketsModal [class*="ticket-item"]:hover {
    background-color: #2d2f33 !important;
}

body[data-theme="dark"] #ticketsModal .ticket-item.selected,
body[data-theme="dark"] #ticketsModal .ticket-list-item.selected,
body[data-theme="dark"] #ticketsModal [class*="selected"] {
    background-color: rgba(30, 64, 175, 0.3) !important;
    border-color: #1E40AF !important;
}

body[data-theme="dark"] #ticketsModal .ticket-id,
body[data-theme="dark"] #ticketsModal .ticket-company,
body[data-theme="dark"] #ticketsModal .ticket-problem {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .priority-badge {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .priority-badge.media,
body[data-theme="dark"] #ticketsModal .priority-media {
    background-color: rgba(217, 119, 6, 0.2) !important;
    color: #FCD34D !important;
}

body[data-theme="dark"] #ticketsModal .priority-badge.alta,
body[data-theme="dark"] #ticketsModal .priority-alta {
    background-color: rgba(234, 88, 12, 0.2) !important;
    color: #FCA5A5 !important;
}

body[data-theme="dark"] #ticketsModal .priority-badge.baixa,
body[data-theme="dark"] #ticketsModal .priority-baixa {
    background-color: rgba(5, 150, 105, 0.2) !important;
    color: #6EE7B7 !important;
}

body[data-theme="dark"] #ticketsModal .priority-badge.critica,
body[data-theme="dark"] #ticketsModal .priority-critica {
    background-color: rgba(220, 38, 38, 0.2) !important;
    color: #FCA5A5 !important;
}

body[data-theme="dark"] #ticketsModal .status-badge {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] #ticketsModal .status-badge.aberto {
    background-color: rgba(30, 64, 175, 0.3) !important;
    color: #60A5FA !important;
}

/* 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);
}

.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;
}

body[data-theme="dark"] .modal-close {
    color: #9CA3AF !important;
}

body[data-theme="dark"] .modal-close:hover {
    background-color: #2d2f33 !important;
    color: #e4e4e4 !important;
}

.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 do conteúdo do modal - Modo Escuro */
body[data-theme="dark"] .modal-body::-webkit-scrollbar { width: 8px; height: 8px; }
body[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb { background: #3a3939; border-radius: 8px; }
body[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover { background: #4b5563; }
body[data-theme="dark"] .modal-body { scrollbar-width: thin; scrollbar-color: #3a3939 transparent; }

/* Estilos genéricos para elementos dentro de modais no modo escuro */
body[data-theme="dark"] .modal-body .form-group label {
    color: #CBD5E1 !important;
}

body[data-theme="dark"] .modal-body .form-group input,
body[data-theme="dark"] .modal-body .form-group select,
body[data-theme="dark"] .modal-body .form-group textarea {
    background-color: #191b1f !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .modal-body .info-row,
body[data-theme="dark"] .modal-body .detail-item {
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .modal-body .info-label,
body[data-theme="dark"] .modal-body .detail-label {
    color: #CBD5E1 !important;
}

body[data-theme="dark"] .modal-body .info-value,
body[data-theme="dark"] .modal-body .detail-value {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] .modal-body .btn {
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .modal-body .btn-primary {
    background-color: #1E40AF !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .modal-body .btn-primary:hover {
    background-color: #1E3A8A !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;
    }
}

/* ==========================================================================
   ISAC PARTNER MANAGEMENT - MODERN UI EXTENSION
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --muted: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --radius: 12px;
}

/* Partner Card Styling */
.partner-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: none;
    margin-bottom: 24px;
    border: none;
}

body[data-theme="dark"] .partner-card {
    background: #1a1919;
}

.partner-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

body[data-theme="dark"] .partner-card h2 {
    color: #fefefe;
}

.muted {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Data Table Modernization */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--bg-light);
    padding: 4px; /* Padding for the inner rounded look */
    margin-top: 24px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}

body[data-theme="dark"] .table-container {
    background: #252424;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.data-table thead {
    background: transparent;
}

.data-table th {
    padding: 16px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    border-bottom: none;
    white-space: nowrap;
}

body[data-theme="dark"] .data-table th {
    color: #d1d5db;
}

.data-table td {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: #1F2937;
    border-bottom: none;
    vertical-align: middle;
}

body[data-theme="dark"] .data-table td {
    color: #e5e7eb;
}

.data-table tbody tr {
    transition: background-color 0.2s;
    border-radius: 8px;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

body[data-theme="dark"] .data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Button overrides for partner section */
.partner-card .btn-primary {
    background-color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
}

.partner-card .btn-primary:hover {
    background-color: var(--primary-dark);
}

.partner-card .btn-outline-danger {
    background: transparent;
    border: none;
    color: #374151;
    font-weight: 500;
    box-shadow: none;
}

.partner-card .btn-outline-danger i {
    color: #374151;
}

.partner-card .btn-outline-danger:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.partner-card .btn-outline-danger:hover i {
    color: var(--danger);
}

/* Home Stats Grid Modern */
.home-stat {
    border-radius: var(--radius);
    background: var(--white);
    padding: 20px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body[data-theme="dark"] .home-stat {
    background: #1a1919;
    border-color: rgba(255, 255, 255, 0.05);
}

.home-stat strong {
    font-size: 1.5rem;
    color: var(--primary);
}

body[data-theme="dark"] .home-stat strong {
    color: #fefefe;
}

/* Forms Grid Modern */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
}

.field input, 
.field select, 
.field textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: var(--white);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body[data-theme="dark"] .field input, 
body[data-theme="dark"] .field select, 
body[data-theme="dark"] .field textarea {
    background: #252424;
    border-color: #3a3939;
    color: #e4e4e4;
}

.field input:focus, 
.field select:focus, 
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Action Buttons Modern */
.partner-actions {
    display: flex;
    gap: 12px;
}


/* Global Stats Bar - ISAC Premium */
.global-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin: 85px 30px 10px 310px; /* Offset for header and sidebar */
    border-radius: 16px;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.sidebar-collapsed .global-stats-bar {
    margin-left: 110px;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stats-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stats-item i {
    font-size: 20px;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stats-info {
    display: flex;
    flex-direction: column;
}

.stats-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 600;
}

.stats-value {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
}

body[data-theme="dark"] .stats-value {
    color: #f1f5f9;
}

body[data-theme="dark"] .stats-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1200px) {
    .global-stats-bar {
        margin-left: 300px;
        gap: 10px;
    }
}

@media (max-width: 992px) {
    .global-stats-bar {
        margin: 85px 20px 10px 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .stats-item {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .global-stats-bar {
        margin: 80px 15px 10px 15px;
        padding: 15px;
    }
    .stats-item {
        min-width: 140px;
    }
}
