/*
 * Failsafe ECO Status Page Stylesheet
 * Estilo Dark Premium com Glassmorphism
 */

:root {
    --bg-main: #0B0F19;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(26, 36, 57, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(99, 102, 241, 0.3);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    /* Neon Coherence Tokens */
    --clr-success: #10B981;
    --clr-success-glow: rgba(16, 185, 129, 0.25);
    
    --clr-warning: #F59E0B;
    --clr-warning-glow: rgba(245, 158, 11, 0.25);
    
    --clr-danger: #EF4444;
    --clr-danger-glow: rgba(239, 68, 68, 0.25);
    
    --clr-accent: #6366F1;
    --clr-accent-glow: rgba(99, 102, 241, 0.4);
    --clr-accent-grad: linear-gradient(135deg, #6366F1 0%, #A855F7 100%);
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Ambient Glows */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px;
    left: -100px;
    z-index: -1;
    pointer-events: none;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    background: var(--clr-accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text h1 span {
    color: #A855F7;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Hero Banner */
.hero-status-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--status-color, var(--clr-accent));
}

.status-badge-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-pulse-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--status-color, var(--clr-accent));
    box-shadow: 0 0 12px var(--status-color-glow, var(--clr-accent-glow));
    position: relative;
}

.status-pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    opacity: 0.4;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(2); opacity: 0; }
}

.hero-status-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
}

.hero-status-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* Grid Cards */
.dashboard-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-icon {
    font-size: 1.25rem;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Custom list items inside cards */
.list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item.completed {
    color: var(--text-muted);
}

.badge-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.45rem;
    flex-shrink: 0;
}

.badge-status.completed { background-color: var(--clr-success); }
.badge-status.in_progress { background-color: var(--clr-warning); }
.badge-status.pending { background-color: var(--clr-accent); }
.badge-status.blocked { background-color: var(--clr-danger); }

.list-text {
    flex-grow: 1;
}

/* Timeline Layout */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    left: -21px;
    top: 5px;
    background-color: var(--timeline-color, var(--clr-accent));
    border: 2px solid var(--bg-main);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Loading placeholders */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-style: italic;
    animation: flash 1.5s ease-in-out infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Footer styles */
.main-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding-top: 2rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.version-tag {
    color: var(--clr-accent);
    font-weight: 500;
}

/* Responsive fixes */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .refresh-indicator {
        align-self: flex-end;
    }
    
    .hero-status-card {
        padding: 1.5rem;
    }
}
