/* crm-ui-v2: design-tokens.json, centered Login.vue and AuthForm (Naive large controls). */
@font-face {
    font-family: "Geist Sans";
    src: url("Geist-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg-color: #ffffff;
    --bg-secondary-color: #fafbfc;
    --fg-color: #000000;
    --fg-secondary-color: #495465;
    --primary-color: rgb(0, 118, 70);
    --font-family: "Geist Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f4f5;
    color: var(--fg-color);
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.35;
    -webkit-font-smoothing: antialiased;
}

.page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 50px;
}

.wrapper,
.form-box {
    width: 100%;
}

.wrapper {
    max-width: 500px;
}

.form-wrap {
    width: 100%;
    padding: 60px;
    border-radius: 20px;
    background: var(--bg-color);
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo {
    display: block;
    height: 37px;
    max-width: 100%;
    object-fit: contain;
}

.environment {
    color: #4b5563;
}

h1 {
    margin: 0 0 16px;
    font-family: var(--font-family);
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
}

.intro {
    margin: 0 0 48px;
    color: var(--fg-secondary-color);
    font-size: 18px;
    line-height: 1.3;
}

.field {
    padding-bottom: 24px;
}

.field label {
    display: block;
    padding: 0 0 6px 2px;
    font-size: 14px;
    line-height: 20px;
}

.field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgb(224, 224, 230);
    border-radius: 0;
    background: var(--bg-color);
    color: var(--fg-color);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
    color: rgba(194, 194, 194, 1);
}

.field input:hover,
.field input:focus {
    border-color: var(--primary-color);
}

.field input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(0 118 70 / 20%);
}

.required {
    color: #ff0156;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    inset: 1px 1px 1px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c2c2c2;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--fg-secondary-color);
}

.password-toggle .eye-hide,
.password-toggle[aria-pressed="true"] .eye-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-hide {
    display: block;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--fg-secondary-color);
    font-size: 12px;
    cursor: pointer;
}

.remember input {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary-color);
}

.sign-in {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    background: var(--primary-color);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.sign-in:hover {
    background: #0d7d4f;
    border-color: #0d7d4f;
}

.sign-in:active {
    background: #005e38;
}

button:focus-visible,
.remember input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.help {
    margin: 24px 0 0;
    color: var(--fg-secondary-color);
    font-size: 12px;
}

.error {
    margin: 0 0 24px;
    color: #ff0156;
    font-size: 14px;
}

/* Match the SPA centered layout's mobile gutters and card padding. */
@media (max-width: 600px) {
    .page {
        padding: 4%;
    }

    .form-wrap {
        padding: 8%;
    }
}

.mfa-qr { display: flex; justify-content: center; margin: 20px 0; }
.mfa-qr svg { width: 200px; height: 200px; }
.mfa-secret { overflow-wrap: anywhere; text-align: center; font-family: monospace; letter-spacing: 0.08em; }
