/* ── Stitch Auth Design System (Premium Mesh & Glass Showcase) ── */
:root {
    --stitch-primary: #885df1;
    --stitch-primary-hover: #7645ea;
    --stitch-primary-light: #f3effe;
    --stitch-primary-glow: rgba(136, 93, 241, 0.35);
    --stitch-text-dark: #0f172a;
    --stitch-text-muted: #64748b;
    --stitch-text-label: #334155;
    --stitch-input-bg: #f8fafc;
    --stitch-input-border: #e2e8f0;
    --stitch-card-bg: #ffffff;
    --stitch-radius-lg: 24px;
    --stitch-radius-md: 16px;
    --stitch-radius-sm: 12px;
}

.stitch-auth-section {
    background: #f8fafc;
    padding: 60px 15px 90px;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.stitch-auth-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.stitch-auth-card {
    background: var(--stitch-card-bg);
    border-radius: var(--stitch-radius-lg);
    box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    overflow: hidden;
    padding: 14px;
    gap: 0;
}

/* ── Form Column (Left) ── */
.stitch-form-col {
    flex: 1 1 50%;
    max-width: 50%;
    padding: 38px 42px 32px 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Back Link ── */
.stitch-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--stitch-text-muted);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.18s ease;
    width: fit-content;
}
.stitch-back-link:hover {
    color: var(--stitch-primary);
}

/* ── Title & Headings ── */
.stitch-title {
    font-size: 29px;
    font-weight: 800;
    color: var(--stitch-text-dark);
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 8px;
}
.stitch-title .text-purple {
    color: var(--stitch-primary);
}
.stitch-subtitle {
    font-size: 14px;
    color: var(--stitch-text-muted);
    line-height: 1.55;
    margin-bottom: 22px;
}

/* ── Role Switch (Above submit button) ── */
.stitch-role-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1.5px solid var(--stitch-input-border);
    border-radius: var(--stitch-radius-sm);
    padding: 8px 14px;
    margin: 10px 0 20px;
    transition: border-color 0.2s ease;
}
.stitch-role-switch:hover {
    border-color: rgba(136, 93, 241, 0.6);
}
.stitch-role-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--stitch-text-label);
}
.stitch-role-pills {
    display: inline-flex;
    background: #eef2f6;
    border-radius: 50px;
    padding: 3px;
    position: relative;
    gap: 3px;
}
.stitch-role-btn {
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--stitch-text-muted);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.stitch-role-btn.active {
    background: var(--stitch-primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 3px 12px var(--stitch-primary-glow);
}

/* ── Form Groups & Input Strict Styles ── */
.stitch-form-group {
    margin-bottom: 18px;
    position: relative;
}
.stitch-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--stitch-text-label);
    margin-bottom: 7px;
}
.stitch-label .required {
    color: #ef4444;
}

.stitch-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.stitch-auth-section .stitch-input-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 16px !important;
    pointer-events: none !important;
    z-index: 5 !important;
    line-height: 1 !important;
    transition: color 0.18s ease;
}

.stitch-auth-section input.stitch-input,
.stitch-auth-section input[type="email"].stitch-input,
.stitch-auth-section input[type="password"].stitch-input,
.stitch-auth-section input[type="text"].stitch-input {
    width: 100% !important;
    height: 48px !important;
    background: var(--stitch-input-bg) !important;
    border: 1.5px solid var(--stitch-input-border) !important;
    border-radius: var(--stitch-radius-sm) !important;
    padding: 0 44px 0 46px !important;
    font-size: 14.5px !important;
    color: var(--stitch-text-dark) !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    margin: 0 !important;
    transition: all 0.18s ease !important;
}

.stitch-auth-section input.stitch-input::placeholder {
    color: #94a3b8 !important;
    font-size: 14px !important;
    opacity: 1 !important;
}

.stitch-auth-section input.stitch-input:focus {
    background: #ffffff !important;
    border-color: var(--stitch-primary) !important;
    box-shadow: 0 0 0 3.5px var(--stitch-primary-glow) !important;
}

.stitch-auth-section .stitch-input-wrap:focus-within .stitch-input-icon {
    color: var(--stitch-primary) !important;
}

/* Password Toggle Icon */
.stitch-auth-section .stitch-toggle-password {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    z-index: 5 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.18s ease !important;
}
.stitch-auth-section .stitch-toggle-password:hover {
    color: var(--stitch-primary) !important;
}

