@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    /* Newman Logo Color Palette */
    --primary: #3155E7;
    --primary-hover: #2443C7;
    --primary-light: #EAF0FF;

    --blue: #2563EB;
    --cyan: #18B9E8;
    --purple: #6336E8;
    --navy: #101A43;

    /* UI Colors */
    --bg-color: #F6F8FC;
    --surface: #FFFFFF;

    --text-main: #101A43;
    --text-muted: #667085;

    --border: #E4E9F2;
    --input-bg: #F9FAFC;

    --error: #EF5B6A;

    /* =========================================================
       관리자 공통 UI 시스템 변수 (완벽 규격화)
    ========================================================= */
    --admin-bg: #F6F8FB;
    --admin-surface: #FFFFFF;
    --admin-text: #172033;
    --admin-muted: #667085;
    --admin-border: #E4E7EC;
    --admin-primary: #3155E7;
    --admin-primary-soft: #EEF4FF;
    --admin-shadow: 0 10px 30px rgba(16, 24, 40, .05);
    --admin-radius-xl: 22px;
    --admin-radius-lg: 16px;
    --admin-radius-md: 12px;
    --admin-transition: 180ms cubic-bezier(.2, .8, .2, 1);

    /* 규격화 변수 */
    --input-height: 52px;
    --btn-primary-height: 52px;
    --btn-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:
        'Pretendard',
        -apple-system,
        BlinkMacSystemFont,
        system-ui,
        Roboto,
        sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 20px;

    overflow-x: hidden;
}

/* 관리자 페이지 Body 스타일 오버라이드 */
body:has(.admin-container),
body.admin-body {
    display: block;
    background: var(--admin-bg);
    color: var(--admin-text);
    padding: 40px 20px;
    margin: 0;
    min-height: 100vh;
}

/* =========================
   메인 카드 (사용자 페이지)
========================= */

