@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: #062817;
    color: #1e293b;
    overflow-x: hidden;
}

/* Background & Outer Layout */
.infinity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 30px 16px;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(0, 159, 227, 0.25) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(24, 143, 40, 0.35) 0%, transparent 45%),
                radial-gradient(circle at 50% 50%, rgba(10, 102, 57, 0.2) 0%, transparent 60%),
                linear-gradient(145deg, #021e10 0%, #06391d 40%, #0a4f29 70%, #024b72 100%);
    overflow: hidden;
}

/* Subtle Geometric Star/Islamic Motif Overlay via CSS */
.infinity-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.2px),
        radial-gradient(rgba(0, 159, 227, 0.15) 1.2px, transparent 1.2px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
    pointer-events: none;
    opacity: 0.8;
}

/* Top Glow Line */
.infinity-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #009fe3, rgb(24, 143, 40), #ffc107, rgb(24, 143, 40), #009fe3);
}

/* Brand Header Area */
.login-brand-header {
    text-align: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
    animation: fadeInDown 0.6s ease-out;
}

.login-brand-logo-wrap {
    display: inline-block;
    position: relative;
    margin-bottom: 12px;
}

.login-brand-logo {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: contain;
    background: #ffffff;
    padding: 5px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
                0 0 0 5px rgba(24, 143, 40, 0.35);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-brand-logo:hover {
    transform: scale(1.08) rotate(3deg);
}

.login-brand-urdu {
    font-family: 'Amiri', serif;
    color: #e2fbe8;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.login-brand-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.login-brand-subtitle {
    color: #a7f3d0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.6px;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Form Card Container */
.infinity-form-block {
    width: 440px;
    max-width: 100%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infinity-form-block:hover {
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.65);
}

/* Card Header Banner */
.infinity-click-box {
    padding: 18px 24px;
    background: linear-gradient(135deg, rgb(24, 143, 40) 0%, #009fe3 100%);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.infinity-click-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 4s infinite;
}

.infinity-click-box h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.infinity-click-box p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #e0f2fe;
    font-weight: 400;
}

/* Form Body */
.infinity-fold {
    padding: 30px 32px 24px 32px;
    background: #ffffff;
}

.form-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.infinity-form .form-input {
    position: relative;
    margin-bottom: 20px;
}

.infinity-form .form-input input {
    width: 100%;
    height: 48px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0 45px 0 44px;
    font-size: 14.5px;
    font-family: 'Poppins', sans-serif;
    color: #0f172a;
    outline: none;
    transition: all 0.25s ease;
}

.infinity-form .form-input input::placeholder {
    color: #94a3b8;
    font-size: 13.5px;
}

.infinity-form .form-input .input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: rgb(24, 143, 40);
    font-size: 16px;
    transition: color 0.25s ease;
    pointer-events: none;
}

.infinity-form .form-input .toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.25s ease;
    padding: 6px;
}

.infinity-form .form-input .toggle-password:hover {
    color: #009fe3;
}

.infinity-form .form-input input:focus {
    border-color: rgb(24, 143, 40);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(24, 143, 40, 0.15);
}

.infinity-form .form-input input:focus ~ .input-icon {
    color: #009fe3;
}

/* Remember me & Helper row */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.custom-control-label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: rgb(24, 143, 40) !important;
    border-color: rgb(24, 143, 40) !important;
    box-shadow: none !important;
}

.portal-switch-link {
    font-size: 12.5px;
    color: #009fe3;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.portal-switch-link:hover {
    color: rgb(24, 143, 40);
    text-decoration: underline;
}

/* Submit Button */
.btn-login-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(24, 143, 40) 0%, #009fe3 100%);
    color: #ffffff;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(24, 143, 40, 0.35);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #127320 0%, #0088c4 100%);
    box-shadow: 0 12px 28px rgba(24, 143, 40, 0.48);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-login-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(24, 143, 40, 0.3);
}

/* Security Badge & Back Link */
.login-footer-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.back-website-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.back-website-link:hover {
    color: #ffffff;
    background: rgb(24, 143, 40);
    text-decoration: none;
    transform: translateY(-1px);
}

.login-security-notice {
    margin-top: 14px;
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-security-notice i {
    color: rgb(24, 143, 40);
}

/* Outer Bottom Copyright */
.login-outer-footer {
    margin-top: 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    position: relative;
    z-index: 2;
}

.login-outer-footer a {
    color: #a7f3d0;
    text-decoration: none;
    font-weight: 600;
}

.login-outer-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 150%; }
}

/* Error text styling */
.text-danger {
    color: #dc2626 !important;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .infinity-container {
        padding: 20px 12px;
    }
    .infinity-form-block {
        border-radius: 16px;
    }
    .infinity-fold {
        padding: 22px 20px 18px 20px;
    }
    .login-brand-logo {
        width: 70px;
        height: 70px;
    }
    .login-brand-urdu {
        font-size: 19px;
    }
    .login-brand-title {
        font-size: 14px;
    }
}
