/*
  Sign-in pages (/auth/login, /auth/forgot-password, /auth/reset-password).
  Two-panel card: dark brand panel on the left, form on the right. Stacks on phones.
*/
.auth-wrap {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.auth-card {
    display: flex;
    width: 100%;
    max-width: 860px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(var(--ssm-dark-rgb), .14), 0 2px 6px rgba(var(--ssm-dark-rgb), .06);
}

/* ── Brand panel ── */
.auth-brand {
    flex: 0 0 42%;
    padding: 2.75rem 2.25rem;
    color: #ecf0f1;
    background:
        radial-gradient(circle at 110% -10%, rgba(var(--ssm-accent-rgb), .35), transparent 55%),
        linear-gradient(160deg, var(--ssm-dark) 0%, var(--ssm-dark-deep) 100%);
    display: flex;
    flex-direction: column;
}

.auth-logo {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(var(--ssm-accent-rgb), .18);
    color: var(--ssm-accent);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* Logo (Branding & Theme): on a white tile, so a dark logo shows on the dark panel */
.auth-logo.auth-logo-img { width: auto; height: 64px; max-width: 100%; padding: 8px 14px; background: #fff; }
.auth-logo.auth-logo-img img { height: 100%; max-width: 220px; object-fit: contain; display: block; }

.auth-brand h1 { font-size: 1.45rem; font-weight: 600; color: #fff; margin: 0 0 .6rem; line-height: 1.3; }
.auth-brand p { color: #b8c4ce; font-size: .95rem; line-height: 1.55; margin: 0 0 2rem; }

.auth-points { list-style: none; padding: 0; margin: auto 0 0; }
.auth-points li { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: #d5dde3; padding: .4rem 0; }
.auth-points .fa-solid { color: var(--ssm-accent); width: 1.1rem; text-align: center; }

/* ── Form panel ── */
.auth-form { flex: 1; padding: 2.75rem 2.5rem; }
.auth-form h2 { font-size: 1.5rem; font-weight: 600; color: var(--ssm-dark); margin: 0 0 .3rem; }
.auth-sub { color: #7f8c8d; font-size: .93rem; line-height: 1.5; margin: 0 0 1.75rem; }

.auth-field { margin-bottom: 1.15rem; }
.auth-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ssm-dark-hover); margin-bottom: .4rem; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }

.auth-input { position: relative; }
.auth-input > .fa-solid {
    position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
    color: #a0acb5; font-size: .9rem; pointer-events: none; transition: color .15s;
}
.auth-input input {
    width: 100%;
    height: 46px;
    padding: 0 2.75rem 0 2.5rem;
    font-size: .95rem;
    color: var(--ssm-dark);
    background: #f9fafb;
    border: 1px solid #dde3e8;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input input::placeholder { color: #aab4bc; }
.auth-input input:focus {
    outline: none;
    background: #fff;
    border-color: var(--ssm-primary);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, .15);
}
.auth-input:focus-within > .fa-solid { color: var(--ssm-primary); }
.auth-input.invalid input { border-color: #e6b0aa; background: #fdf6f5; }
.auth-input.invalid input:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }

.auth-eye {
    position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; background: transparent; border-radius: 6px;
    color: #a0acb5; cursor: pointer;
}
.auth-eye:hover { color: var(--ssm-dark); background: #eef1f4; }

.auth-hint { margin-top: .4rem; font-size: .8rem; color: #95a5a6; }
.auth-hint.warn { color: #b9770e; }
.auth-hint.bad { color: #c0392b; }
.auth-caps { display: none; }
.auth-caps.show { display: block; }

.auth-link { font-size: .82rem; color: var(--ssm-primary); text-decoration: none; }
.auth-link:hover { color: var(--ssm-primary-active); text-decoration: underline; }

.auth-submit {
    width: 100%;
    height: 46px;
    margin-top: .6rem;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    border: 0; border-radius: 8px;
    background: var(--ssm-primary); color: #fff;
    font-size: 1rem; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 160, 133, .28);
    transition: background .15s, transform .05s, box-shadow .15s;
}
.auth-submit:hover { background: var(--ssm-primary-hover); color: #fff; box-shadow: 0 6px 16px rgba(22, 160, 133, .34); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: .75; cursor: progress; }

.auth-back {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin-top: 1.25rem; font-size: .88rem; color: #5d6d7e; text-decoration: none;
}
.auth-back:hover { color: var(--ssm-primary); }

.auth-alert {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .7rem .85rem; margin-bottom: 1.2rem;
    border-radius: 8px; font-size: .88rem; line-height: 1.4;
}
.auth-alert .fa-solid { margin-top: .15rem; }
.auth-alert-error { background: #fdecea; color: #a93226; border: 1px solid #f5c6c0; }
.auth-alert-info { background: var(--ssm-primary-subtle); color: var(--ssm-primary-text); border: 1px solid var(--ssm-accent-light); }

/* Big confirmation state (e.g. password changed) */
.auth-done { text-align: center; padding: 1rem 0 .5rem; }
.auth-done-icon {
    width: 64px; height: 64px; margin: 0 auto 1.1rem;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--ssm-primary-subtle); color: var(--ssm-primary); font-size: 1.7rem;
}
.auth-done h2 { margin-bottom: .5rem; }

.auth-foot {
    margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #eef1f4;
    font-size: .8rem; color: #95a5a6; text-align: center;
}


/* One-time code field: spaced digits */
.auth-input input.auth-otp { letter-spacing: .35em; font-weight: 600; font-family: Consolas, 'Courier New', monospace; }
.auth-input input.auth-otp::placeholder { letter-spacing: .35em; }

/* Admin variant: red accents to signal a restricted area */
.auth-badge {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: .4rem;
    margin-bottom: .9rem; padding: .2rem .65rem;
    border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .03em;
    background: rgba(231, 76, 60, .18); color: #f5b7b1;
}
.auth-admin .auth-brand {
    background:
        radial-gradient(circle at 110% -10%, rgba(231, 76, 60, .30), transparent 55%),
        linear-gradient(160deg, var(--ssm-dark) 0%, var(--ssm-dark-deep) 100%);
}
.auth-admin .auth-logo { background: rgba(231, 76, 60, .18); color: #ec7063; }
.auth-admin .auth-points .fa-solid { color: #ec7063; }
.auth-admin .auth-input input:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .14); }
.auth-admin .auth-input:focus-within > .fa-solid { color: #c0392b; }
.auth-admin .auth-submit { background: #c0392b; box-shadow: 0 4px 12px rgba(192, 57, 43, .28); }
.auth-admin .auth-submit:hover { background: #a93226; box-shadow: 0 6px 16px rgba(192, 57, 43, .34); }
@media (max-width: 768px) {
    .auth-card { flex-direction: column; max-width: 440px; }
    .auth-brand { padding: 1.75rem 1.5rem; }
    .auth-brand p, .auth-points { display: none; }
    .auth-logo { margin-bottom: .9rem; width: 44px; height: 44px; font-size: 1.15rem; }
    .auth-brand h1 { margin: 0; font-size: 1.25rem; }
    .auth-form { padding: 1.75rem 1.5rem; }
}
