/* ============================================================
   ReadyStockMarket — Seller Authentication Styles
   Modern split-screen login/registration UI
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --auth-primary: #6366f1;
    --auth-primary-dark: #4f46e5;
    --auth-secondary: #8b5cf6;
    --auth-accent: #ec4899;
    --auth-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --auth-gradient-dark: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    --auth-bg: #f8fafc;
    --auth-card-bg: #ffffff;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-input-bg: #f8fafc;
    --auth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --auth-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --auth-radius: 12px;
    --auth-radius-sm: 8px;
    --auth-radius-lg: 16px;
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.auth-body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Split-Screen Container ────────────────────────────────── */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Brand Panel (Left) ────────────────────────────────────── */
.auth-brand-panel {
    flex: 1;
    background: var(--auth-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: authFloat 20s ease-in-out infinite;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 420px;
    animation: authSlideIn 0.8s ease-out;
}

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

.auth-brand-logo {
    max-width: 180px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.auth-brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.auth-brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

.auth-brand-features {
    list-style: none;
    text-align: left;
}

.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.12);
    border-radius: var(--auth-radius-sm);
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: var(--auth-transition);
}

.auth-brand-features li:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.auth-brand-features li i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Form Panel (Right) ────────────────────────────────────── */
.auth-form-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--auth-card-bg);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    animation: authCardIn 0.6s ease-out;
}

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

.auth-logo {
    max-width: 140px;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--auth-text-muted);
    margin-bottom: 32px;
}

/* ── Form Elements ─────────────────────────────────────────── */
.auth-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 8px;
}

.auth-form label i {
    margin-right: 6px;
    color: var(--auth-text-muted);
    width: 16px;
    text-align: center;
}

.auth-form .auth-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    transition: var(--auth-transition);
    outline: none;
}

.auth-form .auth-input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.auth-form .auth-input::placeholder {
    color: #94a3b8;
}

.auth-form textarea.auth-input {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.auth-form select.auth-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ── Password Wrapper ──────────────────────────────────────── */
.password-wrapper {
    position: relative;
}

.password-wrapper .auth-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--auth-text-muted);
    font-size: 18px;
    padding: 4px;
    transition: var(--auth-transition);
    user-select: none;
    z-index: 2;
}

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

/* ── Buttons ───────────────────────────────────────────────── */
.primary-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.primary-btn:hover {
    background: var(--auth-gradient-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}

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

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

.primary-btn i {
    font-size: 14px;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: transparent;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--auth-transition);
    text-decoration: none;
}

.secondary-btn:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    background: rgba(99, 102, 241, 0.05);
}

.secondary-btn i {
    font-size: 13px;
}

/* ── Links ─────────────────────────────────────────────────── */
.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--auth-transition);
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-text-muted);
}

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

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

.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--auth-text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: var(--auth-transition);
}

.auth-home-link:hover {
    color: var(--auth-text);
    text-decoration: none;
}

/* ── Alerts ────────────────────────────────────────────────── */
.auth-alert {
    padding: 14px 18px;
    border-radius: var(--auth-radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: authAlertIn 0.4s ease-out;
}

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

.auth-alert i {
    margin-top: 2px;
    font-size: 16px;
    flex-shrink: 0;
}

.auth-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ── Divider ───────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--auth-text-muted);
    font-size: 13px;
}

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

/* ── Progress Container (Registration) ─────────────────────── */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    position: relative;
    cursor: default;
    transition: var(--auth-transition);
}

.progress-step::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 48px;
    width: 2px;
    height: calc(100% - 16px);
    background: var(--auth-border);
}

.progress-step:last-child::before {
    display: none;
}

.progress-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: var(--auth-transition);
}

.progress-step.completed .progress-step-number {
    background: #10b981;
    color: #fff;
}

