/* ─── App Tenant Login Page (matches SA Login Design) ─── */

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

body {
    font-family: 'Cairo', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .75rem;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

/* ─── Background Blobs ─── */
.app-login-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: blobFloat 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(16, 185, 129, .15);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(20, 184, 166, .12);
    bottom: -10%;
    right: -10%;
    animation-delay: -2s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, .1);
    top: 40%;
    left: 60%;
    animation-delay: -4s;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ─── Main Card ─── */
.app-login-card {
    position: relative;
    z-index: 10;
    background: #fff;
    width: 100%;
    max-width: 900px;
    min-height: auto;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: cardEntry 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Left Side: Form ─── */
.app-login-form-side {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-login-form-inner {
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.app-login-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.app-login-logo .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 6px 16px rgba(16, 185, 129, .3);
}

.app-login-logo .logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -.02em;
}

/* Heading */
.app-login-heading {
    margin-bottom: 1.25rem;
}

.app-login-heading h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: .25rem;
    line-height: 1.3;
}

.app-login-heading p {
    color: #64748b;
    font-size: .78rem;
}

/* Errors */
.app-login-errors {
    background: rgba(239, 68, 68, .06);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: .75rem;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.app-login-errors p {
    color: #dc2626;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* Form Groups */
.app-form-group {
    margin-bottom: .85rem;
}

.app-form-label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.app-input-wrap {
    position: relative;
}

.app-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: .85rem;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .75rem;
    pointer-events: none;
    transition: color .3s;
}

.app-form-input {
    width: 100%;
    padding: .65rem .85rem;
    padding-inline-start: 2.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .6rem;
    color: #1e293b;
    font-size: .8rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: all .3s;
}

.app-form-input:focus {
    background: #fff;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.app-form-group:focus-within .app-input-icon {
    color: #10b981;
}

.app-form-group:focus-within .app-form-label {
    color: #10b981;
}

.app-toggle-pass {
    position: absolute;
    top: 50%;
    inset-inline-end: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: .9rem;
    transition: color .2s;
}

.app-toggle-pass:hover {
    color: #475569;
}

/* Options Row */
.app-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    margin-top: .15rem;
}

.app-checkbox-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    font-size: .75rem;
    color: #64748b;
    transition: color .2s;
}

.app-checkbox-label:hover {
    color: #475569;
}

.app-checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: #10b981;
    cursor: pointer;
    border-radius: 4px;
}

.app-lang-switch {
    font-size: .85rem;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
    transition: color .2s;
}

.app-lang-switch:hover {
    color: #059669;
}

/* Submit */
.app-login-submit {
    width: 100%;
    padding: .7rem;
    background: #059669;
    color: white;
    font-size: .85rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    border: none;
    border-radius: .6rem;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 6px 18px rgba(5, 150, 105, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.app-login-submit:hover {
    background: #047857;
    box-shadow: 0 12px 32px rgba(5, 150, 105, .35);
    transform: translateY(-2px);
}

.app-login-submit:active {
    transform: translateY(0);
}

.app-login-submit i {
    font-size: .85rem;
    opacity: .8;
    transition: transform .3s;
}

.app-login-submit:hover i {
    transform: translateX(-3px);
}

html[dir="ltr"] .app-login-submit:hover i {
    transform: translateX(3px);
}

/* Forgot Password */
.app-login-forgot {
    text-align: center;
    margin-top: .85rem;
}

.app-login-forgot a {
    color: #64748b;
    font-size: .75rem;
    text-decoration: none;
    transition: color .2s;
}

.app-login-forgot a:hover {
    color: #10b981;
}

/* ─── Right Side: Promo ─── */
.app-login-promo-side {
    width: 50%;
    background: #111827;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

.promo-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #059669, #115e59);
    opacity: .92;
}

.promo-circle {
    position: absolute;
    border-radius: 50%;
    animation: blobFloat 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-circle-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, .08);
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    filter: blur(30px);
}

.promo-circle-2 {
    width: 320px;
    height: 320px;
    background: rgba(52, 211, 153, .15);
    bottom: 0;
    left: 0;
    transform: translate(-50%, 50%);
    filter: blur(30px);
    animation-delay: -5s;
}

.promo-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 300px;
}

/* Dashboard Mockup */
.promo-mockup {
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .85rem;
    padding: 1rem;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .2);
    transform: rotate(3deg);
    transition: all .7s ease;
    cursor: default;
}

.promo-mockup:hover {
    transform: rotate(0deg) scale(1.02);
}

.mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mockup-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.mockup-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6ee7b7;
    font-size: .75rem;
    border: 1px solid rgba(110, 231, 183, .3);
}

.mockup-lines .line {
    border-radius: 999px;
    background: rgba(255, 255, 255, .3);
}

.line-lg {
    width: 100px;
    height: 10px;
    margin-bottom: 6px;
}

.line-sm {
    width: 64px;
    height: 8px;
    background: rgba(255, 255, 255, .15) !important;
}

.mockup-badge {
    padding: .25rem .75rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, .15);
    border: 1px solid rgba(34, 197, 94, .3);
    color: #86efac;
    font-size: .75rem;
    font-weight: 600;
}

/* Bars */
.mockup-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 80px;
    gap: .5rem;
    padding: 0 .25rem;
}

.bar {
    flex: 1;
    border-radius: .5rem .5rem 0 0;
    background: rgba(255, 255, 255, .08);
    transition: height .5s ease;
}

.bar-1 {
    height: 40%;
}

.bar-2 {
    height: 70%;
    background: rgba(255, 255, 255, .15);
}

.bar-3 {
    height: 50%;
}

.bar-4 {
    height: 80%;
    background: rgba(255, 255, 255, .15);
}

.bar-5 {
    height: 60%;
    background: rgba(255, 255, 255, .08);
}

.bar-accent {
    background: #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, .5);
}

.promo-mockup:hover .bar-1 {
    height: 50%;
}

.promo-mockup:hover .bar-2 {
    height: 60%;
}

.promo-mockup:hover .bar-3 {
    height: 85%;
}

.promo-mockup:hover .bar-4 {
    height: 65%;
}

.promo-mockup:hover .bar-5 {
    height: 75%;
}

/* Promo Text */
.promo-text {
    text-align: center;
    margin-top: 1.5rem;
}

.promo-text h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .25rem;
}

.promo-text p {
    color: rgba(167, 243, 208, .7);
    font-size: .7rem;
    line-height: 1.6;
}

/* Features Row */
.promo-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.promo-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
}

.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6ee7b7;
    font-size: .7rem;
}

.promo-feature span {
    font-size: .7rem;
    color: rgba(255, 255, 255, .6);
    font-weight: 500;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .app-login-card {
        flex-direction: column;
        max-width: 440px;
        min-height: auto;
        border-radius: 1.5rem;
    }

    .app-login-form-side {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .app-login-promo-side {
        display: none;
    }

    .app-login-heading h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-login-page {
        padding: .5rem;
    }

    .app-login-card {
        border-radius: 1rem;
    }

    .app-login-form-side {
        padding: 1.5rem 1.25rem;
    }
}