/* Login card styles */

#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0f19 !important;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

#loginScreen::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0) 70%);
    top: 10%;
    right: 15%;
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
    pointer-events: none;
}

#loginScreen::after {
    content: '';
    position: absolute;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0) 70%);
    bottom: 5%;
    left: 10%;
    border-radius: 50%;
    z-index: 0;
    filter: blur(80px);
    pointer-events: none;
}

.login-container-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    background: rgba(17, 25, 40, 0.82) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42) !important;
    border-radius: 20px !important;
    padding: 56px 36px 32px !important;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 20px auto;
}

.login-logo-floating {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    /* background: linear-gradient(135deg, #3b82f6, #ec4899); */
    background: #0f1526;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-title-h1 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-align: center;
    margin: 4px 0 6px;
    letter-spacing: 0.5px;
}

.login-subtitle-p {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    margin: 0 0 26px;
    line-height: 1.4;
}

.input-group-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.input-field {
    width: 100%;
    padding: 14px 16px 14px 44px;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.input-field::placeholder {
    color: #64748b;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 1.1rem;
    pointer-events: none;
    user-select: none;
}

.input-icon-right {
    position: absolute;
    right: 14px;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.input-icon-right:hover {
    color: #a5b4fc;
}

.login-form-field {
    margin-bottom: 18px;
}

.login-password-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}

.login-password-toggle:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
    border-radius: 6px;
}

.login-single-store-summary {
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
}

.login-single-store-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 9px;
    font-size: 17px;
}

.login-single-store-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.login-single-store-caption {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.login-single-store-details strong {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.login-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
}

.login-checkbox-label input {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.login-forgot-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-forgot-link:hover {
    color: #a5b4fc;
}

.login-btn-premium {
    width: 100%;
    min-height: 50px;
    padding: 14px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 20px rgba(99, 102, 241, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn-premium:hover {
    background: linear-gradient(90deg, #4f46e5, #9333ea);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 24px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.login-btn-premium:active {
    transform: translateY(1px);
}

@media (max-width: 520px) {
    .login-container-wrapper {
        max-width: 440px;
        padding: 16px;
    }

    .login-card {
        margin: 36px auto 16px;
        padding: 54px 24px 26px !important;
        border-radius: 18px !important;
    }
}

#loginScreen {
    --login-page: #0b1220;
    --login-workspace: #101a2b;
    --login-text: #f2f5fb;
    --login-muted: #9ba9bd;
    --login-label: #dce5f1;
    --login-input: #152237;
    --login-input-border: #34445c;
    --login-store: #121f32;
    --login-store-border: #2b3b52;
    --login-error-bg: #3b1b2a;
    --login-error-border: #8d3348;
    --login-error-text: #ffc0ca;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: clamp(18px, 4vh, 38px) 24px;
    color: var(--login-text);
    color-scheme: dark;
    background:
        radial-gradient(ellipse at 74% 14%, rgba(76, 107, 181, 0.18), transparent 34%),
        radial-gradient(ellipse at 5% 90%, rgba(75, 92, 161, 0.12), transparent 36%),
        var(--login-page) !important;
    font-family: 'Noto Sans Armenian', 'Inter', system-ui, sans-serif;
}

#loginScreen::before,
#loginScreen::after {
    display: none;
}

body.light-theme #loginScreen {
    --login-page: #e9eef5;
    --login-workspace: #ffffff;
    --login-text: #17243a;
    --login-muted: #69788f;
    --login-label: #334258;
    --login-input: #f6f8fc;
    --login-input-border: #d5deea;
    --login-store: #f7f9fc;
    --login-store-border: #dce4ef;
    --login-error-bg: #fff1f2;
    --login-error-border: #fecdd3;
    --login-error-text: #9f1239;
    color-scheme: light;
    background:
        radial-gradient(ellipse at 75% 12%, rgba(99, 122, 196, 0.14), transparent 36%),
        linear-gradient(145deg, #f8fafc, var(--login-page)) !important;
}

#loginScreen .login-container-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    margin: auto;
    padding: 0;
    box-sizing: border-box;
}

#loginScreen .login-card {
    display: grid;
    grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.35fr);
    width: 100%;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    background: var(--login-workspace) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 24px !important;
    box-shadow: 0 32px 90px rgba(2, 8, 23, 0.38), 0 2px 8px rgba(2, 8, 23, 0.12) !important;
    box-sizing: border-box;
}

