/* Blue and White Theme - BM Consulting */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #3b82f6;
    --secondary-blue: #60a5fa;
    --light-blue: #dbeafe;
    --pale-blue: #eff6ff;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --error-red: #ef4444;
    --error-bg: #fee2e2;
    --success-green: #10b981;
    --success-bg: #d1fae5;
}

* {
    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(--pale-blue) 0%, var(--light-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-800);
}

.container {
    width: 100%;
    max-width: 600px;
}

.form-container {
    max-width: 800px;
}

/* Login Box & Form Box */
.login-box,
.form-box,
.success-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
    padding: 40px;
    border: 1px solid var(--gray-200);
}

.seller-form {
    max-width: 100%;
}

/* Top Actions Bar */
.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.top-actions .btn {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-clear {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-logout {
    background: linear-gradient(135deg, var(--error-red) 0%, #dc2626 100%);
    color: var(--white);
    border: none;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--error-red) 100%);
    transform: translateY(-1px);
}

.success-box {
    text-align: center;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    color: var(--primary-blue);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: var(--gray-500);
    font-size: 16px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: var(--error-red);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 16px;
    color: var(--gray-800);
    background-color: var(--white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-group input[readonly] {
    background-color: var(--gray-50);
    color: var(--gray-500);
    cursor: not-allowed;
}

/* Autofill Section */
.autofill-section {
    background: var(--pale-blue);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--light-blue);
}

.autofill-section .form-group {
    margin-bottom: 16px;
}

.autofill-section .form-group:last-child {
    margin-bottom: 0;
}

/* Validation Message */
.validation-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
}

.validation-message.success {
    color: var(--success-green);
}

.validation-message.error {
    color: var(--error-red);
}

/* Seller Display Name (for validation only) */
.seller-display-name {
    display: none;
    margin-top: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--pale-blue) 100%);
    border-left: 4px solid var(--primary-blue);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-blue-dark);
    animation: fadeIn 0.3s ease;
}

.seller-display-name.show {
    display: block;
}

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

/* Conditional Fields */
.conditional-field {
    animation: slideDown 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    margin-top: 12px;
}

.btn-secondary:hover {
    background: var(--pale-blue);
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

/* Error Message */
.error-message {
    background: var(--error-bg);
    color: var(--error-red);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid var(--error-red);
}

/* Success Icon */
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

/* Select2 Custom Styles */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: auto;
    min-height: 54px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 10px 16px;
    background-color: var(--white);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    color: var(--gray-800);
    padding-left: 0;
    padding-right: 35px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 12px;
}

.select2-container--default .select2-selection--single:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.select2-dropdown {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-blue);
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* Seller Search Dropdown Styles */
.seller-search + .select2-container {
    width: 100% !important;
}

.seller-search + .select2-container .select2-selection--single {
    height: auto;
    min-height: 54px;
}

.seller-search + .select2-container .select2-selection__rendered {
    white-space: normal !important;
    word-wrap: break-word;
    line-height: 1.4;
    padding: 8px 35px 8px 12px;
}

/* Placeholder Option Styles */
.placeholder-option {
    color: var(--gray-400) !important;
    font-style: italic;
}

select option.placeholder-option {
    color: var(--gray-400);
    font-style: italic;
}

select:required:invalid {
    color: var(--gray-400);
}

/* Read-only input styling */
input[readonly] {
    background-color: var(--gray-100) !important;
    color: var(--gray-700) !important;
    cursor: default !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box,
    .form-box,
    .success-box {
        padding: 24px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 12px 24px;
    }
    
    .autofill-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 0;
    }
    
    .form-container {
        max-width: 100%;
    }
}
