:root {
    color-scheme: light;
    --ink: #10231e;
    --muted: #52645e;
    --paper: #f5f4ef;
    --surface: #fff;
    --line: #d9ddd7;
    --green: #0b6b50;
    --green-dark: #073c31;
    --error: #973b32;
    --error-bg: #fff1ed;
    --success-bg: #e9f4ec;
    --focus: #0b6b50;
}

* { box-sizing: border-box; }
body { margin: 0; font: 400 16px/1.65 "Noto Sans Georgian", system-ui, sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-dark); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: 8px; z-index: 10; padding: 12px 16px; background: var(--ink); color: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: none; color: #fff; }
.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-header, .auth-shell, .auth-footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.auth-header { min-height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 21px; line-height: 1.4; font-weight: 750; letter-spacing: -.04em; overflow-wrap: anywhere; }
.brand-mark { flex: 0 0 36px; width: 36px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--green); }
.brand-mark i { font-size: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0; font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.auth-shell { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); column-gap: clamp(48px, 7vw, 108px); align-items: center; padding-block: 64px; }
.auth-panel { grid-column: 2; grid-row: 1; min-width: 0; padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 44px rgb(11 51 41 / 4%); overflow-wrap: anywhere; }
.auth-panel-heading { margin-bottom: 28px; }
.auth-eyebrow { font-size: 11px; line-height: 1.5; font-weight: 750; color: var(--green); letter-spacing: .07em; margin: 0 0 14px; }
.auth-panel h1 { font-size: clamp(25px, 2.5vw, 32px); font-weight: 700; line-height: 1.35; letter-spacing: -.035em; margin: 0; }
.auth-intro { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.auth-form { display: grid; gap: 20px; }
.auth-field { min-width: 0; }
.auth-field label { display: block; color: var(--ink); margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.auth-field input { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 11px 13px; background: var(--surface); color: var(--ink); border: 1px solid #8b9a91; border-radius: 7px; line-height: 1.5; transition: border-color .15s ease, box-shadow .15s ease; }
.auth-field input:hover { border-color: #5e7567; }
.auth-field input:focus { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--green); }
.auth-field input[aria-invalid="true"] { border-color: var(--error); }
.auth-field input:autofill { color: var(--ink); }
.auth-input-wrap { display: flex; align-items: stretch; gap: 8px; }
.auth-input-wrap input { flex: 1; }
.password-toggle { flex-shrink: 0; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--green); font-size: 12px; font-weight: 650; transition: background .15s ease; }
.password-toggle:hover { background: #e6ebe4; }
.auth-hint { display: block; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-submit { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 52px; padding: 12px 18px; background: var(--green); border: 1px solid var(--green); border-radius: 7px; color: #fff; text-align: center; text-decoration: none; font-size: 15px; font-weight: 650; transition: background .15s ease, border-color .15s ease; }
.auth-submit:hover { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.auth-submit:disabled { background: #526b60; border-color: #526b60; cursor: wait; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12px; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-switch { margin: 24px 0 0; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; text-align: center; color: var(--muted); }
.auth-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.auth-message { padding: 14px 16px; border-radius: 7px; border: 1px solid var(--line); margin: 0 0 24px; font-size: 14px; line-height: 1.7; }
.auth-message.is-error { background: var(--error-bg); border-color: #d5a79d; color: var(--error); }
.auth-message.is-success { background: var(--success-bg); border-color: #aacbb5; color: var(--green-dark); }
.auth-message a { color: inherit; }
.auth-story { grid-column: 1; grid-row: 1; min-width: 0; padding: 10px 0; }
.auth-story h2 { margin: 0; font-size: clamp(32px, 3.2vw, 46px); line-height: 1.35; letter-spacing: -.045em; font-weight: 700; }
.auth-story h2 span { color: var(--green); }
.story-intro { max-width: 440px; color: var(--muted); margin: 20px 0 32px; }
.story-features { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.story-features li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature-number { padding-top: 4px; color: var(--green); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.story-features h3 { font-size: 15px; font-weight: 650; margin: 0 0 5px; line-height: 1.5; }
.story-features p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.7; }
.story-note { display: flex; align-items: flex-start; gap: 10px; margin: 24px 0 0; max-width: 450px; font-size: 12px; color: var(--muted); }
.story-note>i { width: 18px; flex-shrink: 0; margin-top: 4px; color: var(--green); text-align: center; }
.auth-footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-block: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.invitation-detail { padding: 16px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; background: var(--paper); }
.invitation-detail p { margin: 0; }
.invitation-detail p + p { margin-top: 10px; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 500px; padding-block: 40px; }
    .auth-panel { grid-column: 1; }
    .auth-story { display: none; }
}
@media (max-width: 520px) {
    .auth-header, .auth-shell, .auth-footer { width: calc(100% - 32px); }
    .auth-header { min-height: 80px; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
    .auth-brand { font-size: 18px; }
    .back-link { font-size: 12px; }
    .auth-shell { padding-block: 28px; }
    .auth-panel { padding: 26px 20px; border-radius: 12px; }
    .auth-panel h1 { font-size: 26px; }
    .auth-links { flex-direction: column; align-items: flex-start; gap: 0; }
    .auth-footer { align-items: flex-start; flex-direction: column; gap: 4px; padding-block: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
