/* ========== LOGIN PAGE ========== */

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
}


/* =========================================================
   PREMIUM AURORA BACKGROUND
   ========================================================= */

.animated-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #f8fafc;
}


/* =========================================================
   SOFT LIGHT
   ========================================================= */

.animated-bg::before {
    content: "";
    position: absolute;
    inset: -15%;

    background:
        radial-gradient(
            circle 520px at 100% 0%,
            rgba(102, 126, 234, 0.20),
            transparent 70%
        ),
        radial-gradient(
            circle 500px at 0% 100%,
            rgba(118, 75, 162, 0.17),
            transparent 70%
        ),
        radial-gradient(
            circle 420px at 50% 45%,
            rgba(167, 139, 250, 0.08),
            transparent 70%
        );

    filter: blur(25px);
    animation: meshMove 24s ease-in-out infinite alternate;
    will-change: transform;
}


/* =========================================================
   VERY SUBTLE GRID
   ========================================================= */

.animated-bg::after {
    content: "";
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(102, 126, 234, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(102, 126, 234, 0.025) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    mask-image:
        radial-gradient(
            ellipse 80% 75% at 50% 50%,
            black 0%,
            transparent 100%
        );

    -webkit-mask-image:
        radial-gradient(
            ellipse 80% 75% at 50% 50%,
            black 0%,
            transparent 100%
        );
}


/* =========================================================
   BLOBS
   ========================================================= */

.bg-blob {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}


/* =========================================================
   BLUE GLOW
   ========================================================= */

.blob-1 {
    width: 620px;
    height: 620px;
    top: -300px;
    right: -190px;

    background:
        radial-gradient(
            circle,
            rgba(102, 126, 234, 0.24) 0%,
            rgba(102, 126, 234, 0.12) 38%,
            rgba(102, 126, 234, 0.03) 60%,
            transparent 74%
        );

    filter: blur(65px);
    animation: blueAurora 20s ease-in-out infinite;
}


/* =========================================================
   PURPLE GLOW
   ========================================================= */

.blob-2 {
    width: 600px;
    height: 600px;
    bottom: -300px;
    left: -190px;

    background:
        radial-gradient(
            circle,
            rgba(118, 75, 162, 0.21) 0%,
            rgba(118, 75, 162, 0.10) 38%,
            rgba(118, 75, 162, 0.025) 60%,
            transparent 74%
        );

    filter: blur(70px);
    animation: purpleAurora 24s ease-in-out infinite;
}


/* =========================================================
   CENTER GLOW
   ========================================================= */

.blob-3 {
    width: 440px;
    height: 440px;
    top: 38%;
    left: 43%;

    background:
        radial-gradient(
            circle,
            rgba(167, 139, 250, 0.12) 0%,
            rgba(167, 139, 250, 0.05) 40%,
            transparent 72%
        );

    filter: blur(80px);
    animation: centerAurora 28s ease-in-out infinite;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes meshMove {
    0% {
        transform:
            translate3d(-1%, -1%, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(1.5%, 1%, 0)
            scale(1.035);
    }

    100% {
        transform:
            translate3d(-1%, 2%, 0)
            scale(1.06);
    }
}


@keyframes blueAurora {
    0%,
    100% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    35% {
        transform:
            translate3d(-35px, 35px, 0)
            scale(1.05);
    }

    70% {
        transform:
            translate3d(-70px, 55px, 0)
            scale(1.10);
    }
}


@keyframes purpleAurora {
    0%,
    100% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    40% {
        transform:
            translate3d(40px, -35px, 0)
            scale(1.05);
    }

    75% {
        transform:
            translate3d(75px, -65px, 0)
            scale(1.10);
    }
}


@keyframes centerAurora {
    0%,
    100% {
        transform:
            translate3d(0, 0, 0)
            scale(0.90);

        opacity: 0.55;
    }

    50% {
        transform:
            translate3d(-45px, -35px, 0)
            scale(1.10);

        opacity: 0.9;
    }
}


/* =========================================================
   DARK MODE
   ========================================================= */

body.dark .animated-bg {
    background: #0f172a;
}


body.dark .animated-bg::before {
    background:
        radial-gradient(
            circle 520px at 100% 0%,
            rgba(102, 126, 234, 0.20),
            transparent 70%
        ),
        radial-gradient(
            circle 500px at 0% 100%,
            rgba(118, 75, 162, 0.17),
            transparent 70%
        ),
        radial-gradient(
            circle 420px at 50% 45%,
            rgba(167, 139, 250, 0.08),
            transparent 70%
        );
}


body.dark .animated-bg::after {
    background-image:
        linear-gradient(
            rgba(167, 139, 250, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(167, 139, 250, 0.025) 1px,
            transparent 1px
        );
}


body.dark .blob-1 {
    background:
        radial-gradient(
            circle,
            rgba(102, 126, 234, 0.22) 0%,
            rgba(102, 126, 234, 0.10) 38%,
            rgba(102, 126, 234, 0.025) 60%,
            transparent 74%
        );

    filter: blur(70px);
}


body.dark .blob-2 {
    background:
        radial-gradient(
            circle,
            rgba(118, 75, 162, 0.20) 0%,
            rgba(118, 75, 162, 0.09) 38%,
            rgba(118, 75, 162, 0.025) 60%,
            transparent 74%
        );

    filter: blur(75px);
}


body.dark .blob-3 {
    background:
        radial-gradient(
            circle,
            rgba(167, 139, 250, 0.10) 0%,
            rgba(167, 139, 250, 0.04) 40%,
            transparent 72%
        );

    filter: blur(85px);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .blob-1 {
        width: 460px;
        height: 460px;
        top: -230px;
        right: -190px;
    }

    .blob-2 {
        width: 440px;
        height: 440px;
        bottom: -230px;
        left: -190px;
    }

    .blob-3 {
        width: 320px;
        height: 320px;
        top: 40%;
        left: 35%;
    }

    .animated-bg::after {
        background-size: 45px 45px;
    }
}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .animated-bg::before,
    .bg-blob {
        animation: none !important;
    }
}


/* ========== LOGIN CONTAINER ========== */

.login-container {
    display: flex;
    max-width: 950px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    animation: containerIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
}

@keyframes containerIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ========== LOGIN GRAPHIC (چپ) ========== */

.login-graphic {
    flex: 1.1;
    background: var(--primary-gradient);
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float 8s infinite ease-in-out;
}

.bubble-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 50px;
    height: 50px;
    top: 60%;
    left: 15%;
    animation-delay: 2s;
}

.bubble-3 {
    width: 100px;
    height: 100px;
    bottom: 15%;
    right: 25%;
    animation-delay: 4s;
}

.bubble-4 {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 30%;
    animation-delay: 6s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

.graphic-content {
    position: relative;
    z-index: 2;
}

.graphic-icon {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.graphic-icon i {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    animation: floatIcon 4s infinite ease-in-out;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.graphic-icon i:nth-child(1) {
    animation-delay: 0s;
}

.graphic-icon i:nth-child(2) {
    animation-delay: 0.4s;
}

.graphic-icon i:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes floatIcon {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.graphic-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1.6;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.graphic-desc {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.desc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    font-size: 10px;
    color: #a5f3c3;
    flex-shrink: 0;
}

.graphic-footer {
    margin-top: 40px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}


/* ========== LOGIN FORM (راست) ========== */

.login-form-side {
    flex: 0.9;
    padding: 40px 36px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-form-side > * {
    animation: fadeSlideUp 0.6s ease forwards;
}

/* ========== SIGNUP LINK ========== */
.signup-link {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.signup-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
    transition: all 0.25s ease;
}

.signup-link a i {
    font-size: 11px;
}

.signup-link a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

body.dark .signup-link {
    color: #94a3b8;
}

body.dark .signup-link a {
    color: #a78bfa;
    background: rgba(129, 140, 248, 0.12);
}

body.dark .signup-link a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

@keyframes fadeSlideUp {
    from {
        transform: translateY(20px);
    }

    to {
        transform: translateY(0);
    }
}


/* لوگو */

.form-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: #fff;
    padding: 0;
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.35);
    margin-bottom: 14px;
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
}

.logo-circle::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes logoPulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.form-logo p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}


/* خطا */

.error-message {
    background: #ef4444;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
    animation: shakeError 0.4s ease;
}

body.dark .error-message {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

@keyframes shakeError {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}


/* input */

.input-wrapper input,
body.dark .input-wrapper input,
body.dark input#username,
body.dark input#password {
    flex: 1;
    width: 100% !important;
    padding: 15px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    text-align: right !important;
    direction: rtl !important;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}


/* آیکون */

.input-icon {
    color: var(--text-secondary);
    font-size: 15px;
    flex-shrink: 0;
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #667eea;
}

body.dark .input-wrapper:focus-within .input-icon {
    color: #a78bfa;
}


/* ========== دکمه ورود ========== */

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    font-family: inherit;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.45);
}

.login-btn .btn-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.login-btn .btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    display: inline-block;
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* فوتر */

.form-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-footer .copyright {
    font-size: 11px;
    color: var(--text-secondary);
}

.form-footer .copyright a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}


/* دارک مود دکمه */

body.dark .logo-circle {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

body.dark .logo-circle::after {
    border-color: rgba(139, 92, 246, 0.2);
}

body.dark .login-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

body.dark .login-btn:hover {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.55);
}


/* ========== RESPONSIVE ========== */

@media (max-width: 750px) {

    .login-graphic {
        display: none;
    }

    .login-form-side {
        flex: none;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        padding: 32px 24px;
    }

    .login-container {
        max-width: 420px;
        border-radius: 24px;
    }

    .logo-circle {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }

    .logo-circle img {
        border-radius: 18px;
    }

    .logo-circle::after {
        inset: -5px;
        border-radius: 23px;
    }

    .logo-text {
        font-size: 22px;
    }
}

@media (max-width: 400px) {

    .login-container {
        border-radius: 20px;
    }

    .login-form-side {
        padding: 28px 20px;
    }

    .logo-text {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   autofill
   ========================================================= */

.input-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    z-index: 1;
}

/* لایه پس‌زمینه پشت input */
.input-bg {
    position: absolute;
    inset: 0;
    background: rgba(102, 126, 234, 0.04);
    border-radius: 14px;
    z-index: -1;
    transition: background 0.25s ease;
    pointer-events: none;
}

.input-wrapper:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.input-wrapper:hover .input-bg {
    background: rgba(102, 126, 234, 0.06);
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper:focus-within .input-bg {
    background: rgba(102, 126, 234, 0.06);
}

/* input کاملاً شفاف */
.input-wrapper input {
    flex: 1;
    width: 100% !important;
    padding: 15px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    font-size: 13px !important;
    font-family: inherit !important;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary) !important;
    text-align: right !important;
    direction: rtl !important;
    position: relative;
    z-index: 2;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    -webkit-text-fill-color: var(--text-secondary);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.input-icon {
    color: var(--text-secondary);
    font-size: 15px;
    flex-shrink: 0;
    pointer-events: none;
    transition: color 0.25s ease;
    position: relative;
    z-index: 2;
}

.input-wrapper:focus-within .input-icon {
    color: #667eea;
}

/* ========== دارک مود ========== */
body.dark .input-wrapper {
    border-color: #334155;
}

body.dark .input-bg {
    background: rgba(148, 163, 184, 0.06);
}

body.dark .input-wrapper:hover {
    border-color: rgba(167, 139, 250, 0.3);
}

body.dark .input-wrapper:hover .input-bg {
    background: rgba(148, 163, 184, 0.09);
}

body.dark .input-wrapper:focus-within {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

body.dark .input-wrapper:focus-within .input-bg {
    background: rgba(148, 163, 184, 0.1);
}

body.dark .input-wrapper input {
    -webkit-text-fill-color: #cbd5e1 !important;
    color: #cbd5e1 !important;
    caret-color: #cbd5e1 !important;
}

body.dark input:-webkit-autofill,
body.dark input:-webkit-autofill:hover,
body.dark input:-webkit-autofill:focus,
body.dark input:-webkit-autofill:active {
    -webkit-text-fill-color: #cbd5e1 !important;
    caret-color: #cbd5e1 !important;
}

body.dark .input-wrapper:focus-within .input-icon {
    color: #a78bfa;
}

/* =========================================================
   HELP MODAL (دریافت نام کاربری و رمز عبور)
   ========================================================= */

.help-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.help-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.help-modal-content {
    background: var(--card-bg);
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid var(--border);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}

.help-modal-overlay.show .help-modal-content {
    transform: translateY(0) scale(1);
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%);
}

body.dark .help-modal-header {
    background: linear-gradient(180deg, rgba(30,41,59,0.6) 0%, rgba(30,41,59,0) 100%);
}

.help-modal-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.help-modal-header h3 i {
    color: var(--primary);
    font-size: 14px;
    background: rgba(102, 126, 234, 0.1);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.help-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: 0.2s;
    opacity: 0.6;
}

.help-modal-close:hover {
    color: #ef4444;
    opacity: 1;
    transform: rotate(90deg);
}

.help-modal-body {
    padding: 24px;
}

.help-modal-body > p {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
}

.help-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.help-step .step-num {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.help-step p {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
}

.help-step strong {
    color: var(--primary);
    font-weight: 800;
}

.help-modal-actions {
    margin-top: 28px;
    text-align: center;
}

.btn-go-bot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    width: 100%;
}

.btn-go-bot:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
    color: white;
}

body.dark .help-modal-content {
    background: #1e293b;
}

body.dark .help-step .step-num {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

body.dark .help-modal-header h3 i {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

/* =========================================================
   بهینه‌سازی مودال برای موبایل (جلوگیری از بزرگ شدن بیش از حد)
   ========================================================= */
@media (max-width: 768px) {
    .help-modal-overlay {
        padding: 12px;
    }
    
    .help-modal-content {
        max-width: 100%;
        border-radius: 20px;
    }

    .help-modal-header {
        padding: 12px 16px;
    }

    .help-modal-header h3 {
        font-size: 13px; /* کوچیک‌تر شدن متن هدر */
    }

    .help-modal-header h3 i {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 8px;
    }

    .help-modal-body {
        padding: 16px; /* کاهش پدینگ بدنه */
    }

    .help-modal-body > p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .help-step {
        gap: 10px;
        margin-bottom: 14px;
    }

    .help-step .step-num {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .help-step p {
        font-size: 12px; /* کوچیک‌تر شدن متن مراحل */
        line-height: 1.6;
    }

    .help-modal-actions {
        margin-top: 20px;
    }

    .btn-go-bot {
        padding: 12px 16px;
        font-size: 12px;
        border-radius: 10px;
    }
}

/* =========================================================
   HELP MODAL - ALERT BOX (باکس هشدار ادمین‌ها)
   ========================================================= */

.help-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(245, 158, 11, 0.08); /* پس‌زمینه زرد ملایم */
    border: 1px solid rgba(245, 158, 11, 0.2); /* حاشیه زرد */
    padding: 14px 16px;
    border-radius: 12px;
    margin-top: 24px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
}

.help-alert i {
    color: #d97706; /* رنگ نارنجی/زرد برای آیکون */
    font-size: 14px;
    margin-top: 3px;
    flex-shrink: 0;
}

.help-alert span {
    flex: 1;
}

.help-alert strong {
    font-weight: 800;
    color: #d97706;
}

/* استایل هشدار در حالت تاریک */
body.dark .help-alert {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark .help-alert i,
body.dark .help-alert strong {
    color: #fbbf24; /* رنگ زرد روشن‌تر برای دارک مود */
}