/* Estilos específicos para o Dashboard Administrativo - RAT ATMs */

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-ocorrencias {
    border-left-color: #F59E0B;
}

.stat-companhias {
    border-left-color: #10B981;
}

.stat-tecnicos {
    border-left-color: #3B82F6;
}

.stat-equipamentos {
    border-left-color: #EF4444;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.stat-ocorrencias .stat-icon {
    background-color: #F59E0B;
}

.stat-companhias .stat-icon {
    background-color: #10B981;
}

.stat-tecnicos .stat-icon {
    background-color: #3B82F6;
}

.stat-equipamentos .stat-icon {
    background-color: #EF4444;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #10B981;
}

.stat-change.negative {
    color: #EF4444;
}

.stat-change.neutral {
    color: #6B7280;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #1E3A8A;
}

.action-icon {
    width: 50px;
    height: 50px;
    background-color: #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-bottom: 15px;
}

.action-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
}

/* Recent Activity */
.recent-activity {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: #F9FAFB;
    border-radius: 8px;
    border-left: 3px solid #E5E7EB;
}

.activity-icon {
    width: 32px;
    height: 32px;
    background-color: #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 5px;
}

.activity-content p {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 5px;
    line-height: 1.4;
}

.activity-time {
    font-size: 11px;
    color: #9CA3AF;
    font-style: italic;
}

/* System Status */
.system-status {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-indicator.online {
    color: #10B981;
}

.status-indicator.online i {
    color: #10B981;
    font-size: 8px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.status-item {
    padding: 15px;
    background-color: #F9FAFB;
    border-radius: 8px;
    border-left: 3px solid #E5E7EB;
}

.status-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.status-item .status-badge {
    display: inline-block;
    margin-bottom: 8px;
}

.status-item .uptime {
    font-size: 12px;
    color: #6B7280;
    display: block;
}

/* Status Badges */
.status-operational {
    background-color: #DCFCE7;
    color: #16A34A;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .stat-card {
        padding: 20px;
    }

    .action-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-bottom: 15px;
    }

    .action-icon {
        margin: 0 auto 15px auto;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }

    .activity-icon {
        margin: 0 auto;
    }
}

/* Filtro de Período */
.period-filter-section {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.filter-header h2 i {
    margin-right: 10px;
    color: #3B82F6;
}

.btn-filter-reset {
    background-color: #EF4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-filter-reset:hover {
    background-color: #DC2626;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.filter-input,
.filter-select {
    padding: 10px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-filter-apply {
    background-color: #3B82F6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    height: fit-content;
}

.btn-filter-apply:hover {
    background-color: #2563EB;
}

/* Grid de Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.chart-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.chart-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F3F4F6;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.chart-header h3 i {
    margin-right: 10px;
    color: #3B82F6;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Modal de Acessos */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #F3F4F6;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.modal-header h2 i {
    margin-right: 10px;
    color: #3B82F6;
}

.modal-close {
    color: #6B7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #1F2937;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.usuario-info {
    margin-bottom: 20px;
}

.usuario-info-card {
    background-color: #F9FAFB;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3B82F6;
}

.usuario-info-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 10px 0;
}

.usuario-info-card p {
    margin: 5px 0;
    color: #6B7280;
    font-size: 14px;
}

.acessos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.acesso-item {
    background-color: #F9FAFB;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3B82F6;
    transition: transform 0.2s, box-shadow 0.2s;
}

.acesso-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.acesso-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.acesso-acao {
    font-weight: 600;
    color: #1F2937;
    font-size: 15px;
}

.acesso-data {
    font-size: 12px;
    color: #9CA3AF;
}

.acesso-details {
    font-size: 13px;
    color: #6B7280;
}

.acesso-details p {
    margin: 5px 0;
}

.no-data,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}

.error-message {
    color: #EF4444;
}

