:root {
    color-scheme: dark;
    --login-bg: #14191f;
    --login-field: #1c232b;
    --login-line: #3a4650;
    --login-ink: #f0f4f7;
    --login-muted: #adbac4;
    --login-accent: #a9c5d4;
    --login-focus: #b5e1f1;
    font: 16px/1.5 Arial, sans-serif;
    background: var(--login-bg);
    color: var(--login-ink);
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: 40px 24px;
}

.office-login {
    width: min(100%, 384px);
    min-width: 0;
    margin-inline: auto;
}

.office-login-brand {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--login-line);
}

.office-login-brand img {
    display: block;
    width: min(100%, 210px);
    height: auto;
}

.office-login-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.office-login-form h1 {
    margin: 0 0 2px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.office-login-field {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.office-login-field[hidden] { display: none; }

.office-login-field label {
    font-size: 14px;
    font-weight: 600;
}

.office-login-field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid #586571;
    border-radius: 6px;
    background: var(--login-field);
    color: var(--login-ink);
    font: inherit;
    scroll-margin-block: 12px;
}

.office-login-password {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.office-login-toggle {
    flex: 0 0 48px;
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #586571;
    border-radius: 6px;
    background: var(--login-field);
    color: var(--login-muted);
    cursor: pointer;
}

.office-login-toggle[hidden],
.office-login-toggle[data-visible="false"] [data-password-hide],
.office-login-toggle[data-visible="true"] [data-password-show] { display: none; }

.office-login-toggle svg { width: 19px; height: 19px; }

.office-login-submit {
    min-height: 48px;
    margin-top: 4px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--login-accent);
    color: #121c23;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.office-login-toggle:hover { color: var(--login-ink); background: #27323c; }
.office-login-submit:hover { background: #c0d7e3; }

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

.office-login-error {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #875a60;
    border-radius: 6px;
    background: #302228;
    color: #ffdade;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.office-login-footer {
    margin-top: 28px;
    border-top: 1px solid var(--login-line);
}

.office-login-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 16px;
    padding-block: 5px;
}

.office-login-footer a,
.office-login-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--login-muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.office-login-link {
    justify-self: end;
    margin-block: -10px;
}

.office-login-footer a:hover,
.office-login-link:hover { color: var(--login-ink); }

.office-login-notice {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #54796b;
    border-radius: 6px;
    background: #1d302b;
    color: #cbefe1;
    font-size: 14px;
}

@media (max-width: 480px), (max-height: 575px) {
    body { align-items: start; padding: 28px 20px; }
    .office-login-brand { padding-bottom: 18px; }
    .office-login-form { margin-top: 20px; gap: 14px; }
    .office-login-footer { margin-top: 22px; }
}