.container {
    background: var(--surface);

    width: 100%;
    max-width: 420px;

    padding: 40px 30px;

    border-radius: 24px;

    box-shadow:
        0 12px 40px rgba(16, 26, 67, 0.06),
        0 2px 8px rgba(16, 26, 67, 0.03);

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================
   로고
========================= */

.logo { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 24px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}

/* =========================
   타이틀
========================= */

h2 {
    font-size: 24px;
    font-weight: 700;

    text-align: center;
    line-height: 1.4;

    margin-bottom: 24px;

    color: var(--navy);

    letter-spacing: -0.5px;
}

p.desc {
    font-size: 15px;

    color: var(--text-muted);

    text-align: center;

    margin-bottom: 30px;

    line-height: 1.6;
}

p.error-msg {
    color: var(--error);

    font-size: 14px;

    margin-bottom: 16px;

    text-align: center;

    font-weight: 500;
}

.error-msg {
    width: 100%;

    margin-bottom: 18px;
    padding: 13px 16px;

    border-radius: 12px;

    background: #FFF5F5;
    color: #E05260;

    font-size: 14px;
    line-height: 1.5;

    text-align: center;
    font-weight: 600;
}

/* =========================
   폼
========================= */

form {
    width: 100%;

    display: flex;
    flex-direction: column;
}

.input-group {
    width: 100%;

    margin-bottom: 16px;

    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 14px;

    font-weight: 600;

    margin-bottom: 8px;

    color: var(--navy);

    letter-spacing: -0.2px;
}

/* =========================
   입력창
========================= */

input {
    width: 100%;
    height: 52px;

    padding: 0 16px;

    font-size: 16px;

    border: 1.5px solid var(--border);

    border-radius: 12px;

    background-color: var(--input-bg);

    color: var(--text-main);

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

input::placeholder {
    color: #98A2B3;
}

input:focus {
    border-color: var(--primary);

    background-color: var(--surface);

    outline: none;

    box-shadow:
        0 0 0 3px rgba(49, 85, 231, 0.10);
}

/* =========================
   버튼
========================= */

button {
    width: 100%;
    height: 52px;

    margin-top: 8px;

    border: none;
    border-radius: 12px;

    /* 로고의 블루 → 퍼플 느낌 */
    background: linear-gradient(
        135deg,
        #2563EB 0%,
        #3155E7 50%,
        #6336E8 100%
    );

    color: white;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow:
        0 6px 16px rgba(49, 85, 231, 0.20);
}

button:hover {
    background: linear-gradient(
        135deg,
        #1F55D8 0%,
        #2949D1 50%,
        #5730D2 100%
    );

    box-shadow:
        0 8px 20px rgba(49, 85, 231, 0.26);

    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);

    box-shadow:
        0 4px 10px rgba(49, 85, 231, 0.18);
}

/* 보조 버튼 */

button.btn-secondary {
    background: #EEF2F7;

    color: #475467;

    margin-top: 16px;

    box-shadow: none;
}

button.btn-secondary:hover {
    background: #E4E9F1;

    color: var(--navy);

    box-shadow: none;

    transform: none;
}

/* 삭제 / 위험 버튼 */

button.btn-danger {
    background: #EF5B6A;

    box-shadow:
        0 6px 16px rgba(239, 91, 106, 0.18);
}

button.btn-danger:hover {
    background: #D94858;

    box-shadow:
        0 8px 20px rgba(239, 91, 106, 0.22);
}

/* =========================
   서명 캔버스
========================= */

.canvas-container {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    width: 100%;
    max-width: 400px;
    height: 200px;

    border: 2px dashed #D8DEEA;

    border-radius: 16px;

    background-color: #FCFDFE;

    margin-bottom: 24px;

    touch-action: none;

    cursor: crosshair;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

canvas:active {
    border-color: var(--primary);

    background-color: #F8FAFF;
}

/* =========================
   버튼 그룹
========================= */

.button-group {
    display: flex;

    gap: 12px;

    width: 100%;
}

.button-group button {
    margin-top: 0;
}

/* =========================
   링크
========================= */

a {
    text-decoration: none;

    width: 100%;
}

/* =========================
   Footer
========================= */

footer {
    margin-top: 32px;

    text-align: center;

    color: var(--text-muted);

    font-size: 13px;

    line-height: 1.6;
}

footer .copyright {
    font-weight: 600;

    margin-bottom: 4px;

    color: var(--navy);
}

.help-msg {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #98A2B3;
}

.help-msg strong {
    color: #667085;
    font-weight: 600;
}


/* =========================================================
   관리자 공통 UI 시스템 (Admin Common Components)
========================================================= */

.admin-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid rgba(228, 231, 236, .9);
    border-radius: var(--admin-radius-xl);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.5px;
    text-align: left;
    color: var(--admin-text);
}

/* 관리자 탭 네비게이션 */
.admin-nav {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    margin: 0 0 28px;
    padding: 4px;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: #F2F4F7;
}

.admin-nav-item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
    border-radius: 10px;
    color: var(--admin-muted);
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--admin-transition);
}

.admin-nav-item:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, .55);
}

.admin-nav-item.active {
    color: var(--admin-primary);
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .09);
}

/* 섹션 카드 */
.section-box {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .025);
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.35px;
    color: var(--admin-text);
}

.section-heading p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 14px;
}

/* 알림 메시지 */
.flash-message {
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 10px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
    font-size: 14px;
    font-weight: 600;
}

/* 관리자 공통 버튼 */
.admin-container button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all var(--admin-transition);
}

.btn-primary,
.admin-container .btn-primary,
.admin-container button.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-primary-height);
    background: var(--admin-primary);
    color: white;
    border-radius: var(--btn-radius);
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    margin-top: 0;
    box-shadow: none;
}

.btn-primary:hover,
.admin-container .btn-primary:hover,
.admin-container button.btn-primary:hover {
    background: #2546C4;
    transform: translateY(-1px);
    box-shadow: none;
}

.admin-container .btn-secondary,
.admin-container button.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-primary-height);
    background: #F2F4F7;
    color: #475467;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 15px;
    width: 100%;
    margin-top: 0;
    box-shadow: none;
}

.admin-container .btn-secondary:hover,
.admin-container button.btn-secondary:hover {
    background: #E4E7EC;
    color: var(--admin-text);
    box-shadow: none;
    transform: none;
}

