/* =====================================================
   login.css — استایل اختصاصی پنل تاپ ۱۱۸
   ===================================================== */

:root {
        --primary: #0d9488;
        --primary-dark: #0f766e;
    }

    * {
        box-sizing: border-box;
    }

    body {
        font-family: 'Vazir', sans-serif;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: #f0fdfa;
        overflow: hidden;
        position: relative;
    }

    #bg-canvas {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 0;
    }

    @keyframes float1 {

        0%,
        100% {
            transform: translate(0, 0) rotate(0deg);
        }

        33% {
            transform: translate(18px, -24px) rotate(8deg);
        }

        66% {
            transform: translate(-12px, 14px) rotate(-5deg);
        }
    }

    @keyframes float2 {

        0%,
        100% {
            transform: translate(0, 0) rotate(0deg);
        }

        40% {
            transform: translate(-20px, 16px) rotate(-10deg);
        }

        70% {
            transform: translate(14px, -10px) rotate(6deg);
        }
    }

    @keyframes float3 {

        0%,
        100% {
            transform: translate(0, 0) scale(1);
        }

        50% {
            transform: translate(10px, 20px) scale(1.08);
        }
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: .09;
        }

        50% {
            opacity: .2;
        }
    }

    @keyframes spin-s {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    .f1 {
        animation: float1 9s ease-in-out infinite;
    }

    .f2 {
        animation: float2 11s ease-in-out infinite;
    }

    .f3 {
        animation: float3 7s ease-in-out infinite;
    }

    .f4 {
        animation: float1 13s ease-in-out infinite reverse;
    }

    .f5 {
        animation: float2 8s ease-in-out infinite 2s;
    }

    .f6 {
        animation: pulse 5s ease-in-out infinite;
    }

    .f7 {
        animation: spin-s 22s linear infinite;
    }

    .f8 {
        animation: float3 14s ease-in-out infinite 1s;
    }

    .f9 {
        animation: spin-s 30s linear infinite reverse;
    }

    .login-wrap {
        position: relative;
        z-index: 10;
        width: 100%;
        max-width: 420px;
    }

    .login-card {
        background: #fff;
        border-radius: 24px;
        padding: 40px 36px 32px;
        box-shadow:
            0 0 0 1px rgba(13, 148, 136, 0.08),
            0 8px 16px rgba(0, 0, 0, 0.05),
            0 24px 48px rgba(13, 148, 136, 0.09);
    }

    @media(max-width:480px) {
        .login-card {
            padding: 28px 20px 24px;
            border-radius: 20px;
        }
    }

    .login-logo {
        text-align: center;
        margin-bottom: 28px;
    }

    .logo-icon {
        width: 68px;
        height: 68px;
        background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
        border-radius: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.55rem;
        font-weight: 900;
        margin-bottom: 14px;
        box-shadow: 0 8px 28px rgba(13, 148, 136, 0.32);
    }

    .login-logo h1 {
        font-size: 1.3rem;
        font-weight: 800;
        color: #134e4a;
        margin: 0 0 4px;
    }

    .login-logo p {
        font-size: 0.78rem;
        color: #94a3b8;
        margin: 0;
    }

    .divider {
        height: 1px;
        background: #f1f5f9;
        margin: 0 0 24px;
    }

    .form-label {
        font-size: .8rem;
        font-weight: 700;
        color: #374151;
        margin-bottom: 6px;
    }

    .form-control {
        font-family: 'Vazir', sans-serif;
        font-size: .9rem;
        border: 1.5px solid #e5e7eb;
        border-radius: 12px;
        padding: 11px 14px;
        transition: border-color .2s, box-shadow .2s;
        color: #1f2937;
        background: #fafafa;
    }

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
        outline: none;
        background: #fff;
    }

    .form-control.is-invalid {
        border-color: #ef4444;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
    }

    /* RTL: چشم سمت چپ، input سمت راست */
    .input-group .form-control {
        border-radius: 0 12px 12px 0;
        border-left: none;
    }

    .btn-eye {
        background: #fafafa;
        border: 1.5px solid #e5e7eb;
        border-right: none;
        border-radius: 12px 0 0 12px;
        color: #9ca3af;
        padding: 0 14px;
        cursor: pointer;
        transition: color .15s;
    }

    .btn-eye:hover {
        color: var(--primary);
    }

    .input-group:focus-within .form-control,
    .input-group:focus-within .btn-eye {
        border-color: var(--primary);
    }

    .captcha-box {
        background: #f0fdfa;
        border: 1.5px dashed #5eead4;
        border-radius: 12px;
        padding: 10px 16px;
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary-dark);
        text-align: center;
        letter-spacing: 2px;
        user-select: none;
        margin-bottom: 8px;
    }

    .btn-login {
        width: 100%;
        background: linear-gradient(120deg, var(--primary) 0%, #0891b2 100%);
        color: white;
        border: none;
        border-radius: 12px;
        padding: 13px;
        font-family: 'Vazir', sans-serif;
        font-size: .98rem;
        font-weight: 700;
        cursor: pointer;
        transition: opacity .2s, transform .15s, box-shadow .2s;
        margin-top: 4px;
        box-shadow: 0 4px 16px rgba(13, 148, 136, 0.25);
    }

    .btn-login:hover {
        opacity: .92;
        transform: translateY(-1px);
        box-shadow: 0 8px 24px rgba(13, 148, 136, .35);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
    }

    .alert-error {
        background: #fef2f2;
        border: 1.5px solid #fecaca;
        border-radius: 12px;
        padding: 10px 14px;
        font-size: .82rem;
        color: #dc2626;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 18px;
    }

    .login-footer {
        text-align: center;
        margin-top: 20px;
        font-size: .74rem;
        color: #94a3b8;
    }

    .login-footer a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
    }

    .login-footer a:hover {
        text-decoration: underline;
    }

    .spinner {
        display: none;
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, .4);
        border-top-color: white;
        border-radius: 50%;
        animation: spin .7s linear infinite;
        margin: 0 auto;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .trust-row {
        display: flex;
        justify-content: center;
        gap: 18px;
        margin-top: 16px;
    }

    .trust-item {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: .7rem;
        color: #94a3b8;
    }

    .trust-item i {
        color: var(--primary);
        font-size: .85rem;
    }