/* ==========================================================================
   Authentication Pages Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Layout
   -------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    overflow: hidden;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.auth-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 50% at 0% 0%, rgba(201, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 100% 100%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        var(--color-bg);
}

.auth-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            var(--color-gold) 40px,
            var(--color-gold) 41px
        );
}

.auth-glow {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Left Panel - Branding
   -------------------------------------------------------------------------- */
.auth-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4xl);
    position: relative;
}

.branding-content {
    max-width: 480px;
    margin: 0 auto;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-4xl);
}

.auth-logo .logo-crown {
    font-size: 2rem;
    color: var(--color-gold);
    filter: drop-shadow(0 0 15px rgba(201, 169, 98, 0.4));
}

.auth-logo .logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.15em;
}

.branding-message {
    margin-bottom: var(--space-3xl);
}

.branding-message h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.branding-message p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Testimonial */
.branding-testimonial {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3xl);
}

.branding-testimonial blockquote {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold));
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.author-title {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Mini Stats */
.branding-stats {
    display: flex;
    gap: var(--space-2xl);
}

.mini-stat {
    display: flex;
    flex-direction: column;
}

.mini-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-gold);
}

.mini-stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Right Panel - Form
   -------------------------------------------------------------------------- */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    background: var(--color-bg-elevated);
    border-left: 1px solid var(--color-border);
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-form-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.auth-form-header p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > svg {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) * 2 + 18px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    transition: all var(--duration-normal) var(--ease-out);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.input-wrapper input:focus + svg,
.input-wrapper:focus-within > svg {
    color: var(--color-gold);
}

.input-wrapper input::placeholder {
    color: var(--color-text-muted);
}

/* Password toggle */
.toggle-password {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    padding: var(--space-xs);
    color: var(--color-text-muted);
    transition: color var(--duration-fast) var(--ease-out);
    z-index: 2;
}

.toggle-password:hover {
    color: var(--color-text);
}

.toggle-password svg {
    position: static;
    transform: none;
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓';
    color: var(--color-bg);
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--color-gold);
    transition: color var(--duration-fast) var(--ease-out);
}

.forgot-link:hover {
    color: var(--color-gold-light);
}

/* Submit Button */
.btn-full {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--duration-normal) var(--ease-out);
}

.social-btn:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-hover);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.auth-footer p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.auth-footer a {
    color: var(--color-gold);
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-out);
}

.auth-footer a:hover {
    color: var(--color-gold-light);
}

/* --------------------------------------------------------------------------
   Sign Up Page Specific
   -------------------------------------------------------------------------- */
.signup-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.step-indicator {
    width: 40px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
}

.step-indicator.active {
    background: var(--color-gold);
}

.step-indicator.completed {
    background: var(--color-gold);
}

/* Account Type Selection */
.account-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.account-type-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    text-align: center;
}

.account-type-card:hover {
    border-color: var(--color-border-hover);
}

.account-type-card.selected {
    border-color: var(--color-gold);
    background: rgba(201, 169, 98, 0.05);
}

.account-type-card input {
    display: none;
}

.type-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: all var(--duration-normal) var(--ease-out);
}

.account-type-card.selected .type-icon {
    background: var(--color-gold);
    color: var(--color-bg);
}

.type-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.type-desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* Terms Checkbox */
.terms-checkbox {
    font-size: 0.8125rem;
}

.terms-checkbox a {
    color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   Upload Flow Styles
   -------------------------------------------------------------------------- */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(var(--space-5xl) + 60px) var(--container-padding) var(--space-4xl);
}

.upload-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.upload-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.upload-header p {
    color: var(--color-text-secondary);
}

/* Progress Steps */
.upload-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all var(--duration-normal) var(--ease-out);
}

.progress-step.active .step-number {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-bg);
}

.progress-step.completed .step-number {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-bg);
}

.step-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: color var(--duration-normal) var(--ease-out);
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--color-text);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--color-border);
    transition: background var(--duration-normal) var(--ease-out);
}

.progress-line.completed {
    background: var(--color-gold);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4xl);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    margin-bottom: var(--space-2xl);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--color-gold);
    background: rgba(201, 169, 98, 0.05);
}

.upload-zone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border-radius: 50%;
    color: var(--color-gold);
}

.upload-zone h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.upload-zone p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.upload-zone .btn {
    pointer-events: none;
}

.upload-zone input[type="file"] {
    display: none;
}

/* Image Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-card);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 9, 8, 0.8);
    border-radius: 50%;
    color: var(--color-text);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

/* Upload Form Fields */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.upload-form textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all var(--duration-normal) var(--ease-out);
}

.upload-form textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

/* Tags Input */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-height: 48px;
    transition: all var(--duration-normal) var(--ease-out);
}

.tags-input:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.tag {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.tag-remove {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1;
}

.tag-remove:hover {
    color: var(--color-text);
}

.tags-input input {
    flex: 1;
    min-width: 120px;
    padding: var(--space-xs);
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.tags-input input:focus {
    outline: none;
}

/* Category Select */
.category-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.category-option {
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    font-size: 0.875rem;
}

.category-option:hover {
    border-color: var(--color-border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.category-option.selected,
.category-option:has(input:checked) {
    border-color: var(--color-gold);
    background: rgba(201, 169, 98, 0.15);
    color: var(--color-gold);
    font-weight: 500;
}

.category-option.selected::after,
.category-option:has(input:checked)::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--color-gold);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.category-option input {
    display: none;
}

/* Upload Actions */
.upload-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-branding {
        display: none;
    }

    .auth-form-panel {
        border-left: none;
    }

    .upload-progress {
        flex-wrap: wrap;
    }

    .progress-line {
        display: none;
    }

    .category-select {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .social-login {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .account-type-grid {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: var(--space-xl);
    }

    .category-select {
        grid-template-columns: 1fr;
    }
}
