/* ===================== 기본 리셋 & 전체 레이아웃 ===================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
                 "Noto Sans KR", "맑은 고딕", sans-serif;
    background: #f5f7fb;
    color: #222;
    box-sizing: border-box;
    overflow-x: hidden;
}

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

/* 상단에 이상하게 남는 단독 텍스트(특히 'x')가 있더라도 영향 최소화 */
body {
    position: relative;
}

/* ===================== 전체 컨텐츠 레이아웃 ===================== */
/* 좌메뉴 / 메인 / 우측패널 3컬럼, 가운데 정렬 느낌 */
.gnb-layout-wrap {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 20%;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin: 24px auto 40px;
    padding: 0 24px;
}

/* 메인 컨텐츠 영역 (가운데 + 오른쪽패널) */
.gnb-main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 24px;
}

/* 오른쪽 패널 */
.gnb-side-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 공통 카드 스타일 ===== */
.side-box,
.smm-category-wrap,
.smm-service-panel,
.category-img-banner,
.side-banner {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 35, 95, 0.06);
    border: 1px solid rgba(145, 158, 171, 0.18);overflow:hidden;display:block;
}
.category-img-banner img,.side-banner img {display:block;max-width:100% !important;}
/* ===================== 좌측 사이드 메뉴 ===================== */
.gnb-side-menu {
    background: var(--side-menu-bg, #050c1e);
    border-radius: 24px;
    padding: 26px 20px 22px;
    color: var(--side-menu-text, #e4ecff);
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: fit-content;
}

/* 로고 */
.side-top-logo {
    text-align: center;
    margin-bottom: 4px;
}
.side-top-logo img {
    max-width: 160px;
}

/* 로그인 영역 */
.side-login-info {
    background: var(--side-login-bg, rgba(10, 25, 56, 0.9));
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 13px;
}
.login-nick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.side-login-info .btn-modify,
.side-login-info .btn-logout,
.login-btn-row-nologin .btn-login,
.login-btn-row-nologin .btn-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    padding: 4px 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.side-login-info .btn-modify {
    background: #1f3b8a;
    color: #fff;
}
.side-login-info .btn-logout {
    background: #ff7676;
    color: #fff;
}
.login-btn-row-nologin {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.login-btn-row-nologin .btn-login {
    background: #ff7676;
    color: #fff;
}
.login-btn-row-nologin .btn-join {
    background: #1f3b8a;
    color: #fff;
}

/* 좌측 메뉴 리스트 */
.gnb-side-menu ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}
.gnb-side-menu ul li {
    margin-bottom: 4px;
}
.gnb-side-menu ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: #b8c4ff;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.gnb-side-menu ul li a i {
    font-size: 16px;
}

/* 선택된 메뉴 */
.gnb-side-menu ul li a.on,
.gnb-side-menu ul li a:hover {
    background: var(--side-menu-hover, linear-gradient(135deg, #4e6bff, #9358ff));
    color: #ffffff;
    transform: translateY(-1px);
}

/* 쪽지 반짝 효과 */
.gnb-side-menu a.memo-unread {
    animation: memoBlink 1.5s infinite;
}
@keyframes memoBlink {
    0%, 50% {
        color: #ffebee;
        transform: scale(1);
    }
    25%, 75% {
        color: #ffffff;
        transform: scale(1.03);
    }
}

/* 좌측 배너 */
.side-left-banner-wrap {
    margin-top: 4px;
}
.side-left-banner-img {
    width: 100%;
    border-radius: 14px;
    display: block;
}

/* ===================== 카테고리 박스 ===================== */
.smm-category-wrap {
    padding: 18px 22px 22px;
    margin-top: 16px;
}
.smm-category-wrap h2 {
    font-size: 16px;
    margin: 0 0 14px;
    font-weight: 700;
    color: #111827;
}

/* 아이콘 그리드 */
.smm-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.smm-category-item {
    background: #f6f7ff;
    border-radius: 16px;
    padding: 14px 8px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.smm-category-item img.smm-category-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 2px;
}
.smm-category-item span {
    font-size: 13px;
    color: #111827;
}
.smm-category-item small {
    font-size: 11px;
}
.smm-category-item:hover {
    background: #e4ecff;
    border-color: #406dbe;
    box-shadow: 0 8px 20px rgba(64, 109, 190, 0.16);
    transform: translateY(-1px);
}
.smm-category-item.active {
    background: #406dbe;
    border-color: #274999;
    box-shadow: 0 10px 28px rgba(64, 109, 190, 0.32);
}
.smm-category-item.active span,
.smm-category-item.active small {
    color: #fff;
}

/* ===================== 주문 폼 패널 ===================== */
.smm-service-panel {
    padding: 18px 22px 24px;
    margin-top: 18px;
}
.smm-service-panel h2 {
    font-size: 16px;
    margin: 0 0 12px;
    font-weight: 700;
    color: #111827;
}
.smm-form-row {
    margin-bottom: 10px;
}
.smm-order-input,
.smm-qty-input,
.smm-service-select {
    width: 100%;
    font-size: 14px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #dbe3f3;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.smm-order-input:focus,
.smm-qty-input:focus,
.smm-service-select:focus {
    border-color: #406dbe;
    box-shadow: 0 0 0 1px rgba(64,109,190,0.28);
}

/* 주문하기 버튼 */
.smm-order-btn {
    border: none;
    border-radius: 999px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #406dbe, #5f7df7);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(64, 109, 190, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.smm-order-btn:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}
.smm-order-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(64, 109, 190, 0.5);
}

/* 주문 수량/금액 행 */
.order-qty-row {
    background: #f4f6fb;
    border-radius: 14px;
}

/* FAQ/공지 카드 */
.side-box {
    padding: 16px 18px;
}
.side-box h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.faq-list li,
.notice-list li {
    font-size: 13px;
}

/* 우측 최신 업데이트 박스 */
.gnb-side-right .side-box:last-child {
    background: var(--light-bg, #eaf2fc) !important;
    border: 1px solid var(--border-color, rgba(145, 158, 171, 0.18)) !important;
    color: var(--main-color, #406dbe);
}

/* ===================== FAQ 모달 ===================== */
.faq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.faq-modal-overlay.active {
    display: flex;
}
.faq-modal-content {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 20px 20px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.faq-modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}
.faq-modal-q {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 15px;
}
.faq-modal-a {
    font-size: 14px;
    line-height: 1.6;
}

/* ===================== 모바일 헤더 & 반응형 ===================== */

/* 기본: PC에서 모바일 헤더 숨김 */
.gnb-mobile-header {
    display: none;
}

/* 모바일 오버레이 기본 숨김 */
.smm-mobile-overlay {
    display: none;
}

/* 1200px 이하 – 우측 패널 아래로 */
@media (max-width: 1200px) {
    .gnb-main-content {
        grid-template-columns: minmax(0, 1fr);
    }
    .gnb-side-right {
        margin-top: 12px;
    }
}

/* 1024px 이하 – 모바일 레이아웃 */
@media (max-width: 1024px) {
    body {
        padding-top: 60px; /* 모바일 헤더 높이만큼 여백 */
    }

    /* 모바일 헤더 활성화 */
    .gnb-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 14px;
        background: var(--side-menu-bg, #050c1e);
        color: var(--side-menu-text, #fff);
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 1100;
    }
	.gnb-mobile-header .login-section {display:none;}
    .gnb-mobile-header .logo-section img {
        height: 40px !important;
    }
    .gnb-mobile-header .gnb-menu-btn {
        border: none;
        background: none;
        color: #fff;
        font-size: 23px;
        padding: 2px 4px;
        cursor: pointer;
    }

    /* 전체 레이아웃 1단 */
    .gnb-layout-wrap {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        margin: 0 0 24px;
        padding: 16px 10px 32px;
    }
    .gnb-main-content {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* 좌측 사이드 메뉴 – 오프캔버스 패널 */
    .gnb-side-menu {
        position: fixed;
        top: 0px;
        left: 0;
        width: 260px;
        height: calc(100vh - 0px);
        /*border-radius: 0 18px 18px 0;*/border-radius:0px;
        background: #050c1e;
        z-index: 1200;
        overflow-y: auto;

        /* 처음엔 완전히 화면 밖으로 숨기기 */
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
        pointer-events: none;   /* 닫혀 있을 때 클릭 안 되게 */
    }

    /* 메뉴 열릴 때 */
    .gnb-side-menu.open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0,0,0,0.35);
        pointer-events: auto;
    }

    /* 모바일에서 배경 오버레이 */
    .smm-mobile-overlay {
        display: none;
        position: fixed;
        inset: 60px 0 0 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1150;
    }
    .smm-mobile-overlay.active {
        display: block;
    }

    /* 오른쪽 패널은 메인 아래로 */
    .gnb-side-right {
        order: 2;
    }

    /* 카드들 여백 축소 */
    .smm-category-wrap,
    .smm-service-panel,
    .side-box,
    .category-img-banner,
    .side-banner {
        border-radius: 16px;
    }

    .gnb-side-menu {
        max-width: 100vw;
    }

    /* 카테고리 래퍼/리스트는 100% 안에서만 */
    .smm-category-wrap {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .smm-category-list {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px 8px;
    }
    .smm-category-item {
        padding: 10px 4px 9px;
    }
    .smm-category-item img.smm-category-icon {
        width: 28px;
        height: 28px;
    }
    .smm-category-item span {
        font-size: 12px;
    }

    /* 주문 폼 행 세로 정렬 */
    .order-qty-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* FAQ 모달은 전체화면에 가깝게 */
    .faq-modal-content {
        max-width: 94%;
        max-height: 82vh;
    }
}

/* 640px 이하 – 더 타이트하게 */
@media (max-width: 640px) {
    .smm-category-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .gnb-layout-wrap {
        padding: 12px 8px 24px;
    }
}

/* ===================== FOOTER 정렬 ===================== */
.gnb-footer {
    box-sizing: border-box;
    width: 100%;
    max-width: calc(100% - 48px); /* 좌우 24px 마진과 맞춤 */
    margin: 0 auto 24px;
    padding: 20px 24px 28px 300px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.7;
}
.footer-info-row {
    margin-bottom: 4px;
}
.footer-info-row b {
    font-weight: 600;
    color: #374151;
}
.footer-divider {
    display: inline-block;
    margin: 0 6px;
    color: #9ca3af;
}
.footer-links {
    margin: 8px 0;
    font-size: 12px;
}
.footer-links a {
    color: #6b7280;
    text-decoration: none;
}
.footer-links a:hover {
    text-decoration: underline;
}
.footer-copyright {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

/* 모바일 푸터 여백 조정 */
@media (max-width: 1024px) {
    .gnb-footer {
        max-width: 100%;
        margin: 0;
        padding: 16px 10px 24px;
    }
}
@media (max-width: 640px) {
    .gnb-footer {
        padding: 16px 8px 24px;
    }
}



/* ======================= 일반주문내역 카드 레이아웃 ======================= */
.order-wrap-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(15, 35, 95, 0.08);
    border: 1px solid rgba(145, 158, 171, 0.18);
    padding: 20px 22px 24px;
    margin-top: 20px;
}

/* 상단 타이틀 + 검색 줄 */
.order-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.order-main-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* 검색 폼 */
.order-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.order-search-input {
    min-width: 260px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    outline: none;
    background: #f9fafb;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.order-search-input:focus {
    border-color: #406dbe;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(64, 109, 190, 0.2);
}

.order-search-btn {
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #406dbe, #5f7df7);
    box-shadow: 0 8px 18px rgba(64, 109, 190, 0.45);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.order-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(64, 109, 190, 0.55);
}

/* ======================= 상태 탭 버튼 ======================= */
.order-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.order-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    background: #f9fafb;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.order-tab-btn:hover {
    background: #e5edff;
    border-color: #406dbe;
    color: #1f2933;
    transform: translateY(-1px);
}
.order-tab-btn.active {
    background: linear-gradient(135deg, #4e6bff, #9358ff);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(78, 107, 255, .45);
}

/* ======================= 주문 테이블 ======================= */
.order-table-outer {
    margin-top: 4px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

/* 작은 화면에서는 가로 스크롤 */
@media (max-width: 900px) {
    .order-table-outer {
        overflow-x: auto;
    }
}

.order-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.order-list-table thead {
    background: #f8f9ff;
}
.order-list-table thead th {
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.order-list-table tbody tr {
    border-bottom: 1px solid #f1f3f8;
}
.order-list-table tbody tr:last-child {
    border-bottom: none;
}
.order-list-table tbody tr:hover {
    background: #f9fbff;
}

.order-list-table tbody td {
    padding: 10px 12px;
    vertical-align: top;
}

/* 등록일 칸 */
.regdate-cell {
    text-align: center;
    color: #4b5563;
    font-size: 12px;
}
.regdate-date {
    font-weight: 600;
}
.regdate-time {
    margin-top: 2px;
    font-size: 11px;
    color: #6b7280;
}

/* 관리자용 아이디/포인트 */
.member-id {
    margin-top: 6px;
    font-size: 11px;
    color: #2563eb;
    cursor: pointer;
}
.member-id:hover {
    text-decoration: underline;
}
.member-point {
    margin-top: 2px;
    font-size: 11px;
    color: #9ca3af;
}

/* ======================= 상태 뱃지 ======================= */
.order-wrap-card .badge {
    display: inline-block;
    min-width: 70px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    background: #9ca3af;
    white-space: nowrap;
}

/* 각 상태별 색상 */
.order-wrap-card .badge.completed  { background: var(--success-color, #10b981); }   /* 완료 */
.order-wrap-card .badge.processing { background: var(--main-color, #3b82f6); }   /* 진행중 */
.order-wrap-card .badge.pending    { background: var(--warning-color, #f59e0b); }   /* 대기 */
.order-wrap-card .badge.partial    { background: var(--accent-color, #6366f1); }   /* 부분완료 */
.order-wrap-card .badge.canceled   { background: #6b7280; }   /* 취소/환불 */
.order-wrap-card .badge.expired    { background: #9ca3af; }   /* 만료 */
.order-wrap-card .badge.error      { background: var(--danger-color, #ef4444); }   /* 실패 */

/* 에러 메시지 / 노트 */
.order-error-msg {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
}
.order-error-note {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 11px;
    text-align: left;
}

/* ===================== 공통 페이징 스타일 ===================== */
.order-list-paging {
    margin-top: 20px;
    text-align: center;
}

.order-list-paging .paging-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f4fb;
}

/* 기본 페이지 버튼 */
.order-list-paging .pg_box {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #4b5563;
    background: transparent;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease,
                border-color 0.18s ease, transform 0.15s ease,
                box-shadow 0.15s ease;
}

.order-list-paging .pg_box:hover:not(.disabled):not(.active) {
    background: #e5edff;
    border-color: #a5b4fc;
    color: #1d4ed8;
    transform: translateY(-1px);
}

/* 현재 페이지 */
.order-list-paging .pg_box.active {
    background: #406dbe;
    border-color: #274999;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 15px rgba(64, 109, 190, 0.35);
    cursor: default;
}

/* 비활성(«, ‹ 가 막혀 있을 때 등) */
.order-list-paging .pg_box.disabled {
    opacity: 0.35;
    cursor: default;
}

/* 화살표 버튼 – 텍스트는 숨기고 아이콘만 노출 */
.order-list-paging .pg_box:first-child,
.order-list-paging .pg_box:nth-child(2),
.order-list-paging .pg_box:nth-last-child(2),
.order-list-paging .pg_box:last-child {
    font-size: 0;              /* 원래 « < > » 텍스트 숨김 */
    padding: 0;
    width: 32px;
}

/* 맨 처음 */
.order-list-paging .pg_box:first-child::before {
    content: "⏮";
    font-size: 16px;
}

/* 이전 */
.order-list-paging .pg_box:nth-child(2)::before {
    content: "◀";
    font-size: 14px;
}

/* 다음 */
.order-list-paging .pg_box:nth-last-child(2)::before {
    content: "▶";
    font-size: 14px;
}

/* 맨 끝 */
.order-list-paging .pg_box:last-child::before {
    content: "⏭";
    font-size: 16px;
}

/* 현재 n / m 페이지 표시 */
.order-list-paging .paging-info {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.order-list-paging .paging-info strong {
    color: #111827;
}

/* 모바일에서는 조금 간격 줄이기 */
@media (max-width: 640px) {
    .order-list-paging .paging-wrap {
        gap: 4px;
        padding: 4px 8px;
    }
    .order-list-paging .pg_box {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
}


/* ======================= 관리자 컨텍스트 메뉴 ======================= */
.member-context-menu {
    position: absolute;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
    border: 1px solid #e5e7eb;
    padding: 6px 0;
    z-index: 999;
    min-width: 140px;
}
.member-context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.member-context-menu li a {
    display: block;
    padding: 7px 12px;
    font-size: 12px;
    color: #4b5563;
    text-decoration: none;
}
.member-context-menu li a:hover {
    background: #f3f4ff;
    color: #2563eb;
}

/* ======================= 반응형: 모바일 ======================= */
@media (max-width: 900px) {
    .order-main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .order-search-form {
        width: 100%;
    }
    .order-search-input {
        flex: 1;
        min-width: 0;
    }
    .order-wrap-card {
        padding: 16px 12px 20px;
    }
}


/* === 모바일(<= 768px)에서 테이블 가로 넘침 최소화 === */
@media (max-width: 768px) {
  /* 전체 카드 여백 조금 줄이기 */
  .order-wrap-card {
    padding: 14px 10px 18px;
    margin-top: 12px;
  }

  .order-main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .order-search-form {
    width: 100%;
  }

  .order-search-input {
    flex: 1;
    min-width: 0;
  }

  /* 링크가 너무 길어도 줄바꿈 되도록 */
  .order-list-table td a {
    word-break: break-all;
  }

  /* 안쪽에서만 가로 스크롤이 생기도록 (페이지 전체가 밀리지 않게) */
  .order-table-outer {
    margin-top: 8px;
    border-radius: 12px;
    overflow-x: auto;
  }
}

/* ================= 주문내역 카드/그리드 공통 ================= */

.order-list-outer {
  margin-top: 8px;
}

.order-empty {
  text-align: center;
  padding: 40px 0;
  color: #9ca3af;
  font-size: 14px;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

/* 공통 컬럼 블럭 */
.order-col {
  margin-bottom: 6px;
  font-size: 13px;
}

.order-col:last-child {
  margin-bottom: 0;
}

.order-col-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
}

.pc-only {
  display: none;
}

.order-id-value {
  font-weight: 700;
  font-size: 14px;
}

.order-detail-text a {
  word-break: break-all;
}

/* 오류메시지 */
.order-error-msg {
  margin-top: 6px;
  padding: 6px 8px;
  background: #fff1f2;
  border-radius: 6px;
  font-size: 12px;
  color: #b91c1c;
}

/* 관리자용 정보 */
.member-point {
  margin-top: 4px;
  font-size: 12px;
  color: #374151;
}

.api-link-info {
  margin-top: 8px;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12px;
  background: #eff6ff;
  color: #1d4ed8;
}

.api-link-info span {
  display: block;
  margin-bottom: 2px;
}

/* 상태 뱃지 기본 */
.order-col-status .badge {
  display: inline-block;
  margin-top: 2px;
}

/* 이미 사용 중인 .badge 색 클래스가 있으면 그대로 사용,
   없으면 대략 예시값 */
.badge.completed   { background: var(--success-color, #10b981); color:#fff; }
.badge.processing  { background: var(--main-color, #3b82f6); color:#fff; }
.badge.pending     { background: var(--warning-color, #f59e0b); color:#fff; }
.badge.partial     { background: var(--accent-color, #6366f1); color:#fff; }
.badge.canceled    { background:#9ca3af; color:#fff; }
.badge.expired     { background:#6b7280; color:#fff; }
.badge.error       { background: var(--danger-color, #ef4444); color:#fff; }

/* ================== PC 레이아웃 (4컬럼 그리드) ================== */

@media (min-width: 960px) {
  .order-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 180px 140px;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .order-col {
    margin-bottom: 0;
  }

  .order-col-id {
    text-align: center;
  }

  .order-col-date {
    font-size: 12px;
  }

.order-col-date {
	display: flex;
	flex-direction: column;
	justify-content: flex-start !important; /* 위로 정렬 */
	align-items: flex-start;
	gap: 4px; /* 날짜/시간 간격 */
}
.order-col-date .regdate-date {
	font-weight: 600;
	color: #222;
}
.order-col-date .regdate-time {
	font-size: 13px;
	color: #777;
}

  .pc-only {
    display: inline-block;
  }

  .order-col-label {
    display: block;
    margin-bottom: 6px;
  }


.order-item {
    display: grid;
    grid-template-columns: 10% minmax(0, 1fr) 20% 20%;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  /* 관리자(회원ID 컬럼이 있는) 카드일 때는 5컬럼 */
  .order-item.has-member {
    grid-template-columns: 80px 120px minmax(0, 1fr) 120px 140px;
  }

  .order-col {
    margin-bottom: 0;
  }

  .order-col-id {
    text-align: center;
  }

  .order-col-date {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
  }
  .order-col-date .regdate-date {
    font-weight: 600;
    color: #222;
  }
  .order-col-date .regdate-time {
    font-size: 13px;
    color: #777;
  }

  .pc-only {
    display: inline-block;
  }

  .order-col-label {
    display: block;
    margin-bottom: 6px;
  }

}

/* ================== 모바일 (<= 640px) – 완전 카드형 ================== */

@media (max-width: 640px) {
  .order-item {
    padding: 10px 10px 12px;
  }

  .order-col {
    margin-bottom: 8px;
  }

  .order-col-id,
  .order-col-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .order-col-status .badge {
    margin-left: 8px;
  }

  .regdate-date,
  .regdate-time {
    font-size: 12px;
  }
}



