:root {
    --auth-primary: #f5223d;
    --auth-primary-hover: #e31330;
    --auth-page-bg: #f4f6f9;
    --auth-card-bg: #ffffff;
    --auth-border: #dce2ea;
    --auth-text: #0e1b35;
    --auth-muted: #7f8ba0;
    --auth-input-muted: #9aa6b8;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: var(--auth-page-bg);
    color: var(--auth-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    -webkit-font-smoothing: antialiased;
}
.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    padding: 32px 30px 26px;
}
.auth-brand {
    min-height: 54px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 12px;
}
.auth-brand img {
    display: block;
    max-width: 220px;
    width: auto;
    max-height: 54px;
    object-fit: contain;
}
.auth-brand-fallback {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ff101b;
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -1.4px;
}
.auth-brand-fallback i { font-size: 32px; }
.auth-eyebrow {
    margin: 0 0 6px;
    color: var(--auth-primary);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.auth-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.8px;
    color: var(--auth-text);
}
.auth-subtitle {
    margin: 8px 0 22px;
    max-width: 350px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.5;
}
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.45;
}
.auth-alert-error { color: #b42318; border-color: #fecdca; background: #fffbfa; }
.auth-alert-success { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.auth-field { margin-bottom: 14px; }
.auth-label {
    display: block;
    margin-bottom: 6px;
    color: #26344d;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}
.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-input-shell:focus-within {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 1px rgba(245, 34, 61, .03);
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c9aae;
    font-size: 16px;
    pointer-events: none;
}
.auth-input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    border-radius: 11px;
    padding: 0 42px;
    background: transparent;
    color: var(--auth-text);
    font: inherit;
    font-size: 13px;
}
.auth-input::placeholder { color: var(--auth-input-muted); opacity: 1; }
.auth-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8c9aae;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
}
.auth-password-toggle:hover,
.auth-password-toggle:focus-visible { color: var(--auth-primary); outline: none; background: #fff3f5; }
.auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 11px;
    background: var(--auth-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.auth-submit:hover { background: var(--auth-primary-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-back {
    margin-top: 17px;
    text-align: center;
}
.auth-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #66748b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}
.auth-back a:hover { color: var(--auth-primary); text-decoration: none !important; }
.auth-help {
    margin: 16px 0 0;
    padding-top: 15px;
    border-top: 1px solid #edf0f4;
    color: #8a95a8;
    text-align: center;
    font-size: 10.5px;
    line-height: 1.55;
}
.auth-help a { color: #68758a; text-decoration: none; font-weight: 600; }
.auth-help a:hover { color: var(--auth-primary); text-decoration: none; }
.auth-invalid {
    text-align: center;
    padding: 5px 0 2px;
}
.auth-invalid-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff1f3;
    color: var(--auth-primary);
    display: grid;
    place-items: center;
    font-size: 22px;
}
.auth-invalid p { margin: 0 0 16px; color: var(--auth-muted); font-size: 12.5px; line-height: 1.55; }
@media (max-width: 520px) {
    body { padding: 16px 12px; align-items: flex-start; }
    .auth-card { margin-top: 3vh; padding: 26px 20px 22px; border-radius: 15px; }
    .auth-brand { min-height: 50px; margin-bottom: 10px; }
    .auth-brand img { max-width: 196px; max-height: 50px; }
    .auth-brand-fallback { font-size: 26px; }
    .auth-brand-fallback i { font-size: 29px; }
    .auth-title { font-size: 24px; }
    .auth-subtitle { font-size: 12.5px; margin-bottom: 20px; }
}
