/* Dashboard Moderno - Estilos Específicos */

/* Reset e base */
.dashboard-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
}

/* Header do Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 0 24px 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.dashboard-header .content {
    position: relative;
    z-index: 2;
}

.dashboard-welcome {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.dashboard-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0.8;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color, #6366f1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card.primary { --card-color: #6366f1; }
.stat-card.success { --card-color: #10b981; }
.stat-card.warning { --card-color: #f59e0b; }
.stat-card.danger { --card-color: #ef4444; }

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    background: var(--card-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.chart-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Activity Feed */
.activity-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    transition: background-color 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: #f9fafb;
    border-radius: 8px;
    margin: 0 -1rem;
    padding: 1rem;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-icon.entrada {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.activity-icon.saida {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.activity-content h6 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.activity-content p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Table Moderna */
.modern-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-table-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modern-table table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead th {
    background: #f9fafb;
    padding: 1rem 2rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.modern-table tbody tr:hover {
    background-color: #f9fafb;
}

.modern-table tbody td {
    padding: 1rem 2rem;
    vertical-align: middle;
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Buttons */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn.primary {
    background: #e0e7ff;
    color: #3730a3;
}

.action-btn.primary:hover {
    background: #6366f1;
    color: white;
}

.action-btn.success {
    background: #d1fae5;
    color: #047857;
}

.action-btn.success:hover {
    background: #10b981;
    color: white;
}

.action-btn.info {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn.info:hover {
    background: #3b82f6;
    color: white;
}

/* Category Stats */
.category-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.category-item:last-child {
    border-bottom: none;
}

.category-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: 1rem;
    font-size: 1.125rem;
}

.category-info h6 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.category-info span {
    color: #6b7280;
    font-size: 0.875rem;
}

.category-percentage {
    margin-left: auto;
    font-weight: 700;
    font-size: 1.125rem;
    color: #6366f1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: -1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .chart-card,
    .activity-card,
    .modern-table {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-welcome {
        font-size: 2rem;
    }
    
    .modern-table thead th,
    .modern-table tbody td {
        padding: 0.75rem 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dashboard-container {
        background: #0f172a;
        color: #f1f5f9;
    }
    
    .stat-card,
    .chart-card,
    .activity-card,
    .modern-table {
        background: #1e293b;
        border-color: #334155;
    }
    
    .stat-number,
    .chart-title,
    .activity-content h6 {
        color: #f1f5f9;
    }
    
    .stat-label,
    .activity-content p,
    .category-info span {
        color: #94a3b8;
    }
}

/* Smooth Animations */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
