* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

/* Global Navbar Dropdowns */
.topbar .menu-dropdown {
    position: relative;
}

.topbar .dropdown-toggle {
    min-width: 130px;
}

.topbar .family-dropdown .dropdown-toggle {
    min-width: 142px;
}

.topbar .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #d8e8f3;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(16, 58, 84, 0.12);
    display: none;
    z-index: 20;
}

.topbar .dropdown-menu-right {
    left: auto;
    right: 0;
}

.topbar .menu-dropdown.open .dropdown-menu,
.topbar .menu-dropdown:focus-within .dropdown-menu {
    display: block;
}

.topbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #1b4a65;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.topbar .dropdown-item:hover {
    background: #eaf4fb;
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(31, 111, 157, 0.06);
}

.topbar .dropdown-item i {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #1f6f9d;
}

.topbar .dropdown-form {
    margin: 0;
}

.topbar .dropdown-submit {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

/* Login Page */
.page-login {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-soft: #f1f7fb;
    --text: #102133;
    --muted: #688197;
    --line: #d5e3ee;
    --primary: #219ad6;
    --primary-deep: #157eb6;
    --accent: #18b382;
    --shadow: 0 25px 60px rgba(14, 48, 73, 0.12);
    --ring: rgba(33, 154, 214, 0.2);
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 6% 10%, #dff2fb 0%, transparent 36%),
        radial-gradient(circle at 92% 88%, #dcf5eb 0%, transparent 36%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.page-login .login-shell {
    width: 100%;
    max-width: 520px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
    border: 1px solid #e8f0f6;
    animation: fade-up 0.55s ease;
}

.page-login .login-panel {
    padding: 44px 36px;
}

.page-login .login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.page-login .login-brand-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 18px;
    border: 1px solid #d4e4ef;
    background: #f7fbfe;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.page-login .login-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-login .login-brand-logo span {
    font-size: 28px;
    font-weight: 800;
    color: #1c4f70;
    text-transform: uppercase;
}

.page-login .login-brand-label {
    margin: 0 0 4px;
    color: #5e7a8f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-login .login-brand-name {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    font-family: "Sora", sans-serif;
    color: #12344a;
    word-break: break-word;
}

.page-login .panel-title {
    margin: 0 0 6px;
    font-size: 32px;
    letter-spacing: -0.01em;
}

.page-login .panel-subtitle {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.page-login .captcha-hint {
    margin: 4px 0 10px;
    color: #5f7284;
    font-size: 13px;
    font-weight: 600;
}

.page-login .captcha-field {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.page-login .captcha-widget {
    transform-origin: left top;
}

.page-login .captcha-config-error {
    margin: 0;
    color: #a6424b;
    font-size: 13px;
    font-weight: 700;
}

.page-login .captcha-mode-status {
    margin: 2px 0 10px;
    font-size: 12px;
    font-weight: 700;
}

.page-login .captcha-mode-status.is-online {
    color: #216fa1;
}

.page-login .captcha-mode-status.is-offline {
    color: #9a5a1b;
}

.page-login .captcha-mode-panel {
    margin-bottom: 6px;
}

.page-login .offline-captcha-box {
    margin: 0 0 10px;
    border-radius: 12px;
    border: 1px solid #d8e4ef;
    background: #f5f9fc;
    padding: 11px 12px;
}

.page-login .offline-captcha-question {
    display: block;
    color: #243f57;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.page-login .message-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-login .message-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 26, 40, 0.5);
    backdrop-filter: blur(3px);
}

.page-login .message-modal-card {
    position: relative;
    width: min(470px, 100%);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 0%, rgba(31, 182, 142, 0.08) 0%, transparent 44%),
        radial-gradient(circle at 0% 0%, rgba(33, 154, 214, 0.09) 0%, transparent 42%),
        #ffffff;
    border: 1px solid #d4e3ef;
    box-shadow: 0 28px 65px rgba(12, 46, 67, 0.28);
    padding: 0 0 18px;
    overflow: hidden;
}

.page-login .login-message-modal-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(110deg, var(--primary), var(--accent));
}

.page-login .login-modal-hero {
    position: relative;
    margin-bottom: 8px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #d7e6f0;
    background: linear-gradient(150deg, rgba(33, 154, 214, 0.1), rgba(24, 179, 130, 0.07));
    text-align: left;
}

.page-login .login-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #c8d9e6;
    background: #ffffff;
    color: #3a5f77;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.page-login .login-modal-close:hover {
    border-color: #a8c3d6;
    color: #1c425a;
    background: #f3f8fc;
}

.page-login .login-modal-icon-wrap {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.page-login .login-modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0;
    display: grid;
    place-items: center;
    color: #207cae;
    background: linear-gradient(170deg, #eef8ff, #e6f6ef);
    border: 1px solid #c9deed;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.page-login .login-modal-icon svg {
    width: 24px;
    height: 24px;
}

.page-login .login-modal-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 800;
    color: #1d6a95;
    border: 1px solid #b9d8eb;
    background: #edf7fd;
}

.page-login .login-message-modal-card h4 {
    margin: 14px 0 5px;
    text-align: left;
    font-size: 22px;
    font-family: "Sora", sans-serif;
    color: #113b54;
}

.page-login .login-modal-subtitle {
    margin: 0;
    text-align: left;
    color: #5a7385;
    font-size: 13px;
    font-weight: 600;
}

.page-login .message-modal-body {
    display: grid;
    gap: 9px;
    margin: 0 0 6px;
    padding: 0 16px;
}

.page-login .message-modal-text {
    margin: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
    padding: 10px 11px;
    border-radius: 11px;
}

.page-login .message-modal-text.is-error {
    color: #8c3a43;
    border: 1px solid #efc6cc;
    background: linear-gradient(135deg, #fff4f6, #fff9fb);
}

.page-login .login-modal-error-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    background: #d25764;
}

.page-login #flashMessageOkBtn {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 170px;
    border-radius: 11px;
    height: 42px;
    font-size: 14px;
    font-weight: 800;
}

.page-login .login-modal-actions {
    padding: 6px 16px 0;
}

.page-login .login-modal-ok-btn {
    background: linear-gradient(120deg, #1f90cf, #1fb68e);
    box-shadow: 0 10px 24px rgba(23, 129, 146, 0.24);
}

.page-login .login-modal-ok-btn:hover {
    filter: brightness(1.04);
}

.page-login .login-email-change-modal .message-modal-backdrop {
    background: rgba(10, 31, 46, 0.44);
    backdrop-filter: blur(2px);
}

.page-login .login-email-change-modal-card {
    width: min(430px, 100%);
    border-radius: 18px;
    border: 1px solid #d4e5f1;
    box-shadow: 0 26px 60px rgba(10, 38, 56, 0.25);
    padding: 22px 20px 18px;
    text-align: center;
    background: #ffffff;
}

.page-login .login-email-change-modal-card h4 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #11374d;
    font-family: "Sora", sans-serif;
}

.page-login .login-email-change-modal .message-modal-body {
    margin-bottom: 16px;
    padding: 0;
    display: block;
}

.page-login .login-email-change-modal .message-modal-text {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9a3f48;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
    display: block;
}

.page-login .login-email-change-modal .message-modal-text + .message-modal-text {
    margin-top: 7px;
}

.page-login .login-email-change-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    background: #fceef0;
    color: #b83e4b;
    border: 1px solid #f2cfd4;
}

.page-login .login-email-change-modal-actions {
    display: flex;
    justify-content: center;
}

.page-login .login-email-change-modal-ok-btn {
    min-width: 130px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(120deg, #1f8cff, #2f6dff);
    box-shadow: 0 10px 24px rgba(31, 124, 255, 0.3);
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.page-login .login-email-change-modal-ok-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.page-login .login-email-change-modal-ok-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(47, 109, 255, 0.24),
        0 10px 24px rgba(31, 124, 255, 0.3);
}

.page-login .message-modal.is-open .message-modal-backdrop {
    animation: modal-fade-in 0.2s ease forwards;
}

.page-login .message-modal.is-open .message-modal-card {
    animation: modal-fade-in-up 0.22s ease forwards;
}

.page-login .message-modal.is-closing .message-modal-backdrop {
    animation: modal-fade-out 0.2s ease forwards;
}

.page-login .message-modal.is-closing .message-modal-card {
    animation: modal-fade-out-down 0.2s ease forwards;
}

.page-login .alert-box {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #f4cdd0;
    background: #fff5f5;
}

.page-login .alert-box p {
    margin: 4px 0;
    color: #a6424b;
    font-size: 13px;
    font-weight: 700;
}

.page-login .field {
    margin-bottom: 15px;
}

.page-login .field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.page-login .field input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0 13px;
    font-size: 14px;
    outline: none;
    transition: 0.2s border-color, 0.2s box-shadow;
    background: #fbfdff;
}

.page-login .field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

.page-login .password-wrap {
    position: relative;
}

.page-login .password-wrap input {
    padding-right: 46px;
}

.page-login .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4d6d83;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-login .password-toggle svg {
    width: 20px;
    height: 20px;
}

.page-login .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 21px;
    gap: 12px;
}

.page-login .remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.page-login .remember input {
    margin: 0;
}

.page-login .forgot {
    font-size: 13px;
    color: var(--primary-deep);
    text-decoration: none;
    font-weight: 700;
}

.page-login .forgot:hover {
    text-decoration: underline;
}

.page-login .btn-login {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(110deg, var(--primary), var(--accent));
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease;
}

.page-login .btn-login:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.page-login .social-divider {
    margin: 16px 0 14px;
    position: relative;
    text-align: center;
}

.page-login .social-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #d9e6f0;
    transform: translateY(-50%);
}

.page-login .social-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 10px;
    background: #ffffff;
    color: #6a8196;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-login .social-auth-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.page-login .btn-google-login,
.page-login .btn-username-login,
.page-login .btn-otp-login {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #d3e1eb;
    background: #ffffff;
    color: #21384d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-login .btn-google-login svg,
.page-login .btn-username-login svg,
.page-login .btn-otp-login svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.page-login .btn-username-login svg,
.page-login .btn-otp-login svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-login .btn-google-login:hover,
.page-login .btn-username-login:hover,
.page-login .btn-otp-login:hover {
    transform: translateY(-1px);
    border-color: #bdd1de;
    box-shadow: 0 8px 18px rgba(16, 47, 68, 0.08);
}

.page-login .btn-username-login:focus-visible,
.page-login .btn-otp-login:focus-visible {
    outline: none;
    border-color: #bdd1de;
    box-shadow: 0 0 0 3px rgba(33, 154, 214, 0.2);
}

@media (max-width: 520px) {
    .page-login .social-auth-row {
        grid-template-columns: 1fr;
    }
}

.page-login .social-login-note {
    margin: 9px 0 0;
    color: #5e768a;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
}

.page-login .panel-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    font-weight: 600;
}

.page-login .alert-success-soft {
    border: 1px solid #c7efd9;
    background: #ecfbf4;
}

.page-login .alert-success-soft p {
    color: #1c7b52;
}

.page-login .inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-login .auth-shell {
    max-width: 560px;
}

.page-login .email-change-success-shell {
    max-width: 620px;
}

.page-login .email-change-success-panel {
    text-align: center;
}

.page-login .email-change-success-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    background: #e7faef;
    border: 1px solid #c9efd8;
    color: #1d8459;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.page-login .email-change-success-summary {
    margin-top: 14px;
    padding: 14px 14px 12px;
    border-radius: 14px;
}

.page-login .email-change-success-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(28, 123, 82, 0.26);
}

.page-login .email-change-success-row:last-of-type {
    margin-bottom: 8px;
}

.page-login .email-change-success-row span {
    color: #2f6f52;
    font-size: 13px;
    font-weight: 700;
}

.page-login .email-change-success-row strong {
    color: #0f5133;
    font-size: 13px;
    font-weight: 800;
    max-width: 64%;
    text-align: right;
    word-break: break-word;
}

.page-login .email-change-success-countdown {
    margin: 4px 0 0;
    color: #1b6d48;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.page-login .email-change-success-countdown span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    margin: 0 3px;
    background: #d1f1dd;
    color: #156942;
    font-weight: 800;
}

.page-login .email-change-success-btn {
    margin-top: 10px;
}

