﻿/* =========================================================
   Login.css — Premium Login UI
   ========================================================= */

:root {
    --login-primary: #083b6b;
    --login-blue: #2b74b8;
    --login-green: #0f7a4f;
    --login-green-2: #19b36b;
    --login-bg: #f3f7fb;
    --login-text: #18324a;
    --login-muted: #728397;
    --login-border: rgba(8,59,107,.13);
    --login-shadow: 0 28px 70px rgba(8,59,107,.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    font-family: 'Cairo','Segoe UI',Tahoma,Arial,sans-serif;
    background: radial-gradient(circle at 80% 15%, rgba(43,116,184,.22), transparent 30%), radial-gradient(circle at 15% 85%, rgba(25,179,107,.16), transparent 30%), linear-gradient(135deg, #f3f7fb, #eaf2f9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: linear-gradient(45deg, rgba(8,59,107,.045) 25%, transparent 25%), linear-gradient(-45deg, rgba(8,59,107,.045) 25%, transparent 25%);
        background-size: 42px 42px;
        opacity: .55;
        pointer-events: none;
    }

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 34px 32px 26px;
    border-radius: 32px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp .8s ease forwards;
    overflow: hidden;
}

    .login-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 9px;
        background: linear-gradient(90deg, var(--login-green-2), var(--login-blue), var(--login-primary));
    }

    .login-card::after {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(43,116,184,.08);
        left: -80px;
        top: -80px;
        pointer-events: none;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 18px;
}

    .logo-container img {
        width: 178px;
        max-width: 78%;
        animation: popIn .9s ease;
    }

@keyframes popIn {
    0% {
        transform: scale(.86);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.card-title {
    text-align: center;
}

.main-title {
    margin: 0 0 6px;
    color: var(--login-primary);
    font-size: 27px;
    font-weight: 900;
}

.sub-title {
    margin: 0 0 24px;
    color: var(--login-muted);
    font-size: 15px;
    font-weight: 800;
}

.text-danger {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
}

.mb-3 {
    margin-bottom: 16px !important;
}

.form-label {
    margin-bottom: 8px;
    color: var(--login-text);
    font-size: 13px;
    font-weight: 900;
}

.form-control {
    height: 48px;
    border-radius: 16px;
    border: 1px solid var(--login-border);
    background: #fff;
    color: var(--login-text);
    font-size: 14px;
    font-weight: 800;
    padding: 10px 14px;
    box-shadow: 0 9px 18px rgba(8,59,107,.045);
    transition: .18s ease;
}

    .form-control:focus {
        border-color: rgba(43,116,184,.60);
        box-shadow: 0 0 0 4px rgba(43,116,184,.13);
    }

    .form-control.is-invalid,
    .was-validated .form-control:invalid {
        border-color: #dc3545;
        animation: shake .28s ease;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.input-group {
    direction: ltr;
    border-radius: 16px;
    box-shadow: 0 9px 18px rgba(8,59,107,.045);
}

    .input-group .form-control {
        box-shadow: none;
        border-radius: 16px 0 0 16px !important;
    }

#togglePassword {
    width: 50px;
    border: 1px solid var(--login-border);
    border-left: 0;
    border-radius: 0 16px 16px 0 !important;
    background: #eef6ff;
    color: var(--login-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .18s ease;
}

    #togglePassword:hover {
        background: #e4f1ff;
        color: var(--login-blue);
    }

    #togglePassword:focus {
        box-shadow: none !important;
    }

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 25px;
}

.form-check-input {
    float: none;
    margin: 0;
    width: 18px;
    height: 18px;
    border-color: rgba(8,59,107,.28);
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: var(--login-green);
        border-color: var(--login-green);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 4px rgba(15,122,79,.13);
    }

.form-check-label {
    color: var(--login-muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    height: 49px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--login-primary), var(--login-blue));
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 16px 30px rgba(8,59,107,.18);
    transition: .2s ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        background: linear-gradient(135deg, var(--login-primary), var(--login-green));
        box-shadow: 0 22px 42px rgba(8,59,107,.23);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.alert-danger {
    border: 1px solid rgba(190,18,60,.14);
    border-radius: 16px;
    background: #fff1f2;
    color: #be123c;
    font-size: 13px;
    font-weight: 900;
}

.footer-text {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(8,59,107,.09);
    text-align: center;
    color: var(--login-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
}

    .footer-text a {
        display: inline-flex;
        margin-bottom: 8px;
        color: var(--login-primary);
        text-decoration: none;
        font-size: 13px;
        font-weight: 900;
    }

        .footer-text a:hover {
            color: var(--login-green);
            text-decoration: underline;
        }

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

@media (max-width: 576px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 30px 22px 22px;
        border-radius: 26px;
    }

    .main-title {
        font-size: 24px;
    }

    .sub-title {
        font-size: 14px;
    }

    .logo-container img {
        width: 155px;
    }
}
/* =========================================================
   Set Password Page
   ========================================================= */

.set-password-card {
    animation: setPasswordEnter .8s ease forwards;
}

@keyframes setPasswordEnter {

    0% {
        opacity: 0;
        transform: translateY(22px) scale(.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.password-group {
    direction: ltr;
    border-radius: 16px;
    overflow: hidden;
}

    .password-group .form-control {
        border-radius: 16px 0 0 16px !important;
    }

.password-meter {
    margin-top: 14px;
}

.meter-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
}

.meter-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient( 90deg, #ef4444, #f59e0b, #22c55e );
    transition: .25s ease;
}

.meter-labels {
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--login-muted);
    font-size: 12px;
    font-weight: 900;
}

.rules-box {
    display: none;
    margin-top: 14px;
    animation: fadeRules .18s ease;
}

@keyframes fadeRules {

    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-rules {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .password-rules .rule {
        min-height: 42px;
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 14px;
        background: #f5f8fc;
        border: 1px solid rgba(8,59,107,.07);
        color: var(--login-muted);
        font-size: 12px;
        font-weight: 900;
        display: flex;
        align-items: center;
        gap: 9px;
        transition: .18s ease;
    }

        .password-rules .rule.ok {
            background: #e7f8ee;
            color: #166534;
            border-color: rgba(22,101,52,.14);
        }

    .password-rules .icon {
        width: 18px;
        text-align: center;
    }

.set-password-card .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}