/* ===== 회원 페이지 공통 ===== */
.member-main {
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    background: #f9fafb;
}

.member-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== 회원가입/로그인 폼 ===== */
.member-form-wrap {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    padding: 40px 32px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.member-form-wrap h1 {
    margin: 0 0 8px;
    font-size: 24px;
    text-align: center;
}

.member-form-sub {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 24px;
}

.member-form .form-group {
    margin-bottom: 16px;
}

.member-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.member-form input[type=text],
.member-form input[type=email],
.member-form input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.member-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.member-form small {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.member-form .form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.member-form .form-actions {
    margin-top: 24px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

.member-form-foot {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

.member-form-foot a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.required {
    color: #dc2626;
}

/* ===== 마이페이지 ===== */
.member-dashboard h1 {
    margin: 0 0 24px;
    font-size: 28px;
}

.member-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.member-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.member-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #6b7280;
    font-weight: 600;
}

.member-card-highlight {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
}

.member-card-highlight h3 {
    color: rgba(255,255,255,0.85);
}

.credit-balance {
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0;
}

.member-card-note {
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0 0;
}

.member-card-highlight .member-card-note {
    color: rgba(255,255,255,0.85);
}

.member-info {
    margin: 0;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px 12px;
    font-size: 14px;
}

.member-info dt {
    color: #9ca3af;
    font-weight: 500;
}

.member-info dd {
    margin: 0;
    color: #1f2937;
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.referral-code-box code {
    flex: 1;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 1px;
}

.btn-copy {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.btn-copy:hover {
    background: #f9fafb;
}

.member-actions {
    text-align: center;
    margin-top: 32px;
}

/* ===== 알림 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }


.check-msg {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}
.check-ok { color: #16a34a; }
.check-fail { color: #dc2626; }


.member-orders { margin-top: 32px; }
.member-orders h2 { margin: 0 0 16px; font-size: 20px; }
.member-orders .data-table { width: 100%; background: #fff; border-collapse: collapse; }
.member-orders .data-table th,
.member-orders .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    text-align: left;
}
.member-orders .data-table th { background: #f9fafb; color: #6b7280; font-weight: 600; }
.empty-state { background: #fff; padding: 40px; text-align: center; color: #6b7280; border-radius: 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-muted { background: #f3f4f6; color: #6b7280; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* 마이페이지 섹션 헤더 */
.member-dashboard .section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0 16px;
}
.member-dashboard .section-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--color-primary, #1e3a8a);
}
.member-dashboard .section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.member-dashboard .section-link {
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
}
.member-dashboard .section-link:hover { color: #1e3a8a; }

/* 마이페이지 하단 액션 버튼 */
.member-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}
.member-actions .btn {
    min-width: 140px;
    text-align: center;
}
.member-actions .btn-danger {
    color: #dc2626;
    border-color: #fecaca;
}
.member-actions .btn-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}
@media (max-width: 600px) {
    .member-dashboard .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .member-actions { flex-direction: column; }
    .member-actions .btn { width: 100%; }
}

/* 마이페이지 내 문의 테이블 (member-orders와 동일 스타일 공유) */
.member-inquiries { margin-top: 32px; }
.member-inquiries h2 { margin: 0; font-size: 20px; }
.member-inquiries .data-table { width: 100%; background: #fff; border-collapse: collapse; }
.member-inquiries .data-table th,
.member-inquiries .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}
.member-inquiries .data-table th { background: #f9fafb; color: #6b7280; font-weight: 600; }
.member-inquiries .data-table a { color: #1e3a8a; text-decoration: none; }
.member-inquiries .data-table a:hover { text-decoration: underline; }

/* 섹션 헤더 안의 미니 버튼 */
.section-actions .btn-mini {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s;
}
.section-actions .btn-mini:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
.section-actions .btn-mini.btn-primary {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}
.section-actions .btn-mini.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* 마이페이지 하단 여백 (푸터와 간격) */
.member-dashboard { padding-bottom: 60px; }

@media (max-width: 600px) {
    .member-dashboard { padding-bottom: 40px; }
}


/* ===== 회원 폼 안내 박스 ===== */
.member-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 0 0 24px;
}
.member-notice-icon {
    font-size: 20px;
    line-height: 1.2;
    flex-shrink: 0;
}
.member-notice-body strong {
    display: block;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 4px;
}
.member-notice-body p {
    margin: 0;
    color: #78350f;
    font-size: 13px;
    line-height: 1.6;
}
.member-notice-body b {
    color: #b45309;
    font-weight: 600;
}
