/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --warning-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background-color) 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.header-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.header-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-info h1 i {
    font-size: 2rem;
}

.header-info p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.company-info {
    text-align: right;
    opacity: 0.9;
}

.company-info a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.company-info a:hover {
    text-decoration: underline;
}

/* Main Form Container */
.form-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.form-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section.full-width {
    grid-column: 1 / -1;
}

.form-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
    margin-bottom: 0.5rem;
}

.form-section h3 i {
    color: var(--primary-color);
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    color: var(--primary-color);
    width: 1rem;
    text-align: center;
}

.input-group small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: -0.25rem;
}

/* Input Styling */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--surface-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

select {
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* File Upload Styling */
.file-upload {
    position: relative;
}

.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--background-color);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
}

.file-input-wrapper:hover,
.file-input-wrapper.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
}

.file-upload-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
}

.file-upload-content i {
    font-size: 3rem;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.file-input-wrapper:hover .file-upload-content i,
.file-input-wrapper.dragover .file-upload-content i {
    color: var(--primary-color);
}

.file-input-text {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.file-input-wrapper:hover .file-input-text,
.file-input-wrapper.dragover .file-input-text {
    color: var(--primary-color);
}

.file-upload-content small {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Error Messages */
.error-message {
    color: var(--danger-color);
    font-size: 0.8rem;
    display: none;
    margin-top: 0.25rem;
}

.error-message:before {
    content: "⚠ ";
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Button Styling */
.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
    text-decoration: none;
    min-width: 150px;
    justify-content: center;
    position: relative;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

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

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.btn-primary.loading::after {
    content: "";
    position: absolute;
    right: 1rem;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.form-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--surface-color);
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.message.success {
    background: var(--success-light);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message.error {
    background: var(--danger-light);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.message i {
    font-size: 1.5rem;
}

.message p {
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .form-card {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .company-info {
        text-align: center;
    }
}

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

    .form-header {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .header-info h1 {
        font-size: 2rem;
    }

    .header-info h1 i {
        font-size: 1.75rem;
    }

    .form-card {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
        margin: 0 0.5rem 1.5rem;
    }

    .form-grid {
        gap: 1.25rem;
    }

    .form-section {
        gap: 1.25rem;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        min-width: auto;
    }

    .file-input-wrapper {
        min-height: 120px;
        padding: 1.5rem;
    }

    .file-upload-content i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .form-header {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-lg);
    }

    .header-info h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-info p {
        font-size: 1rem;
    }

    .form-card {
        margin: 0 0 1rem;
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .form-section h3 {
        font-size: 1.125rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .file-input-wrapper {
        min-height: 100px;
        padding: 1rem;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

/* Print Styles */
@media print {
    .form-header,
    .form-footer,
    .form-actions {
        display: none;
    }

    body {
        background: white;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Dark Mode Support 
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0f172a;
        --surface-color: #1e293b;
        --border-color: #334155;
        --border-hover: #475569;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-light: #64748b;
        --primary-light: #1e3a8a;
        --success-light: #064e3b;
        --danger-light: #7f1d1d;
    }

    body {
        background: linear-gradient(135deg, var(--background-color) 0%, #1e293b 100%);
    }
}*/