body.light-theme #loginScreen .login-card {
    border-color: #d5deea !important;
    box-shadow: 0 28px 80px rgba(29, 46, 75, 0.16), 0 2px 8px rgba(29, 46, 75, 0.06) !important;
}

#loginScreen .login-showcase {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 620px;
    padding: 34px 30px 26px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 42% 52%, rgba(79, 111, 178, 0.27), transparent 48%),
        linear-gradient(155deg, #172842 0%, #111d31 56%, #101a2b 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.13);
    box-sizing: border-box;
}

#loginScreen .login-showcase::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(180, 198, 226, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 198, 226, 0.045) 1px, transparent 1px);
    background-size: 32px 32px;
    content: "";
    mask-image: linear-gradient(to bottom, transparent 5%, #000 55%, transparent 100%);
    pointer-events: none;
}

#loginScreen .login-showcase::after {
    position: absolute;
    z-index: -1;
    right: -142px;
    bottom: -156px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(147, 174, 223, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(147, 174, 223, 0.035), 0 0 0 50px rgba(147, 174, 223, 0.025);
    content: "";
    pointer-events: none;
}

#loginScreen .login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #f4f7fc;
    font: 700 24px/1.2 'Inter', system-ui, sans-serif;
    letter-spacing: -0.035em;
}

#loginScreen .login-brand svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    color: #dce7ff;
    background: linear-gradient(145deg, #6077ed, #5264c4);
    border: 1px solid rgba(218, 228, 255, 0.2);
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(60, 85, 188, 0.28);
    box-sizing: border-box;
}

#loginScreen .login-showcase-art {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 1;
    min-height: 300px;
    margin: 18px -20px 10px;
    place-items: center;
}

#loginScreen .login-showcase-art svg {
    display: block;
    width: 100%;
    max-width: 360px;
    overflow: visible;
    filter: drop-shadow(0 24px 24px rgba(4, 10, 24, 0.28));
}

#loginScreen .login-showcase-mark {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9aabc3;
    font: 700 10px/1 'Inter', system-ui, sans-serif;
    letter-spacing: 0.16em;
}

#loginScreen .login-showcase-mark span:first-child {
    color: #d9e3f3;
}

#loginScreen .login-showcase-mark i {
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, #7a9cff, rgba(122, 156, 255, 0.15));
}

#loginScreen .login-workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px clamp(28px, 4.2vw, 52px) 34px;
    background: var(--login-workspace);
    box-sizing: border-box;
}

#loginScreen .login-language-picker {
    align-self: flex-end;
    margin: 0 0 22px;
    padding: 8px 30px 8px 11px;
    color: var(--login-label);
    background-color: var(--login-input);
    border: 1px solid var(--login-input-border);
    border-radius: 9px;
    font-size: 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

#loginScreen .login-language-picker:focus-visible {
    outline: 2px solid #8799ff;
    outline-offset: 2px;
}

#loginScreen .login-language-picker option {
    color: var(--login-text);
    background: var(--login-workspace);
}

#loginScreen #loginFormContainer,
#loginScreen #resetFormContainer {
    width: 100%;
    min-width: 0;
}

#loginScreen .login-title-h1 {
    margin: 0 0 7px;
    color: var(--login-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.035em;
    text-align: left;
}

#loginScreen .login-subtitle-p {
    margin: 0 0 24px;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.65;
    text-align: left;
}

#loginScreen #saasStoreSelectorContainer {
    margin-bottom: 20px !important;
    padding: 14px 15px;
    background: var(--login-store);
    border: 1px solid var(--login-store-border);
    border-radius: 12px;
}