@media (max-width: 640px) {
    .page-login .email-change-success-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-login .email-change-success-row strong {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 430px) {
    .page-login .login-brand {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .page-login .login-brand-logo {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        border-radius: 14px;
    }

    .page-login .login-brand-logo span {
        font-size: 22px;
    }

    .page-login .login-brand-name {
        font-size: 18px;
    }

    .page-login .captcha-widget {
        transform: scale(0.88);
    }

    .page-login .captcha-field {
        min-height: 72px;
    }

    .page-login .message-modal {
        padding: 16px;
    }

    .page-login .message-modal-card {
        border-radius: 20px;
    }

    .page-login .login-modal-hero {
        padding: 18px 16px 12px;
    }

    .page-login .login-modal-icon-wrap {
        gap: 8px;
    }

    .page-login .login-modal-icon {
        width: 45px;
        height: 45px;
    }

    .page-login .login-modal-icon svg {
        width: 22px;
        height: 22px;
    }

    .page-login .login-modal-badge {
        font-size: 10px;
        min-height: 24px;
        padding: 0 9px;
    }

.page-login .login-message-modal-card h4 {
    font-size: 18px;
}

/* Live Location Page Navbar */
.page-live-location {
    --bg: #f5f8fb;
    --surface: #ffffff;
    --text: #102133;
    --muted: #678196;
    --line: #d8e5ef;
    --primary: #1f9ad6;
    --primary-soft: #ddf1fa;
    --accent: #17b67f;
    --accent-soft: #dcf7ee;
    --shadow: 0 16px 40px rgba(17, 56, 82, 0.08);
    --radius-xl: 24px;
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 90% 10%, #e4f8f1 0%, transparent 35%),
        radial-gradient(circle at 0% 0%, #e5f2fb 0%, transparent 40%),
        var(--bg);
}

.page-live-location .page-navbar-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 15px 0;
    box-sizing: border-box;
}

.page-live-location .topbar {
    background: var(--surface);
    border: 1px solid #edf3f8;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    position: sticky;
    top: 12px;
    z-index: 10;
}

.page-live-location .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-live-location .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    font-family: "Sora", sans-serif;
    overflow: hidden;
}

.page-live-location .brand-mark.has-logo {
    background: transparent;
    width: auto;
    height: auto;
    overflow: visible;
}

.page-live-location .brand-mark a {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.page-live-location .brand-mark.has-logo a {
    display: flex;
    align-items: center;
}

.page-live-location .brand-logo {
    width: auto;
    height: 42px;
    max-width: 180px;
    border-radius: 0;
    object-fit: contain;
    display: block;
}

.page-live-location .brand h1 {
    margin: 0;
    font-size: 18px;
    font-family: "Sora", sans-serif;
    font-weight: 700;
}

.page-live-location .actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-live-location .menu-dropdown {
    position: relative;
}

.page-live-location .dropdown-toggle {
    min-width: 130px;
}

.page-live-location .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #d8e8f3;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(16, 58, 84, 0.12);
    display: none;
    z-index: 20;
}

.page-live-location .dropdown-menu-right {
    left: auto;
    right: 0;
}

.page-live-location .menu-dropdown.open .dropdown-menu,
.page-live-location .menu-dropdown:focus-within .dropdown-menu {
    display: block;
}

.page-live-location .dropdown-item {
    display: block;
    padding: 9px 10px;
    border-radius: 9px;
    color: #1b4a65;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.page-live-location .dropdown-item:hover {
    background: #eaf4fb;
}

.page-live-location .dropdown-form {
    margin: 0;
}

.page-live-location .dropdown-submit {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.page-live-location .btn {
    border: 0;
    height: 40px;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.page-live-location .btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--primary), #35b0df);
}

.page-live-location .btn-soft {
    color: #0f5f7b;
    background: var(--primary-soft);
}

.page-live-location .btn-ghost {
    color: #1f4a63;
    background: #eaf2f8;
}

@media (max-width: 760px) {
    .page-live-location .page-navbar-shell {
        padding: 8px 8px 0;
    }

    .page-live-location .topbar {
        width: 100%;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .page-live-location .actions {
        flex-wrap: wrap;
    }
}
}

/* Final login card override - single card layout */
body.page-login {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 14%, rgba(33, 154, 214, 0.18), transparent 30%),
        radial-gradient(circle at 86% 16%, rgba(24, 179, 130, 0.14), transparent 26%),
        linear-gradient(160deg, #edf7fb 0%, #fbfdff 44%, #edf8f2 100%);
}

body.page-login main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 22px;
}

.page-login .login-shell {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.page-login .login-card {
    display: block !important;
    width: 100%;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(210, 225, 236, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 70px rgba(11, 43, 59, 0.12);
}

.page-login .login-card-body {
    padding: 36px 36px 32px;
}

.page-login .login-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 28px;
}

.page-login .login-brand-logo {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: 18px;
    border: 1px solid #cfe0eb;
    background: #f8fbfe;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 10px 22px rgba(8, 32, 48, 0.08);
}

.page-login .login-brand-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 10px;
}

.page-login .login-brand-initial {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #17384e;
    font-family: "Sora", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-login .login-brand-copy p {
    margin: 0 0 4px;
    color: #111111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.page-login .login-brand-copy h1 {
    margin: 0;
    color: #111111;
    font-family: "Sora", sans-serif;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-login .login-panel-head {
    display: none;
}

.page-login .login-form {
    display: grid;
    gap: 14px;
}

body.page-login .login-card .login-field {
    display: block !important;
    margin: 0 !important;
}

.page-login .login-field label {
    display: block;
    margin: 0 0 7px;
    color: #17384e;
    font-size: 13px;
    font-weight: 800;
}

.page-login .login-input {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    border: 1px solid #d4e0ea;
    background: linear-gradient(180deg, #fcfeff, #f8fbfd);
    padding: 0 14px;
    color: #102d41;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.page-login .login-input:focus {
    border-color: #21a2da;
    box-shadow: 0 0 0 4px rgba(33, 154, 214, 0.16);
    background: #ffffff;
}

.page-login .login-password-field {
    position: relative;
}

.page-login .login-password-field .login-input {
    padding-right: 48px;
}

.page-login .login-password-toggle {
    top: 50%;
    transform: translateY(calc(-50% + 11px));
}

.page-login .login-utility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-login .login-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #385066;
    font-size: 13px;
    font-weight: 700;
}

.page-login .login-link-inline,
.page-login .login-back-link {
    color: #146f9c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.page-login .btn-login {
    width: 100%;
    height: 58px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(115deg, #2b9fd8 0%, #21b892 100%);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(24, 130, 142, 0.22);
}

.page-login .login-divider {
    margin: 18px 0 16px;
}

.page-login .login-shortcuts {
    gap: 12px;
}

.page-login .login-shortcut {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid #d3e0ea;
    font-size: 15px;
    font-weight: 800;
}

.page-login .login-note {
    margin-top: 16px;
    color: #6f8394;
    text-align: center;
}

@media (max-width: 520px) {
    body.page-login main {
        padding: 18px 12px;
    }

    .page-login .login-card {
        border-radius: 24px;
    }

    .page-login .login-card-body {
        padding: 22px 18px 20px;
    }

    .page-login .login-brand {
        gap: 12px;
        margin-bottom: 12px;
    }

    .page-login .login-brand-logo {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
    }

    .page-login .login-brand-copy h1 {
        font-size: 24px;
    }

    .page-login .login-shortcuts {
        grid-template-columns: 1fr;
    }

    .page-login .login-utility-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-login .login-shortcut {
        min-height: 48px;
    }
}

body.page-login .login-brand-copy p,
body.page-login .login-brand-copy h1 {
    color: #111111 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.page-login .method-switch {
    margin-bottom: 16px;
    padding: 4px;
    background: #eef4f8;
    border: 1px solid #d5e3ee;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.page-login .method-btn {
    height: 38px;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #4d6579;
    background: transparent;
    cursor: pointer;
    transition: 0.2s ease;
}

.page-login .method-btn.is-active {
    color: #ffffff;
    background: linear-gradient(110deg, var(--primary), var(--accent));
}

.page-login .auth-panel {
    display: none;
}

.page-login .auth-panel.is-active {
    display: block;
}

.page-login .phone-send-form {
    margin-bottom: 12px;
}

.page-login .phone-otp-form {
    border-top: 1px dashed rgba(107, 114, 128, 0.35);
    padding-top: 12px;
}

.page-login .otp-note {
    margin: 0 0 10px;
    font-size: 12px;
    color: #4b5563;
}

.page-login .auth-row-spaced {
    margin-top: 10px;
}

.page-login .otp-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.page-login .otp-modal.is-visible {
    display: flex;
}

.page-login .otp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    opacity: 0;
    animation: otpFadeIn 0.26s ease forwards;
}

.page-login .otp-modal-dialog {
    position: relative;
    width: min(92%, 420px);
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 20px;
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.24);
    opacity: 0;
    transform: translateY(10px);
    animation: otpFadeInUp 0.28s ease forwards;
}

.page-login .otp-modal.fade-out .otp-modal-backdrop {
    animation: otpFadeOut 0.22s ease forwards;
}

.page-login .otp-modal.fade-out .otp-modal-dialog {
    animation: otpFadeOutDown 0.24s ease forwards;
}

.page-login .otp-modal-dialog h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111827;
}

.page-login .otp-modal-dialog p {
    margin: 0 0 16px;
    color: #374151;
    font-size: 14px;
    line-height: 1.45;
}

@keyframes otpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes otpFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes otpFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes otpFadeOutDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}

/* Family Tree Page */
.page-family-tree {
    --bg: #f5f8fb;
    --surface: #ffffff;
    --text: #102133;
    --muted: #678196;
    --line: #d8e5ef;
    --tree-link: #8cbddc;
    --tree-link-width: 2px;
    --tree-link-overlap: 3px;
    --tree-link-fuse: 2px;
    --tree-link-height: 38px;
    --partner-link-y: 92px;
    --tree-level-gap: 40px;
    --partner-gap: 20px;
    --member-card-width: 170px;
    --tree-display-base-zoom: 0.64;
    --primary: #1f9ad6;
    --primary-soft: #ddf1fa;
    --accent: #17b67f;
    --accent-soft: #dcf7ee;
    --shadow: 0 16px 40px rgba(17, 56, 82, 0.08);
    --shadow-hover: 0 22px 48px rgba(17, 56, 82, 0.16);
    --radius-xl: 24px;
    --radius-md: 16px;
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 90% 10%, #e4f8f1 0%, transparent 35%),
        radial-gradient(circle at 0% 0%, #e5f2fb 0%, transparent 40%),
        var(--bg);
}

.page-family-tree .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 18px 48px;
}

.page-management-data-master .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-data-master .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-users .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-users .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-activity-log .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-activity-log .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-recycle-bin .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-recycle-bin .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-backup-database .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-backup-database .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-permission .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-permission .management-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-management-setting .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-setting .settings-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.page-management-setting {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.page-management-setting main {
    flex: 1 0 auto;
}

body.page-management-setting .site-footer {
    margin-top: auto;
}

.page-management-console .wrapper {
    max-width: none;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-management-console .console-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.page-family-tree .page-navbar-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 15px 0;
    box-sizing: border-box;
}

.page-family-tree .topbar {
    background: var(--surface);
    border: 1px solid #edf3f8;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    position: sticky;
    top: 12px;
    z-index: 10;
}

.page-family-tree .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-family-tree .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    font-family: "Sora", sans-serif;
    overflow: hidden;
}

.page-family-tree .brand-mark.has-logo {
    background: transparent;
    width: auto;
    height: auto;
    overflow: visible;
}

.page-family-tree .brand-mark a {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.page-family-tree .brand-mark.has-logo a {
    display: flex;
    align-items: center;
}

.page-family-tree .brand-logo {
    width: auto;
    height: 42px;
    max-width: 180px;
    border-radius: 0;
    object-fit: contain;
    display: block;
}

.page-family-tree .brand h1 {
    margin: 0;
    font-size: 18px;
    font-family: "Sora", sans-serif;
    font-weight: 700;
}

.page-family-tree .brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.page-family-tree .actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-family-tree .menu-dropdown {
    position: relative;
}

.page-family-tree .family-dropdown .dropdown-toggle {
    min-width: 142px;
}

.page-family-tree .dropdown-toggle {
    min-width: 130px;
}

.page-family-tree .family-dropdown .dropdown-menu {
    width: min(280px, calc(100vw - 24px));
    min-width: 240px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(216, 232, 243, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 22px 42px rgba(16, 58, 84, 0.16);
    overflow: hidden;
}

.page-family-tree .family-dropdown .dropdown-header {
    padding: 4px 10px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(27, 74, 101, 0.08);
}

.page-family-tree .family-dropdown .dropdown-header span {
    display: block;
    color: #13384f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-family-tree .family-dropdown .dropdown-header small {
    display: block;
    margin-top: 3px;
    color: #6b8193;
    font-size: 12px;
    line-height: 1.4;
}

.page-family-tree .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #d8e8f3;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(16, 58, 84, 0.12);
    display: none;
    z-index: 20;
}

.page-family-tree .dropdown-menu-right {
    left: auto;
    right: 0;
}

.page-family-tree .menu-dropdown.open .dropdown-menu {
    display: block;
}

.page-family-tree .menu-dropdown:focus-within .dropdown-menu {
    display: block;
}

.page-family-tree .family-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #1b4a65;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.page-family-tree .family-dropdown .dropdown-item i {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    padding: 7px;
    border-radius: 10px;
    background: rgba(31, 111, 157, 0.08);
    color: #1f6f9d;
}

.page-family-tree .family-dropdown .dropdown-item span {
    line-height: 1.2;
}

.page-family-tree .family-dropdown .dropdown-item:hover {
    background: #eaf4fb;
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(31, 111, 157, 0.06);
}

.page-family-tree .family-dropdown .dropdown-item.is-active {
    background: linear-gradient(135deg, rgba(54, 144, 206, 0.16), rgba(54, 144, 206, 0.07));
    color: #0f4f75;
}

.page-family-tree .family-dropdown .dropdown-item.is-active i {
    color: #0f4f75;
    background: rgba(15, 79, 117, 0.1);
}

.page-family-tree .dropdown-form {
    margin: 0;
}

.page-family-tree .dropdown-submit {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

@media (max-width: 767px) {
    .page-family-tree .actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .page-family-tree .family-dropdown .dropdown-menu {
        width: min(320px, calc(100vw - 18px));
        right: 0;
        left: auto;
    }

    .page-family-tree .family-dropdown .dropdown-item {
        padding: 11px 12px;
    }
}

.page-family-tree .search {
    height: 40px;
    min-width: 240px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: 0.2s;
}

.page-family-tree .search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.14);
}

.page-family-tree .btn {
    border: 0;
    height: 40px;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.page-family-tree .btn.is-loading {
    cursor: progress;
    pointer-events: none;
    opacity: 0.92;
}

.btn-loading-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    display: inline-block;
    vertical-align: -2px;
    animation: btn-spin 0.8s linear infinite;
}

.btn-loading-text {
    display: inline-block;
    margin-left: 8px;
}

.page-family-tree .btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--primary), #35b0df);
}

.page-family-tree .btn-soft {
    color: #0f5f7b;
    background: var(--primary-soft);
}

.page-family-tree .btn-ghost {
    color: #1f4a63;
    background: #eaf2f8;
}

@keyframes btn-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.page-family-tree .user-badge {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #edf5fa;
    color: #1b4a65;
    font-size: 12px;
    font-weight: 800;
}

.page-family-tree .logout-form {
    margin: 0;
}

.page-family-tree .profile-toggle {
    min-width: 180px;
    justify-content: center;
    gap: 6px;
}

.page-family-tree .welcome-label {
    color: var(--muted);
    font-weight: 700;
}

.page-family-tree .stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.page-family-tree .stat-card {
    background: var(--surface);
    border: 1px solid #eaf1f6;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.page-family-tree .stat-card small {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
}

.page-family-tree .stat-card h2 {
    margin: 7px 0 0;
    font-size: 26px;
    line-height: 1;
    font-family: "Sora", sans-serif;
}

.page-family-tree .stat-card .last-update {
    margin-top: 12px;
    font-size: 18px;
}

.page-family-tree .panel {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: start;
}

.page-family-tree .home-page-panel.has-selected-member {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
}

.page-family-tree .home-page-panel.has-selected-member .tree-container {
    grid-column: 1;
    grid-row: 1;
}

.page-family-tree .home-page-panel.has-selected-member .detail-shell {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

.page-family-tree .tree-container {
    background: var(--surface);
    border: 1px solid #eaf1f6;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 20px;
    overflow: hidden;
    overflow-anchor: none;
}

.page-family-tree .tree-scroll {
    position: relative;
    overflow: auto;
    max-height: min(68vh, 720px);
    -ms-overflow-style: none;
    scrollbar-width: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.page-family-tree .tree-scroll.has-inline-tree-toggle {
    padding-top: 56px;
    padding-bottom: 56px;
}

.page-family-tree .tree-inline-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    margin-top: 0;
}

.page-family-tree .tree-inline-toggle-top {
    top: 12px;
}

.page-family-tree .tree-inline-toggle-bottom {
    bottom: 12px;
}

.page-family-tree .tree-inline-toggle .tree-expand-toggle {
    pointer-events: auto;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(12, 35, 53, 0.14);
}

.page-family-tree .tree-root-toggle-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0 12px;
    position: relative;
    z-index: 2;
}

.page-family-tree .tree-root-toggle-wrap .tree-expand-all-toggle {
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(12, 35, 53, 0.14);
}

.page-family-tree .tree-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.page-family-tree .tree-scroll.is-pannable {
    cursor: move;
}

.page-family-tree .tree-scroll.is-pannable * {
    cursor: move;
}

.page-family-tree .tree-scroll.is-pannable.is-dragging {
    cursor: move;
    user-select: none;
}

.page-family-tree .tree-scroll.is-pannable.is-dragging * {
    cursor: move;
}

.page-family-tree .tree-scroll.is-pannable .member-card,
.page-family-tree .tree-scroll.is-pannable .tree-see-more-btn,
.page-family-tree .tree-scroll.is-pannable .tree-expand-all-toggle {
    cursor: grab;
}

.page-family-tree .tree-scroll.is-pannable.is-dragging .member-card,
.page-family-tree .tree-scroll.is-pannable.is-dragging .tree-see-more-btn,
.page-family-tree .tree-scroll.is-pannable.is-dragging .tree-expand-all-toggle {
    cursor: grabbing;
}

.page-family-tree .tree-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.page-family-tree .tree-head h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 19px;
}

.page-family-tree .tree-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .tree-tools {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-family-tree .tree-tools-secondary {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.page-family-tree .tree-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid #d7e4ef;
    border-radius: 12px;
    background: #f8fcff;
}

.page-family-tree .tree-zoom-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.page-family-tree .tree-zoom-value {
    min-width: 56px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #25485f;
}

.page-family-tree .tree-zoom-stage {
    position: relative;
    box-sizing: border-box;
    width: fit-content;
    min-width: 100%;
    min-height: 100%;
}

.page-family-tree .legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.page-family-tree .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}

