/* United DigiArt Vision - Document→Form Automation */
:root {
    --deep-blue: #1a365d;
    --electric-teal: #0891b2;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --success: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--electric-teal) 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
    color: var(--gray-800);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
header {
    background: var(--deep-blue);
    color: var(--white);
    padding: 2rem;
}

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

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--electric-teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.logo-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 2rem;
}

.step {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.step.active {
    display: block;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--deep-blue), var(--electric-teal));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-header h2 {
    font-size: 1.75rem;
    color: var(--deep-blue);
    font-weight: 700;
}

.step-content {
    padding-left: 4rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--gray-300);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.upload-area:hover {
    border-color: var(--electric-teal);
    background: var(--white);
}

.upload-area.drag-over {
    border-color: var(--electric-teal);
    background: rgba(8, 145, 178, 0.05);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--electric-teal);
    margin: 0 auto 1rem;
}

.upload-area p {
    font-size: 1.125rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

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

/* Preview Area */
.preview-area {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-area img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--deep-blue), var(--electric-teal));
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    margin-right: 1rem;
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* Processing */
.processing {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--electric-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.processing p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* Data Display */
.data-display h3, .ai-response h3 {
    color: var(--deep-blue);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.data-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.data-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--electric-teal);
}

.data-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.data-value {
    font-size: 1.125rem;
    color: var(--gray-800);
    font-weight: 600;
}

/* AI Response */
.response-box {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--deep-blue);
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Form */
.auto-form h3 {
    color: var(--deep-blue);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-page {
    display: none;
}

.form-page.active {
    display: block;
    animation: fadeIn 0.4s ease-in;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--gray-50);
    color: var(--gray-800);
}

.form-group input:focus {
    outline: none;
    border-color: var(--electric-teal);
    background: var(--white);
}

/* Confirmation */
.confirmation {
    text-align: center;
    padding: 2rem 0;
}

.check-icon {
    width: 80px;
    height: 80px;
    color: var(--success);
    margin: 0 auto 1.5rem;
}

.confirmation h3 {
    color: var(--deep-blue);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.confirmation p {
    color: var(--gray-600);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.summary {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    margin: 0 auto 2rem;
    max-width: 500px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.summary-label {
    color: var(--gray-600);
    font-weight: 500;
}

.summary-value {
    color: var(--gray-800);
    font-weight: 600;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--gray-200);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--deep-blue), var(--electric-teal));
    width: 0%;
    transition: width 0.5s ease;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container {
        border-radius: 8px;
    }

    header {
        padding: 1.5rem;
    }

    main {
        padding: 1.5rem;
    }

    .step-content {
        padding-left: 0;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}