.btn-sm,
.admin-container .btn-sm,
.admin-container button.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 8px;
    width: auto;
    margin-top: 0;
}

/* 관리자 공통 입력창 규격화 */
.setting-field input,
.setting-field textarea,
.member-field input,
.search-box input,
.filter-row select,
.upload-row input[type="file"] {
    width: 100%;
    border: 1.5px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: #FAFBFD;
    color: var(--admin-text);
    font-size: 15px;
    transition: all var(--admin-transition);
}

.setting-field input,
.member-field input,
.search-box input,
.filter-row select,
.upload-row input[type="file"] {
    height: var(--input-height);
    padding: 0 16px;
}

.setting-field textarea {
    padding: 14px 16px;
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.setting-field input:focus,
.setting-field textarea:focus,
.member-field input:focus,
.search-box input:focus,
.filter-row select:focus {
    outline: none;
    border-color: var(--admin-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(49, 85, 231, .10);
}


/* =========================================================
   admin_panel 전용 레이아웃 (웹페이지 관리)
========================================================= */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 32px;
    align-items: start;
}

.settings-editor {
    min-width: 0;
}

.settings-group {
    padding: 26px 0;
    border-top: 1px solid var(--admin-border);
}

.settings-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.settings-group h4 {
    font-size: 17px;
    margin: 0 0 6px;
    color: var(--admin-text);
}

.settings-description {
    font-size: 13px;
    color: var(--admin-muted);
    margin: 0 0 20px;
}

.settings-grid {
    display: grid;
    gap: 20px;
}

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

.settings-grid-1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: 900px;
}

.setting-field {
    display: flex;
    flex-direction: column;
}

.setting-field label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--admin-text);
}

.settings-actions {
    border-top: 1px solid var(--admin-border);
    margin-top: 4px;
    padding-top: 24px;
    text-align: left;
    display: block;
}

.settings-actions .btn-primary {
    max-width: 260px;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.settings-row form input[type="file"] {
    width: 100%;
    height: var(--input-height);
    padding: 12px;
    border: 1.5px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    background: #FFFFFF;
    margin-bottom: 12px;
}

.settings-row form .btn-primary {
    max-width: 300px;
}

.settings-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    padding: 8px;
}

/* 실시간 미리보기 */
.live-preview {
    position: sticky;
    top: 24px;
}

.preview-header {
    margin-bottom: 12px;
}

.preview-header h4 {
    font-size: 17px;
    margin: 0 0 5px;
    color: var(--admin-text);
}

.preview-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px;
    background: #EEF2F7;
    border-radius: 10px;
}

.preview-tab {
    flex: 1;
    height: 36px;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
}

.preview-tab:hover {
    background: rgba(255, 255, 255, .5);
    box-shadow: none;
    transform: none;
}

.preview-tab.active {
    background: #FFFFFF;
    color: var(--admin-text);
    box-shadow: 0 1px 4px rgba(16, 26, 67, 0.08);
}

.preview-phone {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 18px 45px rgba(16, 26, 67, 0.18);
}

.preview-screen {
    position: relative;
    height: 700px;
    overflow: hidden;
    border-radius: 22px;
    background: #F8FAFC;
}

.preview-screen-inner {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 18px 14px 24px;
}

.preview-screen-inner::-webkit-scrollbar {
    width: 4px;
}

.preview-screen-inner::-webkit-scrollbar-thumb {
    background: #D8DEEA;
    border-radius: 999px;
}

.preview-site-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 34px 24px 30px;
    background: #FFFFFF;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(16, 26, 67, 0.06);
    text-align: center;
}

.preview-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.preview-title {
    margin: 0 0 24px;
    color: #172033;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.5px;
    text-align: center;
}

.preview-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    margin-bottom: 16px;
    border: 1.5px solid var(--admin-border);
    border-radius: 12px;
    background: #F9FAFB;
    font-size: 16px;
    outline: none;
}

.preview-submit {
    width: 100%;
    height: 52px;
    margin: 8px 0 0;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563EB 0%, #3155E7 50%, #6336E8 100%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(49, 85, 231, 0.20);
}