.page-family-tree .tree {
    display: inline-block;
    width: max-content;
    min-width: 0;
    padding: 10px 8px 2px;
    position: relative;
    transform: scale(var(--tree-display-base-zoom));
    transform-origin: top left;
    backface-visibility: visible;
    will-change: auto;
    image-rendering: auto;
    text-rendering: geometricPrecision;
}

.page-family-tree .tree-connector-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.page-family-tree .tree-connector-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.page-family-tree .tree-connector-line {
    stroke: var(--tree-link);
    stroke-width: var(--tree-link-width);
    fill: none;
    stroke-linecap: square;
}

.page-family-tree .tree ul {
    margin: 0;
    padding-top: var(--tree-link-height);
    position: relative;
    text-align: center;
    z-index: 1;
}

.page-family-tree .tree li {
    list-style-type: none;
    position: relative;
    padding: var(--tree-link-height) 14px 0;
    display: inline-block;
    vertical-align: top;
}

.page-family-tree .tree li::before,
.page-family-tree .tree li::after {
    content: "";
    position: absolute;
    top: calc(var(--tree-link-overlap) * -1);
    right: 50%;
    width: calc(50% + var(--tree-link-fuse));
    height: calc(var(--tree-link-height) + var(--tree-link-overlap));
    border-top: var(--tree-link-width) solid var(--tree-link);
}

.page-family-tree .tree li::after {
    right: auto;
    left: 50%;
    border-left: var(--tree-link-width) solid var(--tree-link);
}

.page-family-tree .tree li:only-child::after,
.page-family-tree .tree li:only-child::before {
    display: none;
}

.page-family-tree .tree li:only-child {
    padding-top: var(--tree-link-height);
}

.page-family-tree .tree li:only-child::after {
    display: block;
    left: 50%;
    right: auto;
    width: 0;
    height: calc(var(--tree-link-height) + var(--tree-link-overlap));
    border-top: 0;
    border-left: var(--tree-link-width) solid var(--tree-link);
    transform: translateX(calc(var(--tree-link-width) / -2));
}

.page-family-tree .tree li:first-child::before,
.page-family-tree .tree li:last-child::after {
    border: 0;
}

.page-family-tree .tree li:last-child::before {
    border-right: var(--tree-link-width) solid var(--tree-link);
}

.page-family-tree .tree ul ul::before {
    content: "";
    position: absolute;
    top: calc(var(--tree-link-overlap) * -1);
    left: 50%;
    width: 0;
    height: calc(var(--tree-link-height) + var(--tree-link-overlap));
    border-left: var(--tree-link-width) solid var(--tree-link);
    transform: translateX(calc(var(--tree-link-width) / -2));
}

.page-family-tree .tree li > ul.child-group + ul.child-group {
    margin-top: 16px;
}

.page-family-tree .tree li.has-partner-node > ul.child-group-single-parent::before {
    left: 50%;
}

.page-family-tree .tree li.has-partner-node > ul.child-group-single-parent {
    text-align: center;
}

.page-family-tree .tree li.has-partner-node.has-single-parent-children > ul.child-group-single-parent::before {
    display: block;
}

.page-family-tree .tree li.has-partner-node.has-single-parent-children > .partner-row::after {
    display: block;
}

.page-family-tree .tree li > ul.child-group:has(> li.has-partner-node:only-child)::before {
    left: 50%;
}

.page-family-tree .tree li::before,
.page-family-tree .tree li::after,
.page-family-tree .tree ul ul::before,
.page-family-tree .partner-row.has-partner::before,
.page-family-tree .tree li.has-partner-node > .partner-row.has-partner::after,
.page-family-tree .tree li.has-partner-node.has-single-parent-children > .partner-row::after {
    content: none !important;
    border: 0 !important;
    display: none !important;
}

.page-family-tree .member-card {
    width: var(--member-card-width);
    min-height: 206px;
    background: #fafcfe;
    border: 1px solid #d7e3ed;
    border-radius: 18px;
    box-shadow: 0 3px 12px rgba(43, 68, 92, 0.05);
    padding: 14px 12px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: 0.22s transform, 0.22s box-shadow, 0.22s border-color;
    cursor: default;
}

.page-family-tree .partner-row {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--partner-gap);
    flex-wrap: nowrap;
    justify-content: center;
    position: relative;
}

.page-family-tree .partner-row .member-card.is-male {
    order: 1;
}

.page-family-tree .partner-row .member-card:not(.is-male):not(.is-female) {
    order: 2;
}

.page-family-tree .partner-row .member-card.is-female {
    order: 3;
}

.page-family-tree .partner-row.has-partner::before {
    content: "";
    position: absolute;
    top: var(--partner-link-y);
    left: calc((var(--member-card-width) / 2) - var(--tree-link-fuse));
    right: calc((var(--member-card-width) / 2) - var(--tree-link-fuse));
    height: 0;
    border-top: var(--tree-link-width) solid var(--tree-link);
    pointer-events: none;
}

.page-family-tree .tree li.has-partner-node:has(> ul.child-group) > .partner-row.has-partner::after {
    content: "";
    position: absolute;
    top: calc(var(--partner-link-y) - var(--tree-link-overlap));
    left: 50%;
    width: 0;
    height: calc(100% - var(--partner-link-y) + var(--tree-link-height) + (var(--tree-link-overlap) * 3));
    border-left: var(--tree-link-width) solid var(--tree-link);
    transform: translateX(-1px);
    pointer-events: none;
}

.page-family-tree .member-card:hover {
    transform: translateY(-2px);
    border-color: #c3d6e6;
    box-shadow: 0 10px 18px rgba(43, 68, 92, 0.11);
}

.page-family-tree .member-card.active {
    border-color: #63b3e8;
    box-shadow: 0 0 0 3px rgba(132, 196, 237, 0.28), 0 10px 20px rgba(43, 68, 92, 0.12);
}

.page-family-tree .member-card.is-deceased {
    background: #f4f8fb;
    border-color: #cad7e2;
}

.page-family-tree .member-card.is-deceased .member-photo {
    filter: grayscale(1);
    opacity: 0.88;
}

.page-family-tree .member-card.is-deceased .member-name {
    color: #5a6b7c;
}

.page-family-tree .member-card.is-deceased .member-role,
.page-family-tree .member-card.is-deceased .member-age,
.page-family-tree .member-card.is-deceased .member-marital {
    color: #6c8296;
}

.page-family-tree .member-card.is-deceased .member-me-badge {
    background: #d8e3ed;
    color: #45627a;
}

.page-family-tree .member-photo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #edf5fc;
    background: #bfdcf4;
    margin: 0 auto 12px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(214, 227, 238, 0.95);
}

.page-family-tree .member-card.is-male .member-photo-wrap {
    background: #bfdcf4;
}

.page-family-tree .member-card.is-female .member-photo-wrap {
    background: #efc8de;
}

.page-family-tree .member-photo-wrap::after {
    content: none;
    display: none;
}

.page-family-tree .member-card.is-female .member-photo-wrap::after {
    content: none;
    display: none;
}

.page-family-tree .member-photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0;
    border: 0;
    box-shadow: none;
    object-fit: cover;
    display: block;
}

.page-family-tree .member-name {
    margin: 2px 0 0;
    font-size: 15px;
    font-weight: 800;
    color: #19364d;
    line-height: 1.25;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.page-family-tree .member-role {
    margin: 16px 0 0;
    color: #6f89a1;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.page-family-tree .member-age {
    margin: 7px 0 0;
    color: #365a77;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.page-family-tree .member-marital {
    margin: 4px 0 0;
    color: #5a7690;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.page-family-tree .member-meta {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
    min-height: 26px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-family-tree .member-status {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-family-tree .member-me-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #1f7cb4;
    background: #cae8fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.page-family-tree .member-generation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #8b5cf6;
    background: #e9d5ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    margin-top: 4px;
}

.page-family-tree .tree-see-more-btn {
    margin-top: 10px;
}

.page-family-tree .member-tag {
    margin-top: 10px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #107a59;
    background: var(--accent-soft);
}

.page-family-tree .detail {
    background: var(--surface);
    border: 1px solid #eaf1f6;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 16px;
    position: sticky;
    top: 88px;
    align-self: start;
    overflow-anchor: none;
}

.page-family-tree .detail h4 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 16px;
}

.page-family-tree .detail-card {
    margin-top: 16px;
    border-radius: 20px;
    background:
        radial-gradient(140% 100% at 100% 0%, rgba(122, 189, 224, 0.16) 0%, rgba(122, 189, 224, 0) 62%),
        linear-gradient(168deg, #f6fbff 0%, #eef8f3 100%);
    border: 1px solid #d8e9f3;
    box-shadow: 0 10px 20px rgba(18, 84, 120, 0.08);
    padding: 8px 4px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
        "photo name"
        "photo role"
        "list list";
    column-gap: 8px;
    row-gap: 2px;
}

.page-family-tree .detail-card.is-deceased {
    background:
        radial-gradient(140% 100% at 100% 0%, rgba(122, 138, 160, 0.18) 0%, rgba(122, 138, 160, 0) 62%),
        linear-gradient(165deg, #f3f5f8 0%, #eef1f6 100%);
    border-color: #d4dce5;
    box-shadow: 0 12px 24px rgba(51, 68, 85, 0.08);
}

.page-family-tree .detail-card.is-deceased .detail-photo {
    filter: grayscale(1);
    opacity: 0.9;
}

.page-family-tree .detail-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 10px 20px rgba(23, 99, 132, 0.2);
    object-fit: cover;
}

.page-family-tree .detail-photo-wrap {
    width: 64px;
    height: 64px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    grid-area: photo;
    align-self: center;
}

.page-family-tree .detail-photo-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.page-family-tree .detail-photo-wrap.is-editable .detail-photo-overlay {
    display: flex;
}

.page-family-tree .detail-photo-wrap.is-editable .detail-photo {
    opacity: 0.4;
}

.page-family-tree .detail-photo-camera-btn {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #fff;
    z-index: 2;
    cursor: pointer;
}

.page-family-tree .detail-photo-wrap.is-editable .detail-photo-camera-btn {
    display: flex;
}

.page-family-tree .detail-photo-icon {
    width: 24px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 4px;
    position: relative;
}

.page-family-tree .detail-photo-icon::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 5px;
    width: 10px;
    height: 6px;
    border: 2px solid #fff;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
}

.page-family-tree .detail-photo-icon::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.page-family-tree .detail-photo.is-editable {
    cursor: pointer;
}

.page-family-tree .detail-name {
    grid-area: name;
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.25;
    font-family: "Sora", sans-serif;
    color: #10334d;
}

.page-family-tree .detail-role {
    grid-area: role;
    margin: 0;
    color: #40657c;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.page-family-tree .detail-list {
    grid-area: list;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    font-size: 12px;
}

.page-family-tree .detail-list li {
    display: grid;
    grid-template-columns: 130px minmax(250px, 1fr);
    align-items: start;
    column-gap: 0;
    border: 0;
    border-bottom: 1px dashed #cfe1ec;
    border-radius: 0;
    background: transparent;
    padding: 6px 0;
    min-height: 0;
    min-width: 0;
}

.page-family-tree .detail-list li:last-child {
    border-bottom: 0;
}

.page-family-tree .detail-list span {
    color: #5f778b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
}

.page-family-tree .detail-list strong {
    display: block;
    min-width: 0;
    width: 100%;
    padding-left: 0;
    color: #14324a;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    overflow: visible;
    font-weight: 700;
}

.page-family-tree .detail-grave-location-link {
    color: #1f6f9d;
    text-decoration: none;
    font-weight: 800;
}

.page-family-tree .detail-grave-location-link:hover {
    text-decoration: underline;
}

.page-family-tree .detail-life-timeline-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(27, 74, 101, 0.08);
}

.page-family-tree .detail-life-timeline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.page-family-tree .detail-life-timeline-head h6 {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #13384f;
}

.page-family-tree .detail-life-timeline-head p {
    margin: 4px 0 0;
    color: #6b8193;
    font-size: 12px;
    line-height: 1.45;
}

.page-family-tree .detail-life-timeline-head a {
    color: #1f6f9d;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.page-family-tree .detail-life-timeline-head a:hover {
    text-decoration: underline;
}

.page-family-tree .detail-life-timeline-list {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.page-family-tree .detail-life-timeline-item {
    position: relative;
    padding-left: 16px;
}

.page-family-tree .detail-life-timeline-dot {
    position: absolute;
    left: 0;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f9ad6, #18b382);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.12);
}

.page-family-tree .detail-life-timeline-card {
    padding: 12px 13px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #d8e8f3;
}

.page-family-tree .detail-life-timeline-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.page-family-tree .detail-life-timeline-card-head strong {
    font-size: 13px;
    font-weight: 900;
    color: #12374f;
}

.page-family-tree .detail-life-timeline-card-head span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eaf4fb;
    color: #146f9c;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-family-tree .detail-life-timeline-card p {
    margin: 7px 0 0;
    color: #5a7487;
    font-size: 12px;
    font-weight: 700;
}

.page-family-tree .detail-life-timeline-card small {
    display: block;
    margin-top: 6px;
    color: #35556d;
    font-size: 12px;
    line-height: 1.5;
}

.page-family-tree .detail-life-timeline-foot {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.page-family-tree .detail-life-timeline-foot span {
    color: #5a7487;
    font-size: 11px;
    font-weight: 800;
}

.page-family-tree .detail-life-timeline-foot a {
    color: #1f6f9d;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.page-family-tree .detail-life-timeline-foot a:hover {
    text-decoration: underline;
}

.page-family-tree .detail-life-timeline-empty {
    padding: 12px 13px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px dashed #d8e8f3;
    color: #637a8b;
    font-size: 12px;
    font-weight: 700;
}

.page-family-tree .detail-list li.detail-social-media-row {
    display: grid;
    grid-template-columns: 130px minmax(250px, 1fr);
    min-height: 0;
}

.page-family-tree .detail-social-media-list {
    min-width: 0;
    width: 100%;
    display: table-row-group;
}

.page-family-tree .detail-social-media-list.is-empty {
    display: table-row-group;
    color: #6f7780;
}

.page-family-tree .detail-social-media-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.page-family-tree .detail-social-media-table td {
    padding: 0;
    vertical-align: middle;
}

.page-family-tree .detail-social-media-empty {
    color: #6f7780;
    padding: 6px 0;
}

.page-family-tree .detail-social-media-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid #d7e4ef;
    background: #f7fbff;
    color: #16364f;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.page-family-tree .detail-social-media-item:hover {
    border-color: #a7c6dc;
    background: #eef7fd;
}

.page-family-tree .detail-social-media-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-family-tree .detail-social-media-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.page-family-tree .detail-social-media-icon--facebook {
    color: #1877f2;
}

.page-family-tree .detail-social-media-icon--instagram {
    color: #e1306c;
}

.page-family-tree .detail-social-media-icon--tiktok {
    color: #111111;
}

.page-family-tree .detail-social-media-icon--youtube {
    color: #ff0000;
}

.page-family-tree .detail-social-media-icon--x {
    color: #111111;
}

.page-family-tree .detail-social-media-icon--whatsapp {
    color: #25d366;
}

.page-family-tree .detail-social-media-icon--linkedin {
    color: #0a66c2;
}

.page-family-tree .detail-social-media-icon--telegram {
    color: #229ed9;
}

.page-family-tree .detail-social-media-username {
    min-width: 0;
    display: inline-block;
    max-width: 100%;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.page-family-tree #detailBirthplace,
.page-family-tree #detailAddress {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.page-family-tree #detailEmail {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    font-size: inherit;
    line-height: inherit;
    text-overflow: clip;
}

