html.erfan-login-profile-locked,
body.erfan-login-profile-locked {
    overflow: hidden !important;
}

.erfan-login-profile-gate {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.erfan-login-profile-gate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    pointer-events: auto;
}

.erfan-login-profile-gate-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.erfan-login-profile-gate-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.erfan-login-profile-gate-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.erfan-login-profile-gate-description {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

.erfan-login-profile-gate-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.erfan-login-profile-gate-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.erfan-login-profile-gate-field .required {
    color: #e74c3c;
}

.erfan-login-profile-gate-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.erfan-login-profile-gate-field input:focus {
    outline: none;
    border-color: var(--erfan-login-primary, #0BD08B);
}

.erfan-login-profile-gate-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.5;
}

.erfan-login-profile-gate-submit {
    width: 100%;
    margin-top: 4px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: var(--erfan-login-primary, #0BD08B);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.erfan-login-profile-gate-submit:hover {
    opacity: 0.92;
}

.erfan-login-profile-gate-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.erfan-login-profile-gate.is-hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .erfan-login-profile-gate-content {
        padding: 22px 18px;
    }

    .erfan-login-profile-gate-title {
        font-size: 20px;
    }
}

/* ── Style 5 — Emerald Noir Luxury ── */
.erfan-login-profile-gate.erfan-login-theme-style-5 {
    --s5-bg-deep: #071a18;
    --s5-bg-mid: #0d2f2a;
    --s5-bg-lift: #164840;
    --s5-accent: #3eb8a8;
    --s5-gold: #e0c078;
    --s5-gold-deep: #c9a24a;
    --s5-gold-soft: rgba(224, 192, 120, 0.28);
    --s5-text: #eef8f6;
    --s5-muted: rgba(238, 248, 246, 0.62);
    --s5-input: rgba(5, 20, 18, 0.62);
    --s5-border: rgba(94, 196, 182, 0.28);
    --s5-error: #f0a8a8;
    --s5-radius: 24px;
    --s5-radius-sm: 14px;
    --s5-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-overlay {
    background: rgba(4, 14, 12, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-content {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 32px 28px;
    border-radius: var(--s5-radius);
    color: var(--s5-text);
    border: 1px solid var(--s5-border);
    background:
        radial-gradient(ellipse 80% 60% at 15% 10%, rgba(46, 140, 128, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 90%, rgba(201, 162, 74, 0.12) 0%, transparent 50%),
        linear-gradient(155deg, var(--s5-bg-lift) 0%, var(--s5-bg-mid) 45%, var(--s5-bg-deep) 100%);
    box-shadow:
        0 28px 72px rgba(3, 14, 12, 0.65),
        0 8px 24px rgba(3, 14, 12, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: s5-gate-enter 0.65s var(--s5-ease) both;
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-content::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    top: -50px;
    right: -36px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(62, 184, 168, 0.26) 0%, transparent 70%);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-title,
.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-description,
.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-form {
    position: relative;
    z-index: 1;
}

@keyframes s5-gate-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-title {
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--s5-text);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-description {
    color: var(--s5-muted);
    margin-bottom: 24px;
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field label {
    color: var(--s5-text);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field .required {
    color: var(--s5-gold);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field input {
    padding: 14px 16px;
    border-radius: var(--s5-radius-sm);
    border: 1px solid var(--s5-border);
    background: var(--s5-input);
    color: var(--s5-text);
    transition:
        border-color 0.28s var(--s5-ease),
        box-shadow 0.28s var(--s5-ease),
        background-color 0.28s var(--s5-ease);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field input::placeholder {
    color: rgba(238, 248, 246, 0.38);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field input:hover {
    border-color: rgba(94, 196, 182, 0.45);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-field input:focus {
    border-color: var(--s5-gold);
    background: rgba(5, 20, 18, 0.88);
    box-shadow:
        0 0 0 3px var(--s5-gold-soft),
        0 0 0 1px rgba(62, 184, 168, 0.2);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-error {
    background: rgba(240, 168, 168, 0.12);
    border: 1px solid rgba(240, 168, 168, 0.35);
    color: var(--s5-error);
    border-radius: var(--s5-radius-sm);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-submit {
    padding: 15px 20px;
    border-radius: var(--s5-radius-sm);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--s5-bg-deep);
    background: linear-gradient(135deg, #f0d48a 0%, var(--s5-gold) 42%, var(--s5-gold-deep) 100%);
    box-shadow:
        0 10px 28px rgba(201, 162, 74, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition:
        transform 0.25s var(--s5-ease),
        box-shadow 0.28s var(--s5-ease),
        filter 0.25s ease,
        opacity 0.2s ease;
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-submit:hover:not(:disabled) {
    opacity: 1;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 14px 34px rgba(201, 162, 74, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-submit:active:not(:disabled) {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-content {
        padding: 26px 20px;
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-content {
        animation: none;
    }

    .erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-submit:hover:not(:disabled),
    .erfan-login-profile-gate.erfan-login-theme-style-5 .erfan-login-profile-gate-submit:active:not(:disabled) {
        transform: none;
    }
}