#loginScreen .login-single-store-summary {
    min-height: 42px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

#loginScreen .login-single-store-icon {
    flex: 0 0 32px;
    color: #91a8d1;
    background: none;
}

#loginScreen .login-single-store-icon svg {
    width: 25px;
    height: 25px;
}

#loginScreen .login-single-store-details {
    gap: 5px;
}

#loginScreen .login-single-store-caption {
    color: var(--login-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

#loginScreen .login-single-store-details strong {
    overflow-wrap: anywhere;
    color: var(--login-text);
    font-size: 13px;
    font-weight: 600;
    white-space: normal;
}

#loginScreen #loginStoreSelectorControls {
    gap: 12px;
}

#loginScreen #toggleStoreModeBtn {
    flex-shrink: 0;
    padding: 6px 0;
    color: #aab8ff !important;
    font-size: 12px !important;
}

#loginScreen #loginStoreStatusBadge {
    line-height: 1.5;
}

#loginScreen #saasStoreSelectorContainer:has(#loginSingleStoreSummary[style*="display: flex"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
}

#loginScreen #saasStoreSelectorContainer:has(#loginSingleStoreSummary[style*="display: flex"]) #loginStoreSelectorControls {
    margin: 0 !important;
}

#loginScreen #saasStoreSelectorContainer:has(#loginSingleStoreSummary[style*="display: flex"]) #loginStoreSelectorControls label {
    display: none;
}

#loginScreen #saasStoreSelectorContainer:has(#loginSingleStoreSummary[style*="display: flex"]) #loginStoreStatusBadge {
    grid-column: 1 / -1;
    margin-left: 44px;
}

#loginScreen .input-group-label {
    margin-bottom: 8px;
    color: var(--login-label);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.015em;
}

#loginScreen .login-form-field {
    margin-bottom: 17px;
}

#loginScreen .input-field {
    min-height: 50px;
    color: var(--login-text) !important;
    background: var(--login-input) !important;
    border: 1px solid var(--login-input-border) !important;
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    font-family: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#loginScreen .input-field::placeholder {
    color: var(--login-muted);
    opacity: 0.8;
}

#loginScreen .input-field:focus {
    border-color: #8193ff !important;
    box-shadow: 0 0 0 3px rgba(111, 132, 255, 0.17);
}

#loginScreen .input-field option {
    color: var(--login-text);
    background: var(--login-workspace);
}

#loginScreen .input-icon-left,
#loginScreen .login-password-toggle {
    color: #91a2bc;
}

#loginScreen .input-icon-left svg,
#loginScreen .login-password-toggle svg {
    width: 19px;
    height: 19px;
}

#loginScreen .login-password-toggle {
    right: 5px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

#loginScreen .login-password-toggle:hover {
    color: #dce7ff;
    background: rgba(130, 151, 190, 0.12);
}

#loginScreen .login-eye-slash {
    display: none;
}

#loginScreen .login-password-toggle[aria-pressed="true"] .login-eye-slash {
    display: block;
}

#loginScreen .login-options-row {
    flex-wrap: wrap;
    gap: 12px 16px;
    margin: 3px 0 21px;
}

#loginScreen .login-checkbox-label {
    color: var(--login-muted);
    font-size: 12px;
}

#loginScreen .login-checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: #6879ef;
}

#loginScreen .login-forgot-link {
    color: #9eacff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

#loginScreen .login-forgot-link:hover {
    color: #c1caff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#loginScreen .login-back-link {
    color: var(--login-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.16s ease;
}

