/* EmaanMall Admin / Seller login — vertical centered layout */
.em-login {
    --em-primary: var(--theme-deafult, #E35336);
    --em-primary-end: #EB7A63;
    --em-secondary: var(--theme-secondary, #B23A22);
    --em-accent: var(--score-accent, #E35336);
    --em-accent-soft: var(--score-accent-soft, #FCE9E4);
    --em-ink: #242934;
    --em-muted: #59667a;
    --em-border: #efefef;
    --em-surface: #fdfeff;
    --em-danger: #B23A22;
    --em-success: #455a64;
    --em-font: "Rubik", system-ui, sans-serif;
    --em-display: "Syne", "Rubik", system-ui, sans-serif;

    margin: 0;
    min-height: 100vh;
    font-family: var(--em-font);
    color: #fff;
    background:
        radial-gradient(ellipse 800px 500px at 15% 0%, rgba(227, 83, 54, 0.5), transparent 60%),
        radial-gradient(ellipse 700px 500px at 95% 100%, rgba(235, 122, 99, 0.28), transparent 60%),
        #0f1115;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

.em-login::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.em-login::after {
    content: "";
    position: absolute;
    width: 42rem;
    height: 42rem;
    border-radius: 50%;
    left: 50%;
    top: -18%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(227, 83, 54, 0.32) 0%, transparent 68%);
    animation: em-login-orb 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.em-login *,
.em-login *::before,
.em-login *::after {
    box-sizing: border-box;
}

.em-login a {
    color: var(--em-primary);
    text-decoration: none;
}

.em-login a:hover {
    text-decoration: underline;
}

/* Vertical stack */
.em-login-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    min-height: 100vh;
    padding: 2.5rem 1.25rem 2rem;
    text-align: center;
    animation: em-login-fade-in 0.7s ease both;
}

.em-login-hd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    max-width: 42rem;
}

.em-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: em-login-rise 0.55s ease both;
}

.em-login-logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.em-login-hd h1 {
    margin: 0;
    font-family: var(--em-display);
    font-size: clamp(1.65rem, 4.2vw, 2.65rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff;
    max-width: 40rem;
    animation: em-login-rise 0.6s ease 0.06s both;
}

/* Form card */
.em-login-panel {
    width: 100%;
    max-width: 440px;
    animation: em-login-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.em-login-card {
    width: 100%;
    padding: 2.15rem 2rem;
    border-radius: 22px;
    background: #fff;
    color: var(--em-ink);
    text-align: left;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
}

.em-login-card-head {
    margin-bottom: 1.65rem;
}

.em-login-card-head h2 {
    margin: 0 0 0.4rem;
    font-family: var(--em-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--em-ink);
}

.em-login-card-head p {
    margin: 0;
    color: var(--em-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.em-login-alert {
    display: none;
    margin-bottom: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(178, 58, 34, 0.35);
    background: rgba(178, 58, 34, 0.08);
    color: var(--em-danger);
    font-size: 0.875rem;
    line-height: 1.45;
}

.em-login-alert.validation-summary-errors {
    display: block;
}

.em-login-alert.validation-summary-valid {
    display: none;
}

.em-login-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.em-login-alert li {
    margin: 0.15rem 0;
}

.em-login-field {
    margin-bottom: 1.15rem;
}

.em-login-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #455a64;
}

.em-login-input-wrap {
    position: relative;
}

.em-login-field input[type="email"],
.em-login-field input[type="text"],
.em-login-field input[type="password"] {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--em-border);
    border-radius: 10px;
    background: #fafafa;
    color: var(--em-ink);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.em-login-field input.em-has-toggle {
    padding-right: 3rem;
}

.em-login-field input:hover {
    border-color: #cccccc;
}

.em-login-field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--em-primary);
    box-shadow: 0 0 0 3px rgba(227, 83, 54, 0.18);
}

.em-login-field input.input-validation-error {
    border-color: var(--em-danger);
    background: rgba(178, 58, 34, 0.04);
}

.em-login-field input.input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(178, 58, 34, 0.15);
}

.em-login-field .field-validation-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--em-danger);
}

.em-login-field .field-validation-valid {
    display: none;
}

.em-login-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--em-muted);
    cursor: pointer;
}

.em-login-toggle:hover,
.em-login-toggle:focus-visible {
    color: var(--em-primary);
    background: rgba(227, 83, 54, 0.08);
    outline: none;
}

.em-login-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    flex-shrink: 0;
}

.em-login-toggle svg.is-hidden,
.em-login-toggle .em-eye-icon.is-hidden {
    display: none !important;
}

.em-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.25rem 0 1.35rem;
    flex-wrap: wrap;
}

.em-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--em-muted);
    cursor: pointer;
    user-select: none;
}

.em-login-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--em-primary);
    cursor: pointer;
}

.em-login-forgot {
    font-size: 0.875rem;
    font-weight: 500;
}

.em-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.05rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(26deg, var(--em-primary) 0%, var(--em-primary-end) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.975rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(227, 83, 54, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.em-login-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 12px 28px rgba(227, 83, 54, 0.34);
}

.em-login-submit:active {
    transform: translateY(1px);
}

.em-login-submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.em-login-submit.is-loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    margin-left: 0.65rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: em-login-spin 0.7s linear infinite;
}

.em-login-meta {
    margin-top: 1.35rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #898989;
    line-height: 1.5;
}

/* Footer: lead + chips */
.em-login-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 38rem;
    animation: em-login-rise 0.65s ease 0.2s both;
}

.em-login-lead {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #c7cad1;
    max-width: 36rem;
}

.em-login-audience {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.em-login-audience li {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    animation: em-login-rise 0.55s ease both;
}

.em-login-audience li:nth-child(2) { animation-delay: 0.06s; }
.em-login-audience li:nth-child(3) { animation-delay: 0.12s; }
.em-login-audience li:nth-child(4) { animation-delay: 0.18s; }
.em-login-audience li:nth-child(5) { animation-delay: 0.24s; }
.em-login-audience li:nth-child(6) { animation-delay: 0.3s; }

@keyframes em-login-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes em-login-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes em-login-orb {
    from { transform: translateX(-50%) translate(0, 0) scale(1); }
    to { transform: translateX(-50%) translate(-4%, 10%) scale(1.1); }
}

@keyframes em-login-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
    .em-login-shell {
        padding: 1.75rem 1rem 1.5rem;
        gap: 1.1rem;
        justify-content: flex-start;
        min-height: 100vh;
    }

    .em-login-logo img {
        height: 46px;
    }

    .em-login-hd h1 {
        font-size: clamp(1.4rem, 6.5vw, 1.85rem);
    }

    .em-login-card {
        padding: 1.65rem 1.25rem;
        border-radius: 18px;
    }

    .em-login-card-head h2 {
        font-size: 1.5rem;
    }

    .em-login-lead {
        font-size: 0.875rem;
    }

    .em-login-audience li:nth-child(n + 5) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .em-login,
    .em-login-shell,
    .em-login-logo,
    .em-login-hd h1,
    .em-login-panel,
    .em-login-foot,
    .em-login-audience li,
    .em-login::after {
        animation: none;
    }
}
