:root {
    color-scheme: light;
    --auth-ink: #173b38;
    --auth-muted: #5d726e;
    --auth-accent: #087f76;
    --auth-accent-hover: #06685f;
    --auth-line: #bdceca;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.auth-page {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: #fff;
    color: var(--auth-ink);
    -webkit-font-smoothing: antialiased;
}
.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding: 32px 48px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #a9cfc4;
    border-radius: 12px;
    background: #edf7f3;
    color: var(--auth-ink);
    font-size: 27px;
    font-weight: 750;
}
.auth-brand-name { font-size: 21px; font-weight: 750; letter-spacing: .035em; }
.auth-brand-name small {
    display: block;
    margin-top: 3px;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 550;
    letter-spacing: .08em;
}
.environment-badge {
    padding: 5px 9px;
    border: 1px solid #72978e;
    border-radius: 6px;
    background: #edf7f3;
    color: var(--auth-ink);
    font-size: 12px;
    letter-spacing: .05em;
    white-space: nowrap;
}
.environment-badge[data-environment="prod"],
.environment-badge[data-environment="inconnu"] {
    border-color: #ae7e3e;
    background: #fff0d6;
    color: #754000;
}
.auth-main {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 32px 24px 64px;
}
.auth-panel { width: 100%; max-width: 440px; min-width: 0; }
.auth-panel h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.035em;
}
.auth-description {
    margin: 0 0 32px;
    color: var(--auth-muted);
    font-size: 16px;
    line-height: 1.6;
}
.auth-form { display: grid; gap: 22px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 600; }
.auth-field input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}
.auth-field input::placeholder { color: #6b7d78; opacity: 1; }
.auth-password { position: relative; }
.auth-password.has-password-toggle input { padding-right: 96px; }
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    min-width: 78px;
    min-height: 44px;
    padding: 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--auth-accent-hover);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    padding: 14px 20px;
    border: 1px solid var(--auth-accent);
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}
.auth-submit:hover { border-color: var(--auth-accent-hover); background: var(--auth-accent-hover); }
.auth-password-toggle:hover { background: #edf7f3; }
.auth-field input:focus-visible,
.auth-page button:focus-visible,
.auth-page a:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}
.auth-feedback {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #dbc9aa;
    border-radius: 8px;
    background: #fff8ed;
    color: #704713;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.auth-feedback-danger { border-color: #e3bbb7; background: #fff4f2; color: #903b32; }
.auth-footer { padding: 24px; color: var(--auth-muted); font-size: 12px; text-align: center; }
.auth-skip-link { position: absolute; top: -80px; left: 24px; }
.auth-skip-link:focus { top: 12px; padding: 12px; background: #fff; color: var(--auth-ink); }

@media (max-width: 600px) {
    .auth-header { padding: 24px; }
    .auth-panel h1 { font-size: 28px; }
    .auth-main { padding-top: 28px; padding-bottom: 40px; }
}
