/* ==========================================================
 * Genealogic Login / Register Page
 * ======================================================== */

/* ── Page Layout ───────────────────────────────────────── */
.glp-login-page {
    display: flex;
    min-height: calc(100vh - 60px);
    font-family: var(--genealogic-font, 'Plus Jakarta Sans', sans-serif);
    background: #f8f9fb;
}

.glp-login-page-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
}

.glp-login-inner {
    width: 100%;
    max-width: 440px;
}

.glp-login-page-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #dbe4ee 100%);
}

.glp-login-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100vh;
}

/* ── Tabs ──────────────────────────────────────────────── */
.glp-login-tabs {
    display: flex;
    background: #f0f2f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 36px;
}

.glp-login-tab {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.glp-login-tab:hover {
    color: #374151;
}

.glp-login-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Title & Subtitle ──────────────────────────────────── */
.glp-login-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
}

.glp-login-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 32px 0;
}

/* ── Form Fields ───────────────────────────────────────── */
.glp-login-field {
    margin-bottom: 20px;
}

.glp-login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.glp-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.glp-login-input-wrap > i:first-child {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.glp-login-input-wrap input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.glp-login-input-wrap input::placeholder {
    color: #9ca3af;
}

.glp-login-input-wrap input:focus {
    border-color: var(--genealogic-primary, #D74709);
    box-shadow: 0 0 0 4px rgba(215, 71, 9, 0.08);
}

/* Validation states */
.glp-login-check {
    position: absolute;
    right: 14px;
    color: #22c55e;
    font-size: 16px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    pointer-events: none;
}

.glp-login-input-wrap.is-valid .glp-login-check {
    opacity: 1;
    transform: scale(1);
}

.glp-login-input-wrap.is-invalid input {
    border-color: #ef4444;
}
.glp-login-input-wrap.is-invalid input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

/* Password toggle */
.glp-login-toggle-pw {
    position: absolute;
    right: 14px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.15s;
    z-index: 1;
}
.glp-login-toggle-pw:hover {
    color: #6b7280;
}

/* ── Messages ──────────────────────────────────────────── */
.glp-login-message {
    margin-bottom: 16px;
    padding: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    text-align: center;
}

.glp-login-message.is-error {
    display: block;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.glp-login-message.is-success {
    display: block;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

/* ── Primary Button ────────────────────────────────────── */
.glp-login-btn-primary {
    width: 100%;
    padding: 16px 24px !important;
    background: var(--genealogic-primary, #D74709) !important;
    background-color: var(--genealogic-primary, #D74709) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background-image: none !important;
    box-shadow: none !important;
}

.glp-login-btn-primary:hover {
    background: var(--genealogic-primary-hover, #c03d07) !important;
    background-color: var(--genealogic-primary-hover, #c03d07) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 71, 9, 0.25) !important;
}

.glp-login-btn-primary:active {
    transform: translateY(0);
}

.glp-login-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Divider ───────────────────────────────────────────── */
.glp-login-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    gap: 16px;
}

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

.glp-login-divider span {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Social Buttons ────────────────────────────────────── */
.glp-login-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.glp-login-social-btn {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    border: 1.5px solid #e5e7eb !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    cursor: not-allowed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    opacity: 0.7;
    padding: 0 !important;
    box-shadow: none !important;
    min-width: auto !important;
}

.glp-login-social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    opacity: 1;
}

.glp-login-social-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Footer Text ───────────────────────────────────────── */
.glp-login-footer-text {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.glp-login-footer-text a,
.glp-login-tab-link {
    color: var(--genealogic-primary, #D74709);
    font-weight: 600;
    text-decoration: none;
}

.glp-login-footer-text a:hover,
.glp-login-tab-link:hover {
    text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
    .glp-login-page-image {
        display: none;
    }
    .glp-login-page {
        justify-content: center;
    }
    .glp-login-page-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .glp-login-page-form {
        padding: 24px 20px;
    }
    .glp-login-title {
        font-size: 24px;
    }
    .glp-login-tabs {
        margin-bottom: 28px;
    }
    .glp-login-btn-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
}
