*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (max-width: 1200px) {
    html, body { overflow: auto; height: auto; }
    .uadm-layout { height: auto; min-height: 100vh; overflow: visible; }
    .uadm-main { height: auto; overflow: visible; }
    .uadm-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .uadm-charts-grid { grid-template-columns: 1fr; }
    .uadm-bottom-grid { grid-template-columns: 1fr; }
    .uadm-new-members-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .uadm-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 모바일 사이드바 드로어 (1024 이하) — PC(>1024)는 이 블록 밖이라 무영향 ── */
.uadm-sidebar__hamburger { display: none; }
.uadm-sidebar__backdrop { display: none; }
@media (max-width: 1024px) {
    .uadm-sidebar__hamburger {
        display: inline-flex; align-items: center; justify-content: center;
        position: fixed; top: 10px; left: 10px; z-index: 1300;
        width: 40px; height: 40px; padding: 0;
        background: #1A202C; color: #fff;
        border: none; border-radius: 8px; cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .uadm-sidebar {
        position: fixed; top: 0; left: 0; z-index: 1310;
        /* 모바일 사파리 하단 툴바(주소창)가 100vh 하단을 가려 'HUB 이동' 버튼이
           안 보이는 문제 → 동적 뷰포트 높이(dvh)로 실제 보이는 영역에 맞춘다.
           dvh 미지원 브라우저는 위의 100vh 로 폴백. */
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .uadm-sidebar.is-open { transform: translateX(0); }
    .uadm-sidebar__backdrop {
        position: fixed; inset: 0; z-index: 1305;
        background: rgba(0,0,0,0.45);
    }
    .uadm-sidebar__backdrop.is-open { display: block; }
    .uadm-main { padding-top: 52px; }
}

@media (max-width: 640px) {
    .uadm-body { padding: 16px; }
    .uadm-header { padding: 0 16px; }
    .uadm-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 전체 레이아웃 ──────────────────────────────── */
.uadm-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ── 사이드바 ─────────────────────────────────── */
.uadm-sidebar {
    width: 256px;
    min-width: 256px;
    /* 이 base 규칙이 소스상 모바일 미디어쿼리보다 뒤라, 여기서 100vh 를 쓰면
       모바일 드로어의 100dvh 를 덮어써(같은 특이도·뒤 우선) 사파리/삼성인터넷
       하단 툴바에 하단(HUB 이동)이 가린다. base 부터 dvh 로 둔다(PC 는 dvh=vh). */
    height: 100vh;
    height: 100dvh;
    background: #1A202C;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.uadm-sidebar__logo {
    padding: 24px;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.uadm-sidebar__logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.uadm-sidebar__logo-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

/* 내비게이션 */
.uadm-sidebar__nav {
    flex: 1;
    /* min-height:0 이 없으면 flex 아이템이 내용 높이 밑으로 안 줄어들어(min-height:auto),
       메뉴가 길면 드로어(overflow:hidden)를 넘겨 하단 프로필/HUB 이동이 잘린다.
       0 으로 두면 nav 가 남는 높이만큼만 차지하고 내부 스크롤된다. */
    min-height: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.uadm-sidebar__nav::-webkit-scrollbar { width: 4px; }
.uadm-sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.uadm-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.uadm-nav__section-label {
    padding: 16px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 16px;
}

.uadm-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-height: 48px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    border-radius: 8px;
}

/* 승인 대기 건수 알림 칩. 대기건이 있을 때만 렌더된다. */
.uadm-nav__chip[hidden] { display: none; }
.uadm-nav__chip {
    margin-left: auto;
    min-width: 24px;
    padding: 0 8px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #E11D48;
    color: #FFFFFF;
    /* 11px 은 어두운 배경에서 뭉개져 보인다 — 크기·두께를 올려 또렷하게 */
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.uadm-nav__item:hover {
    color: #FFFFFF;
    background: rgba(255,255,255,0.08);
}

.uadm-nav__item.active {
    color: #FFFFFF;
    background: rgba(255,255,255,0.1);
}

.uadm-nav__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── 공통 푸터 (uadm 전 페이지) ─────────────────── */
.uadm-detail__footer {
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid #E5E7EB;
    text-align: center;
    color: #6B7280;
    font-size: 13px;
}

/* ── 공통 버튼 (uadm-btn 계열) ─────────────────── */
.uadm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
/* 브랜드 SVG 소셜 아이콘 (글자 아이콘의 배경 없이) */
.uadm-sns-icon--img {
    background: none !important;
    border: 0; border-radius: 0; padding: 0;
    object-fit: contain; vertical-align: -2px;
}

/* 공용 브레드크럼 — 좌측 메뉴명 기준 경로 표기 */
.uadm-crumbs {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
    font-size: 13px; color: #64748B;
}
.uadm-crumbs a { color: #64748B; text-decoration: none; }
.uadm-crumbs a:hover { color: #0058BE; }
.uadm-crumbs__sep { color: #CBD5E1; }
.uadm-crumbs__cur { color: #191C1E; font-weight: 600; }

.uadm-btn--outline {
    background: #FFFFFF;
    border-color: #C7C5CD;
    color: #191C1E;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.uadm-btn--outline:hover { background: #F8FAFC; }
.uadm-btn--primary {
    background: #0058BE;
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.uadm-btn--primary:hover { background: #004A9F; }
.uadm-btn--sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 4px;
}
.uadm-btn--danger {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.uadm-btn--danger:hover { background: #B91C1C; }

/* ── 공통 페이지네이션 ─────────────────────────── */
.uadm-member-pagination__nav {
    display: flex;
    gap: 4px;
    align-items: center;
}
.uadm-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.uadm-page-btn:hover { background: #F8FAFC; }
.uadm-page-btn.active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}
.uadm-page-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.uadm-page-ellipsis {
    padding: 0 4px;
    color: #94A3B8;
    font-size: 13px;
}

/* ── 하위 메뉴 그룹 (회원관리) ────────────────── */
.uadm-nav__group { display: flex; flex-direction: column; gap: 4px; }
.uadm-nav__group-toggle {
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
}
.uadm-nav__group-toggle .uadm-nav__label { flex: 1; }
.uadm-nav__caret {
    color: rgba(255,255,255,0.6);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.uadm-nav__group.is-open .uadm-nav__caret { transform: rotate(180deg); }

.uadm-nav__submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 8px;
}
.uadm-nav__group.is-open .uadm-nav__submenu { display: flex; }

.uadm-nav__subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-height: 44px;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.uadm-nav__sub-prefix { color: rgba(255,255,255,0.5); font-size: 16px; line-height: 24px; }
.uadm-nav__subitem:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }
.uadm-nav__subitem.active { color: #EF7D00; }
.uadm-nav__subitem.active .uadm-nav__sub-prefix { color: #EF7D00; }

/* 프로필 카드 */
.uadm-sidebar__profile {
    margin: 0 16px 16px;
    background: rgba(249,115,22,0.5);
    border-radius: 8px;
    padding: 16px;
}

.uadm-profile__role {
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    color: rgba(255,255,255,0.6);
}

.uadm-profile__name {
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: #FFFFFF;
    margin-top: 4px;
}

.uadm-profile__logout {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    padding: 4px 10px;
    transition: opacity 0.15s;
}

.uadm-profile__logout:hover { opacity: 0.75; }

/* 하단 */
.uadm-sidebar__bottom {
    display: flex;
    flex-direction: column;
    /* iOS 홈 인디케이터/하단 안전영역만큼 여백을 둬 'HUB 이동'이 가리지 않게 */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.uadm-sidebar__lang {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-size: 12px;
    color: #FFFFFF;
    cursor: pointer;
    gap: 6px;
}

.uadm-sidebar__lang select {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.uadm-sidebar__hub-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    background: rgba(255,255,255,0.1);
    font-size: 12px;
    font-weight: 400;
    color: #FFFFFF;
    text-decoration: none;
    gap: 6px;
    transition: background 0.15s;
}

.uadm-sidebar__hub-link:hover { background: rgba(255,255,255,0.16); }

/* ── 메인 콘텐츠 ───────────────────────────────── */
.uadm-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
}

.uadm-main::-webkit-scrollbar { width: 6px; }
.uadm-main::-webkit-scrollbar-track { background: transparent; }
.uadm-main::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }

/* 헤더 */
.uadm-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 2;
}

.uadm-header__left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.uadm-header__title {
    font-weight: 700;
    font-size: 20px;
    color: #000000;
    line-height: 20px;
}

.uadm-header__tabs {
    display: flex;
    gap: 30px;
    align-items: center;
}

.uadm-header__tab {
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: color 0.15s;
    text-decoration: none;
    display: inline-block;
    line-height: 20px;
    position: relative;
    padding-bottom: 4px;
}

.uadm-header__tab:hover { color: #1A202C; }

.uadm-header__tab.active {
    color: #F97316;
    font-weight: 700;
}

.uadm-header__tab.active::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #F97316;
}

.uadm-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uadm-header__date {
    font-size: 12px;
    color: #94A3B8;
}

.uadm-header__refresh {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 14px;
    transition: border-color 0.15s;
}

.uadm-header__refresh:hover { border-color: #F97316; color: #F97316; }

/* 바디 */
.uadm-body {
    padding: 24px;
    flex: 1;
}

/* ── KPI 카드 ─────────────────────────────────── */
.uadm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.uadm-kpi-card {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #E2E8F0;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.uadm-kpi-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.uadm-kpi-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.uadm-kpi-card__icon img {
    max-width: 24px;
    max-height: 24px;
    display: block;
}

.uadm-kpi-card__label {
    font-size: 13px;
    font-weight: 500;
    color: #768394;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    margin-top: 14px;
}

/* 숫자 + 단위(명)를 한 줄에, 단위는 숫자 오른쪽 아랫선에 맞춘다 */
.uadm-kpi-card__value-line {
    display: flex; align-items: baseline; gap: 4px;
    margin-bottom: 12px;
}
.uadm-kpi-card__value-line .uadm-kpi-card__value { margin-bottom: 0; }
/* 단위: '전체 회원 수' 라벨과 동일한 스타일·사이즈 */
.uadm-kpi-card__unit {
    font-size: 13px;
    font-weight: 500;
    color: #768394;
    letter-spacing: -0.01em;
}
.uadm-kpi-card__value {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    line-height: 36px;
    margin-top: 0;
    margin-bottom: 12px;
}

.uadm-kpi-card__bar-bg {
    height: 4px;
    background: #F1F5F9;
    border-radius: 12px;
    overflow: hidden;
    margin-top: auto;
}

.uadm-kpi-card__bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    width: 0;
}

.uadm-kpi-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 3px;
}

.uadm-kpi-card__badge--up { background: #F0FDF4; color: #16A34A; }
.uadm-kpi-card__badge--down { background: #FFF1F2; color: #E11D48; }
/* 증감이 없을 때. 상승 색을 쓰면 오르지 않았는데 오른 것처럼 보인다. */
.uadm-kpi-card__badge--flat { background: #F1F5F9; color: #64748B; }

/* ── 가운데 그리드 (서비스 분포 + 활동) ──────────── */
.uadm-mid-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.uadm-panel {
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.uadm-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #F1F5F9;
}

.uadm-panel__title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.03em;
}

.uadm-panel__subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #768394;
    letter-spacing: -0.03em;
    margin-top: 3px;
}

.uadm-panel__more {
    font-size: 12px;
    color: #94A3B8;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    padding: 0;
}

.uadm-panel__more:hover { color: #F97316; }

/* 주간/월간 토글 */
.uadm-period-toggle {
    display: flex;
    gap: 8px;
}

.uadm-period-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    height: 28px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    color: #94A3B8;
    background: none;
}

.uadm-period-btn.active {
    background: #F1F5F9;
    color: #475569;
}

/* 서비스 분포 4-col 미니 통계 */
.uadm-svc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 시안처럼 항목별 게이지바 사이를 띄운다. 0 이면 막대가 서로 붙어 한 줄처럼 보인다. */
    gap: 28px;
    padding: 24px;
}

.uadm-svc-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uadm-svc-stat__label {
    font-size: 14px;
    font-weight: 400;
    color: #768394;
    text-transform: uppercase;
}

.uadm-svc-stat__value-line { display: flex; align-items: baseline; gap: 3px; }
.uadm-svc-stat__value {
    font-size: 20px;
    font-weight: 600;
    color: #0F172A;
    line-height: 28px;
}
/* 숫자 옆 '명' 단위 — KPI 카드 단위와 동일 톤 */
.uadm-svc-stat__unit {
    font-size: 12px; font-weight: 500;
    color: #768394; letter-spacing: -0.01em;
}

.uadm-svc-stat__bar-bg {
    height: 6px;
    border-radius: 12px;
    overflow: hidden;
}

.uadm-svc-stat__bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    width: 0;
}

/* 서비스 차트 영역 */
.uadm-svc-chart {
    background: #F8FAFC;
    margin: 0 24px 24px;
    border-radius: 8px;
    height: 185px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uadm-svc-chart canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.uadm-svc-chart__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.uadm-svc-chart__empty-icon {
    width: 36px;
    height: 36px;
    background: #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uadm-svc-chart__empty-text {
    font-size: 13px;
    color: #94A3B8;
}

/* 활동 로그 */
.uadm-activity__list {
    display: flex;
    flex-direction: column;
}

.uadm-activity__item {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 52px;
    padding: 0 20px;
    border-bottom: 1px solid #F1F5F9;
}

.uadm-activity__item:last-child { border-bottom: none; }

.uadm-activity__time {
    font-size: 13px;
    color: #768394;
    width: 64px;
    flex-shrink: 0;
    line-height: 15px;
    white-space: nowrap;
}

.uadm-activity__type {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-left: 8px;
    color: #000000;
    margin-left: 8px;
    flex-shrink: 0;
}

.uadm-activity__email {
    font-size: 14px;
    color: #53565D;
    margin-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 활동로그 전체보기 */
.uadm-activity__footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid #F1F5F9;
}

.uadm-activity__footer a {
    font-size: 13px;
    color: #F97316;
    text-decoration: none;
    font-weight: 500;
}

/* ── 신규 가입자 구성 ─────────────────────────── */
.uadm-bottom-panel {
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.uadm-bottom-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #F1F5F9;
}

.uadm-bottom-panel__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.uadm-bottom-panel__title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.03em;
}

.uadm-bottom-panel__sub {
    font-size: 14px;
    color: #768394;
}

.uadm-bottom-panel__count {
    font-size: 24px;
    font-weight: 700;
    color: #F97316;
    text-align: right;
    line-height: 1;
}

.uadm-bottom-panel__count-label {
    font-size: 12px;
    color: #94A3B8;
    text-align: right;
    margin-top: 2px;
}

.uadm-new-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 24px;
    gap: 24px;
}

.uadm-new-col__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 16px;
}

.uadm-new-col__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.uadm-new-col__items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uadm-new-col__item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.uadm-new-col__item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uadm-new-col__item-name {
    font-size: 13px;
    color: #374151;
}

.uadm-new-col__item-meta {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.uadm-new-col__bar-bg {
    height: 5px;
    background: #F1F5F9;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* 빈 바 shimmer 는 뺐다.
   감추려던 선택자(~ 형제, [style*="width: 0"])가 동작하지 않아 값이 있어도 계속 반짝였다. */

.uadm-new-col__bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
}

/* ── 레거시 호환 (기존 스타일 유지) ──────────── */
.uadm-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.uadm-new-member__table {
    width: 100%;
    border-collapse: collapse;
}

.uadm-new-member__table th {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0 10px;
    text-align: left;
    border-bottom: 1px solid #F1F5F9;
}

.uadm-new-member__table td {
    font-size: 13px;
    color: #374151;
    padding: 9px 0;
    border-bottom: 1px solid #F8FAFC;
    vertical-align: middle;
}

.uadm-new-member__table tr:last-child td { border-bottom: none; }

.uadm-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.uadm-type-badge--parent  { background: #EFF6FF; color: #2563EB; }
.uadm-type-badge--teacher { background: #F0FDF4; color: #16A34A; }
.uadm-type-badge--org     { background: #FFF7ED; color: #C2410C; }

.uadm-stats__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.uadm-stats__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uadm-stats__label {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uadm-stats__bar-wrap {
    flex: 1;
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    margin: 0 14px;
    overflow: hidden;
}

.uadm-stats__bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.uadm-stats__value {
    font-size: 13px;
    font-weight: 600;
    color: #1A202C;
    min-width: 40px;
    text-align: right;
}

/* ===============================================================
 * 공통 스켈레톤 로딩 유틸 (전역)
 * =============================================================== */
@keyframes uadmSkelShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.uadm-skel {
    display: inline-block;
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: uadmSkelShimmer 1.2s ease-in-out infinite;
    color: transparent !important;
    user-select: none;
    vertical-align: middle;
    min-height: 14px;
}
.uadm-skel--block { display: block; }
.uadm-skel--xs  { width: 40px;  height: 14px; }
.uadm-skel--sm  { width: 80px;  height: 16px; }
.uadm-skel--md  { width: 140px; height: 18px; }
.uadm-skel--lg  { width: 200px; height: 22px; }
.uadm-skel--xl  { width: 280px; height: 26px; }
.uadm-skel--num { width: 90px;  height: 30px; }
.uadm-skel--pill { width: 60px; height: 20px; border-radius: 12px; }
.uadm-skel-row {
    display: block;
    height: 16px;
    margin: 6px 0;
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: uadmSkelShimmer 1.2s ease-in-out infinite;
}
/* 테이블 스켈레톤 셀 */
.uadm-skel-cell { padding: 14px 20px !important; }
.uadm-skel-cell .uadm-skel { width: 70%; height: 16px; }

/* ====== uadm 공통 커스텀 알럿 ====== */
@keyframes uadmAlertBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes uadmAlertBoxIn {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.uadm-alert {
    position: fixed; inset: 0;
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.uadm-alert[hidden] { display: none !important; }
.uadm-alert__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: uadmAlertBackdropIn 160ms ease-out;
}
.uadm-alert__box {
    position: relative;
    box-sizing: border-box;
    min-width: 260px;
    max-width: min(420px, calc(100% - 32px));
    padding: 24px 24px 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(15,23,42,0.25), 0 8px 16px -8px rgba(15,23,42,0.15);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    transform-origin: center;
}
.uadm-alert__box.is-in {
    animation: uadmAlertBoxIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.uadm-alert__icon {
    display: flex; align-items: center; justify-content: center;
    height: 28px;
}
.uadm-alert__icon[hidden] { display: none !important; }
.uadm-alert__icon-slot { display: none; align-items: center; justify-content: center; }
.uadm-alert__msg {
    font-family: 'Pretendard', 'Inter', sans-serif;
    font-size: 14px;
    line-height: 22px;
    font-weight: 500;
    color: #0F172A;
    text-align: center;
    white-space: pre-line;
    max-width: 340px;
    letter-spacing: -0.1px;
}
.uadm-alert__actions {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4px;
}
.uadm-alert__btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 84px;
    height: 38px;
    padding: 8px 20px;
    background: #0F172A;
    color: #FFFFFF;
    border: 1px solid #0F172A;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}
.uadm-alert__btn:hover { opacity: 0.88; }
.uadm-alert__btn--cancel {
    background: #FFFFFF;
    color: #334155;
    border-color: #E2E8F0;
}
.uadm-alert__btn--cancel:hover { background: #F8FAFC; opacity: 1; }
.uadm-alert__btn[hidden] { display: none !important; }

/* 레거시 알림 모달(page/adm/adm_alert_modal.php)은 d-none 으로 숨겨져 있는데,
   그 유틸리티는 adm_common.css 에만 있고 uadm 화면은 그 파일을 싣지 않는다.
   그래서 안 실으면 확인/알림 마크업이 푸터 아래에 그대로 노출된다.
   lb.js 가 gu.alert 를 호출하므로 마크업 자체는 남겨야 해서 규칙만 가져온다. */
.d-none{display:none !important;}

/* 내보내기 형식 선택 (기획: 엑셀 CSV / XLSX 형식 지원).
   6개 화면이 함께 쓴다. 옆의 .uadm-btn--outline 과 같은 치수·테두리로 맞춘다. */
.uadm-export-format {
    height: 42px;
    padding: 0 34px 0 12px;          /* 오른쪽은 화살표 자리 */
    border: 1px solid #C7C5CD;
    border-radius: 8px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2346464C' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #191C1E;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;                /* OS 기본 화살표 제거 */
    transition: background-color 0.15s, border-color 0.15s;
}
.uadm-export-format:hover { background-color: #F8FAFC; }
.uadm-export-format:focus-visible {
    border-color: #0058BE;
    outline: 2px solid rgba(0, 88, 190, 0.25);
    outline-offset: 1px;
}
/* 목록에서 고른 항목이 파란 배경 위 검은 글씨로 뭉개지지 않게 */
.uadm-export-format option { color: #191C1E; background: #FFFFFF; }

/* ── 페이지 헤더 통일 — 기준: 관리자 권한 설정 화면 ──
   크럼 14px › (24px) › 제목 30/800/-0.75 › (4px) › 부제 16px #64748B.
   페이지별 CSS 가 뒤에 로드되므로 .uadm-layout 을 붙여 특이도로 이긴다. */
/* 서체·두께를 명시해야 페이지 기본 폰트에 따라 굵기가 달라 보이지 않는다 */
.uadm-layout .uadm-crumbs {
    font-family: 'Pretendard', sans-serif;
    font-size: 14px; font-weight: 500;
    margin: 0 0 24px;
}
.uadm-layout .uadm-crumbs a { font-weight: 500; }
.uadm-layout .uadm-crumbs a:hover { color: #1A202C; }
.uadm-layout .uadm-crumbs .uadm-crumbs__sep { font-weight: 400; }
/* 경로의 마지막 항목(현재 화면)은 진하게 */
.uadm-layout .uadm-crumbs > :last-child { color: #191C1E; font-weight: 500; }

/* 상단 여백 통일 — 기준(이탈 관리) 32px. 24px·40px 로 제각각이던 화면들 */
.uadm-layout .uadm-main.uadm-leave,
.uadm-layout .uadm-main.uadm-activity-page,
.uadm-layout .uadm-main.uadm-member { padding: 32px; }

/* gap 컬럼 안에서는 gap 이 간격을 만든다 — 마진까지 더하면 두 배가 된다 */
.uadm-perm-page__body > .uadm-crumbs,
.uadm-churn-page__body > .uadm-crumbs,
.uadm-mail-page__body > .uadm-crumbs,
.uadm-sns-page__body > .uadm-crumbs,
.uadm-sns-log-page__body > .uadm-crumbs,
.uadm-activity-page__body > .uadm-crumbs,
.uadm-leave__body > .uadm-crumbs { margin-bottom: 0; }
/* 승인 관리는 gap 이 32px 라 -8px 로 기준(24px)에 맞춘다 */
.uadm-approval-page__body > .uadm-crumbs { margin-bottom: -8px; }

.uadm-layout .uadm-member__title,
.uadm-layout .uadm-activity-page__title,
.uadm-layout .uadm-detail__title,
.uadm-layout .uadm-leave__title,
.uadm-layout .uadm-sns-page__title,
.uadm-layout .uadm-approval-page__title,
.uadm-layout .uadm-notes__title,
.uadm-layout .uadm-activity__title,
.uadm-layout .uadm-churn-page__title,
.uadm-layout .uadm-mail-page__title,
.uadm-layout .uadm-sns-log-page__title,
.uadm-layout .uadm-perm-page__title {
    /* 제목과 부제 사이 8px — 4px 는 너무 붙어 보인다 */
    margin: 0 0 8px 0;
    font-family: 'Pretendard', sans-serif;
    font-weight: 800; font-size: 30px; line-height: 36px;
    letter-spacing: -0.75px; color: #1A202C;
}
.uadm-layout .uadm-member__subtitle,
.uadm-layout .uadm-leave__subtitle,
.uadm-layout .uadm-sns-page__subtitle,
.uadm-layout .uadm-activity__subtitle {
    margin: 0; font-size: 16px; color: #64748B; line-height: 24px;
}

/* ── 대시보드 모바일 반응형 (640 이하) — 파일 끝이라 정의보다 우선, PC 무영향 ── */
@media (max-width: 640px) {
    .uadm-kpi-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .uadm-mid-grid  { grid-template-columns: 1fr !important; }
    .uadm-new-grid  { grid-template-columns: 1fr !important; }
    /* 서비스 이용 분포: 4칼럼이 좁아 글자가 세로로 쪼개진다 → 2열 */
    .uadm-svc-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
    /* 최근 활동 로그 등 표/카드가 오른쪽으로 잘리지 않게 */
    .uadm-panel, .uadm-bottom-panel { min-width: 0; overflow-x: auto; }
}

/* ── 공통 모바일 레이아웃 (화면별 반응형 공통분) ───────────────────
   member/leave/activity 는 .uadm-main 에 padding:32px 단축을 걸어
   ≤1024 의 padding-top:52px(햄버거 여백)를 덮어써 제목이 햄버거에
   가린다. 같은 특이도로 뒤에서 top 여백을 되살린다. */
@media (max-width: 1024px) {
    /* 모든 화면: 고정 햄버거(top:10 + 40px)가 상단 경로/제목을 가리지 않도록
       본문 상단 여백을 확보한다. 일부 화면(sns/sns_log/detail/notes 등)은
       .uadm-main.<페이지> 로 자체 padding 을 걸어 특이도가 같아 소스순서로
       이겨버리므로, !important 로 상단 여백만 확실히 되살린다(좌우/하단은
       각 화면 값 유지). */
    .uadm-layout .uadm-main { padding-top: 56px !important; }
    /* 경로(breadcrumb)가 __body 래퍼(padding:32) 안에 있는 화면은 main 의 56px
       위에 래퍼 top padding 이 겹쳐 햄버거~경로 간격이 페이지마다 달라진다.
       모바일에선 래퍼 상단 여백을 0으로 눌러 crumbs 가 main 직속인 화면
       (member/dashboard/stats 등)과 간격을 통일한다. */
    .uadm-layout .uadm-main > [class*="__body"] { padding-top: 0 !important; }
}
@media (max-width: 640px) {
    /* 본문 좌우 여백 축소 — 좁은 화면에서 콘텐츠 폭 확보 */
    .uadm-layout .uadm-main { padding-left: 16px !important; padding-right: 16px !important; }
    .uadm-layout .uadm-main.uadm-leave,
    .uadm-layout .uadm-main.uadm-activity-page,
    .uadm-layout .uadm-main.uadm-member { padding: 56px 16px 24px !important; }
    /* 대시보드 상단 헤더(대시보드/개요/통계분석): 상단 여백을 조금 준다
       (좌우는 콘텐츠와 동일한 16px 로 정렬) */
    .uadm-layout .uadm-main > .uadm-header { padding-top: 10px !important; }
    .uadm-header__left { padding-left: 4px; }
    /* 신규 가입자 구성 헤더: 긴 부제가 우측 카운트를 밀지 않게 위쪽 정렬 + 간격,
       우측 '오늘 신규 가입' 라벨은 한 줄 유지 */
    .uadm-bottom-panel__header { align-items: flex-start; gap: 12px; }
    .uadm-bottom-panel__count-label { white-space: nowrap; }
    /* 콘텐츠 좌우 여백 통일: 화면마다 안쪽 래퍼(__body 32px, .uadm-body 등)의
       좌우 패딩이 제각각이라 콘텐츠 시작점이 16/32/48px 로 갈렸다. 바깥
       main 이 16px 를 담당하고 안쪽 래퍼는 좌우 0 으로 맞춰 전 화면 16px
       로 통일한다(상/하 여백은 유지). */
    .uadm-layout .uadm-main > [class$="__body"],
    .uadm-layout .uadm-main > .uadm-body,
    .uadm-layout .uadm-main > .uadm-header { padding-left: 0 !important; padding-right: 0 !important; }
    /* 경로(breadcrumb) 줄바꿈 허용 */
    .uadm-crumbs { flex-wrap: wrap; row-gap: 2px; }
    /* 패널 헤더(제목+주간/월간 토글): 토글 글자가 '주/간'으로 쪼개지지 않게 */
    .uadm-panel__header { flex-wrap: wrap; gap: 8px; }
    .uadm-period-btn { white-space: nowrap; }
    /* 데이터 테이블 공통 — 좁은 화면에서 칸이 세로로 뭉개지지 않게
       가로 스크롤로 전환하고 최소 폭을 보장한다. */
    .uadm-member-table-wrap,
    .uadm-churn-table-wrap,
    .uadm-mail-table-wrap,
    .uadm-approval-tableWrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .uadm-member-table,
    .uadm-churn-table,
    .uadm-mail-table,
    .uadm-approval-table { min-width: 840px; }
    /* 표 헤더 항목명이 '서비스 권/한' 처럼 개행되지 않게 한 줄 유지 +
       셀에 좌우 여백을 조금 더 줘 열 간격이 답답하지 않게 */
    .uadm-main table thead th { white-space: nowrap; }
    .uadm-main table thead th, .uadm-main table tbody td { padding-left: 16px; padding-right: 16px; }
    /* 카드 헤더의 툴바(검색·버튼)가 오른쪽으로 넘치지 않게 줄바꿈 */
    .uadm-churn-tableCard__head,
    .uadm-churn-tableCard__tools { flex-wrap: wrap; gap: 8px; }
    /* churn 표 좌우 32px 여백은 좁은 화면에서 과해 축소 */
    .uadm-churn-table-wrap { padding: 0 16px !important; }
}
.uadm-nowrap { white-space: nowrap; }

/* 모바일 메뉴 드로어가 열려 있는 동안 배경(부모창) 스크롤 잠금.
   JS(sbOpen/sbClose)가 html·body 에 .uadm-drawer-open 을 토글한다. */
html.uadm-drawer-open,
body.uadm-drawer-open { overflow: hidden !important; touch-action: none; }
