/**
 * Vinathis CMS – Auth Module Shared Stylesheet v2.0
 * Consistent, modern auth forms across all themes.
 * Included via <link> tag in each theme's header.php.
 */

/* ── Google Font ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Auth Page Wrapper ────────────────────────── */
.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--gray-50, #f8fafc);
    font-family: 'Inter', var(--font-primary, sans-serif);
}

/* ── Auth Card ────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .10), 0 1px 4px rgba(0, 0, 0, .06);
    overflow: hidden;
}

/* ── Card Header Band ─────────────────────────── */
.auth-card-head {
    background: linear-gradient(135deg, var(--primary, #2563eb) 0%, var(--primary-dark, #1d4ed8) 100%);
    padding: 32px 28px 28px;
    text-align: center;
    color: #fff;
}

.auth-card-head .auth-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}

.auth-card-head h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.2;
}

.auth-card-head p {
    font-size: 13px;
    opacity: .85;
    margin: 0;
}

/* ── Card Body ────────────────────────────────── */
.auth-card-body {
    padding: 28px;
}

/* ── Alert / Flash ────────────────────────────── */
.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auth-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-alert ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.auth-alert ul li {
    margin-bottom: 3px;
}

/* ── Form Groups ──────────────────────────────── */
.auth-group {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-label .req {
    color: #ef4444;
    margin-left: 2px;
}

/* ── Inputs ───────────────────────────────────── */
.auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.auth-input:focus {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.auth-input.is-invalid {
    border-color: #ef4444;
}

/* ── Password Field Wrapper ───────────────────── */
.auth-pw-wrap {
    position: relative;
}

.auth-pw-wrap .auth-input {
    padding-right: 42px;
}

.auth-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}

.auth-pw-toggle:hover {
    color: var(--primary, #2563eb);
}

/* ── Password Strength Meter ──────────────────── */
.pw-strength-bar {
    height: 4px;
    border-radius: 4px;
    background: #e5e7eb;
    margin-top: 6px;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s, background-color .3s;
    width: 0;
}

.pw-strength-text {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 600;
}

/* ── Remember + Forgot Row ────────────────────── */
.auth-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: #4b5563;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-meta-row a {
    color: var(--primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.auth-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary, #2563eb);
    cursor: pointer;
}

/* ── CAPTCHA block ────────────────────────────── */
.auth-captcha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    gap: 12px;
}

.auth-captcha label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.auth-captcha .captcha-answer {
    width: 80px;
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    outline: none;
}

/* ── Submit Button ────────────────────────────── */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-dark, #1d4ed8));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .3px;
    transition: opacity .2s, transform .1s;
}

.auth-btn:hover {
    opacity: .92;
}

.auth-btn:active {
    transform: scale(.98);
}

.auth-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Footer Links ─────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #6b7280;
}

.auth-footer a {
    color: var(--primary, #2563eb);
    font-weight: 600;
    text-decoration: none;
}

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

/* ── Lockout Banner ───────────────────────────── */
.auth-lockout {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #c2410c;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-lockout i {
    font-size: 18px;
}

/* ── Divider ──────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 12px;
    color: #9ca3af;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ── Profile Card ─────────────────────────────── */
.profile-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    overflow: hidden;
    max-width: 680px;
    margin: 32px auto;
}

.profile-card-head {
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-dark, #1d4ed8));
    padding: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.profile-card-body {
    padding: 28px;
}

.profile-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

.profile-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
    transition: color .2s;
}

.profile-tab.active {
    color: var(--primary, #2563eb);
    border-bottom-color: var(--primary, #2563eb);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 480px) {
    .auth-card-head {
        padding: 24px 20px;
    }

    .auth-card-body {
        padding: 20px;
    }

    .auth-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-card {
        margin: 16px auto;
        border-radius: 12px;
    }

    .profile-card-body {
        padding: 16px;
    }
}