.progress-step.active .progress-step-number {
    background: var(--auth-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.progress-step.pending .progress-step-number {
    background: var(--auth-border);
    color: var(--auth-text-muted);
}

.progress-step-text {
    flex: 1;
}

.progress-step-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    transition: var(--auth-transition);
}

.progress-step.pending .progress-step-label {
    color: var(--auth-text-muted);
}

.progress-step.active .progress-step-label {
    color: var(--auth-primary);
}

.progress-step-sublabel {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin-top: 2px;
}

/* ── Registration Form Header ──────────────────────────────── */
.auth-step-header {
    margin-bottom: 32px;
}

.auth-step-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-step-title i {
    color: var(--auth-primary);
}

.auth-step-subtitle {
    font-size: 14px;
    color: var(--auth-text-muted);
}

/* ── Form Row ──────────────────────────────────────────────── */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Action Row ────────────────────────────────────────────── */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.auth-actions .primary-btn {
    width: auto;
    min-width: 180px;
}

/* ── Review Panels ─────────────────────────────────────────── */
.auth-review-panel {
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.auth-review-header {
    background: var(--auth-input-bg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--auth-border);
}

.auth-review-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-review-header h4 i {
    color: var(--auth-primary);
}

.auth-review-header a {
    font-size: 13px;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-review-header a:hover {
    text-decoration: underline;
}

.auth-review-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.auth-review-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.auth-review-item {
    flex: 1;
    min-width: 150px;
}

.auth-review-item small {
    display: block;
    color: var(--auth-text-muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.auth-review-item strong {
    color: var(--auth-text);
}

/* ── Upload Area ───────────────────────────────────────────── */
.auth-upload-area {
    border: 2px dashed var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding: 30px 20px;
    text-align: center;
    transition: var(--auth-transition);
    background: var(--auth-input-bg);
}

.auth-upload-area:hover {
    border-color: var(--auth-primary);
    background: rgba(99, 102, 241, 0.03);
}

.auth-upload-area i {
    font-size: 36px;
    color: var(--auth-text-muted);
    margin-bottom: 12px;
    display: block;
}

.auth-upload-area h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-upload-area p {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* ── Terms Checkbox ────────────────────────────────────────── */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.auth-terms input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
    flex-shrink: 0;
}

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

.auth-terms a:hover {
    text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-brand-panel {
        padding: 40px 30px;
        min-height: auto;
    }

    .auth-brand-title {
        font-size: 26px;
    }

    .auth-brand-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .auth-brand-features li {
        padding: 10px 14px;
        font-size: 13px;
    }

    .auth-form-panel {
        padding: 30px 20px;
    }

    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .auth-brand-panel {
        padding: 30px 20px;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-brand-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .auth-brand-features {
        grid-template-columns: 1fr;
    }

    .auth-form-panel {
        padding: 24px 16px;
    }

    .auth-title {
        font-size: 24px;
    }

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

    .auth-actions {
        flex-direction: column;
    }

    .auth-actions .primary-btn,
    .auth-actions .secondary-btn {
        width: 100%;
    }

    /* Registration: vertical progress → horizontal */
    .progress-container {
        flex-direction: row;
        overflow-x: auto;
        gap: 0;
        padding: 0 8px;
        margin-bottom: 24px;
        -webkit-overflow-scrolling: touch;
    }

    .progress-step {
        flex-direction: column;
        text-align: center;
        padding: 8px 12px;
        min-width: 70px;
    }

    .progress-step::before {
        display: none;
    }

    .progress-step-text {
        font-size: 11px;
    }

    .progress-step-label {
        font-size: 11px;
    }

    .progress-step-sublabel {
        display: none;
    }

    .progress-step-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .auth-brand-panel {
        padding: 24px 16px;
    }

    .auth-brand-title {
        font-size: 20px;
    }

    .auth-form-panel {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 22px;
    }
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
    .auth-brand-panel { display: none; }
    .auth-container { display: block; }
    .auth-form-panel { padding: 20px; }
}
