/* ===== PROFESSIONAL UPLOAD PAGE STYLES ===== */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary: #10B981;
    --secondary: #F59E0B;
    --accent: #059669;
    --dark: #1F2937;
    --light: #F9FAFB;
    --white: #FFFFFF;
    --text: #374151;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Poppins', sans-serif;

    /* Spacing */
    --section-padding: 4rem 0;
    --container-max-width: 1200px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--light) 0%, #FFFFFF 100%);
    min-height: 100vh;
}

/* Upload Header */
.upload-header {
    text-align: center;
    margin-bottom: 3rem;
}

.upload-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

.upload-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PROGRESS STEPS ===== */
.upload-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
    position: relative;
}

.upload-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    background: var(--light);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.progress-step.completed .step-number {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* ===== FORM MESSAGES ===== */
.form-messages {
    margin-bottom: 2rem;
    display: none;
}

.upload-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    margin-bottom: 1rem;
    animation: slideInDown 0.3s ease;
}

.upload-message--success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.upload-message--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.upload-message--warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.upload-message--info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== UPLOAD FORM ===== */
.upload-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
}

.form-section h3 i {
    color: var(--primary);
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Error Messages */
.error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

/* ===== FILE UPLOAD AREA ===== */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FAFAFA;
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.02);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-upload-area:hover::before {
    left: 100%;
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.02);
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder svg {
    color: var(--primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.2));
}

.upload-placeholder p {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.125rem;
}

.upload-hint {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ===== FILE LIST ===== */
.file-list {
    margin-top: 1.5rem;
}

.no-files {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #F3F4F6;
    border-color: var(--primary);
    transform: translateX(4px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-info i {
    color: var(--primary);
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.875rem;
}

.file-size {
    color: var(--text-light);
    font-size: 0.75rem;
}

.remove-file {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: var(--error);
    color: var(--white);
    transform: scale(1.1);
}

/* ===== PRICE SUMMARY ===== */
.price-summary {
    background: linear-gradient(135deg, var(--light) 0%, #F3F4F6 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.price-item:last-child {
    border-bottom: none;
}

.price-item.total {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
}

.price-item span:last-child {
    font-weight: 600;
    color: var(--dark);
}

.price-item.total span:last-child {
    color: var(--primary);
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--text-light);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn.loading {
    pointer-events: none;
}

.btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: var(--light);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.auth-required-message {
    text-align: center;
    color: var(--text);
    line-height: 1.6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .upload-section {
        padding: 6rem 0 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .upload-header h1 {
        font-size: 2rem;
    }
    
    .upload-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .upload-progress::before {
        display: none;
    }
    
    .progress-step {
        flex-direction: row;
        gap: 1rem;
    }
    
    .step-label {
        white-space: normal;
    }
    
    .upload-form {
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .upload-header h1 {
        font-size: 1.75rem;
    }
    
    .upload-header p {
        font-size: 1rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-info {
        width: 100%;
    }
    
    .remove-file {
        align-self: flex-end;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-light: #000000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1F2937;
        --white: #111827;
        --text: #F9FAFB;
        --text-light: #D1D5DB;
        --border: #374151;
        --dark: #F9FAFB;
    }
    
    .file-upload-area {
        background: #374151;
    }
    
    .price-summary {
        background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    }
}