/* Shared styles for portal auth pages (login, password reset, email verify). */

body.auth-page,
.auth-page-body,
body:has(.auth-container) {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    background-color: #f3f4f6;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body:has(.auth-container)::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(243, 244, 246, 0.65);
    z-index: -2;
    pointer-events: none;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.12),
        0 10px 20px -8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.8);
    padding: 2.5rem 2rem;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
}

.auth-card:hover {
    transform: translateY(-2px);
}

.auth-card .form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    background-color: #fff;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 5;
    border-radius: 0.5rem;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: #4b5563;
    outline: none;
}

.password-toggle-btn:focus-visible {
    color: #4f46e5;
    box-shadow: 0 0 0 0.15rem rgba(99, 102, 241, 0.35);
}

.password-toggle-btn i {
    font-size: 1.15rem;
    pointer-events: none;
}

.auth-card .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: auto;
    padding-left: 0;
    margin: 0;
}

.auth-card .form-check [type="checkbox"],
.auth-card .form-check [type="checkbox"]:not(:checked),
.auth-card .form-check [type="checkbox"]:checked,
.auth-card .form-check-input {
    position: static !important;
    left: auto !important;
    float: none;
    width: 1.1em !important;
    height: 1.1em !important;
    margin: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 0.25em;
    background-color: #fff;
    appearance: auto;
    -webkit-appearance: auto;
    opacity: 1;
    accent-color: #4f46e5;
}

.auth-card .form-check-label {
    margin: 0 !important;
    margin-right: 0 !important;
    line-height: 1.25;
    cursor: pointer;
    padding-left: 0;
    color: #6b7280;
}

.auth-card .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.auth-card .form-check-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

.captcha-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

.captcha-wrapper .g-recaptcha {
    transform-origin: 0 0;
}

.btn-indigo {
    background: linear-gradient(to right, #4f46e5, #4338ca);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 14px -4px rgba(79, 70, 229, 0.5);
    transition: all 0.2s ease;
}

.btn-indigo:hover,
.btn-indigo:focus {
    background: linear-gradient(to right, #4338ca, #3730a3);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(79, 70, 229, 0.55);
}

.btn-indigo:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.link-indigo {
    color: #4f46e5;
    text-decoration: none;
}

.link-indigo:hover {
    color: #4338ca;
    text-decoration: underline;
}

.socialaccount_providers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem;
    margin-top: 1.5rem;
}

.socialaccount_provider a {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid #d1d5db;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: white;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.socialaccount_provider a:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}