.page-family-tree #detailStatus,
.page-family-tree #detailMaritalStatus {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #b7d9cb;
    background: #eaf8f2;
    color: #18714f;
    font-size: 12px;
}

.page-family-tree .detail-card.is-deceased #detailStatus {
    border-color: #ced4de;
    background: #edf0f4;
    color: #4f5d6c;
}

.page-family-tree .detail-social-media-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6f7780;
    text-decoration: none;
    max-width: 100%;
}

.page-family-tree .detail-social-media-item:hover {
    text-decoration: underline;
}

.page-family-tree .detail-social-media-icon,
.page-family-tree .detail-social-media-icon-fallback {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex: 0 0 18px;
}

.page-family-tree .detail-social-media-icon {
    object-fit: cover;
    background: #ffffff;
    border: 1px solid #d7e4ef;
}

.page-family-tree .detail-social-media-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f6;
    border: 1px solid #d5dbe1;
    color: #7b8289;
    font-size: 10px;
    font-weight: 800;
}

.page-family-tree .detail-social-media-username {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.page-family-tree .detail-form-wrap {
    margin-top: 14px;
    border-top: 1px dashed #d7e6f0;
    padding-top: 14px;
}

.page-family-tree .detail-form-wrap h5 {
    margin: 0;
    font-size: 14px;
    color: #14324a;
}

.page-family-tree .detail-form-wrap p {
    margin: 4px 0 10px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.page-family-tree .detail-form {
    display: grid;
    gap: 10px;
}

.page-family-tree .profile-form-card {
    margin-bottom: 10px;
    border: 1px solid #dfeaf3;
    background: linear-gradient(180deg, #f8fcff 0%, #f4f9fd 100%);
    border-radius: 14px;
    padding: 12px;
}

.page-family-tree .profile-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.page-family-tree .profile-form-head h5 {
    margin: 0;
}

.page-family-tree .profile-form-head p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.page-family-tree .profile-completion-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e1f1fb;
    border: 1px solid #c4e3f5;
    color: #0b6790;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.page-family-tree .profile-completion-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e7eef5;
    overflow: hidden;
}

.page-family-tree .profile-completion-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1991c8 0%, #27b0d9 100%);
    transition: width 0.2s ease;
}

.page-family-tree .profile-form-grid {
    display: grid;
    gap: 10px;
}

.page-family-tree .detail-form-field-profile input {
    background: #ffffff;
    border-color: #d4e2ed;
}

.page-family-tree .profile-form-actions {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.page-family-tree .profile-form-actions small {
    margin: 0;
    color: #5f7382;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.page-family-tree .detail-panel-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.page-family-tree .panel-switch-btn {
    height: 34px;
    padding: 0 12px;
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.page-family-tree .panel-switch-btn.is-active {
    background: #dff0fb;
    color: #0c6c95;
}

.page-family-tree .member-action-block {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #deebf4;
    background: #f8fcff;
    display: grid;
    gap: 10px;
}

.page-family-tree .member-action-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.page-family-tree .member-action-status-grid form {
    margin: 0;
}

.page-family-tree .member-action-status-grid .hidden {
    display: none !important;
}

.page-family-tree .member-action-block h5 {
    margin: 0;
    font-size: 13px;
    color: #20455c;
    font-weight: 800;
}

.page-family-tree .btn-danger-soft {
    color: #8e2f3c;
    background: #ffeef0;
    border: 1px solid #f3c6cc;
}

.page-family-tree .btn-danger-soft:hover {
    background: #ffe1e4;
}

.page-family-tree .btn-block {
    width: 100%;
}

.page-family-tree .member-action-block .btn-edit-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #b9d9ec;
    background: linear-gradient(130deg, #e9f5fd 0%, #dff2fb 100%);
    color: #0f5f7b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.page-family-tree .member-action-block .btn-edit-profile:hover {
    background: linear-gradient(130deg, #e2f2fc 0%, #d5edf9 100%);
    border-color: #9dcbe4;
    box-shadow: 0 8px 16px rgba(19, 84, 115, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

.page-family-tree .member-action-block .btn-edit-profile:focus-visible {
    outline: none;
    border-color: #78b4d5;
    box-shadow: 0 0 0 3px rgba(63, 148, 190, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.page-family-tree .member-action-block label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .life-status-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-family-tree .life-status-row select {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 0 11px;
    font-size: 13px;
    outline: none;
}

.page-family-tree .child-parenting-mode-box {
    display: grid;
    gap: 8px;
}

.page-family-tree .child-parenting-mode-box select {
    width: 100%;
}

.page-family-tree .child-parenting-mode-box .btn {
    width: 100%;
}

.page-family-tree .child-parenting-mode-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #224257;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .page-family-tree .member-action-status-grid {
        grid-template-columns: 1fr;
    }
}

.page-family-tree .child-parenting-mode-status strong {
    color: #0f5f7b;
}

.page-family-tree .detail-panel.hidden {
    display: none;
}

.page-family-tree .detail-form-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .detail-form-field small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.page-family-tree .detail-form-field input,
.page-family-tree .detail-form-field select {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 0 11px;
    font-size: 13px;
    outline: none;
}

.page-family-tree .relation-btn-row {
    display: flex;
    gap: 8px;
}

.page-family-tree .relation-btn {
    flex: 1;
}

.page-family-tree .relation-btn.is-active {
    background: #dff0fb;
    color: #0c6c95;
}

.page-family-tree .detail-form-field input:focus,
.page-family-tree .detail-form-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.15);
}

@media (max-width: 640px) {
    .page-family-tree .profile-form-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-family-tree .profile-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-family-tree .profile-form-actions .btn {
        width: 100%;
    }
}

.page-family-tree .management-card {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #eaf1f6;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.page-family-tree .settings-card,
.page-management-setting .settings-card {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #eaf1f6;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.page-family-tree .account-card {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #eaf1f6;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 18px;
    max-width: 720px;
}

.page-family-tree .account-grid {
    width: 100%;
    max-width: none;
}

.page-family-tree .account-grid .account-card,
.page-family-tree .account-edit-card,
.page-family-tree .account-password-card,
.page-family-tree .account-family-profile-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.page-account main,
body.page-account .wrapper {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.page-account .wrapper {
    margin: 0;
    padding: 30px 15px 48px;
}

body.page-account .account-grid {
    width: 100%;
    max-width: none;
    margin-top: 18px;
}

body.page-account .account-card {
    width: 100%;
    max-width: none !important;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

body.page-account .account-edit-card,
body.page-account .account-password-card {
    width: 100%;
    max-width: none !important;
}

body.page-account .account-form,
body.page-account .account-password-form {
    width: 100%;
    max-width: none;
}

.page-family-tree .account-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    max-width: none;
}

.page-family-tree .account-grid .account-card,
.page-family-tree .account-edit-card {
    max-width: none;
}

.page-family-tree .account-summary-card {
    background: linear-gradient(165deg, #ffffff, #f7fbfe);
}

.page-family-tree .account-card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-family: "Sora", sans-serif;
}

.page-family-tree .account-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .account-list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.page-family-tree .account-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #deebf4;
    border-radius: 14px;
    background: #f5fbff;
}

.page-family-tree .account-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.page-family-tree .account-list strong {
    color: #16354c;
    font-size: 13px;
}

.page-family-tree .account-photo-editor {
    margin-top: 12px;
    margin-bottom: 14px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
}

.page-family-tree .account-detail-photo-wrap {
    cursor: pointer;
    align-self: flex-start;
    justify-self: start;
    margin-left: 0;
}

.page-family-tree .account-photo-editor small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.page-family-tree .settings-head h2,
.page-management-setting .settings-head h2 {
    margin: 0;
    font-size: 22px;
    font-family: "Sora", sans-serif;
}

.page-family-tree .settings-head p,
.page-management-setting .settings-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .settings-form,
.page-management-setting .settings-form {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: none;
    align-items: start;
}

.page-family-tree .account-form {
    margin-top: 16px;
    max-width: none;
}

.page-family-tree .account-password-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    border-color: #dfeefa;
}

.page-family-tree .account-password-form {
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.page-family-tree .account-password-form .btn {
    min-height: 42px;
    padding-inline: 16px;
    font-weight: 700;
}

.page-family-tree .account-password-field {
    display: grid;
    gap: 8px;
}

.page-family-tree .account-password-wrap {
    position: relative;
}

.page-family-tree .account-password-wrap input[type="password"],
.page-family-tree .account-password-wrap input[type="text"] {
    padding-right: 44px;
}

.page-family-tree .account-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #43667c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-family-tree .account-password-toggle:hover {
    background: #eff5fa;
    color: #25475e;
}

.page-family-tree .account-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 154, 214, 0.25);
}

.page-family-tree .account-password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-family-tree .account-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-family-tree .settings-form > .settings-preview,
.page-family-tree .settings-form > .settings-actions,
.page-family-tree .settings-form > .btn,
.page-management-setting .settings-form > .settings-preview,
.page-management-setting .settings-form > .settings-actions,
.page-management-setting .settings-form > .btn {
    grid-column: 1 / -1;
}

.page-family-tree .account-form-grid .btn,
.page-family-tree .account-form .btn {
    width: auto;
}

.page-family-tree .account-form-grid .settings-field-full {
    grid-column: 1 / -1;
}

.page-family-tree .account-family-profile-card {
    max-width: none;
}

.page-family-tree .account-social-media-options {
    border: 1px solid #d7e4ef;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px 11px;
    display: grid;
    gap: 8px;
}

.page-family-tree .account-social-media-option {
    display: grid;
    gap: 8px;
}

.page-family-tree .account-social-media-option-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #224257;
    font-size: 13px;
    font-weight: 700;
}

.page-family-tree .account-social-media-option-toggle input[type="checkbox"] {
    margin: 0;
}

.page-family-tree .account-social-media-link-input {
    margin-left: 24px;
}

.page-family-tree .account-social-media-empty {
    display: block;
    color: #5f7b8f;
    font-size: 12px;
    font-weight: 600;
}

.page-family-tree .account-add-social-btn {
    margin-top: 2px;
}

.page-family-tree .account-new-social-rows {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.page-family-tree .account-new-social-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.page-family-tree .account-new-social-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.page-family-tree .account-remove-social-row-btn {
    padding: 9px 12px;
    white-space: nowrap;
}

.page-family-tree .account-social-select-wrap {
    position: relative;
}

.page-family-tree .account-social-select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #5f7b8f;
    border-bottom: 2px solid #5f7b8f;
    transform: rotate(45deg);
    pointer-events: none;
}

.page-family-tree .account-social-row-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 11px !important;
    padding-right: 34px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
    border-color: #bfd4e5 !important;
    font-weight: 600;
    color: #1f3f56;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.page-family-tree .account-social-row-select:hover {
    border-color: #93b7d2 !important;
}

.page-family-tree .account-social-row-select:focus {
    border-color: #1f9ad6 !important;
}

.page-family-tree .account-social-row-select option {
    padding: 8px 10px;
    font-weight: 500;
    color: #203547;
}

@media (max-width: 760px) {
    .page-family-tree .account-new-social-row {
        grid-template-columns: 1fr;
    }

    .page-family-tree .account-remove-social-row-btn {
        justify-self: start;
    }
}

.page-family-tree .settings-field label,
.page-management-setting .settings-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .settings-field input[type="text"],
.page-family-tree .settings-field input[type="email"],
.page-family-tree .settings-field input[type="password"],
.page-family-tree .settings-field input[type="date"],
.page-family-tree .settings-field textarea,
.page-family-tree .settings-field select,
.page-family-tree .settings-field input[type="file"],
.page-management-setting .settings-field input[type="text"],
.page-management-setting .settings-field input[type="email"],
.page-management-setting .settings-field input[type="password"],
.page-management-setting .settings-field input[type="date"],
.page-management-setting .settings-field textarea,
.page-management-setting .settings-field select,
.page-management-setting .settings-field input[type="file"] {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 10px 11px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.page-family-tree .settings-field input[readonly],
.page-family-tree .settings-field input:disabled,
.page-family-tree .settings-field select:disabled,
.page-management-setting .settings-field input[readonly],
.page-management-setting .settings-field input:disabled,
.page-management-setting .settings-field select:disabled {
    background: #eef4f8;
    color: #486478;
    cursor: not-allowed;
}

.page-family-tree .settings-field input[type="text"]:focus,
.page-family-tree .settings-field input[type="email"]:focus,
.page-family-tree .settings-field input[type="password"]:focus,
.page-family-tree .settings-field input[type="date"]:focus,
.page-family-tree .settings-field textarea:focus,
.page-family-tree .settings-field select:focus,
.page-management-setting .settings-field input[type="text"]:focus,
.page-management-setting .settings-field input[type="email"]:focus,
.page-management-setting .settings-field input[type="password"]:focus,
.page-management-setting .settings-field input[type="date"]:focus,
.page-management-setting .settings-field textarea:focus,
.page-management-setting .settings-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.14);
}

.page-family-tree .settings-field input.is-invalid,
.page-family-tree .settings-field select.is-invalid,
.page-family-tree .account-new-social-row input.is-invalid,
.page-family-tree .account-new-social-row select.is-invalid,
.page-management-setting .settings-field input.is-invalid,
.page-management-setting .settings-field select.is-invalid,
.page-management-setting .account-new-social-row input.is-invalid,
.page-management-setting .account-new-social-row select.is-invalid {
    border-color: #d93025 !important;
    background: #fff6f6 !important;
}

.page-family-tree .settings-field input.is-invalid:focus,
.page-family-tree .settings-field select.is-invalid:focus,
.page-family-tree .account-new-social-row input.is-invalid:focus,
.page-family-tree .account-new-social-row select.is-invalid:focus,
.page-management-setting .settings-field input.is-invalid:focus,
.page-management-setting .settings-field select.is-invalid:focus,
.page-management-setting .account-new-social-row input.is-invalid:focus,
.page-management-setting .account-new-social-row select.is-invalid:focus {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.16) !important;
}

.page-family-tree .settings-field small,
.page-management-setting .settings-field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.page-family-tree .field-error-text {
    display: block;
    margin-top: 2px;
    color: #c62828 !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.35;
}

.page-family-tree .email-pending-state {
    margin-top: 10px;
    border: 1px solid #d5d9dd;
    background: #f1f3f4;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    color: #202124;
    line-height: 1.45;
}

.page-family-tree .email-pending-state strong {
    color: inherit;
}

.page-family-tree .email-pending-state span {
    display: block;
}

