/* ===== Report Generator — Social Listening 🏭 ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
    --brand-purple: #472F69;
    --brand-purple-light: #5E4087;
    --brand-purple-dark: #2D1B4E;
    --brand-mint: #2BFDB4;
    --brand-mint-dark: #1AD99A;
    --brand-purple-10: rgba(71, 47, 105, 0.10);
    --brand-purple-06: rgba(71, 47, 105, 0.06);
    --accent-blue: #3B82F6;
    --accent-indigo: #6366F1;
    --bg-primary: #F8F7FB;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F7F5FA;
    --border: #E8E4EF;
    --border-light: #D4CDE0;
    --text-primary: #1A1128;
    --text-secondary: #4A3F5C;
    --text-muted: #8E83A0;
    --positive: #059669;
    --positive-bg: #ECFDF5;
    --negative: #DC2626;
    --negative-bg: #FEF2F2;
    --neutral-color: #6366F1;
    --neutral-bg: #EEF2FF;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(71, 47, 105, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(71, 47, 105, 0.08), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(71, 47, 105, 0.12), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 16px 48px rgba(71, 47, 105, 0.18);
    --shadow-glow: 0 0 30px rgba(43, 253, 180, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F3F0F7; }
::-webkit-scrollbar-thumb { background: #C4BAD4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-purple); }

/* --- App Shell --- */
.app {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: 100vh;
}

/* --- Header --- */
.gen-header {
    background: linear-gradient(135deg, var(--brand-purple-dark) 0%, var(--brand-purple) 50%, var(--brand-purple-light) 100%);
    border-radius: var(--radius);
    padding: 40px 48px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 8px 32px rgba(71, 47, 105, 0.35);
    text-align: center;
}

.gen-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(43, 253, 180, 0.15), transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
}

.gen-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.gen-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.gen-header h1 span { color: var(--brand-mint); }

.gen-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* --- Stepper --- */
.stepper {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 200px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    color: var(--text-muted);
    transition: var(--transition);
    margin-bottom: 8px;
}

.step-indicator.active .step-circle {
    background: var(--brand-purple);
    border-color: var(--brand-purple);
    color: white;
    box-shadow: 0 4px 16px rgba(71, 47, 105, 0.4);
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: var(--positive);
    border-color: var(--positive);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: var(--transition);
}

.step-indicator.active .step-label { color: var(--brand-purple); }
.step-indicator.completed .step-label { color: var(--positive); }

/* --- Steps Content --- */
.step-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.step-content.active { display: block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 4px rgba(71, 47, 105, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* --- Dropzone --- */
.dropzone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, rgba(71, 47, 105, 0.02), rgba(99, 102, 241, 0.02));
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: var(--brand-purple);
    background: linear-gradient(135deg, rgba(71, 47, 105, 0.05), rgba(99, 102, 241, 0.05));
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.dropzone-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.dropzone-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* --- File Checklist --- */
.file-checklist {
    margin-top: 24px;
}

.file-checklist-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-count {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--brand-purple-06);
    padding: 3px 12px;
    border-radius: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    margin-bottom: 4px;
    font-size: 0.82rem;
    transition: var(--transition-fast);
}

.file-item:hover { background: var(--bg-card-hover); }

.file-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.file-status.pending {
    background: #F1F5F9;
    border: 2px solid var(--border);
    color: transparent;
}

.file-status.uploaded {
    background: var(--positive);
    border: 2px solid var(--positive);
    color: white;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-secondary);
}

.file-item.uploaded .file-name {
    color: var(--text-primary);
    font-weight: 600;
}

.file-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.file-badge.required {
    background: var(--negative-bg);
    color: var(--negative);
}

.file-badge.optional {
    background: var(--neutral-bg);
    color: var(--neutral-color);
}

.file-badge.done {
    background: var(--positive-bg);
    color: var(--positive);
}

/* --- Separator --- */
.file-separator {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 10px 14px 6px;
    margin-top: 8px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-light));
    color: white;
    box-shadow: 0 4px 16px rgba(71, 47, 105, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(71, 47, 105, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--brand-purple);
    color: var(--brand-purple);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--positive), #047857);
    color: white;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(5, 150, 105, 0.4);
}

.btn-mint {
    background: linear-gradient(135deg, var(--brand-mint), var(--brand-mint-dark));
    color: var(--brand-purple-dark);
    box-shadow: 0 4px 16px rgba(43, 253, 180, 0.3);
    font-weight: 700;
}

.btn-mint:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(43, 253, 180, 0.45);
}

.btn-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* --- Progress --- */
.progress-container {
    margin: 24px 0;
}

.progress-bar-bg {
    height: 8px;
    background: #F1F5F9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-purple), var(--brand-mint));
    transition: width 0.6s ease;
    width: 0%;
}

.progress-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* --- Status Messages --- */
.status-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
    animation: fadeInUp 0.3s ease;
}

.status-msg.info {
    background: var(--neutral-bg);
    color: var(--neutral-color);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-msg.success {
    background: var(--positive-bg);
    color: var(--positive);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-msg.error {
    background: var(--negative-bg);
    color: var(--negative);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.status-msg.warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* --- Preview Frame --- */
.preview-frame {
    width: 100%;
    height: 600px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: white;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

/* --- Summary Stats --- */
.gen-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.gen-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.gen-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.gen-stat .stat-icon { font-size: 1.5rem; margin-bottom: 6px; display: block; }
.gen-stat .stat-value { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.gen-stat .stat-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Spinner --- */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .app { padding: 16px; }
    .gen-header { padding: 24px; }
    .gen-header h1 { font-size: 1.5rem; }
    .card { padding: 20px; }
    .gen-stats { grid-template-columns: repeat(2, 1fr); }
    .stepper::before { width: 80%; }
    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; }
}

@media (max-width: 480px) {
    .gen-stats { grid-template-columns: 1fr; }
    .step-label { font-size: 0.65rem; }
}