.preview-help {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #98A2B3;
}

.preview-help strong {
    color: #667085;
    font-weight: 600;
    margin-right: 4px;
}

.preview-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.preview-desc {
    font-size: 15px;
    color: var(--admin-muted);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.preview-slogan {
    margin-top: 12px;
    color: var(--admin-primary);
    font-size: 15px;
    font-weight: 600;
}

.preview-complete-title {
    margin-bottom: 16px;
    font-size: 20px;
    line-height: 1.45;
    letter-spacing: -0.4px;
}

.preview-home-button {
    margin-top: 24px;
}

.preview-footer {
    width: 100%;
    max-width: 360px;
    margin: 16px auto 0;
    text-align: center;
    color: #667085;
    font-size: 10px;
    line-height: 1.6;
}

.preview-copyright {
    font-weight: 600;
    margin-bottom: 4px;
}

.preview-footer #preview_developer {
    color: #98A2B3;
}

.preview-note {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: #98A2B3;
}


/* =========================================================
   admin_members 전용 레이아웃 (회원 관리)
========================================================= */

/* 통계 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all .2s ease;
}

.stat-card:hover {
    border-color: #D0D5DD;
    transform: translateY(-1px);
}

.stat-card.active {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(49, 85, 231, .08);
}

.stat-label {
    display: block;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.stat-value {
    font-size: 27px;
    line-height: 1;
    font-weight: 800;
    color: var(--admin-text);
}

/* 검색/필터 툴바 */
.toolbar {
    background: #FFFFFF;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #98A2B3;
    pointer-events: none;
}

.search-box input {
    padding: 0 44px;
}

.clear-search {
    position: absolute;
    right: 8px;
    top: 9px;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    background: transparent;
    color: #98A2B3;
    font-size: 17px;
    box-shadow: none;
}

.clear-search:hover {
    background: #F2F4F7;
    color: var(--admin-text);
    box-shadow: none;
    transform: none;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 2px 0;
    color: var(--admin-muted);
    font-size: 13px;
}

/* 회원 폼 */
.member-group {
    padding: 26px 0;
    border-top: 1px solid var(--admin-border);
}

.member-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.member-group h4 {
    font-size: 17px;
    color: var(--admin-text);
    margin: 0 0 6px;
}

.member-description {
    font-size: 13px;
    color: var(--admin-muted);
    margin: 0 0 18px;
}

.member-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.member-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-muted);
    margin-bottom: 8px;
}

.field-help {
    margin-top: 6px;
    color: #98A2B3;
    font-size: 11px;
}

.member-actions-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.member-actions-row .btn-primary,
.member-actions-row .btn-secondary {
    max-width: 260px;
}

/* 엑셀 업로드 폼 */
.upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.upload-row input[type="file"] {
    max-width: 430px;
    padding: 13px 16px;
    background: #FFFFFF;
}

.upload-row .btn-primary {
    max-width: 180px;
}

.member-helper {
    margin: 10px 0 0;
    color: #98A2B3;
    font-size: 12px;
}

/* 리스트 헤더 및 일괄관리 바 */
.member-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.member-count {
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: #EEF2F7;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.bulk-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    background: #FFFFFF;
}

.bulk-toolbar.show {
    display: flex;
}

.bulk-left,
.bulk-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.bulk-button {
    height: 36px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
    box-shadow: none;
    margin-top: 0;
    width: auto;
}

.bulk-button:hover {
    background: #E0EAFF;
    box-shadow: none;
    transform: none;
}

.bulk-button.danger {
    background: #FEF3F2;
    color: #D92D20;
    box-shadow: none;
}

.bulk-button.danger:hover {
    background: #FEE4E2;
    box-shadow: none;
    transform: none;
}

.bulk-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* 테이블 */
.member-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: #FFFFFF;
}

.member-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
    white-space: nowrap;
}

.member-table th,
.member-table td {
    padding: 13px 11px;
    text-align: center;
    border-bottom: 1px solid var(--admin-border);
}

