.office-login {
    --login-background: rgba(9, 23, 39, 0.96);
    --login-border: rgba(125, 211, 252, 0.22);
    --login-text: #f4f8fb;
    --login-muted: #9db2c6;
    --login-primary: #67e8f9;
    --login-success: #5ee3a1;

    position: fixed;
    z-index: 1055;
    top: 72px;
    right: clamp(0.75rem, 2vw, 1.5rem);
    width: min(440px, calc(100vw - 1.5rem));
    padding: 1.35rem;
    overflow: hidden;
    color: var(--login-text);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.055),
            transparent 48%
        ),
        var(--login-background);
    border: 1px solid var(--login-border);
    border-radius: 22px;
    box-shadow:
        0 28px 75px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.025);
    font-family:
        Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: office-login-open 180ms ease-out;
}

.office-login::before {
    position: absolute;
    top: 0;
    left: 1.5rem;
    width: 90px;
    height: 2px;
    content: "";
    background: linear-gradient(
        90deg,
        var(--login-primary),
        transparent
    );
}

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

.office-login__glow {
    position: absolute;
    top: -100px;
    right: -80px;
    width: 230px;
    height: 230px;
    pointer-events: none;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 50%;
    filter: blur(20px);
}

.office-login__header {
    position: relative;
    z-index: 1;
    display: flex;
    margin-bottom: 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.office-login__heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.85rem;
}

.office-login__icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    color: var(--login-primary);
    background: rgba(103, 232, 249, 0.1);
    border: 1px solid rgba(103, 232, 249, 0.18);
    border-radius: 14px;
    place-items: center;
}

.office-login__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.office-login__eyebrow {
    margin: 0 0 0.15rem;
    color: var(--login-primary);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.office-login__title {
    margin: 0;
    overflow: hidden;
    color: var(--login-text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.office-login__close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 36px;
    color: var(--login-muted);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    cursor: pointer;
    place-items: center;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.office-login__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    transform: rotate(4deg);
}

.office-login__close:focus-visible {
    outline: 2px solid var(--login-primary);
    outline-offset: 2px;
}

.office-login__close svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.office-login__form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
}

.office-login__field {
    display: grid;
    gap: 0.42rem;
}

.office-login__label {
    margin: 0;
    color: #c7d7e2;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.office-login__control {
    position: relative;
}

.office-login__control-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 0.85rem;
    display: grid;
    width: 20px;
    height: 20px;
    color: var(--login-muted);
    pointer-events: none;
    place-items: center;
    transform: translateY(-50%);
    transition: color 160ms ease;
}

.office-login__control-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.office-login__input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem 0.65rem 2.75rem;
    color: var(--login-text);
    background: rgba(2, 10, 18, 0.48);
    border: 1px solid rgba(157, 210, 227, 0.17);
    border-radius: 12px;
    outline: none;
    font: inherit;
    font-size: 0.9rem;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.office-login__input:hover {
    border-color: rgba(103, 232, 249, 0.3);
}

.office-login__input:focus {
    background: rgba(3, 14, 25, 0.72);
    border-color: var(--login-primary);
    box-shadow:
        0 0 0 3px rgba(103, 232, 249, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.16);
}

.office-login__control:focus-within .office-login__control-icon {
    color: var(--login-primary);
}

.office-login__input:-webkit-autofill,
.office-login__input:-webkit-autofill:hover,
.office-login__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--login-text);
    caret-color: var(--login-text);
    transition: background-color 9999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px #0a1a2b inset;
}

.office-login__actions {
    display: flex;
    margin-top: 0.35rem;
    padding-top: 1rem;
    justify-content: flex-end;
    gap: 0.7rem;
    border-top: 1px solid rgba(157, 210, 227, 0.14);
}

.office-login__button {
    display: inline-flex;
    min-height: 40px;
    padding: 0.6rem 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.office-login__button:hover {
    transform: translateY(-1px);
}

.office-login__button:active {
    transform: translateY(0);
}

.office-login__button:focus-visible {
    outline: 2px solid var(--login-primary);
    outline-offset: 2px;
}

.office-login__button svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.office-login__button--cancel {
    color: #d7e3eb;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
}

.office-login__button--cancel:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
}

.office-login__button--submit {
    color: #03231b;
    background: linear-gradient(
        135deg,
        var(--login-success),
        #67e8f9
    );
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 22px rgba(94, 227, 161, 0.18);
}

.office-login__button--submit:hover {
    color: #021b15;
    background: linear-gradient(135deg, #73edb2, #8ceefa);
    box-shadow: 0 11px 26px rgba(94, 227, 161, 0.25);
}

/*
 * Applied by Vue when appwindow.pbody.w <= 900.
 */
.office-login--compact {
    top: 64px;
    right: 0.75rem;
    width: min(350px, calc(100vw - 1.5rem));
    padding: 1.1rem;
    border-radius: 18px;
}

.office-login--compact .office-login__header {
    margin-bottom: 1rem;
}

.office-login--compact .office-login__icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.office-login--compact .office-login__title {
    font-size: 1.15rem;
}

.office-login--compact .office-login__form {
    gap: 0.8rem;
}

@keyframes office-login-open {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.985);
    }

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

@media (max-width: 575.98px) {
    .office-login,
    .office-login--compact {
        position: fixed;
        top: 68px;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-height: calc(100vh - 84px);
        padding: 1rem;
        overflow-y: auto;
        border-radius: 18px;
    }

    .office-login__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .office-login__button {
        width: 100%;
    }
}

@media (max-width: 340px) {
    .office-login__actions {
        grid-template-columns: 1fr;
    }

    .office-login__button--submit {
        grid-row: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .office-login {
        animation: none;
    }

    .office-login *,
    .office-login *::before,
    .office-login *::after {
        transition-duration: 0.01ms !important;
    }
}