:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #334155;
    --secondary-hover: #475569;
    --danger: #ef4444;
    --success: #22c55e;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.text-center { text-align: center; }
.hidden { display: none; }

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}
.login-container .glass-panel {
    width: 100%;
    max-width: 400px;
}
.login-container h1 { margin-bottom: 0.5rem; font-weight: 600; }
.login-container p { color: #94a3b8; margin-bottom: 2rem; }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
input[type="password"], input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}
input[type="password"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}
.btn.full-width { width: 100%; }
.primary-btn {
    background: var(--primary);
    color: white;
}
.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.secondary-btn {
    background: var(--secondary);
    color: white;
}
.secondary-btn:hover { background: var(--secondary-hover); }
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.app-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.subtitle { color: #94a3b8; margin-top: 0.25rem; }

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
}

.sidebar h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.section-desc { color: #94a3b8; font-size: 0.875rem; margin-bottom: 1.5rem; }

.marketplaces-list { margin-bottom: 1.5rem; }
.marketplace-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marketplace-item:last-child { border-bottom: none; }
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
}
.checkbox-label input { display: none; }
.custom-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #64748b;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}
.checkbox-label input:checked + .custom-checkbox {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkbox-label input:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 6px; top: 2px;
    width: 4px; height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.days-input input {
    width: 80px;
    padding: 0.4rem;
    text-align: right;
}

/* Progress & Logs */
#progress-container { margin-bottom: 2rem; }
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
.log-container {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: #cbd5e1;
    height: 150px;
    overflow-y: auto;
}
.log-container div { margin-bottom: 0.25rem; }

/* Results */
.results-container h2 { margin-bottom: 1rem; }
.result-card { margin-bottom: 1.5rem; }
.result-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #e2e8f0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.metric {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}
.metric-label { color: #94a3b8; font-size: 0.875rem; margin-bottom: 0.5rem; }
.metric-value { font-size: 2rem; font-weight: 700; color: white; }
.metric-delta { font-size: 0.875rem; color: #f59e0b; margin-top: 0.25rem; }
.actions {
    display: flex;
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.alert.error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert.warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
