@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.6);
    --white-box-bg: rgba(255, 255, 255, 0.9);
    --white-box-border: rgba(226, 232, 240, 0.8);
    --table-header-bg: #f1f5f9;
    --table-border: #f1f5f9;
    --table-td-bg: #ffffff;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 40px -15px rgba(59, 130, 246, 0.15);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --bg-main: #0f172a;
    --bg-sidebar: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-border: #334155;
    --white-box-bg: #1e293b;
    --white-box-border: #334155;
    --table-header-bg: #0f172a;
    --table-border: #334155;
    --table-td-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
}

/* Dark mode overrides for common Bootstrap classes */
[data-theme="dark"] .text-dark { color: var(--text-main) !important; }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-light { background-color: rgba(255,255,255,0.05) !important; }
[data-theme="dark"] .card { background-color: var(--card-bg) !important; border-color: var(--card-border) !important; color: var(--text-main) !important; }
[data-theme="dark"] .white-box { background-color: var(--white-box-bg) !important; color: var(--text-main) !important; }
[data-theme="dark"] .modal-content { background-color: #1e293b; color: var(--text-main); }
[data-theme="dark"] .modal-header { border-bottom-color: #334155; }
[data-theme="dark"] .modal-footer { border-top-color: #334155; }
[data-theme="dark"] .form-control { background-color: #0f172a; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .fc { background-color: #1e293b; color: #f1f5f9; }
[data-theme="dark"] .tippy-box[data-theme~='visita'] { background-color: #020617; border: 1px solid #334155; }
[data-theme="dark"] .dropdown-item { color: #cbd5e1; }
[data-theme="dark"] .dropdown-item:hover { background-color: rgba(255,255,255,0.05); color: #fff; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Forçando rigidamente 14px para os textos comuns de modo a sobrepor as classes utilitárias do Bootstrap */
html body, 
html body p, 
html body div, 
html body a, 
html body span, 
html body td, 
html body th, 
html body label, 
html body input, 
html body select, 
html body textarea,
html body small,
html body .small,
html body .text-muted,
html body .fs-6 {
    font-size: 14px !important;
}

/* Neutralizando as classes de utilidade de fonte nativas do Bootstrap (que forçam tamanhos gigantes via !important) */
html body .fs-1, html body .fs-2, html body .fs-3, html body .fs-4, html body .fs-5 {
    font-size: 20px !important;
}

/* Títulos limitados à margem exata de 20px requisitada */
h1, .h1, html body .h1,
h2, .h2, html body .h2,
h3, .h3, html body .h3,
h4, .h4, html body .h4,
h5, .h5, html body .h5,
h6, .h6, html body .h6 {
    font-size: 20px !important;
    font-weight: 700 !important;
}

/* Exceções críticas de layout para não quebrar a estrutura e logo */
.sidebar-logo span {
    font-size: 1.25rem !important; /* Logotipo visível */
}
.nav-link {
    font-size: 13px !important; /* Links da sidebar confortáveis */
}
.nav-group-title {
    font-size: 10px !important;
}


/* Glassmorphism utility premium */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    overflow: visible;
}

/* Header top-bar precisa de z-index alto para dropdowns ficarem por cima do conteúdo */
header.top-bar {
    position: relative;
    z-index: 1030;
    overflow: visible !important;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    padding: 1.5rem;
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar-logo img {
    height: 32px;
}

.sidebar-logo span {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.925rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-text-active);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-group-title {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.75rem 1rem;
}

/* Main Content Area */
.main-wrapper {
    margin-left: 280px;
    padding: 1.5rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    position: relative;
    z-index: 1030;
}

/* Settings Dropdown deve ficar acima de todo conteúdo */
.top-bar .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}
[data-theme="dark"] .top-bar .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
[data-theme="dark"] .top-bar .dropdown-menu .dropdown-item {
    color: #e2e8f0;
}
[data-theme="dark"] .top-bar .dropdown-menu .dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}
[data-theme="dark"] .top-bar .dropdown-menu .dropdown-header {
    color: var(--primary) !important;
}
[data-theme="dark"] .top-bar .dropdown-menu .dropdown-divider {
    border-color: #334155;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        left: -280px;
    }
    .sidebar.show {
        left: 0;
    }
    .main-wrapper {
        margin-left: 0;
        padding: 1rem;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* =============================================
   LAYOUT: Ocultar Menu Lateral (sidebar-hidden)
   ============================================= */
body[data-layout="hidden"] .sidebar {
    transform: translateX(-100%);
    pointer-events: none;
}
body[data-layout="hidden"] .main-wrapper {
    margin-left: 0;
}

/* =============================================
   LAYOUT: Menu Superior (top)
   ============================================= */
body[data-layout="top"] .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    left: 0 !important;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    padding: 0.25rem 1.5rem;
    z-index: 1050;
    overflow: visible !important; /* Essencial para dropdowns flutuarem */
}
body[data-layout="top"] .sidebar-logo {
    margin-bottom: 0;
    margin-right: 1.5rem;
    flex-shrink: 0;
}
body[data-layout="top"] .sidebar-profile {
    margin-bottom: 0;
    padding: 0.15rem 0.5rem;
    margin-left: 0.5rem;
    order: 99;
    flex-shrink: 0;
    max-width: 150px;
}
body[data-layout="top"] .sidebar-profile h6 {
    font-size: 0.75rem;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
body[data-layout="top"] .profile-avatar {
    width: 28px;
    height: 28px;
}
body[data-layout="top"] .nav-group-title {
    display: none;
}
body[data-layout="top"] .nav-item {
    margin-bottom: 0;
    margin-right: 0.15rem;
    position: relative;
    display: flex;
    align-items: center;
}
body[data-layout="top"] .nav-link {
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
    font-size: 12px !important;
}
body[data-layout="top"] .nav-item.dropdown .collapse,
body[data-layout="top"] .nav-item.dropdown .collapsing {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: var(--bg-sidebar) !important;
    min-width: 220px !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    z-index: 1100 !important;
    transition: none !important;
    height: auto !important;
    display: none;
}
body[data-layout="top"] .nav-item.dropdown .collapse.show {
    display: block !important;
}
body[data-layout="top"] .nav-item.dropdown .collapse.ps-3 {
    padding-left: 0 !important;
}
body[data-layout="top"] .nav-item.dropdown .collapse .nav-link {
    padding: 0.6rem 1.2rem;
    border-radius: 0;
}
body[data-layout="top"] .nav-item.dropdown .collapse .nav-link:hover {
    background: rgba(255,255,255,0.1);
}
/* Utility classes para exibir/ocultar itens baseados no layout */
body[data-layout="top"] .hide-on-top {
    display: none !important;
}
.show-on-top {
    display: none !important;
}
body[data-layout="top"] .show-on-top {
    display: block !important;
}

body[data-layout="top"] .sidebar > .mt-4.p-2 {
    margin-top: 0 !important;
    padding: 0 0.5rem !important;
    margin-left: auto;
    order: 98;
}
body[data-layout="top"] .sidebar .form-control {
    width: 120px !important;
}
body[data-layout="top"] .sidebar > hr {
    display: none;
}
body[data-layout="top"] .main-wrapper {
    margin-left: 0;
}

/* Compatibility for legacy Bootstrap 3 classes */
.panel {
    @extend .card;
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--card-bg);
}
.panel-info { border-color: #bae6fd; }
.panel-warning { border-color: #fef08a; }
.panel-success { border-color: #bbf7d0; }
.panel-danger { border-color: #fecaca; }

.panel-heading {
    padding: 1rem;
    font-weight: 600;
    background: rgba(0,0,0,0.02);
    border-bottom: 1px solid var(--card-border);
}
.panel-body { padding: 1.25rem; }
.panel-footer {
    padding: 0.75rem 1.25rem;
    background: rgba(0,0,0,0.01);
    border-top: 1px solid var(--card-border);
}

/* Glyphicon compatibility - using Bootstrap Icons instead */
.glyphicon {
    display: inline-block;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
}
.glyphicon-file::before { content: "\f3da"; } /* bi-file-earmark */
.glyphicon-warning-sign::before { content: "\f33a"; } /* bi-exclamation-triangle */
.glyphicon-time::before { content: "\f28f"; } /* bi-clock */
.glyphicon-map-marker::before { content: "\f3e8"; } /* bi-geo-alt */
.glyphicon-user::before { content: "\f4e1"; } /* bi-person */
.glyphicon-calendar::before { content: "\f22d"; } /* bi-calendar */
.glyphicon-ok-circle::before { content: "\f26a"; } /* bi-check-circle */
.glyphicon-comment::before { content: "\f27b"; } /* bi-chat-left-text */
.glyphicon-search::before { content: "\f52a"; } /* bi-search */
.glyphicon-off::before { content: "\f4d5"; } /* bi-power */

/* Modern Cards for Stats with Luxury Lift */
.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(59, 130, 246, 0.3);
}
.stat-card:hover::after {
    opacity: 1;
}

/* Content Area Fixes */
.content-area {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.white-box {
    background: var(--white-box-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--white-box-border);
    padding: 1rem; /* Fortemente reduzido para economizar espaço */
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    overflow-x: auto;
    width: 100%;
    display: block;
}

/* Table fixes */
table.dataTable {
    border-radius: 1rem;
    overflow: hidden;
    border: none !important;
    width: 100% !important;
    min-width: 800px; /* Garante que tabelas com muitas colunas não espremam e usem scroll */
}

table.dataTable thead th {
    background: var(--table-header-bg);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem; /* Super compacto */
    letter-spacing: 0.02em;
    padding: 0.5rem 0.75rem !important;
    border: none !important;
}

table.dataTable tbody td {
    background: var(--table-td-bg) !important;
    padding: 0.5rem 0.75rem !important;
    border-bottom: 1px solid var(--table-border) !important;
    font-size: 0.75rem; /* Reduzido globalmente */
    color: var(--text-main);
}
/* Sobrescreve as listras do DataTables para garantir o fundo correto */
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd,
table.dataTable.stripe tbody tr.even, table.dataTable.display tbody tr.even,
table.dataTable tbody tr {
    background-color: transparent !important;
}
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1,
table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
    background-color: var(--table-td-bg) !important;
}
table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
    background-color: var(--table-td-bg) !important;
}

.dataTables_wrapper {
    overflow-x: auto;
    width: 100%;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-main);
    border-radius: 0.5rem;
    padding: 0.4rem 0.8rem;
    margin-left: 0.5rem;
}

/* Utility for responsive grids */
.grid-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}



.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    color: white;
}

.login-card h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.form-control-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    width: 100%;
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}

.form-control-modern:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.btn-modern {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modern:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Badges */
.badge-modern {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Button Overrides for Legacy classes - Mais achatados e compactos como o antigo */
.btn-default {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    font-weight: 500;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05) !important;
}
.btn-default:hover {
    background: #f9fafb !important;
    color: #111827 !important;
    border-color: #9ca3af !important;
}

.btn-xs {
    padding: 2px 6px !important;
    font-size: 11px !important;
    border-radius: 0.25rem !important; /* Mais quadrado/sutil */
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

.btn-sm {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 0.25rem !important;
    font-weight: 500 !important;
}

.btn-danger {
    border-radius: 0.25rem !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem !important; /* Levemente mais compacto */
    border-radius: 0.5rem !important; /* Sutil */
    box-shadow: 0 2px 6px 0 rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease !important;
}

/* Sidebar Profile */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-info h6 {
    color: white;
    margin: 0;
    font-weight: 600;
}

.profile-info a {
    color: var(--primary);
    font-size: 0.75rem;
    text-decoration: none;
}

/* Page titles */
.row-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row-title h1 span {
    color: var(--primary);
}

.page-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Fix for horizontal overflow on some tables */
.white-box {
    overflow-x: auto;
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form styling globals for the whole system */
.form-control, select.form-control, textarea.form-control {
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.35rem 0.6rem; /* Formato super compacto */
    font-size: 0.75rem; /* Extremamente menor para caber nas colunas sem invadir muito */
    color: #1e293b;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus, select.form-control:focus, textarea.form-control:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    outline: none;
}

label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Tables Global Refresh */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
    min-width: 800px;
}

.table tr {
    border-radius: 0.5rem;
}

.table th {
    border: none !important;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.75rem !important;
    background: var(--table-header-bg);
}

.table td {
    background-color: var(--table-td-bg) !important;
    padding: 0.75rem !important;
    vertical-align: middle;
    border-top: 1px solid var(--table-border) !important;
    border-bottom: 1px solid var(--table-border) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    font-size: 0.825rem;
    color: var(--text-main);
}

.table td:first-child {
    border-left: 1px solid var(--table-border) !important;
    border-top-left-radius: 0.625rem;
    border-bottom-left-radius: 0.625rem;
}

.table td:last-child {
    border-right: 1px solid var(--table-border) !important;
    border-top-right-radius: 0.625rem;
    border-bottom-right-radius: 0.625rem;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Datatable Buttons Styling */
.dt-buttons {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.35rem;
}

.dt-button, .dt-btn-excel, .dt-btn-pdf {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 0.4rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    background-image: none !important; /* Remove o gradiente nativo dos buttons do DT */
}

.dt-button:hover, .dt-btn-excel:hover, .dt-btn-pdf:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
    border-color: #94a3b8 !important;
}

.dt-btn-excel {
    color: #15803d !important;
    border-color: #bbf7d0 !important;
    background-color: #f0fdf4 !important;
}

.dt-btn-excel:hover {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.dt-btn-pdf {
    color: #b91c1c !important;
    border-color: #fecaca !important;
    background-color: #fef2f2 !important;
}

.dt-btn-pdf:hover {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* Modal custom design */
.modal-content {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(25px);
    background: rgba(255, 255, 255, 0.96);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
    background: linear-gradient(to bottom, #ffffff, rgba(255,255,255,0.5));
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
}

/* Feedback visual nos cards clicáveis de Livreta */
.btn-action-hover {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.btn-action-hover:hover {
    transform: scale(1.18) !important;
}

