/* ========================================
   Loan Eligibility Engine - Styles
   Black & White Minimalist Design
======================================== */

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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --success: #22c55e;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================
   Header
======================================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

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

.logo-icon {
    font-size: 1.5rem;
    color: var(--black);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--black);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

/* ========================================
   Main Content
======================================== */

.main {
    flex: 1;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.hero {
    text-align: center;
    margin-bottom: 0.75rem;
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--gray-500);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   Upload Section
======================================== */

.upload-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    width: 100%;
}

.upload-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: var(--black);
    background: var(--gray-50);
}

.upload-area.dragover {
    border-color: var(--black);
    background: var(--gray-100);
}

.upload-icon {
    color: var(--gray-400);
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.upload-area:hover .upload-icon {
    color: var(--black);
}

.upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.upload-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.7rem;
    color: var(--gray-400);
}

/* File Preview */

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.file-icon {
    color: var(--gray-600);
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--black);
}

.file-size {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    color: var(--error);
    background: var(--gray-100);
}

/* Progress Bar */

.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: var(--black);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Upload Button */

.btn-upload {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.btn-upload:hover:not(:disabled) {
    background: var(--gray-800);
    transform: translateY(-1px);
}

.btn-upload:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* Status Card */

.status-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: var(--gray-100);
    color: var(--gray-600);
}

.status-icon.success {
    background: #dcfce7;
    color: var(--success);
}

.status-icon.error {
    background: #fee2e2;
    color: var(--error);
}

.status-icon.loading {
    background: var(--gray-100);
    color: var(--gray-600);
    animation: spin 1s linear infinite;
}

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

.status-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.status-message {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.status-details {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.status-details p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.status-details strong {
    color: var(--black);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--black);
}

/* ========================================
   Pipeline Section
======================================== */

.pipeline-section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: block;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    text-align: center;
    margin-bottom: 0.75rem;
}

.pipeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 150px;
}

.step-number {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--white);
    background: var(--black);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.step-content h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.15rem;
}

.step-content p {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.pipeline-connector {
    width: 60px;
    height: 2px;
    background: var(--gray-200);
    margin-top: 15px;
}

/* ========================================
   Footer
======================================== */

.footer {
    text-align: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    flex-shrink: 0;
}

.footer p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* ========================================
   Responsive
======================================== */

@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .main {
        padding: 2rem 1rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .upload-card {
        padding: 1.5rem;
    }

    .pipeline {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .pipeline-connector {
        width: 2px;
        height: 30px;
        margin: 0;
    }

    .pipeline-step {
        flex-direction: row;
        gap: 1rem;
        text-align: left;
        max-width: 100%;
    }

    .step-content {
        text-align: left;
    }
}
