:root {
    --public-auth-navy: #172235;
    --public-auth-blue: #3498db;
    --public-auth-blue-dark: #2176ae;
    --public-auth-text: #172235;
    --public-auth-muted: #6b778c;
    --public-auth-border: #dce3eb;
}

*, *::before, *::after { box-sizing: border-box; }

.public-auth-page {
    min-height: 100vh;
    margin: 0;
    padding: 36px 20px 24px;
    overflow-x: hidden;
    background: var(--public-auth-navy);
    color: var(--public-auth-text);
    font-family: Poppins, sans-serif;
}

.public-auth-page::before,
.public-auth-page::after {
    position: fixed;
    z-index: 0;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.public-auth-page::before { top: -135px; right: -90px; }
.public-auth-page::after { bottom: -165px; left: -100px; }

.public-auth-wrapper {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    margin: 0 auto;
}
.public-auth-register .public-auth-wrapper { width: min(100%, 830px); }
.public-auth-compact .public-auth-wrapper { width: min(100%, 700px); }

.public-auth-brand {
    margin-bottom: 24px;
    text-align: center;
}
.public-auth-brand-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.public-auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}
.public-auth-brand-name {
    color: #fff;
    font-size: clamp(1.85rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
}
.public-auth-brand-subtitle {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 16px;
}

.public-auth-card {
    width: 100%;
    padding: 44px 48px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(4, 13, 28, .28);
    animation: authFadeUp .38s ease-out both;
}
.public-auth-page .auth-heading {
    margin: 0 0 8px;
    color: var(--public-auth-text);
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 700;
    text-align: center;
}
.public-auth-page .auth-subtitle {
    max-width: 590px;
    margin: 0 auto 30px;
    color: var(--public-auth-muted);
    font-size: 16px;
    line-height: 1.65;
    text-align: center;
}
.public-auth-page .form-label {
    margin-bottom: 8px;
    color: var(--public-auth-text);
    font-size: 14px;
    font-weight: 600;
}
.public-auth-page .form-control,
.public-auth-page .form-select {
    display: block;
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--public-auth-border);
    border-radius: 9px;
    color: var(--public-auth-text);
    font-size: 16px;
    box-shadow: none;
}
.public-auth-page .form-select { padding: 12px 42px 12px 15px; }
.public-auth-page .auth-input .form-control {
    height: 56px;
    padding-left: 44px;
    padding-right: 48px;
}
.public-auth-page .form-control:focus,
.public-auth-page .form-select:focus {
    border-color: var(--public-auth-blue);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, .14);
}
.public-auth-page .form-text,
.public-auth-page .invalid-feedback { font-size: 13px; }
.public-auth-page form > .mb-3 { margin-bottom: 20px !important; }
.public-auth-page form,
.public-auth-page form > .mb-3,
.public-auth-page .auth-input {
    width: 100%;
    max-width: none;
}

.public-auth-page .auth-primary,
.public-auth-page .auth-secondary,
.public-auth-page .public-auth-action {
    display: inline-flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 9px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.public-auth-page .auth-primary,
.public-auth-page .public-auth-action-primary {
    border: 1px solid var(--public-auth-blue);
    background: var(--public-auth-blue);
    color: #fff;
}
.public-auth-page .auth-primary:hover,
.public-auth-page .public-auth-action-primary:hover {
    border-color: var(--public-auth-blue-dark);
    background: var(--public-auth-blue-dark);
    color: #fff;
    box-shadow: 0 8px 22px rgba(52, 152, 219, .24);
    transform: translateY(-1px);
}
.public-auth-page .auth-secondary,
.public-auth-page .public-auth-action-secondary {
    margin-top: 10px;
    border: 1px solid var(--public-auth-border);
    background: #fff;
    color: #556274;
}
.public-auth-page .auth-secondary:hover,
.public-auth-page .public-auth-action-secondary:hover {
    border-color: #b9c4d0;
    background: #f7f9fb;
    color: var(--public-auth-text);
}
.public-auth-page .auth-primary:disabled { opacity: .65; cursor: wait; transform: none; }

.public-auth-page .auth-alert,
.public-auth-page .auth-info {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 16px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.55;
}
.public-auth-page .auth-alert i,
.public-auth-page .auth-info i { flex: 0 0 auto; margin-top: 3px; }
.public-auth-page .auth-info {
    margin-bottom: 22px;
    border: 1px solid #cfe8fb;
    background: #eef7ff;
    color: #315b79;
    overflow-wrap: anywhere;
}
.public-auth-footer {
    margin-top: 23px;
    color: rgba(255, 255, 255, .64);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}
.public-auth-secondary-navigation {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.public-auth-back-home {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 9px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.public-auth-back-home:hover,
.public-auth-back-home:focus-visible {
    border-color: #fff;
    background: #fff;
    color: var(--public-auth-navy);
}
.public-auth-secondary-navigation + .public-auth-footer { margin-top: 15px; }
@media (min-width: 992px) and (min-height: 760px) {
    .public-auth-login { padding-top: 22px; padding-bottom: 18px; }
    .public-auth-login .public-auth-brand { margin-bottom: 16px; }
    .public-auth-login .public-auth-card { padding-top: 32px; padding-bottom: 32px; }
    .public-auth-login form > .mb-3 { margin-bottom: 15px !important; }
    .public-auth-login .auth-subtitle { margin-bottom: 22px; }
    .public-auth-login .recaptcha-wrapper { margin-top: 14px; margin-bottom: 14px; }
    .public-auth-login .public-auth-secondary-navigation { margin-top: 12px; }
    .public-auth-login .public-auth-footer { margin-top: 12px; }
}
.public-auth-page .recaptcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    overflow: hidden;
}

.public-auth-error { text-align: center; }
.public-auth-error-code {
    margin: 0;
    color: var(--public-auth-blue);
    font-size: clamp(4rem, 12vw, 6rem);
    font-weight: 700;
    line-height: 1;
}
.public-auth-error-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}
.public-auth-error-actions .public-auth-action { margin: 0; }

@media (max-width: 767.98px) {
    .public-auth-page { padding: 28px 16px 22px; }
    .public-auth-card { padding: 34px 28px; }
    .public-auth-brand { margin-bottom: 21px; }
}
@media (max-width: 575.98px) {
    .public-auth-page { padding: 22px 16px 20px; }
    .public-auth-logo { width: 50px; height: 50px; }
    .public-auth-brand-main { gap: 11px; }
    .public-auth-brand-subtitle { font-size: 14px; }
    .public-auth-card { padding: 28px 24px; border-radius: 12px; }
    .public-auth-page .auth-subtitle { margin-bottom: 26px; font-size: 15px; }
}
@media (max-width: 390px) {
    .public-auth-page { padding-inline: 16px; }
    .public-auth-card { padding-inline: 20px; }
    .public-auth-brand-name { font-size: 1.7rem; }
    .public-auth-page .recaptcha-wrapper .g-recaptcha { transform: scale(.82); transform-origin: center; }
    .public-auth-error-actions { grid-template-columns: 1fr; }
}
