/* Sign-in, registration and password pages (auth/_layout.html): a brand panel in the sidebar
   colours next to one white form card built from the page kit (ui.css). */
.auth-body { display: block; min-height: 100vh; background: #f4f6f5; }
.auth-body .container { max-width: none; margin: 0; padding: 0; }

.auth { display: grid; grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.15fr); min-height: 100vh; }

/* Brand panel */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 52px;
    overflow: hidden;
    background:
        radial-gradient(110% 70% at 0% 0%, rgba(47, 122, 91, 0.35) 0%, transparent 60%),
        linear-gradient(180deg, #14211d 0%, #0f1714 100%);
    color: #fff;
}
.auth-brand::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(201, 168, 116, 0.28);
    border-radius: 50%;
    box-shadow: 0 0 0 46px rgba(201, 168, 116, 0.05), 0 0 0 92px rgba(201, 168, 116, 0.03);
    pointer-events: none;
}
.auth-logo { display: block; width: 180px; height: auto; }
.auth-brand-text { position: relative; z-index: 1; max-width: 380px; }
.auth-brand-eyebrow { margin: 0; color: #c9a874; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-brand-title { margin: 12px 0 0; color: #fff; font-size: 30px; font-weight: 700; line-height: 1.22; letter-spacing: -0.01em; }
.auth-brand-foot { position: relative; z-index: 1; margin: 0; color: rgba(255, 255, 255, 0.5); font-size: 13px; }

/* Form card */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(440px, 100%); padding: 36px; border: 1px solid var(--ui-line); border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(23, 63, 57, 0.08); }
.auth-card.is-wide { width: min(560px, 100%); }
.auth-head { margin-bottom: 24px; }
.auth-head h1 { margin: 6px 0 8px; color: var(--ui-ink); font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.auth-head .ui-lead { font-size: 15px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .ui-field { gap: 6px; color: var(--ui-text); font-size: 13px; }
.auth-form .ui-input { min-height: 46px; font-size: 15px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-grid .is-full { grid-column: 1 / -1; }
.auth-password { position: relative; }
.auth-password .ui-input { padding-right: 88px; }
.auth-password-toggle { position: absolute; top: 50%; right: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ui-green); font: inherit; font-size: 13px; font-weight: 600; transform: translateY(-50%); cursor: pointer; }
.auth-password-toggle:hover { background: #eef4f0; }
.auth-password-toggle:focus-visible { outline: 2px solid var(--ui-green); outline-offset: 1px; }
.auth-password-toggle[hidden] { display: none; }
.auth-hint { color: var(--ui-faint); font-size: 12px; font-weight: 400; }
.auth-forgot { margin: -6px 0 0; font-size: 13px; text-align: right; }
.auth-submit { width: 100%; min-height: 48px; margin-top: 4px; font-size: 15px; }
.auth-alt { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--ui-line-soft); color: var(--ui-muted); font-size: 14px; text-align: center; }
.auth-back { margin: 0 0 18px; font-size: 14px; }
.auth-forgot a, .auth-alt a, .auth-back a { color: var(--ui-green); font-weight: 600; text-decoration: none; }
.auth-forgot a:hover, .auth-alt a:hover, .auth-back a:hover { text-decoration: underline; }

/* Messages from the server (wrong password, link sent, …) */
.auth-flashes { display: grid; gap: 8px; margin-bottom: 20px; }
.auth-flash { margin: 0; padding: 11px 14px; border: 1px solid #cfe3d8; border-radius: 10px; background: #eef4f1; color: var(--ui-primary); font-size: 14px; line-height: 1.45; }
.auth-flash.is-error, .auth-flash.is-danger { border-color: #f0c4b6; background: #fdf1ec; color: #6e2f1d; }
.auth-flash.is-warning { border-color: #ead2a0; background: #fff6df; color: #4d3d1c; }
.auth-flash.is-success { border-color: #bfe0ca; background: #eaf6ee; color: #1f4d31; }

/* Confirmation (registration sent) */
.auth-done { display: grid; justify-items: center; gap: 4px; text-align: center; }
.auth-done-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: #dff3e6; color: #22613b; font-size: 26px; font-weight: 700; }
.auth-done h1 { margin: 0 0 6px; color: var(--ui-ink); font-size: 26px; }
.auth-done .ui-lead { margin-bottom: 18px; }

@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-brand { flex-direction: row; justify-content: center; padding: 22px 24px; }
    .auth-brand::after, .auth-brand-text, .auth-brand-foot { display: none; }
    .auth-logo { width: 132px; }
    .auth-main { align-items: flex-start; padding: 28px 16px 40px; }
}
@media (max-width: 520px) {
    .auth-card { padding: 26px 20px; border-radius: 16px; }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-form .ui-input { font-size: 16px; }
    .auth-head h1 { font-size: 25px; }
}
