.members-page {
    width: var(--site-content, min(1520px, calc(100% - 16px)));
    margin: 0 auto;
    padding: 8px 0 48px;
    box-sizing: border-box;
}

.members-page .members-hero,
.members-page .clan-hero {
    text-align: left;
    background-image:
        linear-gradient(180deg, rgba(10, 18, 36, 0.28) 0%, rgba(10, 18, 36, 0.78) 100%),
        url('../uploads/gallery/681e62310901a_IMG_20250304_132421_626.jpg');
    background-size: cover;
    background-position: center;
}

.members-page .members-hero p,
.members-page .clan-hero p,
.members-page .lede {
    margin-bottom: 0;
}

.birthday-strip {
    background: linear-gradient(135deg, #1E3C72, #2A5298);
    color: #fff;
    border-radius: 14px;
    padding: 14px 14px 10px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 6px 18px rgba(30, 60, 114, 0.18);
}
.birthday-strip h2 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #FFD700;
    font-weight: 800;
}
.birthday-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.birthday-card {
    flex: 0 0 auto;
    width: 86px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 6px 5px;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.birthday-card:hover {
    transform: translateY(-3px) scale(1.03);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.birthday-card img,
.birthday-card .ph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 12%;
    margin: 0 auto 4px;
    border: 2px solid #FFD700;
    background: #e8eef8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1E3C72;
    font-weight: 800;
    font-size: 0.75rem;
}
.birthday-card strong {
    display: block;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.birthday-card span {
    display: block;
    font-size: 0.64rem;
    color: #FFD700;
}
.birthday-empty { font-size: 0.84rem; opacity: 0.9; margin: 0; }

.branch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px;
    position: sticky;
    top: var(--site-header-h, 118px);
    background: rgba(238, 242, 248, 0.92);
    backdrop-filter: blur(6px);
    z-index: 20;
}
.branch-tabs button {
    flex: 0 0 auto;
    border: 1px solid #c9d6ea;
    background: #fff;
    color: #1E3C72;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition:
        transform 0.22s ease,
        background 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.branch-tabs button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
    border-color: #2A5298;
}

.branch-tabs button.is-on {
    background: #1E3C72;
    color: #fff;
    border-color: #1E3C72;
}
.branch-tabs button small {
    font-weight: 600;
    opacity: 0.75;
    margin-left: 3px;
}

.members-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #e4ebf5;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(20, 35, 63, 0.05);
}
.members-tools input,
.members-tools select {
    border: 1px solid #c9d6ea;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.9rem;
    background: #fff;
}
.members-tools input:focus,
.members-tools select:focus {
    outline: none;
    border-color: #2A5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}
.members-tools input { flex: 1 1 240px; min-width: 160px; }
.members-tools select { min-width: 130px; }
.members-count {
    margin-left: auto;
    font-size: 0.84rem;
    color: #1E3C72;
    font-weight: 700;
    background: #eef3fb;
    padding: 6px 12px;
    border-radius: 999px;
}

.members-table-wrap {
    background: #fff;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    overflow-x: auto;
    width: 100%;
    box-shadow: 0 6px 18px rgba(20, 35, 63, 0.06);
}
.members-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.members-table th {
    background: linear-gradient(135deg, #1E3C72, #2A5298);
    color: #fff;
    text-align: left;
    padding: 12px 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 0;
    border-bottom: 3px solid #FFD700;
    position: sticky;
    top: 0;
    z-index: 2;
}
.members-table td {
    padding: 8px 10px;
    border: 1px solid #d7e2f3;
    vertical-align: middle;
}
.members-table tbody tr:nth-child(even) { background: #f4f7fc; }
.members-table tbody tr:hover { background: #eaf1fb; }
.members-table tbody tr.is-off { display: none; }
.m-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 12%;
    background: #e8eef8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #1E3C72;
    border: 2px solid #d7e2f3;
    vertical-align: middle;
}
.members-table a.name {
    color: #1E3C72;
    font-weight: 700;
    text-decoration: none;
}
.members-table .member-actions-cell {
    white-space: nowrap;
    width: 1%;
}

.members-table .member-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.members-table .view {
    color: #fff;
    background: #2A5298;
    text-decoration: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.members-table .view:hover {
    background: #1E3C72;
    transform: translateY(-1px);
}

.members-table .gender {
    font-size: 0.72rem;
    font-weight: 700;
    color: #2A5298;
    background: #eef3fb;
    border-radius: 999px;
    padding: 2px 7px;
}
.members-table a.tel {
    color: #1E3C72;
    text-decoration: none;
    white-space: nowrap;
}
.members-empty {
    text-align: center;
    padding: 18px;
    color: #5b6b86;
    margin: 0;
}

@media (max-width: 720px) {
    .members-page { padding: 8px 8px 28px; }
    .branch-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}