.page-family-tree .email-cancel-btn {
    display: inline-block;
    margin-top: 4px;
    margin-right: 12px;
    border: 0;
    background: transparent;
    padding: 0;
    height: auto;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.page-family-tree .email-cancel-btn:hover {
    background: transparent;
    color: #1a73e8;
    text-decoration: underline;
}

.page-family-tree .settings-preview > span,
.page-management-setting .settings-preview > span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .settings-logo-box,
.page-management-setting .settings-logo-box {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    border: 1px dashed #bed6e6;
    background: #f4f9fd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-family-tree .settings-logo-box img,
.page-management-setting .settings-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-family-tree .logo-placeholder,
.page-management-setting .logo-placeholder {
    padding: 8px;
    text-align: center;
    color: #567287;
    font-size: 12px;
    font-weight: 600;
}

.page-family-tree .settings-actions,
.page-management-setting .settings-actions {
    margin-top: 4px;
}

.page-management-setting .settings-head--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.page-management-setting .settings-head-badge {
    min-width: 140px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #dbe8f1;
    background: linear-gradient(180deg, #f8fcff, #eef6fb);
    color: #24506a;
    display: grid;
    gap: 4px;
    text-align: right;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.page-management-setting .settings-head-badge span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6a879b;
}

.page-management-setting .settings-head-badge strong {
    font-size: 16px;
    font-weight: 800;
}

.page-management-setting .settings-tabs {
    margin-top: 18px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid #dbe8f1;
    background: #f6fbff;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-management-setting .settings-tab-btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #4f687b;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.page-management-setting .settings-tab-btn:hover {
    background: rgba(35, 153, 210, 0.08);
    color: #1c6e9b;
}

.page-management-setting .settings-tab-btn.is-active {
    background: linear-gradient(125deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(25, 135, 145, 0.18);
}

.page-management-setting .settings-panels {
    margin-top: 18px;
}

.page-management-setting .settings-panel {
    display: none;
    border: 1px solid #e3edf5;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 18px;
    box-shadow: 0 18px 40px rgba(17, 46, 68, 0.08);
}

.page-management-setting .settings-panel.is-active {
    display: block;
}

.page-management-setting .settings-panel-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.page-management-setting .settings-panel-intro h3 {
    margin: 0;
    font-size: 20px;
    font-family: "Sora", sans-serif;
}

.page-management-setting .settings-panel-intro p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-management-setting .settings-panel-tag {
    padding: 8px 10px;
    border-radius: 999px;
    background: #edf7ff;
    color: #1f6a94;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.page-management-setting .settings-form--single,
.page-management-setting .settings-form--landing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-management-setting .full-width {
    grid-column: 1 / -1;
}

.page-management-setting .settings-field textarea {
    min-height: 120px;
    line-height: 1.65;
    resize: vertical;
}

.page-management-setting .landing-photo-card__body {
    display: grid;
    gap: 8px;
}

.page-management-setting .landing-photo-card__body label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #224257;
}

.page-management-setting .landing-photo-card__body input[type="text"],
.page-management-setting .landing-photo-card__body input[type="file"] {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 10px 11px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.page-management-setting .landing-photo-card__body input[type="text"]:focus,
.page-management-setting .landing-photo-card__body input[type="file"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.14);
}

.page-management-setting .landing-photo-card__body small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.page-management-setting .landing-hero-photo {
    grid-column: 1 / -1;
}

.page-management-setting .landing-photo-card,
.page-landing .landing-approval-card,
.page-landing .landing-hero-card,
.page-landing .landing-info-card {
    border: 1px solid #dfeaf2;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 46, 68, 0.08);
}

.page-management-setting .landing-photo-card {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.page-management-setting .landing-photo-card__preview {
    min-height: 160px;
    border-radius: 18px;
    border: 1px dashed #c9dae6;
    background: linear-gradient(180deg, #f9fcff, #eef6fb);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.page-management-setting .landing-photo-card--hero .landing-photo-card__preview {
    width: 300px;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    margin: 0 auto;
}

.page-management-setting .landing-photo-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-management-setting .photo-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-management-setting .photo-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.page-management-setting .photo-crop-card {
    position: relative;
    width: min(460px, 100%);
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d8e8f2;
    box-shadow: 0 20px 55px rgba(15, 50, 74, 0.3);
    padding: 18px;
}

.page-management-setting .photo-crop-card h4 {
    margin: 0;
    font-size: 18px;
    font-family: "Sora", sans-serif;
}

.page-management-setting .photo-crop-card p {
    margin: 6px 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-management-setting .photo-crop-stage-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.page-management-setting .photo-crop-canvas {
    width: 320px;
    height: 320px;
    border-radius: 14px;
    background: #ffffff;
    touch-action: none;
    cursor: grab;
}

.page-management-setting .photo-crop-frame {
    position: absolute;
    inset: auto;
    border: 2px solid #ffffff;
    border-radius: 18px;
    z-index: 2;
    touch-action: none;
    pointer-events: none;
}

.page-management-setting .photo-crop-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.page-management-setting .photo-crop-frame-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #1f9ad6;
    box-shadow: 0 4px 10px rgba(15, 50, 74, 0.2);
    pointer-events: auto;
}

.page-management-setting .photo-crop-frame-handle--nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.page-management-setting .photo-crop-frame-handle--ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.page-management-setting .photo-crop-frame-handle--sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.page-management-setting .photo-crop-frame-handle--se {
    right: -8px;
    bottom: -8px;
    cursor: nwse-resize;
}

.page-management-setting .photo-crop-canvas.is-dragging {
    cursor: grabbing;
}

.page-management-setting .landing-approval-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.page-management-setting .landing-approval-grid .landing-photo-card__preview {
    width: 150px;
    height: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
    margin: 0 auto;
}

.page-management-setting .section-divider {
    padding-top: 8px;
}

.page-management-setting .section-divider h4 {
    margin: 0;
    font-size: 18px;
    font-family: "Sora", sans-serif;
}

.page-management-setting .section-divider p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

body.page-landing {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 146, 192, 0.18), transparent 34%),
        radial-gradient(circle at right 20%, rgba(28, 183, 146, 0.18), transparent 28%),
        linear-gradient(180deg, #f9fcff 0%, #eef7fb 100%);
}

body.page-landing main {
    width: 100%;
}

.page-landing .landing-page {
    position: relative;
    overflow: hidden;
    padding: 18px 0 56px;
    font-family: "Manrope", "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

.page-landing .landing-bg {
    position: absolute;
    inset: auto;
    border-radius: 999px;
    filter: blur(12px);
    pointer-events: none;
    opacity: 0.28;
}

.page-landing .landing-bg--one {
    width: 260px;
    height: 260px;
    top: 18px;
    right: -70px;
    background: radial-gradient(circle, rgba(47, 169, 218, 0.28), transparent 68%);
}

.page-landing .landing-bg--two {
    width: 220px;
    height: 220px;
    left: -70px;
    bottom: 64px;
    background: radial-gradient(circle, rgba(27, 184, 147, 0.2), transparent 70%);
}

.page-landing .landing-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    padding: 0 15px;
    margin: 0 auto;
}

.page-landing .landing-topbar {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(221, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(17, 46, 68, 0.05);
}

.page-landing .landing-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-landing .landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #0f2d41;
    text-decoration: none;
}

.page-landing .landing-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(140deg, #eff7fc, #edf8f3);
    border: 1px solid rgba(25, 123, 171, 0.12);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    overflow: hidden;
}

.page-landing .landing-brand-mark.has-logo {
    background: #ffffff;
}

.page-landing .landing-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.page-landing .landing-brand-copy {
    display: grid;
    gap: 3px;
}

.page-landing .landing-brand-copy strong {
    font-size: 17px;
    font-weight: 800;
}

.page-landing .landing-brand-copy span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.page-landing .landing-language-switcher {
    position: relative;
}

.page-landing .landing-language-switcher > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #d6e4ee;
    background: rgba(255, 255, 255, 0.94);
    color: #16364d;
    cursor: pointer;
    font-weight: 700;
    user-select: none;
    box-shadow: 0 8px 18px rgba(17, 46, 68, 0.05);
}

.page-landing .landing-language-switcher > summary::-webkit-details-marker {
    display: none;
}

.page-landing .landing-language-switcher > summary i:first-child {
    width: 16px;
    height: 16px;
}

.page-landing .landing-language-switcher > summary i:last-child {
    width: 14px;
    height: 14px;
    opacity: 0.72;
}

.page-landing .landing-language-switcher[open] > summary {
    border-color: rgba(31, 154, 214, 0.4);
    box-shadow: 0 12px 24px rgba(17, 46, 68, 0.08);
}

.page-landing .landing-language-switcher__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 180px;
    padding: 7px;
    border-radius: 18px;
    border: 1px solid #d8e8f3;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 28px rgba(16, 58, 84, 0.1);
    z-index: 80;
    display: none;
}

.page-landing .landing-language-switcher[open] .landing-language-switcher__menu {
    display: grid;
    gap: 6px;
}

.page-landing .landing-language-switcher__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 11px;
    border-radius: 11px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #15405d;
    background: transparent;
    transition: background-color 180ms ease, color 180ms ease;
}

.page-landing .landing-language-switcher__menu a:hover,
.page-landing .landing-language-switcher__menu a.is-active {
    background: #eaf4fb;
    color: #0f2d41;
    transform: translateX(2px);
}

.page-landing .landing-hero {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.page-landing .landing-hero-copy,
.page-landing .landing-hero-card,
.page-landing .landing-section,
.page-landing .landing-info-card {
    animation: landingRise 0.55s ease both;
}

.page-landing .landing-hero-copy {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    padding: 24px 24px 20px;
    border-radius: 24px;
    border: 1px solid #dce8ef;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
    box-shadow: 0 14px 32px rgba(17, 46, 68, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-landing .landing-eyebrow,
.page-landing .landing-section-kicker,
.page-landing .landing-card-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef7fb;
    color: #146680;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.page-landing .landing-hero-copy h1 {
    margin: 14px 0 0;
    font-size: clamp(28px, 3.8vw, 44px);
    line-height: 1.06;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: #0f2d41;
}

.page-landing .landing-lead {
    margin: 12px auto 0;
    color: #4f6778;
    font-size: 14px;
    line-height: 1.65;
    max-width: 48ch;
}

.page-landing .landing-hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-landing .landing-hero-action,
.page-landing .landing-topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.page-landing .landing-hero-action {
    min-height: 48px;
    padding: 0 17px;
    border-radius: 999px;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(14, 47, 69, 0.08);
    font-size: 14px;
}

.page-landing .landing-hero-action i,
.page-landing .landing-topbar-link i {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.page-landing .landing-hero-action--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #1e9cd8, #157ea8 72%);
    border-color: rgba(16, 90, 124, 0.14);
}

.page-landing .landing-topbar-link {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    color: #0f3a54;
    background: #ffffff;
    border: 1px solid rgba(19, 108, 152, 0.12);
    box-shadow: 0 8px 18px rgba(13, 42, 61, 0.05);
}

.page-landing .landing-hero-action:hover,
.page-landing .landing-topbar-link:hover {
    transform: translateY(-1px);
}

.page-landing .landing-hero-action--primary:active {
    transform: translateY(1px) scale(0.99);
}

.page-landing .landing-hero-action--primary:hover {
    box-shadow: 0 12px 22px rgba(20, 111, 156, 0.18);
}

.page-landing .landing-hero-action:focus-visible,
.page-landing .landing-topbar-link:focus-visible {
    outline: 3px solid rgba(31, 154, 214, 0.24);
    outline-offset: 2px;
}

.page-landing .landing-hero-card {
    min-height: 100px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 10px;
    border-radius: 24px;
    border: 1px solid #dce8ef;
    background: rgba(255, 255, 255, 0.98);
    color: #102d41;
    box-shadow: 0 14px 30px rgba(13, 42, 61, 0.07);
}

.page-landing .landing-hero-card__media {
    min-width: 0;
}

.page-landing .landing-hero-card__photo,
.page-landing .landing-approval-card__photo {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 800;
}

.page-landing .landing-hero-card__photo {
    width: 300px;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    border: 1px solid #d9e6ee;
    background: #f8fcfe;
}

.page-landing .landing-hero-card__photo img,
.page-landing .landing-approval-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-landing .landing-hero-card__body h2,
.page-landing .landing-info-card h2,
.page-landing .landing-approval-card__body h3 {
    margin: 0;
}

.page-landing .landing-hero-card__body {
    padding-left: 75px;
    padding-right: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    align-items: flex-start;
    text-align: left;
}

.page-landing .landing-hero-card__body h2 {
    margin-top: 6px;
    font-size: 26px;
    color: #0f2d41;
}

.page-landing .landing-hero-card__body p,
.page-landing .landing-info-card p,
.page-landing .landing-section-head p {
    margin: 2px 0 0;
    color: #51697a;
    line-height: 1.48;
    font-size: 12px;
}

.page-landing .landing-section {
    margin-top: 18px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid #dce8ef;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(17, 46, 68, 0.06);
    backdrop-filter: blur(8px);
}

.page-landing .landing-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-landing .landing-section-head h2 {
    margin: 8px 0 0;
    font-size: 24px;
    color: #0f2d41;
}

.page-landing .landing-section-head p {
    max-width: 42ch;
    color: #5e7280;
}

.page-landing .landing-approval-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.page-landing .landing-approval-card {
    padding: 14px;
    display: grid;
    gap: 14px;
    border-radius: 20px;
    border: 1px solid #dce8ef;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 42, 61, 0.06);
}

.page-landing .landing-approval-card__photo {
    width: 100%;
    min-height: 138px;
    background: #f8fcfe;
    border: 1px solid #dbe7ef;
}

.page-landing .landing-approval-card__body h3 {
    font-size: 17px;
    color: #0f2d41;
}

.page-landing .landing-section--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.page-landing .landing-info-card {
    padding: 22px;
}

.page-landing .landing-info-card h2 {
    font-size: 24px;
    color: #0f2d41;
}

.page-landing .landing-info-card p {
    color: #51697a;
}

.page-landing .landing-info-card--accent {
    background: linear-gradient(155deg, #102d41, #164d68);
    color: #ffffff;
}

.page-landing .landing-info-card--accent .btn {
    margin-top: 16px;
}

@keyframes landingRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .page-management-setting .settings-form--single,
    .page-management-setting .settings-form--landing {
        grid-template-columns: 1fr;
    }

    .page-management-setting .landing-approval-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-landing .landing-hero {
        grid-template-columns: 1fr;
    }

    .page-landing .landing-approval-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page-management-setting .settings-head--split,
    .page-management-setting .settings-panel-intro,
    .page-landing .landing-section-head,
    .page-landing .landing-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-landing .landing-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-landing .landing-language-switcher__menu {
        right: auto;
        left: 0;
    }

    .page-management-setting .settings-head-badge {
        text-align: left;
        min-width: 0;
    }

    .page-management-setting .landing-approval-grid,
    .page-landing .landing-approval-grid,
    .page-landing .landing-section--split {
        grid-template-columns: 1fr;
    }

    .page-landing .landing-hero-copy,
    .page-landing .landing-hero-card,
    .page-landing .landing-section {
        padding: 12px;
    }

    .page-landing .landing-topbar {
        padding: 12px 13px;
    }
}

.page-family-tree .management-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.page-family-tree .management-head h2 {
    margin: 0;
    font-size: 22px;
    font-family: "Sora", sans-serif;
}

.page-family-tree .management-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .table-count {
    background: #edf5fa;
    color: #1b4a65;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.page-family-tree .management-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-family-tree .management-tools-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.page-family-tree .backup-db-page {
    overflow: hidden;
}

.page-family-tree .backup-db-page .management-head p {
    max-width: 620px;
    line-height: 1.55;
}

.page-family-tree .backup-db-intro {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-family-tree .backup-db-intro-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #d3e6f2;
    background: #f3f9fd;
    color: #22536f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-family-tree .backup-db-tools {
    justify-content: flex-end;
}

.page-family-tree .backup-db-chip {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid #cde1ef;
    background: #f5fbff;
    color: #1f5875;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.page-family-tree .backup-db-hero {
    margin-top: 4px;
    border: 1px solid #d7e8f3;
    border-radius: 16px;
    padding: 14px;
    background:
        radial-gradient(circle at 94% 4%, rgba(23, 182, 127, 0.08), transparent 38%),
        radial-gradient(circle at 0% 0%, rgba(31, 154, 214, 0.11), transparent 36%),
        #f8fcff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 290px);
    gap: 12px;
    align-items: center;
}

.page-family-tree .backup-db-hero-mark {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1px solid #bfd9ea;
    background: linear-gradient(145deg, #ffffff, #e9f6ff);
    color: #0f597f;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: "Sora", sans-serif;
}

.page-family-tree .backup-db-hero-content h3 {
    margin: 0;
    font-size: 19px;
    color: #123f5a;
    font-family: "Sora", sans-serif;
}

.page-family-tree .backup-db-hero-content p {
    margin: 6px 0 0;
    color: #567589;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.page-family-tree .backup-db-hero-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.page-family-tree .backup-db-hero-list li {
    border: 1px solid #d7e7f2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    color: #244a62;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
}

.page-family-tree .backup-db-layout {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.page-family-tree .backup-db-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe9f3;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 22px rgba(16, 64, 91, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 256px;
}

.page-family-tree .backup-db-panel-export {
    background: linear-gradient(160deg, #ffffff, #f3f9fe);
}

.page-family-tree .backup-db-panel-import {
    background: linear-gradient(160deg, #ffffff, #f9f7ff);
}

.page-family-tree .backup-db-panel-head {
    display: grid;
    gap: 8px;
    align-content: start;
}

.page-family-tree .backup-db-panel h3 {
    margin: 0;
    font-size: 19px;
    color: #153b55;
    font-family: "Sora", sans-serif;
}

.page-family-tree .backup-db-panel-desc {
    margin: 0;
    color: #587589;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    min-height: 40px;
}

.page-family-tree .backup-db-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.page-family-tree .backup-db-points li {
    border: 1px solid #d9e8f2;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f7fcff;
    color: #23485f;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.page-family-tree .backup-db-points li span {
    color: #496a7f;
    font-weight: 700;
}

.page-family-tree .backup-db-points li strong {
    font-size: 12px;
    color: #153f5e;
}

.page-family-tree .backup-db-form-inline,
.page-family-tree .backup-db-form-stack {
    margin-top: auto;
    padding-top: 2px;
}

.page-family-tree .backup-db-panel-import .backup-db-form-stack {
    margin-top: 4px;
    padding-top: 0;
}

.page-family-tree .backup-db-form-stack {
    display: grid;
    gap: 8px;
}

.page-family-tree .backup-db-file-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .backup-db-file-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-family-tree .backup-db-file-inline input[type="file"] {
    flex: 1 1 auto;
}

.page-family-tree .backup-db-file-field input[type="file"] {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 9px 11px;
    font-size: 13px;
    outline: none;
}

.page-family-tree .backup-db-file-field input[type="file"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.14);
}

.page-family-tree .backup-db-file-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 1px solid #d1e2ee;
    border-radius: 8px;
    background: #eef6fc;
    color: #23526d;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    cursor: pointer;
}

.page-family-tree .backup-db-file-field small {
    display: block;
    margin-top: 6px;
    color: #5f7b8f;
    font-size: 12px;
    font-weight: 600;
}

.page-family-tree .backup-db-import-btn {
    justify-self: start;
    white-space: nowrap;
}

.page-family-tree .backup-db-safe-note {
    margin-top: 2px;
    border: 1px solid #f1dcac;
    border-radius: 10px;
    background: #fff8e9;
    color: #7f5a15;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.page-family-tree .backup-db-warning {
    margin-top: 14px;
    border: 1px solid #f1d7a5;
    background: linear-gradient(155deg, #fffdf6, #fff7e5);
    border-radius: 12px;
    padding: 11px 12px;
}

.page-family-tree .backup-db-warning h4 {
    margin: 0;
    font-size: 14px;
    color: #81550f;
    font-family: "Sora", sans-serif;
}

.page-family-tree .backup-db-warning p {
    margin: 5px 0 0;
    color: #8b6112;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

@media (max-width: 1080px) {
    .page-family-tree .backup-db-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .page-family-tree .backup-db-hero-list {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .page-family-tree .backup-db-layout {
        grid-template-columns: 1fr;
    }

    .page-family-tree .backup-db-panel {
        min-height: 220px;
    }

    .page-family-tree .backup-db-hero {
        grid-template-columns: 1fr;
    }

    .page-family-tree .backup-db-hero-mark {
        width: 50px;
        height: 50px;
    }

    .page-family-tree .backup-db-hero-list {
        grid-template-columns: 1fr;
    }

    .page-family-tree .backup-db-panel-desc {
        min-height: 36px;
    }

    .page-family-tree .backup-db-file-inline {
        flex-direction: column;
        align-items: stretch;
    }
}

.page-family-tree .management-controls,
.page-family-tree .management-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.page-family-tree .management-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-family-tree .management-search {
    min-width: 280px;
}

.page-family-tree .management-role-filter {
    min-width: 170px;
    padding-right: 30px;
}

.page-family-tree.bulk-user-card-active {
    padding-bottom: 104px;
}

.page-family-tree .bulk-user-actions-card {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 22px));
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d4e4f0;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(11, 50, 76, 0.2);
    z-index: 1300;
}

.page-family-tree .bulk-select-all-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #23465d;
    user-select: none;
}

.page-family-tree .bulk-select-all-control input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1f9ad6;
    cursor: pointer;
}

.page-family-tree .bulk-delete-form {
    margin: 0;
}

.page-family-tree .bulk-user-actions-right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.page-family-tree .btn-export {
    color: #ffffff;
    background: linear-gradient(120deg, #159a6f, #27c08a);
    box-shadow: 0 8px 18px rgba(21, 154, 111, 0.22);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.page-family-tree .btn-export:hover {
    filter: brightness(1.04);
}

.page-family-tree .table-wrap {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .page-family-tree .account-grid {
        grid-template-columns: 1fr;
    }

    .page-family-tree .account-card {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .page-family-tree .settings-form,
    .page-management-setting .settings-form,
    .page-family-tree .account-form-grid {
        grid-template-columns: 1fr;
    }

    .page-family-tree .account-form-grid .btn,
    .page-family-tree .account-form .btn {
        width: 100%;
    }
}

.page-family-tree .message-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-family-tree .message-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.page-family-tree .message-modal-card {
    position: relative;
    width: min(460px, 100%);
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #d8e8f2;
    box-shadow: 0 20px 55px rgba(15, 50, 74, 0.24);
    padding: 18px;
}

.page-family-tree .message-modal-card.is-add-member-success {
    text-align: center;
    padding: 22px 20px;
}

.page-family-tree .message-modal-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
    font-family: "Sora", sans-serif;
}

.page-family-tree #resetPasswordSuccessTitle {
    text-align: center;
}

.page-family-tree .message-modal-body {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.page-family-tree .life-status-dead-date-field {
    margin-top: 0;
}

.page-family-tree .life-status-dead-date-field small {
    color: #5d7386;
    font-size: 11px;
    line-height: 1.35;
}

.page-family-tree .message-modal-success-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #ecfbf4;
    border: 1px solid #caefdc;
    display: grid;
    place-items: center;
}

.page-family-tree .message-modal-success-icon span {
    width: 22px;
    height: 12px;
    border-left: 3px solid #1c7b52;
    border-bottom: 3px solid #1c7b52;
    transform: rotate(-45deg) translateY(-2px);
}

.page-family-tree .message-modal-text {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.page-family-tree .message-modal-text.is-success {
    color: #1c7b52;
}

.page-family-tree .message-modal-text.is-error {
    color: #9a3f48;
}

.page-family-tree .email-change-modal .message-modal-backdrop {
    background: rgba(10, 31, 46, 0.44);
    backdrop-filter: blur(2px);
}

.page-family-tree .email-change-modal-card {
    width: min(430px, 100%);
    border-radius: 18px;
    border: 1px solid #d4e5f1;
    box-shadow: 0 26px 60px rgba(10, 38, 56, 0.25);
    padding: 22px 20px 18px;
    text-align: center;
}

.page-family-tree .email-change-modal-card h4 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #11374d;
}

.page-family-tree .email-change-modal .message-modal-body {
    margin-bottom: 16px;
}

.page-family-tree .email-change-modal .message-modal-text {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.page-family-tree .email-change-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    background: #e8f3fb;
    color: #146aa0;
    border: 1px solid #cfe2f1;
}

.page-family-tree .email-change-modal-card.is-success .email-change-modal-icon {
    background: #e8f8ef;
    border-color: #caebd8;
    color: #1c7b52;
}

.page-family-tree .email-change-modal-card.is-error .email-change-modal-icon {
    background: #fceef0;
    border-color: #f2cfd4;
    color: #b83e4b;
}

.page-family-tree .email-change-modal-actions {
    display: flex;
    justify-content: center;
}

.page-family-tree .email-change-modal-ok-btn {
    min-width: 130px;
}

.page-family-tree .phone-otp-modal-card {
    text-align: left;
}

.page-family-tree .phone-otp-modal-card h4 {
    text-align: center;
}

.page-family-tree .phone-otp-modal-body {
    margin-bottom: 8px;
}

.page-family-tree .phone-otp-field {
    margin-top: 2px;
}

.page-family-tree .phone-otp-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.page-family-tree .phone-otp-field input[type="text"] {
    width: 100%;
}

.page-family-tree .phone-otp-modal-actions {
    justify-content: flex-end;
    gap: 10px;
}

.page-family-tree #flashMessageOkBtn {
    display: block;
    margin: 0 auto;
    min-width: 120px;
}

.page-family-tree .message-modal.is-open .message-modal-backdrop {
    animation: modal-fade-in 0.2s ease forwards;
}

.page-family-tree .message-modal.is-open .message-modal-card {
    animation: modal-fade-in-up 0.22s ease forwards;
}

.page-family-tree .message-modal.is-closing .message-modal-backdrop {
    animation: modal-fade-out 0.2s ease forwards;
}

.page-family-tree .message-modal.is-closing .message-modal-card {
    animation: modal-fade-out-down 0.2s ease forwards;
}

.page-family-tree .photo-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page-family-tree .photo-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.page-family-tree .photo-crop-card {
    position: relative;
    width: min(460px, 100%);
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d8e8f2;
    box-shadow: 0 20px 55px rgba(15, 50, 74, 0.3);
    padding: 18px;
}

.page-family-tree .photo-crop-card h4 {
    margin: 0;
    font-size: 18px;
    font-family: "Sora", sans-serif;
}

.page-family-tree .photo-crop-card p {
    margin: 6px 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .photo-crop-stage-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.page-family-tree .photo-crop-canvas {
    width: 320px;
    height: 320px;
    border-radius: 14px;
    background: #ffffff;
    touch-action: none;
    cursor: grab;
}

.page-family-tree .photo-crop-frame {
    position: absolute;
    inset: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    touch-action: none;
}

.page-family-tree .photo-crop-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.page-family-tree .photo-crop-canvas.is-dragging {
    cursor: grabbing;
}

.page-family-tree .photo-crop-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.page-family-tree .photo-crop-modal.is-open .photo-crop-backdrop {
    animation: modal-fade-in 0.2s ease forwards;
}

.page-family-tree .photo-crop-modal.is-open .photo-crop-card {
    animation: modal-fade-in-up 0.22s ease forwards;
}

.page-family-tree .photo-crop-modal.is-closing .photo-crop-backdrop {
    animation: modal-fade-out 0.2s ease forwards;
}

.page-family-tree .photo-crop-modal.is-closing .photo-crop-card {
    animation: modal-fade-out-down 0.2s ease forwards;
}

.page-family-tree .alert-success,
.page-family-tree .alert-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.page-family-tree .alert-success {
    background: #ecfbf4;
    border: 1px solid #c7efd9;
    color: #1c7b52;
}

.page-family-tree .alert-error {
    background: #fff5f5;
    border: 1px solid #f2d2d5;
    color: #9a3f48;
}

.page-family-tree .data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.page-family-tree .data-table th {
    text-align: left;
    background: #f4f9fd;
    color: #315169;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 11px 12px;
    border-bottom: 1px solid #dbe8f2;
}

.page-family-tree .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf3f8;
    color: #1b3e57;
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .data-table tbody tr:hover {
    background: #f7fbfe;
}

.page-family-tree .data-table .bulk-select-col {
    display: none;
    width: 52px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.page-family-tree .data-table.bulk-mode .bulk-select-col {
    display: table-cell;
}

.page-family-tree .data-table .bulk-select-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #1f9ad6;
    cursor: pointer;
}

.page-family-tree .data-table.bulk-mode tbody tr {
    cursor: pointer;
}

.page-family-tree .data-table.bulk-mode tbody tr.bulk-selected {
    background: #e9f7ff;
}

.page-family-tree .data-table.bulk-mode tbody tr.bulk-selected:hover {
    background: #dbf0fb;
}

.page-family-tree .data-table.bulk-mode .action-group {
    opacity: 0.35;
    pointer-events: none;
}

.page-family-tree .user-pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.page-family-tree .page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #d6e6f2;
    background: #ffffff;
    color: #2a4e67;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.page-family-tree .page-link.active {
    background: #dff0fb;
    border-color: #bcdff1;
    color: #0c6c95;
}

.page-family-tree .page-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.page-family-tree .action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-family-tree .action-group form {
    margin: 0;
}

.page-family-tree .action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #d6e6f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    cursor: pointer;
    transition: 0.2s;
}

.page-family-tree .action-btn svg {
    width: 16px;
    height: 16px;
}

.page-family-tree .action-reset {
    color: #0b7a9b;
}

.page-family-tree .action-reset:hover {
    background: #e9f7fc;
    border-color: #bfe3ef;
}

.page-family-tree .action-delete {
    color: #b83e4b;
}

.page-family-tree .action-delete:hover {
    background: #fff0f1;
    border-color: #f0c6cb;
}

.page-family-tree .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 31, 45, 0.44);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.page-family-tree .modal-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-family-tree .modal-card {
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e3edf5;
    box-shadow: 0 25px 60px rgba(12, 49, 73, 0.2);
    padding: 16px;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.22s ease, opacity 0.22s ease;
    opacity: 0;
}

.page-family-tree .modal-backdrop.open .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.page-family-tree .modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-family-tree .modal-head h3 {
    margin: 0;
    font-size: 20px;
    font-family: "Sora", sans-serif;
}

.page-family-tree .modal-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #edf5fa;
    color: #2a4d67;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.page-family-tree .modal-subtitle {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .modal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-family-tree .modal-fieldset {
    display: contents;
}

.page-family-tree .modal-fieldset.hidden {
    display: none;
}

.page-family-tree .modal-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #224257;
}

.page-family-tree .modal-field input,
.page-family-tree .modal-field select {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #d7e4ef;
    background: #fbfdff;
    padding: 0 11px;
    font-size: 14px;
    outline: none;
}

.page-family-tree .modal-field input:focus,
.page-family-tree .modal-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.15);
}