/* ── Checkbox & Forgot Password ── */
.stitch-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13.5px;
}
.stitch-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--stitch-text-label);
    font-size: 13.5px;
    margin: 0;
}
.stitch-checkbox-wrap input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--stitch-primary);
    cursor: pointer;
    border-radius: 4px;
}
.stitch-forgot-link {
    color: var(--stitch-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.18s ease;
}
.stitch-forgot-link:hover {
    text-decoration: underline;
    color: var(--stitch-primary-hover);
}

/* ── Submit Button (Matches Header Button #885df1) ── */
.stitch-btn-submit {
    width: 100%;
    height: 50px;
    background: #885df1;
    color: #ffffff;
    border: none;
    border-radius: var(--stitch-radius-sm);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px -4px var(--stitch-primary-glow);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.stitch-btn-submit:hover {
    background: var(--stitch-primary-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 12px 24px -4px var(--stitch-primary-glow);
    color: #ffffff;
}
.stitch-btn-submit:active {
    transform: translateY(0);
}
.stitch-btn-submit i {
    font-size: 14px;
    transition: transform 0.18s ease;
}
.stitch-btn-submit:hover i {
    transform: translateX(3px);
}

/* ── Divider ── */
.stitch-divider {
    position: relative;
    text-align: center;
    margin: 22px 0 18px;
}
.stitch-divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.stitch-divider span {
    position: relative;
    background: var(--stitch-card-bg);
    padding: 0 14px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    z-index: 2;
}

/* ── Social Buttons ── */
.stitch-social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.stitch-btn-social {
    height: 44px;
    background: #ffffff;
    border: 1.5px solid var(--stitch-input-border);
    border-radius: var(--stitch-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--stitch-text-label);
    text-decoration: none;
    transition: all 0.18s ease;
}
.stitch-btn-social:hover {
    background: #f8fafc;
    border-color: rgba(136, 93, 241, 0.5);
    color: var(--stitch-text-dark);
}
.stitch-btn-social img,
.stitch-btn-social svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Auth Switch / Footer Links ── */
.stitch-auth-footer {
    text-align: center;
    font-size: 13.5px;
    color: var(--stitch-text-muted);
    margin-top: 14px;
}
.stitch-auth-footer a {
    color: var(--stitch-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.stitch-auth-footer a:hover {
    text-decoration: underline;
}

/* ── Right Column: Premium Multi-Depth Glass Banner ── */
.stitch-banner-col {
    flex: 1 1 50%;
    max-width: 50%;
    padding: 6px;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

.stitch-composed-panel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 90% 10%, rgba(210, 185, 255, 0.35) 0%, transparent 45%),
                radial-gradient(circle at 10% 90%, rgba(70, 25, 195, 0.45) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(136, 93, 241, 0.35) 0%, transparent 60%),
                linear-gradient(145deg, #7c4de8 0%, #6836de 50%, #5220c4 100%);
    box-shadow: 0 16px 40px -8px rgba(100, 45, 210, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 38px 28px 32px;
    gap: 26px;
    color: #ffffff;
    box-sizing: border-box;
}

/* Subtle modern grid overlay */
.stitch-composed-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.2px);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.65;
}

/* Ambient glow center orb */
.stitch-composed-panel::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: #bba3f7;
    filter: blur(85px);
    opacity: 0.28;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Centerpiece Showcase Stage */
.stitch-hero-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 380px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
}

.stitch-glass-showcase {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 22px;
    padding: 32px 24px 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.stitch-glass-showcase:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.stitch-showcase-logo {
    max-width: 235px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.22));
    margin-bottom: 18px;
}

/* Avatar Community Pill */
.stitch-avatar-group {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px 4px 6px;
    border-radius: 50px;
    gap: 8px;
    backdrop-filter: blur(8px);
}
.stitch-avatar-imgs {
    display: flex;
    align-items: center;
}
.stitch-avatar-imgs img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
    margin-left: -8px;
}
.stitch-avatar-imgs img:first-child {
    margin-left: 0;
}
.stitch-avatar-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

/* Floating Micro Badges */
.stitch-float-chip {
    position: absolute;
    z-index: 3;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
    animation: floatAnimation 4s ease-in-out infinite;
    white-space: nowrap;
}
.stitch-float-chip--top {
    top: -14px;
    right: -10px;
    animation-delay: 0s;
}
.stitch-float-chip--bottom {
    bottom: -14px;
    left: -10px;
    animation-delay: 2s;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Bottom Text & Heading */
.stitch-bottom-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 410px;
    margin-top: 10px;
}
.stitch-hero-title {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.stitch-hero-subtitle {
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ── Responsive Behavior ── */
@media (max-width: 991px) {
    .stitch-form-col {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 30px 24px;
    }
    .stitch-banner-col {
        display: none;
    }
    .stitch-auth-card {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 575px) {
    .stitch-auth-section {
        padding: 30px 10px 60px;
    }
    .stitch-form-col {
        padding: 20px 12px;
    }
    .stitch-title {
        font-size: 24px;
    }
    .stitch-social-row {
        grid-template-columns: 1fr;
    }
    .stitch-form-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
