.public-auth-page {
    background:
        radial-gradient(circle at top left, rgba(26, 95, 180, 0.16), transparent 28%),
        linear-gradient(180deg, #f4f9ff 0%, #eef7f1 100%);
}

.public-auth-main {
    padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.public-auth-shell {
    width: min(100%, 72rem);
    margin: 0 auto;
}

.public-auth-shell--compact {
    max-width: 34rem;
}

.public-auth-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    padding: clamp(1.5rem, 4vw, 3rem);
    backdrop-filter: blur(18px);
}

.public-auth-card--status {
    text-align: center;
}

.public-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.25rem;
}

.public-auth-logo img {
    width: auto;
    height: 3rem;
    border-radius: 0.9rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.public-auth-header {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.public-auth-header h1,
.public-auth-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.7rem, 3.5vw, 2.3rem);
    line-height: 1.15;
}

.public-auth-header p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.public-auth-alert {
    border-radius: 1rem;
    border: 1px solid transparent;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.55;
}

.public-auth-alert ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.public-auth-alert--success {
    background: #ecfdf3;
    border-color: #86efac;
    color: #166534;
}

.public-auth-alert--error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.public-auth-alert--info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.public-auth-alert--warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.public-auth-form {
    display: grid;
    gap: 1.1rem;
}

.public-auth-field {
    display: grid;
    gap: 0.55rem;
}

.public-auth-field label {
    color: #0f172a;
    font-weight: 600;
}

.public-auth-input,
.public-auth-select {
    width: 100%;
    min-height: 3.15rem;
    padding: 0.9rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.95rem;
    font: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.public-auth-input:focus,
.public-auth-select:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.public-auth-password-wrap {
    position: relative;
}

.public-auth-password-wrap .public-auth-input {
    padding-right: 3rem;
}

.public-auth-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
}

.public-auth-toggle:hover,
.public-auth-toggle:focus-visible {
    color: #1d4ed8;
    outline: none;
}

.public-auth-button,
.public-auth-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.2rem;
    padding: 0.9rem 1.35rem;
    border-radius: 0.95rem;
    border: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.public-auth-button {
    width: 100%;
    background: linear-gradient(135deg, #1d4ed8, #16a34a);
    color: #fff;
    box-shadow: 0 14px 30px rgba(29, 78, 216, 0.2);
}

.public-auth-button:hover,
.public-auth-button:focus-visible,
.public-auth-link-button:hover,
.public-auth-link-button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.public-auth-button:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.public-auth-link-button {
    background: #fff;
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.18);
}

.public-auth-link-button--ghost {
    background: transparent;
    border-color: #cbd5e1;
    color: #0f172a;
}

.public-auth-meta {
    margin-top: 1.4rem;
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    text-align: center;
    color: #475569;
}

.public-auth-meta a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

.public-auth-meta a:hover,
.public-auth-meta a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.public-auth-status-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.14);
}

.public-auth-status-icon--success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.public-auth-status-icon--warning {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.public-auth-status-icon--error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.public-auth-status-icon--info {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.public-auth-status-panel {
    margin: 1.5rem 0;
    border-radius: 1.15rem;
    padding: 1.15rem 1.2rem;
    text-align: left;
    line-height: 1.6;
}

.public-auth-status-panel strong {
    color: inherit;
}

.public-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.public-auth-actions .public-auth-link-button {
    flex: 1 1 14rem;
}

.public-auth-strength {
    display: grid;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: #475569;
}

.public-auth-strength-bar {
    width: 100%;
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.public-auth-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.public-auth-requirements {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.6rem;
    font-size: 0.88rem;
    color: #64748b;
}

.public-auth-requirement {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.public-auth-requirement.is-met {
    color: #166534;
}

.public-auth-match {
    font-size: 0.9rem;
    margin-top: 0.4rem;
    min-height: 1.2rem;
}

.public-auth-match--ok {
    color: #166534;
}

.public-auth-match--error {
    color: #b91c1c;
}

.public-auth-support {
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

.public-auth-support p {
    margin: 0.25rem 0;
}

.public-auth-copy {
    color: #475569;
}

@media (max-width: 47.99rem) {
    .public-auth-actions {
        flex-direction: column;
    }

    .public-auth-actions .public-auth-link-button {
        width: 100%;
    }
}