.page-family-tree .modal-field-full {
    grid-column: 1 / -1;
}

.page-family-tree .modal-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .page-family-tree .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-family-tree .panel {
        grid-template-columns: 1fr;
    }

    .page-family-tree .home-page-panel.has-selected-member {
        grid-template-columns: 1fr;
    }

    .page-family-tree .home-page-panel.has-selected-member .tree-container,
    .page-family-tree .home-page-panel.has-selected-member .detail-shell {
        grid-column: auto;
        grid-row: auto;
    }

    .page-family-tree .detail {
        position: static;
    }
}

@media (max-width: 850px) {
    .page-login .login-shell {
        max-width: 520px;
    }

    .page-login .login-panel {
        padding: 32px 26px;
    }

    .page-login .login-brand-logo {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .page-login .login-brand-name {
        font-size: 21px;
    }
}

@media (max-width: 760px) {
    .page-family-tree .page-navbar-shell {
        padding: 8px 8px 0;
    }

    .page-family-tree .topbar {
        width: 100%;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .page-family-tree .actions {
        flex-wrap: wrap;
    }

    .page-family-tree .search {
        min-width: 0;
        flex: 1;
    }

    .page-family-tree .tree-head {
        flex-direction: column;
        align-items: stretch;
    }

    .page-family-tree .tree-tools {
        width: 100%;
    }

    .page-family-tree .tree-zoom-controls {
        margin-left: auto;
    }

    .page-family-tree .stats {
        grid-template-columns: 1fr;
    }

    .page-family-tree .management-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-family-tree .management-tools {
        width: 100%;
        justify-content: space-between;
    }

    .page-family-tree .management-tools-user {
        align-items: stretch;
    }

    .page-family-tree .management-controls,
    .page-family-tree .management-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-family-tree .management-filters {
        width: 100%;
    }

    .page-family-tree .management-search,
    .page-family-tree .management-role-filter {
        width: 100%;
    }

    .page-family-tree.bulk-user-card-active {
        padding-bottom: 138px;
    }

    .page-family-tree .bulk-user-actions-card {
        width: calc(100vw - 16px);
        bottom: 8px;
        padding: 10px 11px;
        gap: 8px;
    }

    .page-family-tree .bulk-user-actions-right {
        margin-left: auto;
        width: auto;
    }

    .page-family-tree .modal-form {
        grid-template-columns: 1fr;
    }

    .page-family-tree .detail-list {
        grid-template-columns: 1fr;
    }

    .page-family-tree .detail {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 460px) {
    .page-family-tree .detail-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "name"
            "role"
            "list";
        justify-items: stretch;
    }

    .page-family-tree .detail-list li,
    .page-family-tree .detail-list li.detail-social-media-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        width: 100%;
    }

    .page-family-tree .detail-list strong,
    .page-family-tree .detail-social-media {
        width: 100%;
        min-width: 0;
        overflow-wrap: normal;
        word-break: normal;
        white-space: normal;
    }

    .page-family-tree .detail-list span {
        font-size: 12px;
    }

    .page-family-tree .detail-list strong {
        font-size: 11px;
    }

    .page-family-tree .detail-name,
    .page-family-tree .detail-role {
        text-align: center;
    }

    .page-family-tree .detail-list {
        width: 100%;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modal-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modal-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-fade-out-down {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.chatbot-shell {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1600;
}

.chatbot-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.chatbot-toggle:checked ~ .floating-chat-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}

.chatbot-toggle:checked ~ .chatbot-widget {
    width: min(320px, calc(100vw - 20px));
    height: min(460px, calc(100vh - 20px));
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    border-radius: 24px;
}

.chatbot-shell.is-open .floating-chat-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}

.floating-chat-btn {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: linear-gradient(145deg, #145f84, #1f9ad6 55%, #17b67f);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 14px 30px rgba(14, 59, 84, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.floating-chat-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 18px 34px rgba(14, 59, 84, 0.36);
}

.floating-chat-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.chatbot-widget {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100px;
    height: 100px;
    border-radius: 26px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transition: width 0.24s ease, height 0.24s ease, opacity 0.2s ease, transform 0.2s ease, border-radius 0.24s ease;
}

.chatbot-widget.is-open {
    width: min(320px, calc(100vw - 20px));
    height: min(460px, calc(100vh - 20px));
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    border-radius: 24px;
}

.chatbot-widget__panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #d9e7f1;
    box-shadow: 0 18px 42px rgba(16, 53, 77, 0.22);
    overflow: hidden;
}

.chatbot-widget__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 10px;
    background: linear-gradient(160deg, #103955, #146377 70%, #139177);
    color: #f3fbff;
}

.chatbot-widget__title p {
    margin: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(236, 250, 255, 0.8);
}

.chatbot-widget__title h3 {
    margin: 4px 0 0;
    font-family: "Sora", sans-serif;
    font-size: 16px;
    line-height: 1.15;
}

.chatbot-widget__close {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.chatbot-widget__close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.chatbot-widget .chatbot-widget__body {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    box-sizing: border-box;
    background:
        linear-gradient(180deg, rgba(249, 253, 255, 0.98), rgba(242, 249, 253, 0.98)),
        #ffffff;
}

.chatbot-widget .chatbot-widget__body .chatbot-messages {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin-top: 0;
    padding: 10px;
    gap: 8px;
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(243, 250, 255, 0.98)),
        repeating-linear-gradient(
            45deg,
            rgba(208, 228, 241, 0.12) 0,
            rgba(208, 228, 241, 0.12) 10px,
            transparent 10px,
            transparent 20px
        );
}

.chatbot-widget .chatbot-widget__body .chatbot-msg {
    max-width: 92%;
    padding: 8px 10px;
    border-radius: 12px;
}

.chatbot-widget .chatbot-widget__body .chatbot-msg p {
    font-size: 12px;
    line-height: 1.35;
}

.chatbot-widget .chatbot-widget__body .chatbot-msg span {
    margin-top: 4px;
    font-size: 8px;
}

.chatbot-widget .chatbot-widget__body .chatbot-msg-user.chatbot-msg-quick {
    max-width: 100%;
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(14, 54, 78, 0.08);
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-head {
    padding: 9px 10px;
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-title {
    gap: 6px;
    font-size: 11px;
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-title b {
    width: 16px;
    height: 16px;
    font-size: 11px;
    border-radius: 5px;
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-list {
    padding: 6px;
    gap: 5px;
}

.chatbot-widget .chatbot-widget__body .chatbot-quick-btn {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 9px;
}

.chatbot-widget .chatbot-widget__body .chatbot-form {
    margin-top: 0;
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 8px;
}

.chatbot-widget .chatbot-widget__body .chatbot-form input,
.chatbot-widget .chatbot-widget__body .chatbot-form .btn {
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
}

.chatbot-widget .chatbot-widget__body .chatbot-form input {
    padding: 0 10px;
}

.chatbot-widget .chatbot-widget__body .chatbot-form .btn {
    min-width: 0;
    padding: 0 10px;
}

.chatbot-widget .chatbot-widget__body .chatbot-typing {
    gap: 4px;
}

.chatbot-widget .chatbot-widget__body .chatbot-typing i {
    width: 6px;
    height: 6px;
}

.chatbot-widget .chatbot-widget__body .chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.chatbot-widget .chatbot-widget__body .chatbot-messages::-webkit-scrollbar-thumb {
    border-width: 2px;
}

.chatbot-widget__frame {
    width: 100%;
    flex: 1 1 auto;
    border: 0;
    background: #ffffff;
    min-height: 0;
}

.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    margin-top: 28px;
    padding: 0 16px 18px;
    pointer-events: auto;
    color: #2f3f4d;
    text-align: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.site-footer__inner {
    display: inline-block;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
}

.site-footer__copy {
    color: #2f3f4d;
    font-weight: 500;
}

.page-family-tree .chatbot-page {
    margin-top: 20px;
    position: relative;
    isolation: isolate;
}

.page-family-tree .chatbot-page::before,
.page-family-tree .chatbot-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    z-index: -1;
    pointer-events: none;
}

.page-family-tree .chatbot-page::before {
    width: 260px;
    height: 260px;
    top: -28px;
    left: -44px;
    background: radial-gradient(circle, rgba(38, 184, 167, 0.18), transparent 70%);
}

.page-family-tree .chatbot-page::after {
    width: 280px;
    height: 280px;
    right: 4px;
    bottom: 10px;
    background: radial-gradient(circle, rgba(31, 154, 214, 0.16), transparent 72%);
}

.page-family-tree .chatbot-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
}

.page-family-tree .chatbot-side {
    display: grid;
    gap: 14px;
}

.page-family-tree .chatbot-brand-panel {
    border-radius: 24px;
    border: 1px solid rgba(157, 224, 235, 0.45);
    background:
        radial-gradient(circle at 88% -2%, rgba(255, 255, 255, 0.3), transparent 48%),
        radial-gradient(circle at 6% 88%, rgba(49, 205, 171, 0.2), transparent 42%),
        linear-gradient(155deg, #133c5a, #0e5b72 55%, #158f79);
    color: #ecfbff;
    padding: 22px 20px;
    box-shadow: 0 18px 42px rgba(12, 57, 80, 0.26);
    position: relative;
    overflow: hidden;
}

.page-family-tree .chatbot-brand-panel::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    top: -84px;
    right: -44px;
    border-radius: 999px;
    border: 1px solid rgba(235, 255, 255, 0.32);
}

.page-family-tree .chatbot-eyebrow {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(228, 249, 255, 0.86);
}

.page-family-tree .chatbot-brand-panel h2 {
    margin: 12px 0 0;
    font-family: "Sora", sans-serif;
    font-size: 25px;
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.page-family-tree .chatbot-brand-panel > p {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.52;
    color: rgba(228, 249, 255, 0.9);
    font-weight: 600;
}

.page-family-tree .chatbot-highlights {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.page-family-tree .chatbot-highlights li {
    position: relative;
    margin: 0;
    padding: 9px 10px 9px 32px;
    border-radius: 12px;
    background: rgba(231, 248, 255, 0.14);
    border: 1px solid rgba(231, 248, 255, 0.25);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    color: rgba(246, 253, 255, 0.95);
}

.page-family-tree .chatbot-highlights li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 11px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(160deg, #f3fff8, #7ef2cb);
    box-shadow: 0 0 0 4px rgba(196, 248, 228, 0.2);
}

.page-family-tree .chatbot-page {
    background: #ffffff;
    border: 1px solid #e2edf5;
    border-radius: 24px;
    box-shadow: 0 16px 44px rgba(16, 53, 77, 0.11);
    padding: 18px;
}

.page-family-tree .chatbot-page {
    display: flex;
    flex-direction: column;
    min-height: 620px;
}

.page-family-tree .chatbot-quick-wrap {
    margin-top: 0;
    border: 1px solid #dce9f3;
    border-radius: 20px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(14, 54, 78, 0.08);
}

.page-family-tree .chatbot-quick-head {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #f7fbff, #f0f7fd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
    cursor: pointer;
    border-bottom: 1px solid #ddeaf4;
}

.page-family-tree .chatbot-quick-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #10374f;
    font-size: 13px;
}

.page-family-tree .chatbot-quick-title b {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(130deg, #1278a8, #17b67f);
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.page-family-tree .chatbot-quick-title strong {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.page-family-tree .chatbot-quick-head i {
    font-style: normal;
    color: #47758f;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.page-family-tree .chatbot-quick-wrap.is-collapsed .chatbot-quick-head i {
    transform: rotate(180deg) translateY(1px);
}

.page-family-tree .chatbot-quick-list {
    display: grid;
    padding: 8px;
}

.page-family-tree .chatbot-quick-wrap.is-collapsed .chatbot-quick-list {
    display: none;
}

.page-family-tree .chatbot-quick-btn {
    border: 1px solid #d8e7f1;
    background: #f9fcff;
    color: #1c4d68;
    border-radius: 12px;
    min-height: 44px;
    padding: 9px 12px;
    text-align: left;
    line-height: 1.35;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.page-family-tree .chatbot-quick-btn + .chatbot-quick-btn {
    margin-top: 8px;
}

.page-family-tree .chatbot-quick-btn:hover {
    background: #eaf6ff;
    border-color: #bad8ea;
    transform: translateX(2px);
}

.page-family-tree .chatbot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.page-family-tree .chatbot-head h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.page-family-tree .chatbot-head p {
    margin: 8px 0 0;
    color: #5d788c;
    font-size: 13px;
    font-weight: 600;
}

.page-family-tree .chatbot-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid #c8ebda;
    background: #edfdf5;
    color: #0f6f4f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.page-family-tree .chatbot-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #15b57e;
    box-shadow: 0 0 0 5px rgba(21, 181, 126, 0.2);
}

.page-family-tree .chatbot-messages {
    margin-top: 14px;
    border: 1px solid #d9e7f1;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(243, 250, 255, 0.97)),
        repeating-linear-gradient(
            45deg,
            rgba(208, 228, 241, 0.16) 0,
            rgba(208, 228, 241, 0.16) 10px,
            transparent 10px,
            transparent 20px
        );
    border-radius: 18px;
    padding: 14px;
    height: clamp(430px, 62vh, 640px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-family-tree .chatbot-messages::-webkit-scrollbar {
    width: 10px;
}

.page-family-tree .chatbot-messages::-webkit-scrollbar-thumb {
    background: #c6dbe8;
    border-radius: 999px;
    border: 2px solid #f2f8fd;
}

.page-family-tree .chatbot-msg {
    max-width: min(86%, 620px);
    padding: 11px 13px;
    border-radius: 16px;
    animation: chatbot-msg-in 0.25s ease;
    box-shadow: 0 9px 20px rgba(14, 54, 76, 0.08);
}

.page-family-tree .chatbot-msg p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    white-space: pre-wrap;
    word-break: break-word;
}

.page-family-tree .chatbot-msg span {
    margin-top: 6px;
    display: block;
    font-size: 11px;
    opacity: 0.8;
    font-weight: 800;
}

.page-family-tree .chatbot-msg-user {
    margin-left: auto;
    background: linear-gradient(145deg, #0f668b, #11847f);
    color: #effcff;
    border: 1px solid rgba(101, 217, 197, 0.35);
}

.page-family-tree .chatbot-msg-user.chatbot-msg-quick {
    max-width: min(90%, 640px);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.page-family-tree .chatbot-msg-quick .chatbot-quick-wrap {
    border-color: #b9d6e6;
    border-radius: 16px;
    background: #ecf7ff;
    box-shadow: 0 10px 24px rgba(16, 80, 109, 0.14);
}

.page-family-tree .chatbot-msg-quick .chatbot-quick-head {
    background: linear-gradient(180deg, #f4fbff, #e9f5fe);
    border-bottom-color: #c8dfed;
}

.page-family-tree .chatbot-msg-quick .chatbot-quick-btn {
    background: #f7fcff;
    border-color: #c5ddea;
}

.page-family-tree .chatbot-msg-user span {
    color: rgba(233, 250, 255, 0.85);
}

.page-family-tree .chatbot-msg-bot {
    margin-right: auto;
    background: #ffffff;
    color: #12374f;
    border: 1px solid #d3e3ee;
}

.page-family-tree .chatbot-form {
    margin-top: 13px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.page-family-tree .chatbot-form input {
    height: 48px;
    border-radius: 14px;
    border: 1px solid #cfdfeb;
    background: #f8fbff;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-family-tree .chatbot-form input:focus {
    border-color: #2a9bcf;
    box-shadow: 0 0 0 4px rgba(31, 154, 214, 0.16);
}

.page-family-tree .chatbot-form .btn {
    height: 48px;
    border-radius: 14px;
    min-width: 112px;
    padding: 0 17px;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(130deg, #187ba8, #18a480);
    box-shadow: 0 10px 24px rgba(19, 106, 127, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.page-family-tree .chatbot-form .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 28px rgba(19, 106, 127, 0.28);
}

.page-family-tree .chatbot-form .btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.page-family-tree .chatbot-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.page-family-tree .chatbot-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7a98ac;
    animation: chatbot-typing 0.9s infinite ease-in-out;
}

.page-family-tree .chatbot-typing i:nth-child(2) {
    animation-delay: 0.14s;
}

.page-family-tree .chatbot-typing i:nth-child(3) {
    animation-delay: 0.28s;
}

body.page-chatbot-embed {
    background: #f3f8fb;
}

body.page-chatbot-embed .page-navbar-shell,
body.page-chatbot-embed .site-footer {
    display: none;
}

body.page-chatbot-embed main {
    min-height: 100vh;
}

body.page-chatbot-embed .chatbot-container {
    padding: 0;
}

body.page-chatbot-embed .chatbot-page {
    margin-top: 0;
    padding: 8px;
}

body.page-chatbot-embed .chatbot-page::before,
body.page-chatbot-embed .chatbot-page::after {
    display: none;
}

body.page-chatbot-embed .chatbot-page {
    min-height: calc(100vh - 16px);
    padding: 0;
}

body.page-chatbot-embed .chatbot-page {
    width: 100%;
    margin: 0;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(16, 53, 77, 0.12);
}

body.page-chatbot-embed .chatbot-page {
    padding: 8px;
    min-height: calc(100vh - 16px);
}

body.page-chatbot-embed .chatbot-messages {
    min-height: 0;
    max-height: none;
    height: auto;
    flex: 1 1 auto;
    margin-top: 0;
    padding: 10px;
    gap: 7px;
}

body.page-chatbot-embed .chatbot-form {
    margin-top: 6px;
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 8px;
}

body.page-chatbot-embed .chatbot-form input,
body.page-chatbot-embed .chatbot-form .btn {
    height: 36px;
    border-radius: 9px;
}

body.page-chatbot-embed .chatbot-msg {
    padding: 7px 9px;
    border-radius: 11px;
}

body.page-chatbot-embed .chatbot-msg p {
    font-size: 11px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
}

body.page-chatbot-embed .chatbot-msg span {
    margin-top: 4px;
    font-size: 8px;
}

body.page-chatbot-embed .chatbot-quick-list {
    gap: 4px;
    padding: 6px;
}

body.page-chatbot-embed .chatbot-quick-btn {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 10px;
    line-height: 1.2;
    border-radius: 9px;
}

body.page-chatbot-embed .chatbot-quick-head {
    padding: 7px 8px;
}

body.page-chatbot-embed .chatbot-quick-title strong {
    font-size: 11px;
}

body.page-chatbot-embed .chatbot-quick-title b,
body.page-chatbot-embed .chatbot-quick-head i {
    font-size: 11px;
}

body.page-chatbot-embed .chatbot-status {
    gap: 5px;
    font-size: 11px;
}

body.page-chatbot-embed .chatbot-status i {
    width: 7px;
    height: 7px;
}

body.page-chatbot-embed .chatbot-form input {
    padding: 0 10px;
    font-size: 12px;
    width: 100%;
}

body.page-chatbot-embed .chatbot-form .btn {
    min-width: 0;
    width: 100%;
    padding: 0 10px;
    font-size: 12px;
}

@media (max-width: 980px) {
    .page-family-tree .chatbot-page {
        grid-template-columns: 1fr;
    }

    .page-family-tree .chatbot-brand-panel {
        padding: 20px 18px;
    }

    .page-family-tree .chatbot-page {
        min-height: 0;
    }

    .page-family-tree .chatbot-messages {
        height: min(62vh, 560px);
    }
}

@media (max-width: 640px) {
    .chatbot-shell {
        right: 12px;
        bottom: 12px;
    }

    .floating-chat-btn {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .floating-chat-btn svg {
        width: 18px;
        height: 18px;
    }

    .chatbot-widget {
        bottom: 0;
    }

    .chatbot-widget.is-open {
        width: calc(100vw - 24px);
        height: min(70vh, 560px);
    }

    .site-footer {
        margin-top: 22px;
        padding: 0 12px 14px;
        font-size: 12px;
    }

    .page-family-tree .chatbot-page {
        margin-top: 16px;
    }

    .page-family-tree .chatbot-page {
        padding: 14px;
        border-radius: 20px;
    }

    .page-family-tree .chatbot-brand-panel h2 {
        font-size: 22px;
    }

    .page-family-tree .chatbot-head {
        flex-direction: column;
        gap: 10px;
    }

    .page-family-tree .chatbot-head h3 {
        font-size: 22px;
    }

    .page-family-tree .chatbot-messages {
        height: min(57vh, 480px);
        padding: 12px;
    }

    .page-family-tree .chatbot-form {
        grid-template-columns: 1fr;
    }

    .page-family-tree .chatbot-form .btn {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-family-tree .chatbot-msg,
    .page-family-tree .chatbot-typing i,
    .page-family-tree .chatbot-form .btn,
    .page-family-tree .chatbot-quick-btn {
        animation: none;
        transition: none;
    }
}

@keyframes chatbot-msg-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatbot-typing {
    0%,
    80%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Error Pages */
.page-error {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-soft: #f1f7fb;
    --text: #102133;
    --muted: #688197;
    --line: #d5e3ee;
    --primary: #219ad6;
    --accent: #18b382;
    --shadow: 0 25px 60px rgba(14, 48, 73, 0.12);
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 6% 10%, #dff2fb 0%, transparent 36%),
        radial-gradient(circle at 92% 88%, #dcf5eb 0%, transparent 36%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.page-error .error-card {
    width: 100%;
    max-width: 560px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid #e8f0f6;
    box-shadow: var(--shadow);
    padding: 36px 32px;
    text-align: center;
    animation: fade-up 0.55s ease;
}

.page-error .error-code {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 58px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #0e5070;
}

.page-error .error-title {
    margin: 14px 0 0;
    font-size: 28px;
    line-height: 1.2;
}

.page-error .error-description {
    margin: 12px auto 0;
    max-width: 440px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
}

.page-error .error-actions {
    margin-top: 26px;
}

.page-error .error-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 165px;
    height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(110deg, var(--primary), var(--accent));
    transition: transform 0.15s ease, filter 0.2s ease;
}

.page-error .error-home-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .page-error .error-card {
        padding: 30px 22px;
    }

    .page-error .error-code {
        font-size: 50px;
    }

    .page-error .error-title {
        font-size: 24px;
    }
}

/* Email Change Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.modal-card {
    position: relative;
    width: min(500px, 100%);
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d8e8f2;
    box-shadow: 0 20px 55px rgba(15, 50, 74, 0.3);
    padding: 24px;
}

.modal-card h4 {
    margin: 0 0 12px;
    font-size: 18px;
    font-family: "Sora", sans-serif;
}

.modal-card p {
    margin: 0 0 20px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.modal-actions .btn-ghost {
    background: transparent;
    color: #666;
}

.modal-actions .btn-ghost:hover {
    background: #f5f5f5;
}

/* Login Page overrides */
body.page-login {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding: 0;
    background:
        radial-gradient(circle at 12% 14%, rgba(33, 154, 214, 0.2), transparent 30%),
        radial-gradient(circle at 86% 16%, rgba(24, 179, 130, 0.16), transparent 26%),
        radial-gradient(circle at 50% 92%, rgba(16, 62, 89, 0.08), transparent 32%),
        linear-gradient(160deg, #edf7fb 0%, #fbfdff 42%, #edf8f2 100%);
}

body.page-login::before,
body.page-login::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    filter: blur(10px);
    opacity: 0.85;
}

body.page-login::before {
    top: -80px;
    left: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(33, 154, 214, 0.12);
}

body.page-login::after {
    right: -90px;
    bottom: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(24, 179, 130, 0.1);
}

body.page-login .site-footer {
    padding: 11px 18px 12px;
}

body.page-login main {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px 22px;
    position: relative;
    z-index: 1;
}

.page-login .login-shell {
    width: 100%;
    max-width: 1120px;
    position: relative;
    margin: 0 auto;
}

.page-login .login-shell::before {
    content: "";
    position: absolute;
    inset: -42px auto auto -46px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(33, 154, 214, 0.08);
    filter: blur(6px);
    pointer-events: none;
}

.page-login .login-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    overflow: hidden;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(210, 225, 236, 0.95);
    box-shadow: 0 28px 70px rgba(11, 43, 59, 0.12);
    backdrop-filter: blur(16px);
}

.page-login .login-hero {
    position: relative;
    padding: 36px 34px 34px;
    color: #effcff;
    background:
        radial-gradient(circle at 88% 0%, rgba(255, 255, 255, 0.16), transparent 28%),
        radial-gradient(circle at 10% 82%, rgba(45, 205, 171, 0.18), transparent 26%),
        linear-gradient(160deg, #0f3f59 0%, #155c78 55%, #148c7b 100%);
}

.page-login .login-hero::before,
.page-login .login-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.page-login .login-hero::before {
    width: 180px;
    height: 180px;
    top: -62px;
    right: -56px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.page-login .login-hero::after {
    width: 240px;
    height: 240px;
    left: -102px;
    bottom: -124px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
}

.page-login .login-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(236, 250, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(239, 252, 255, 0.9);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-login .login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.page-login .login-brand--hero {
    margin-top: 18px;
    margin-bottom: 16px;
}

.page-login .login-brand-logo {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 12px 24px rgba(8, 32, 48, 0.14);
}

.page-login .login-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.page-login .login-brand-logo .login-brand-initial {
    font-family: "Sora", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
}

.page-login .login-brand-copy {
    min-width: 0;
}

.page-login .login-brand-copy p {
    margin: 0 0 4px;
    color: rgba(239, 252, 255, 0.75);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-login .login-brand-copy h1 {
    margin: 0;
    color: #ffffff;
    font-family: "Sora", sans-serif;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.page-login .login-hero-title {
    display: block;
    margin: 10px 0 12px;
    color: #ffffff;
    font-family: "Sora", sans-serif;
    font-size: clamp(30px, 3.6vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-login .login-hero-copy {
    margin: 0;
    max-width: 34ch;
    color: rgba(239, 252, 255, 0.88);
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
}

.page-login .login-hero-points {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.page-login .login-hero-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 13px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.page-login .login-hero-point span {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.page-login .login-hero-point strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.page-login .login-hero-point p {
    margin: 0;
    color: rgba(239, 252, 255, 0.8);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 600;
}

.page-login .login-card-body {
    padding: 34px 34px 30px;
    background: rgba(255, 255, 255, 0.93);
}

.page-login .login-panel-head {
    margin-bottom: 18px;
}

.page-login .login-panel-kicker {
    margin: 0 0 8px;
    color: #216e95;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.page-login .login-panel-head h2 {
    display: block;
    margin: 0;
    color: #11374d;
    font-family: "Sora", sans-serif;
    font-size: clamp(26px, 2.8vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-login .login-panel-subtitle {
    margin: 8px 0 0;
    color: #5d7386;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 600;
}

.page-login .login-card h2 {
    display: none;
}

.page-login .login-alerts {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
}

.page-login .login-alert {
    border-radius: 14px;
    padding: 12px 13px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.page-login .login-alert p {
    margin: 0;
}

.page-login .login-alert.is-success {
    border-color: #c9efd8;
    background: #edfdf4;
    color: #166345;
}

.page-login .login-alert.is-error {
    border-color: #f0c8cf;
    background: #fff4f5;
    color: #8d3c46;
}

.page-login .login-alert-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.page-login .login-alert-list li + li {
    margin-top: 6px;
}

.page-login .login-form {
    display: grid;
    gap: 12px;
}

body.page-login .login-card .login-form {
    display: grid !important;
    gap: 12px !important;
}

body.page-login .login-card .login-field {
    display: block !important;
    margin: 0 !important;
}

body.page-login .login-card .login-field label {
    display: block !important;
    margin: 0 0 6px !important;
    color: #17384e !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.page-login .login-field label {
    display: block;
    margin: 0 0 6px;
    color: #17384e;
    font-size: 13px;
    font-weight: 800;
}

.page-login .login-input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid #d4e0ea;
    background: linear-gradient(180deg, #fcfeff, #f8fbfd);
    padding: 0 14px;
    color: #102d41;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

body.page-login .login-card .login-input {
    width: 100% !important;
    height: 52px !important;
    border-radius: 14px !important;
    border: 1px solid #d3e0ea !important;
    background: #fbfdff !important;
    padding: 0 14px !important;
    color: #102d41 !important;
    font-size: 14px !important;
    display: block !important;
    box-sizing: border-box !important;
}

.page-login .login-input::placeholder {
    color: #8aa0b0;
}

.page-login .login-input:focus {
    border-color: #21a2da;
    box-shadow: 0 0 0 4px rgba(33, 154, 214, 0.16);
    background: #ffffff;
}

.page-login .login-password-field {
    position: relative;
}

.page-login .login-password-field .login-input {
    padding-right: 52px;
}

.page-login .login-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(calc(-50% + 11px));
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4f6b7f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-login .login-password-toggle svg {
    width: 18px;
    height: 18px;
}

.page-login .login-utility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

.page-login .login-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #385066;
    font-size: 13px;
    font-weight: 700;
}

.page-login .login-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #219ad6;
}

.page-login .login-link-inline,
.page-login .login-back-link {
    color: #146f9c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.page-login .login-link-inline:hover,
.page-login .login-back-link:hover {
    text-decoration: underline;
}

.page-login .btn-login {
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(115deg, #1f91ce 0%, #1fba8c 100%);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(24, 130, 142, 0.24);
    transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.page-login .btn-login:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 16px 30px rgba(24, 130, 142, 0.28);
}

.page-login .login-divider {
    position: relative;
    margin: 16px 0 14px;
    text-align: center;
}

.page-login .login-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 1px solid #d7e5ee;
    transform: translateY(-50%);
}

.page-login .login-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #6b8294;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-login .login-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-login .login-shortcut {
    min-height: 52px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 16px;
    border: 1px solid #d3e0ea;
    background: #ffffff;
    color: #1e3446;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-login .login-shortcut svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px;
}

.page-login .login-shortcut:hover {
    transform: translateY(-1px);
    border-color: #bdd2df;
    box-shadow: 0 8px 18px rgba(14, 48, 73, 0.08);
}

.page-login .login-otp-stack {
    display: grid;
    gap: 10px;
}

.page-login .login-otp-note {
    margin: 0;
    padding: 0;
    color: #22485c;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.page-login .login-otp-note strong {
    color: #0f3f55;
}

.page-login .login-captcha {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #d8e4ee;
    background: #f8fbfe;
}

.page-login .captcha-mode-status {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
}

.page-login .captcha-mode-status.is-online {
    color: #216fa1;
}

.page-login .captcha-mode-status.is-offline {
    color: #9a5a1b;
}

.page-login .captcha-mode-panel {
    display: grid;
    gap: 10px;
}

.page-login .captcha-mode-panel.hidden {
    display: none !important;
}

.page-login .captcha-widget {
    min-height: 78px;
}

.page-login .offline-captcha-box {
    border-radius: 12px;
    border: 1px solid #d7e6f0;
    background: #ffffff;
    padding: 11px 12px;
}

.page-login .offline-captcha-question {
    display: block;
    color: #1f4258;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.page-login .login-note {
    margin: 12px 0 0;
    color: #5d7586;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 520px) {
    body.page-login main {
        padding: 18px 12px;
    }

    body.page-login .site-footer {
        padding: 12px 12px 16px;
    }

    .page-login .login-card {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .page-login .login-hero {
        padding: 24px 18px 18px;
    }

    .page-login .login-card-body {
        padding: 22px 18px 20px;
    }

    .page-login .login-brand {
        gap: 12px;
        margin-bottom: 12px;
    }

    .page-login .login-brand-logo {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
        border-radius: 18px;
    }

    .page-login .login-brand-copy h1 {
        font-size: 24px;
    }

    .page-login .login-hero-title {
        font-size: 28px;
    }

    .page-login .login-hero-copy {
        font-size: 13px;
    }

    .page-login .login-shortcuts {
        grid-template-columns: 1fr;
    }

    .page-login .login-utility-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-login .login-panel-head h2 {
        font-size: 24px;
    }

    .page-login .login-shortcut {
        min-height: 48px;
    }

    .page-login .captcha-widget {
        transform: scale(0.92);
        transform-origin: left top;
    }

    .page-login .captcha-field {
        min-height: 72px;
    }

    .page-login .message-modal {
        padding: 16px;
    }

    .page-login .message-modal-card {
        border-radius: 20px;
    }

    .page-login .login-modal-hero {
        padding: 18px 16px 12px;
    }

    .page-login .login-modal-icon-wrap {
        gap: 8px;
    }

    .page-login .login-modal-icon {
        width: 45px;
        height: 45px;
    }

    .page-login .login-modal-icon svg {
        width: 22px;
        height: 22px;
    }

    .page-login .login-modal-badge {
        font-size: 10px;
        min-height: 24px;
        padding: 0 9px;
    }

    .page-login .login-message-modal-card h4 {
        font-size: 18px;
    }
}
