/*
    Login & Register Shared Styles — Presenta Premium Redesign
    Author: lehan
*/

/* ===================== LAYOUT ===================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Left Branding Panel --- */
.auth-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 60px 40px;
    background: linear-gradient(160deg, #1a0533 0%, #0b1326 40%, #091428 100%);
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: floatOrb 8s ease-in-out infinite;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 102, 217, 0.2) 0%, transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: floatOrb 10s ease-in-out infinite reverse;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 15px) scale(0.95);
    }
}

.brand-logo-area {
    position: relative;
    z-index: 2;
    text-align: center;
}

.brand-logo-area .brand-name {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #d2bbff 0%, #7c3aed 50%, #0566d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.brand-tagline {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.7;
    text-align: center;
}

.brand-features {
    list-style: none;
    margin-top: 40px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--on-surface);
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
}

.brand-features li .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-features li .feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Decorative Floating Elements --- */
.floating-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(210, 187, 255, 0.08);
}

.floating-shapes .shape:nth-child(1) {
    width: 120px;
    height: 120px;
    top: 15%;
    right: 10%;
    animation: floatShape 12s ease-in-out infinite;
}

.floating-shapes .shape:nth-child(2) {
    width: 80px;
    height: 80px;
    bottom: 25%;
    left: 15%;
    animation: floatShape 9s ease-in-out infinite 2s;
}

.floating-shapes .shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 25%;
    animation: floatShape 11s ease-in-out infinite 4s;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

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

.auth-form-panel::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    top: 10%;
    right: -100px;
}

/* --- Form Card --- */
.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
    animation: fadeSlideUp 0.6s ease-out;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card .card-header {
    margin-bottom: 36px;
}

.auth-card .card-header h1 {
    font-size: 30px;
    font-weight: 800;
    color: var(--on-surface);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-card .card-header p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===================== FORM ===================== */
.auth-form .form-group {
    margin-bottom: 22px;
    position: relative;
}

.auth-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form .input-wrapper {
    position: relative;
}

.auth-form .input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.auth-form .input-wrapper .input-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-form .form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--on-surface);
    padding: 14px 16px 14px 44px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form .form-control::placeholder {
    color: rgba(149, 141, 161, 0.6);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-container);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-form .form-control:focus+.input-icon,
.auth-form .input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

/* Toggle password visibility */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

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

.toggle-password svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Row for Remember + Forgot --- */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-container);
    cursor: pointer;
    border-radius: 4px;
}

.remember-me span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.link-forgot {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.link-forgot::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.link-forgot:hover::after {
    width: 100%;
}

/* --- Submit Button --- */
.btn-auth-submit {
    width: 91%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: linear-gradient(135deg, #7c3aed 0%, #0566d9 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-auth-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-auth-submit:hover::before {
    opacity: 1;
}

.btn-auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

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

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* --- Back to home link --- */
.btn-back-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 91%;
    height: 40px;
    margin: 20px auto 0 auto;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--on-surface);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back-home svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-back-home:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Auth footer (switch login/register) --- */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.auth-footer a:hover::after {
    width: 100%;
}

/* --- Error Message --- */
.error-msg {
    color: #ffb4ab;
    background: rgba(147, 0, 10, 0.2);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid rgba(255, 180, 171, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }
}

/* ===================== REGISTER EXTRAS ===================== */
.role-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 26px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 11px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.role-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.03);
    color: var(--on-surface);
}

.role-tab.active {
    background: linear-gradient(135deg, #7c3aed, #0566d9);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.designer-fields {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.designer-fields.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    padding-top: 4px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        flex: 1;
        padding: 32px 24px;
    }

    .auth-card {
        max-width: 420px;
    }
}

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

    .auth-card .card-header h1 {
        font-size: 26px;
    }

    .form-extras {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* =========================================================
   LEGACY COMPATIBILITY — for forgot-password, verify-otp,
   reset-password pages that still use old class names.
   ========================================================= */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.brand-title {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-container), var(--secondary-container));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: #0F172A;
    border: 1px solid var(--border-glass);
    color: var(--on-surface);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(210, 187, 255, 0.2);
}

.login-btn-submit {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 16px;
}

.login-btn-back {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.password-header label {
    margin-bottom: 0;
}

.register-prompt {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
    width: 100%;
}

.link-register {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.link-register:hover {
    text-decoration: underline;
    opacity: 0.8;
}