.member-table th {
    background: #F8FAFC;
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.member-table td {
    color: var(--admin-text);
    font-size: 14px;
}

.member-table tbody tr {
    transition: background-color var(--admin-transition);
}

.member-table tbody tr:last-child td {
    border-bottom: 0;
}

.member-table tbody tr:hover {
    background: #FAFBFD;
}

.member-table tbody tr.selected {
    background: #F5F3FF;
}

.member-table input[type="checkbox"],
.select-all-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--admin-primary);
    cursor: pointer;
}

.member-table th:first-child,
.member-table td:first-child {
    width: 42px;
    padding: 0 8px;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    color: var(--admin-primary);
}

.sort-icon {
    margin-left: 3px;
    color: #98A2B3;
    font-size: 11px;
}

/* 상태 뱃지 */
.member-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    min-width: 64px;
}

.member-status.signed {
    background: #ECFDF3;
    color: #027A48;
}

.member-status.pending {
    background: #FFF7ED;
    color: #C2410C;
}

.signed-at {
    display: block;
    margin-top: 3px;
    color: #98A2B3;
    font-size: 11px;
}

/* 테이블 내 버튼 */
.member-table-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.member-table-actions button,
.member-table-actions a {
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-top: 0;
    box-shadow: none;
}

.member-edit,
.member-download {
    background: var(--admin-primary-soft);
    color: var(--admin-primary);
}

.member-edit:hover,
.member-download:hover {
    background: #E0EAFF;
    transform: none;
    box-shadow: none;
}

.member-delete {
    background: #FEF3F2;
    color: #D92D20;
}

.member-delete:hover {
    background: #FEE4E2;
    transform: none;
    box-shadow: none;
}

.signature-view {
    background: #F2F4F7;
    color: #475467;
}

.signature-view:hover {
    background: #E4E7EC;
    transform: none;
    box-shadow: none;
}

.member-empty {
    padding: 54px 20px;
    text-align: center;
    color: var(--admin-muted);
}

.member-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--admin-text);
    font-size: 16px;
}

/* 서명 확인 모달창 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .58);
}

.modal-backdrop.show {
    display: flex;
}

.signature-modal {
    width: min(560px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 24px;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .20);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.modal-header h3 {
    margin: 0;
    font-size: 19px;
    color: var(--admin-text);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #F2F4F7;
    color: #475467;
    font-size: 18px;
    box-shadow: none;
    margin-top: 0;
}

.modal-close:hover {
    background: #E4E7EC;
    box-shadow: none;
    transform: none;
}

.signature-preview-box {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: #FAFAFA;
}

.signature-preview-box img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.modal-meta {
    margin-top: 14px;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.7;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.modal-actions a,
.modal-actions button {
    width: auto;
    margin-top: 0;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    max-width: 360px;
    padding: 13px 16px;
    border-radius: 12px;
    background: #1F2937;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: .2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   관리자 반응형 미디어 쿼리 (Admin Responsive Queries)
========================================================= */

@media (max-width: 800px) {
    .admin-container {
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .member-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .member-list-header {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .live-preview {
        position: static;
    }

    .preview-phone {
        max-width: 390px;
    }

    .settings-grid-2 {
        grid-template-columns: 1fr;
    }

    .settings-actions .btn-primary {
        max-width: 100%;
    }

    .settings-row form .btn-primary {
        max-width: 100%;
    }

    .settings-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body:has(.admin-container),
    body.admin-body {
        padding: 20px 12px;
    }

    .admin-container {
        padding: 20px;
        border-radius: 20px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .admin-nav {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .search-row {
        flex-direction: column;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .member-form-grid {
        grid-template-columns: 1fr;
    }

    .upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-row input[type="file"] {
        max-width: none;
        width: 100%;
    }

    .upload-row .btn-primary,
    .member-actions-row .btn-primary,
    .member-actions-row .btn-secondary {
        max-width: 100%;
    }

    .member-actions-row {
        flex-direction: column;
    }

    .bulk-toolbar.show {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-left,
    .bulk-right {
        width: 100%;
    }

    .bulk-button {
        flex: 1;
    }

    .toast {
        left: 14px;
        right: 14px;
        bottom: 14px;
        max-width: none;
    }
}