/* ===== VARIABLES ===== */
:root {
    --bg-dark: #0a0512;
    --surface-dark: #130b1f;
    --surface-medium: #1f1530;
    --surface-light: #2a1d3d;
    --accent-purple: #a26cff;
    --accent-soft: #7b4fcf;
    --accent-glow: #b48aff;
    --text-light: #f1e7fe;
    --text-muted: #b9a6d9;
    --text-dim: #8a7aa3;
    --border-purple: #3a2b4f;
    --border-light: #4a3a60;
    --card-bg: #1a1028;
    --shadow-heavy: 0 25px 50px -12px rgba(106, 13, 173, 0.6);
    --shadow-soft: 0 10px 30px -5px rgba(106, 13, 173, 0.3);
    --success: #4CAF50;
    --success-bg: rgba(76, 175, 80, 0.1);
    --danger: #f44336;
    --danger-bg: rgba(244, 67, 54, 0.1);
    --warning: #ffb74d;
    --warning-bg: rgba(255, 183, 77, 0.1);
    --info: #64b5f6;
    --info-bg: rgba(100, 181, 246, 0.1);
    --gradient-1: linear-gradient(145deg, #a26cff, #7b4fcf);
}

[data-theme="light"] {
    --bg-dark: #f5f0fa;
    --surface-dark: #ffffff;
    --surface-medium: #f8f4ff;
    --surface-light: #ede7f6;
    --text-light: #2d1b3c;
    --text-muted: #5e4b73;
    --text-dim: #7a6a8f;
    --border-purple: #d1c4e9;
    --border-light: #b39ddb;
    --card-bg: #ffffff;
    --shadow-heavy: 0 25px 50px -12px rgba(106, 13, 173, 0.2);
    --shadow-soft: 0 10px 30px -5px rgba(106, 13, 173, 0.1);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow-x: hidden;
}

/* ===== BACKGROUND ANIMADO ===== */
.floating-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.floating {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}

.floating:nth-child(1) { 
    width: 600px; 
    height: 600px; 
    background: var(--accent-purple); 
    top: -200px; 
    left: -200px; 
    animation-delay: 0s;
}

.floating:nth-child(2) { 
    width: 700px; 
    height: 700px; 
    background: var(--accent-soft); 
    bottom: -300px; 
    right: -200px; 
    animation-delay: -5s;
}

.floating:nth-child(3) { 
    width: 500px; 
    height: 500px; 
    background: var(--accent-glow); 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* ===== CONTAINER PRINCIPAL ===== */
.updates-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 5, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-purple);
    margin: 0 -24px;
    padding: 0 24px;
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.8);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--bg-dark);
    box-shadow: 0 8px 16px rgba(162, 108, 255, 0.3);
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #c49bff, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    width: 60px;
    height: 32px;
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    border-radius: 40px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    transition: all 0.3s;
}

.theme-toggle i {
    font-size: 14px;
    color: var(--text-muted);
    z-index: 2;
    transition: color 0.3s;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: var(--accent-purple);
    border-radius: 50%;
    left: 2px;
    transition: transform 0.3s;
}

.theme-toggle.active::before {
    transform: translateX(28px);
}

.theme-toggle.active i.fa-sun {
    color: var(--text-muted);
}

.theme-toggle.active i.fa-moon {
    color: var(--bg-dark);
}

/* ===== BOTÕES ===== */
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--accent-purple);
    color: var(--bg-dark);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    padding: 32px 0;
}

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    border-radius: 24px;
    padding: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeInUp 0.5s ease;
}

.stat-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 54px;
    height: 54px;
    background: var(--surface-light);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.2;
}

/* ===== FILTERS ===== */
.filters-section {
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    border-radius: 60px;
    padding: 12px 20px;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-light);
    border: 1px solid var(--border-purple);
    border-radius: 40px;
    padding: 10px 16px;
}

.search-box i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--surface-light);
    border: 1px solid var(--border-purple);
    border-radius: 40px;
    padding: 10px 16px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.filter-select:hover {
    border-color: var(--accent-purple);
}

/* ===== UPDATES GRID ===== */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.update-card {
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    border-radius: 28px;
    padding: 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

.update-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.update-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-glow));
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.update-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    flex: 1;
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--surface-light);
    padding: 4px 12px;
    border-radius: 40px;
    white-space: nowrap;
    margin-left: 12px;
}

.update-content {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.update-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-light);
    border: 1px solid var(--border-purple);
    border-radius: 40px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-tag i {
    color: var(--accent-purple);
    font-size: 0.75rem;
}

/* Status colors */
.status-Concluído .meta-tag.status {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

.status-Em\ andamento .meta-tag.status {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning);
}

.status-Agendado .meta-tag.status,
.status-Pendente .meta-tag.status {
    background: var(--info-bg);
    color: var(--info);
    border-color: var(--info);
}

/* Priority colors */
.priority-Alta .meta-tag.priority {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

.priority-Média .meta-tag.priority {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning);
}

.priority-Baixa .meta-tag.priority {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

/* ===== LOADING ===== */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-purple);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--surface-medium);
    border: 1px solid var(--border-purple);
    border-radius: 28px;
}

.empty-state i {
    font-size: 48px;
    color: var(--accent-purple);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-light);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--surface-medium);
    border-top: 1px solid var(--border-purple);
    padding: 24px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-purple);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .updates-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .updates-container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
        border-radius: 28px;
        padding: 16px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .updates-grid {
        grid-template-columns: 1fr;
    }
    
    .update-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .update-date {
        margin-left: 0;
        align-self: flex-start;
    }
}