/* ============================================================================
   Authentication screens — shared shell

   Used by /login, /register, /forgot-password and /reset-password so the whole
   sign-in flow shares one card, one type scale and one set of controls.
   ========================================================================== */

.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background:
        radial-gradient(900px 400px at 15% 0%, rgba(0, 49, 83, 0.07), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #eef3f8 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #e6edf5;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 1px 2px rgba(15, 43, 61, 0.04), 0 18px 48px rgba(0, 49, 83, 0.12);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.auth-logo svg,
.auth-logo img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.auth-header p {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0;
}

.icon-circle {
    width: 56px;
    height: 56px;
    background: #eaf2f8;
    color: #003153;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 1.25rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.45rem;
}

.label-row .form-label {
    margin-bottom: 0;
}

.forgot-link {
    font-size: 0.8125rem;
    color: #003153;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 0.9375rem;
    pointer-events: none;
}

.input-wrapper .form-input {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toggle-password:hover {
    color: #003153;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.95rem;
    font-size: 0.9375rem;
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #003153;
    box-shadow: 0 0 0 3px rgba(0, 49, 83, 0.12);
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.password-hint {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.checkbox-group {
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #4a5568;
    line-height: 1.45;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 2px;
    width: 17px;
    height: 17px;
    accent-color: #003153;
    flex-shrink: 0;
}

.checkbox-label a {
    color: #003153;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: #003153;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: #004570;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 49, 83, 0.22);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.w-full {
    width: 100%;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e6edf5;
}

.divider span {
    padding: 0 1rem;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-social:hover:not(:disabled) {
    border-color: #003153;
    background: #f8fafc;
}

.btn-social:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: #64748b;
}

.auth-footer a {
    color: #003153;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 500;
}

.back-link:hover {
    color: #003153;
}

.success-message {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem;
}

.success-message h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.success-message p {
    color: #64748b;
    font-size: 0.9375rem;
}

.validation-alert {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
}

.validation-alert i {
    font-size: 1rem;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.role-option:hover {
    border-color: #9fb9cf;
}

.role-option input {
    display: none;
}

.role-option i {
    font-size: 1.5rem;
    color: #94a3b8;
}

.role-option span {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a2e;
}

.role-option small {
    font-size: 0.72rem;
    color: #94a3b8;
}

.role-option.selected {
    border-color: #003153;
    background: #eef4f9;
}

.role-option.selected i,
.role-option.selected span {
    color: #003153;
}

.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .name-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 1.75rem 1.35rem;
        border-radius: 16px;
    }
}
