* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #fff;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.refresh-btn {
    display: block;
    margin: 0 auto 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

.stat-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #667eea;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1;
}

.stat-card div:last-child {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.last-discounts {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    margin-bottom: 30px;
}

.last-discounts h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.last-discounts h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
}

table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: #667eea;
    background: #f8f9ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
}

table tr:hover {
    background: #f8f9ff;
    transition: background 0.2s ease;
}

table td:last-child {
    font-weight: 600;
    color: #28a745;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.timestamp {
    text-align: center;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 25px;
    border: 1px solid #e9ecef;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .dashboard-container {
        padding: 25px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .stat-card {
        padding: 25px;
    }
    
    .stat-value {
        font-size: 2.2rem;
    }
    
    .last-discounts {
        padding: 25px;
    }
    
    table th,
    table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .last-discounts {
        padding: 20px;
    }
    
    table th,
    table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
}