/* =========================================================
   MANATRICK FAMILY
   AUTHENTICATION STYLES
   Login / Register / Forgot Password / Reset Password
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* ================= AUTH HEADER ================= */

.auth-page .site-header {
    flex-shrink: 0;
}

.back-link {
    color: var(--text-muted);
    font-weight: 700;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

/* ================= AUTH MAIN ================= */

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.auth-card {
    width: min(100%, 480px);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.register-card {
    width: min(100%, 520px);
}

/* ================= AUTH HEADER ================= */

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-header h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
}

.auth-header p {
    margin: 0;
    color: var(--text-muted);
}

/* ================= FORM ================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: #fff;
    color: var(--text);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.field-help {
    color: var(--text-muted);
    font-size: 12px;
}

.field-error {
    min-height: 16px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

/* ================= PASSWORD ================= */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 76px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    border: 0;
    background: transparent;

    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
}

.password-toggle:hover {
    color: var(--primary-dark);
}

.password-strength {
    margin-top: 4px;
}

.strength-bar {
    width: 100%;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;
    background: #e2e8f0;
}

.strength-bar span {
    display: block;
    width: 0;
    height: 100%;

    border-radius: inherit;

    background: var(--primary);

    transition: width 0.25s ease;
}

.password-strength small {
    display: block;
    margin-top: 5px;

    color: var(--text-muted);
    font-size: 12px;
}

/* ================= OPTIONS ================= */

.form-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-label input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
    font-weight: 700;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

/* ================= LOGIN OPTIONS ================= */

.auth-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    margin-top: -4px;

    font-size: 13px;
}

.auth-extra a {
    color: var(--primary);
    font-weight: 700;
}

.auth-extra a:hover {
    text-decoration: underline;
}

/* ================= MESSAGES ================= */

.form-message {
    margin-bottom: 18px;
    padding: 12px 14px;

    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 600;
}

.form-message.success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.form-message.warning {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

/* ================= LOADING BUTTON ================= */

.button-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-loader::before {
    content: "";
    width: 15px;
    height: 15px;

    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;

    border-radius: 50%;

    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= DIVIDER ================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 25px 0 18px;

    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;

    height: 1px;
    background: var(--border);
}

/* ================= NOTE ================= */

.auth-note {
    margin: 20px 0 0;

    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
}

/* ================= FOOTER ================= */

.auth-footer {
    padding: 20px;
    text-align: center;
}

.auth-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

/* ================= DISABLED ================= */

.auth-form button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ================= INVALID ================= */

.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
    border-color: var(--danger);
}

.form-group input.input-success {
    border-color: var(--success);
}