/**
 * SMARTPICAGEM BACKOFFICE - GLOBAL STYLES
 * Cores: #4a6079 (Azul Ardósia) + Cinzento Escuro
 */

:root {
    --primary-color: #4a6079;
    --primary-dark: #34495e;
    --primary-light: #5a7491;
    --secondary-color: #000000;
    --secondary-light: #2c2c2c;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #f5f5f5;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--background);
}

[ng-cloak] {
    display: none !important;
}

/* ===== PAGE CONTAINER ===== */
.page-container {
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 25px 15px 25px;
    padding: 10px 0 12px 0;
    border-bottom: 3px solid var(--primary-color);
}

.page-title {
    margin: 0;
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 600;
}

.page-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.page-header p {
    margin: 0;
    color: #7f8c8d;
}

.loading-container,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-container i,
.empty-state i {
    display: block;
    margin-bottom: 15px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover:not(:disabled) {
    background: #bdc3c7;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-icon {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.btn-icon.btn-primary {
    color: var(--primary-color);
}

.btn-icon.btn-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-icon.btn-info {
    color: #3b82f6;
}

.btn-icon.btn-info:hover {
    background: #3b82f6;
    color: white;
}

.btn-icon.btn-danger {
    color: #dc3545;
}

.btn-icon.btn-danger:hover {
    background: #dc3545;
    color: white;
}

/* ===== TABLES ===== */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 0 25px 20px 25px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.modern-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.modern-table tbody tr {
    transition: background 0.2s;
}

.modern-table tbody tr:hover {
    background: #f8f9fa;
}

.modern-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* Estilos específicos de tabela */
.table-row {
    transition: background 0.2s;
}

.table-row:hover {
    background: #f9fafb !important;
}

body.dark-mode .table-row:hover {
    background: #374151 !important;
}

.table-row td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .table-row td {
    border-bottom-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
}

.row-alerta {
    background: #fff5f5 !important;
}

body.dark-mode .row-alerta {
    background: rgba(220, 38, 38, 0.1) !important;
}

.total-picagens {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.table-container .modern-table {
    border-radius: 0 0 8px 8px;
}

body.dark-mode .table-container {
    background: #1f2937;
}

body.dark-mode .modern-table thead {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

/* Ações da tabela - alinhamento dos botões */
/* Força a linha inteira a usar flexbox para melhor controle de altura */
.modern-table tbody tr {
    display: table-row;
}

.modern-table tbody td {
    vertical-align: middle !important;
}

/* Coluna de ações - largura fixa */
table.modern-table thead th.actions-cell,
table.modern-table tbody td.actions-cell {
    width: 110px !important;
    max-width: 110px !important;
    min-width: 110px !important;
    padding: 12px 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

table.modern-table .actions-cell .btn-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 7px !important;
    margin: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-control-sm {
    padding: 5px 10px;
    font-size: 13px;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.card-body {
    color: #7f8c8d;
}

/* ===== KPIs ===== */
.kpis-container {
    display: flex;
    gap: 20px;
    margin: 0 25px 15px 25px;
    flex-wrap: wrap;
}

.kpi-card {
    flex: 1;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
}

.kpi-card-info {
    cursor: default;
    border: 1px solid #e5e7eb;
}

.kpi-card-info:hover {
    transform: none;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

body.dark-mode .kpi-card {
    background: #1f2937;
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .kpi-card-info {
    border-color: rgba(255,255,255,0.1);
}

.kpi-card.kpi-active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

body.dark-mode .kpi-label {
    color: #9ca3af;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
}

body.dark-mode .kpi-value {
    color: #f3f4f6;
}

/* ===== BADGES ===== */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #000;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Badges Específicos (data, stats, password) */
.date-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.date-badge.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.date-badge.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.date-badge-compact {
    white-space: nowrap;
    font-size: 11px !important;
    padding: 3px 6px !important;
}

.stats-badge {
    padding: 5px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.stats-badge.stats-zero {
    background: #f8d7da;
    color: #721c24;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
}

.status-badge.status-success {
    background: #d1f7e0;
    color: #27ae60;
}

.password-field {
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

body.dark-mode .password-field {
    background: #111827;
}

/* ===== FILTROS ===== */
.table-filters {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 15px 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    border-radius: 8px 8px 0 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-input,
.filter-select {
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.95);
    color: #1f2937;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-input::placeholder {
    color: rgba(31, 41, 55, 0.5);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255,255,255,1);
    box-shadow: 0 0 0 3px rgba(74, 96, 121, 0.2);
}

/* Estilos específicos para select */
.filter-select option {
    background: #ffffff;
    color: #1f2937;
    padding: 10px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

body.dark-mode .table-filters {
    background: linear-gradient(135deg, #0f1419 0%, #1f2937 100%);
}

body.dark-mode .filter-input,
body.dark-mode .filter-select {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #f3f4f6 !important;
}

body.dark-mode .filter-select option {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
}

body.dark-mode .filter-input::placeholder {
    color: rgba(243, 244, 246, 0.5);
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .loading-overlay {
    background: rgba(17, 24, 39, 0.95);
}

.loading-spinner {
    text-align: center;
    color: var(--primary-color);
}

.loading-spinner p {
    margin-top: 15px;
    font-size: 16px;
    color: #999;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ===== PAGINAÇÃO ===== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
}

body.dark-mode .pagination-container {
    border-top-color: rgba(255,255,255,0.1);
}

.pagination-info {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .pagination-info {
    color: rgba(255,255,255,0.7);
}

.pagination-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

body.dark-mode .pagination-select {
    background: #111827;
    border-color: rgba(255,255,255,0.1);
    color: white;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pagination {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

body.dark-mode .btn-pagination {
    background: #374151;
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.btn-pagination:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-current {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

body.dark-mode .pagination-current {
    color: rgba(255,255,255,0.7);
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: var(--primary-color);
}

.loading-spinner p {
    margin-top: 15px;
    font-size: 16px;
    color: #999;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog.modal-xl {
    max-width: 1400px;
}

.modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== UTILITIES ===== */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

/* ===== DARK MODE ===== */
body.dark-mode {
    background: #111827;
    color: #f3f4f6;
}

body.dark-mode .page-container {
    background: #111827;
}

body.dark-mode .card,
body.dark-mode .kpi-card,
body.dark-mode .table-container,
body.dark-mode .modal-dialog {
    background: #1a1f2e;
    color: #f3f4f6;
}

body.dark-mode .modern-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .form-control {
    background: #0f1419;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

body.dark-mode .page-title,
body.dark-mode .card-header {
    color: #f3f4f6;
}

body.dark-mode .status-badge.status-success {
    background: rgba(39, 174, 96, 0.2);
    color: #4ade80;
}

body.dark-mode md-dialog {
    background: #1f2937;
    color: #f3f4f6;
}

body.dark-mode md-dialog .info-item label {
    color: #9ca3af !important;
}

body.dark-mode md-dialog .info-item div {
    color: #f3f4f6 !important;
}

body.dark-mode md-dialog hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-container {
        padding: 10px 0 0 0;
    }
    
    .page-header {
        margin: 0 10px 15px 10px;
        padding: 15px 0 10px 0;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .kpis-container {
        margin: 0 10px 15px 10px;
        flex-direction: column;
    }
    
    .kpi-card {
        min-width: 100%;
    }
    
    .table-container {
        margin: 0 10px 15px 10px;
    }
    
    .modern-table {
        font-size: 12px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 8px;
    }
    
    .actions-cell {
        gap: 3px !important;
        padding: 6px !important;
    }
    
    .actions-cell .btn-icon {
        width: 28px !important;
        height: 28px !important;
        padding: 5px !important;
        min-width: 28px !important;
    }
    
    .kpis-container {
        flex-direction: column;
    }
    
    .kpi-card {
        min-width: 100%;
    }
    
    .table-filters {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

/* Media queries para telas médias */
@media (max-width: 1200px) {
    .kpis-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== LITEPICKER CUSTOMIZATION ===== */
.litepicker {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
}

.litepicker .container__months {
    background: #ffffff !important;
    border-radius: 12px !important;
}

.litepicker .container__months .month-item-header {
    padding: 15px 10px !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 10px 10px 0 0 !important;
}

/* Dropdowns do Litepicker (mês/ano) */
.litepicker select {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.litepicker select option {
    background: #ffffff !important;
    color: #1f2937 !important;
    padding: 8px !important;
}

.litepicker .container__months .month-item-header .button-previous-month,
.litepicker .container__months .month-item-header .button-next-month {
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.litepicker .container__months .month-item-header .button-previous-month:hover,
.litepicker .container__months .month-item-header .button-next-month:hover {
    opacity: 0.8 !important;
    transform: scale(1.1) !important;
}

.litepicker .container__months .month-item-name {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.litepicker .container__days {
    padding: 10px !important;
}

.litepicker .container__days .day-item {
    color: #333333 !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    font-weight: 500 !important;
}

.litepicker .container__days .day-item:hover {
    background: #f3f4f6 !important;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.litepicker .container__days .day-item.is-today {
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600 !important;
}

.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(74, 96, 121, 0.4) !important;
}

.litepicker .container__days .day-item.is-in-range {
    background: rgba(74, 96, 121, 0.1) !important;
    color: var(--primary-color) !important;
}

.litepicker .container__days .day-item.is-locked {
    color: #d1d5db !important;
    cursor: not-allowed !important;
}

.litepicker .container__days .day-item-weekend {
    color: #dc2626 !important;
}

.litepicker .container__footer {
    padding: 15px !important;
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 0 0 12px 12px !important;
}

.litepicker .container__footer .button-cancel,
.litepicker .container__footer .button-apply {
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.litepicker .container__footer .button-cancel {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.litepicker .container__footer .button-cancel:hover {
    background: #d1d5db !important;
}

.litepicker .container__footer .button-apply {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
}

.litepicker .container__footer .button-apply:hover {
    box-shadow: 0 4px 12px rgba(74, 96, 121, 0.4) !important;
    transform: translateY(-1px) !important;
}

.litepicker .reset-button {
    padding: 8px 20px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.litepicker .reset-button:hover {
    background: #fee2e2 !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2) !important;
}

/* Dark Mode para Litepicker */
body.dark-mode .litepicker {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

body.dark-mode .litepicker .container__months {
    background: #1f2937 !important;
}

body.dark-mode .litepicker select {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f3f4f6 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .litepicker select option {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
}

body.dark-mode .litepicker .container__days .day-item {
    color: #f3f4f6 !important;
}

body.dark-mode .litepicker .container__days .day-item:hover {
    background: #374151 !important;
    color: var(--primary-light) !important;
}

body.dark-mode .litepicker .container__days .day-item.is-today {
    background: #78350f !important;
    color: #fef3c7 !important;
}

body.dark-mode .litepicker .container__days .day-item.is-in-range {
    background: rgba(74, 96, 121, 0.2) !important;
    color: var(--primary-light) !important;
}

body.dark-mode .litepicker .container__footer {
    background: #111827 !important;
    border-top-color: #374151 !important;
}

body.dark-mode .litepicker .container__footer .button-cancel {
    background: #374151 !important;
    color: #f3f4f6 !important;
}

body.dark-mode .litepicker .container__footer .button-cancel:hover {
    background: #4b5563 !important;
}

body.dark-mode .litepicker .reset-button {
    background: #7f1d1d !important;
    color: #fecaca !important;
}

body.dark-mode .litepicker .reset-button:hover {
    background: #991b1b !important;
}


/* ===== LOADING ELEGANTE ===== */
.loading-bar-container {
    width: 200px;
    height: 3px;
    background: rgba(74, 96, 121, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a6079, #34495e);
    border-radius: 3px;
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 75%; margin-left: 25%; }
    100% { width: 0%; margin-left: 100%; }
}

body.dark-mode .loading-bar-container {
    background: rgba(90, 116, 145, 0.2);
}

body.dark-mode .loading-bar {
    background: linear-gradient(90deg, #5a7491, #4a6079);
}

body.dark-mode elegant-loading h3 {
    color: #f3f4f6 !important;
}

body.dark-mode elegant-loading p {
    color: #9ca3af !important;
}

/* Text Secondary Small (para info adicional nas tabelas) */
.text-secondary-small {
    font-size: 10px;
    font-weight: 700;
    color: #666;
    margin-top: 2px;
}

body.dark-mode .text-secondary-small {
    color: #9ca3af;
}

/* ===== SORTING ICONS ===== */
.sortable-header {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.sortable-header i {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.sortable-header:hover i {
    color: rgba(255, 255, 255, 0.8);
}

.sortable-header.active i {
    color: #f3b416;
}

body.dark-mode .sortable-header i {
    color: rgba(243, 244, 246, 0.6);
}

body.dark-mode .sortable-header:hover i {
    color: rgba(243, 244, 246, 0.8);
}

body.dark-mode .sortable-header.active i {
    color: #f3b416;
}