/* ====== DARK MODE - Dashboard Administrativo ====== */
body[data-theme="dark"] .stat-content h3 {
    color: var(--color-stat-content, #e2e2e2) !important;
}

body[data-theme="dark"] .stat-number {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .quick-actions h2,
body[data-theme="dark"] .section-header h2 {
    color: var(--page-h1-cor, #8a8b8b) !important;
}

body[data-theme="dark"] .action-card {
    background-color: var(--card, rgb(26, 25, 25)) !important;
    border-color: #3a3939 !important;
    color: var(--tabela-color-td, #e4e4e4) !important;
}

body[data-theme="dark"] .action-card:hover {
    border-color: #806902 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5) !important;
}

body[data-theme="dark"] .action-card h3 {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .action-card p {
    color: var(--page-p-color, #ddd9d9) !important;
}

body[data-theme="dark"] .recent-activity {
    background-color: var(--card, rgb(26, 25, 25)) !important;
}

body[data-theme="dark"] .activity-item {
    background-color: var(--fundo-tabela-th, rgb(29, 28, 28)) !important;
    border-left-color: #3a3939 !important;
}

body[data-theme="dark"] .activity-content h4 {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .activity-content p {
    color: var(--page-p-color, #ddd9d9) !important;
}

body[data-theme="dark"] .activity-time {
    color: #888888 !important;
}

body[data-theme="dark"] .system-status {
    background-color: var(--card, rgb(26, 25, 25)) !important;
}

body[data-theme="dark"] .status-item {
    background-color: var(--fundo-tabela-th, rgb(29, 28, 28)) !important;
    border-left-color: #3a3939 !important;
}

body[data-theme="dark"] .status-item h4 {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .status-item .uptime {
    color: var(--page-p-color, #ddd9d9) !important;
}

body[data-theme="dark"] .period-filter-section {
    background-color: var(--filtro-fundo, rgb(26, 25, 25)) !important;
}

body[data-theme="dark"] .filter-header h2 {
    color: var(--page-h1-cor, #8a8b8b) !important;
}

body[data-theme="dark"] .filter-group label {
    color: var(--color-label-filtro, #e9e9e9) !important;
}

body[data-theme="dark"] .filter-input,
body[data-theme="dark"] .filter-select {
    background: #1e1d1d !important;
    color: #e4e4e4 !important;
    border-color: #3a3939 !important;
}

body[data-theme="dark"] .chart-card {
    background-color: var(--card, rgb(26, 25, 25)) !important;
}

body[data-theme="dark"] .chart-header {
    border-bottom-color: #3a3939 !important;
}

body[data-theme="dark"] .chart-header h3 {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .modal-content {
    background-color: var(--fundo-modal-content, rgb(36, 35, 35)) !important;
}

body[data-theme="dark"] .modal-header {
    background: var(--fundo--modal-header, rgb(50, 49, 49)) !important;
    border-bottom-color: #3a3939 !important;
}

body[data-theme="dark"] .modal-header h2 {
    color: var(--color-modal-h3, #dfdfdf) !important;
}

body[data-theme="dark"] .modal-close {
    color: #aaaaaa !important;
}

body[data-theme="dark"] .usuario-info-card {
    background-color: var(--fundo-tabela-th, rgb(29, 28, 28)) !important;
    border-left-color: #3b82f6 !important;
}

body[data-theme="dark"] .usuario-info-card h3 {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .usuario-info-card p {
    color: var(--page-p-color, #ddd9d9) !important;
}

body[data-theme="dark"] .acesso-item {
    background-color: var(--fundo-tabela-th, rgb(29, 28, 28)) !important;
    border-left-color: #3b82f6 !important;
}

body[data-theme="dark"] .acesso-acao {
    color: var(--color-stat-number, #c9c9c9) !important;
}

body[data-theme="dark"] .acesso-data {
    color: #888888 !important;
}

body[data-theme="dark"] .acesso-details {
    color: var(--page-p-color, #ddd9d9) !important;
}

body[data-theme="dark"] .no-data {
    color: #888888 !important;
}

/* Responsive Design para Gráficos */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 200px;
    }
    
    .filter-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}