#loginScreen .login-back-link:hover {
    color: #c1caff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#loginScreen .login-btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 52px;
    margin-bottom: 0 !important;
    background: linear-gradient(105deg, #5269dc 0%, #5d65d9 55%, #7169e5 100%);
    border: 1px solid rgba(201, 210, 255, 0.18);
    border-radius: 11px;
    box-shadow: 0 10px 24px rgba(77, 95, 205, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#loginScreen .login-btn-premium:hover {
    filter: brightness(1.08);
    box-shadow: 0 13px 28px rgba(77, 95, 205, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#loginScreen .login-btn-premium:active {
    transform: translateY(0);
}

#loginScreen .login-btn-premium:disabled {
    opacity: 0.65;
    cursor: wait;
}

#loginScreen #loginButton::after {
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    content: "\2192";
}

#loginScreen #loginButton:disabled::after {
    content: none;
}

#loginScreen #grandAdminSetupHint a {
    color: #f3c76e !important;
}

#loginScreen #loginError {
    margin: 0 0 24px !important;
    padding: 12px 14px !important;
    color: var(--login-error-text) !important;
    background: var(--login-error-bg) !important;
    border: 1px solid var(--login-error-border) !important;
    border-radius: 10px !important;
    line-height: 1.6;
}

#loginScreen .login-footer {
    margin-top: 18px;
    color: var(--login-muted);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

#loginScreen a:focus-visible,
#loginScreen button:focus-visible,
#loginScreen input:focus-visible,
#loginScreen select:focus-visible,
#loginScreen input[type="checkbox"]:focus-visible {
    outline: 2px solid #a0afff;
    outline-offset: 3px;
}

body.light-theme #loginScreen .login-forgot-link {
    color: #4f5fc9;
}

body.light-theme #loginScreen .login-forgot-link:hover {
    color: #3948b0;
}

body.light-theme #loginScreen .login-back-link:hover {
    color: #3948b0;
}

body.light-theme #loginScreen .input-icon-left,
body.light-theme #loginScreen .login-password-toggle {
    color: #78879e;
}

body.light-theme #loginScreen .login-password-toggle:hover {
    color: #3948b0;
    background: rgba(79, 95, 201, 0.08);
}

@media (max-width: 760px) {
    #loginScreen {
        padding: 24px 16px;
    }

    #loginScreen .login-container-wrapper {
        max-width: 560px;
    }

    #loginScreen .login-card {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 21px !important;
    }

    #loginScreen .login-showcase {
        min-height: 116px;
        padding: 21px 24px;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    }

    #loginScreen .login-brand {
        font-size: 21px;
    }

    #loginScreen .login-brand svg {
        width: 38px;
        height: 38px;
    }

    #loginScreen .login-showcase-art {
        position: absolute;
        top: -54px;
        right: -23px;
        width: 205px;
        min-height: 0;
        margin: 0;
        opacity: 0.43;
        pointer-events: none;
    }

    #loginScreen .login-showcase-mark {
        display: none;
    }

    #loginScreen .login-workspace {
        padding: 20px 30px 30px;
    }

    #loginScreen .login-language-picker {
        margin-bottom: 20px;
    }
}

@media (max-width: 520px) {
    #loginScreen {
        align-items: flex-start;
        padding: 14px 10px;
    }

    #loginScreen .login-container-wrapper {
        max-width: 480px;
    }

    #loginScreen .login-card {
        border-radius: 18px !important;
    }

    #loginScreen .login-showcase {
        min-height: 104px;
        padding: 18px 20px;
    }

    #loginScreen .login-workspace {
        padding: 18px 22px 24px;
    }

    #loginScreen .login-language-picker {
        margin-bottom: 18px;
    }

    #loginScreen .login-title-h1 {
        font-size: 25px;
    }

    #loginScreen .login-subtitle-p {
        margin-bottom: 20px;
    }

    #loginScreen #saasStoreSelectorContainer:has(#loginSingleStoreSummary[style*="display: flex"]) {
        column-gap: 6px;
    }

    #loginScreen #toggleStoreModeBtn {
        font-size: 11px !important;
    }

    #loginScreen .login-options-row {
        align-items: flex-start;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #loginScreen *,
    #loginScreen *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

#loginCompanyLogo { max-width: 88px; max-height: 32px; object-fit: contain; }
