/* ═══════════════════════════════════════════════
   KTC Wallet Page Styles
   Color system based on site primary: #74a4a4 (muted teal)
   --ktc-dark:   #2d5252   deep teal (text, headings)
   --ktc-main:   #4d8282   medium teal (primary actions)
   --ktc-base:   #74a4a4   site primary
   --ktc-light:  #a8c8c8   light teal (hovers, accents)
   --ktc-pale:   #d4eaea   very light (badges, chips)
   --ktc-bg:     #f0f7f7   tint background
   ═══════════════════════════════════════════════ */

/* ── 공통 ─────────────────────────────────────── */
.ktc-wallet-page {
    max-width: 720px;
    font-size: 14px;
    color: #2d3c3c;
}

.ktc-section {
    background: #fff;
    border: 1px solid #c8dcdc;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(45,82,82,.07);
}

.ktc-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #74a4a4;
}

.ktc-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2d5252;
    flex: 1;
}

.ktc-section-icon { font-size: 20px; }

/* ── 지갑 주소 ──────────────────────────────────── */
.ktc-wallet-address-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f0f7f7;
    border: 1px solid #a8c8c8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.ktc-dot-green {
    width: 8px; height: 8px;
    background: #4d9e7a;
    border-radius: 50%;
    flex-shrink: 0;
}

.ktc-wallet-address-box code {
    font-size: 12px;
    color: #2d5252;
    word-break: break-all;
}

.ktc-ext-link {
    color: #4d8282;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}
.ktc-ext-link:hover { color: #2d5252; text-decoration: underline; }

/* ── 잔액 표시 ────────────────────────────────── */
/* 사이트 메인 컬러(#74a4a4) 기반 다크 그래디언트 — 백색 텍스트 가독성 확보 */
.ktc-balance-section {
    background: linear-gradient(135deg, #1e3d3d 0%, #2d5f5f 45%, #3d7878 100%);
    color: #fff;
    border-color: transparent;
}
.ktc-balance-section .ktc-section-header {
    border-bottom: 1px solid rgba(255,255,255,.22);
}
.ktc-balance-section .ktc-section-header h3 {
    color: #ffffff;
}
.ktc-balance-section .ktc-btn-sm {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.35);
}
.ktc-balance-section .ktc-btn-sm:hover {
    background: rgba(255,255,255,.25);
}

.ktc-balance-display { text-align: center; padding: 12px 0; }

.ktc-balance-ktc {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}

#ktc-balance-amount {
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.ktc-balance-krw {
    font-size: 16px;
    color: rgba(255,255,255,.82);
    margin: 4px 0;
}

.ktc-balance-rate {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
}

.ktc-rate-mode {
    background: rgba(255,255,255,.18);
    color: #fff;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
}

/* ── 탭 ─────────────────────────────────────── */
.ktc-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #c8dcdc;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ktc-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #6b8c8c;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}

.ktc-tab:hover { color: #4d8282; }
.ktc-tab.active { color: #2d5252; border-bottom-color: #74a4a4; }

.ktc-tab-content { display: none; }
.ktc-tab-content.active { display: block; }

/* ── 폼 ─────────────────────────────────────── */
.ktc-form-box { max-width: 500px; }

.ktc-field { margin-bottom: 16px; }

.ktc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a6a6a;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.ktc-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b0c8c8;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3c3c;
    transition: border-color .2s;
    box-sizing: border-box;
}

.ktc-input:focus {
    outline: none;
    border-color: #74a4a4;
    box-shadow: 0 0 0 3px rgba(116,164,164,.18);
}

.ktc-field-hint {
    font-size: 11px;
    color: #88aaaa;
    margin-top: 4px;
    display: block;
}

.ktc-field-found {
    font-size: 12px;
    color: #3d7a5e;
    margin-top: 4px;
    font-style: italic;
}

.ktc-calc-display {
    background: #f0f7f7;
    border: 1px solid #a8c8c8;
    border-radius: 8px;
    padding: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #2d5252;
}

.ktc-wallet-chip {
    background: #f0f7f7;
    border: 1px solid #c8dcdc;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    color: #2d5252;
}

.ktc-fee-breakdown {
    background: #f7fafa;
    border: 1px solid #c8dcdc;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}

.ktc-fee-breakdown > div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: #4a6a6a;
}

.ktc-fee-breakdown > div:first-child { color: #b04040; }
.ktc-fee-breakdown > div:last-child  { color: #2d6652; font-weight: 600; }

.ktc-divider {
    border: none;
    border-top: 1px solid #c8dcdc;
    margin: 16px 0;
}

.ktc-hint {
    color: #6a8a8a;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ── 버튼 ─────────────────────────────────────── */
.ktc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.ktc-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 메인 액션: 사이트 베이스 컬러 */
.ktc-btn-primary {
    background: #4d8282;
    color: #fff;
    border-color: #3d6a6a;
    width: 100%;
    justify-content: center;
    padding: 12px;
}
.ktc-btn-primary:hover:not(:disabled) {
    background: #3d6a6a;
    border-color: #2d5252;
    color: #fff;
}

/* MetaMask 버튼: 브랜드 오렌지 유지 */
.ktc-btn-metamask {
    background: #f6851b;
    color: #fff;
    border-color: #e17316;
    padding: 12px 24px;
}
.ktc-btn-metamask:hover:not(:disabled) { background: #d97400; color: #fff; }

/* 보조 버튼 */
.ktc-btn-ghost {
    background: transparent;
    color: #6a8a8a;
    border-color: #b0c8c8;
    padding: 6px 12px;
    font-size: 12px;
}
.ktc-btn-ghost:hover { background: #f0f7f7; color: #2d5252; }

.ktc-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid currentColor;
    cursor: pointer;
}

/* ── 메시지 ───────────────────────────────────── */
.ktc-msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.ktc-msg-ok   { background: #e8f5f0; border: 1px solid #74a4a4; color: #2d5252; }
.ktc-msg-err  { background: #fde8e8; border: 1px solid #d4a0a0; color: #7a2020; }
.ktc-msg-info { background: #f0f7f7; border: 1px solid #74a4a4; color: #2d5252; }

/* ── 내역 테이블 ─────────────────────────────── */
.ktc-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.ktc-history-table th,
.ktc-history-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #d4eaea;
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
    color: #2d3c3c;
}

.ktc-history-table th {
    background: #e8f3f3;
    color: #2d5252;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
    border-bottom: 2px solid #74a4a4;
}

/* 컬럼 너비 */
.ktc-history-table th:nth-child(1),
.ktc-history-table td:nth-child(1) { width: 85px;  text-align: center; }
.ktc-history-table th:nth-child(2),
.ktc-history-table td:nth-child(2) { width: 130px; }
.ktc-history-table th:nth-child(3),
.ktc-history-table td:nth-child(3) { width: auto; word-break: keep-all; white-space: normal; }
.ktc-history-table th:nth-child(4),
.ktc-history-table td:nth-child(4) { width: 90px; white-space: nowrap; }
.ktc-history-table th:nth-child(5),
.ktc-history-table td:nth-child(5) { width: 90px; text-align: center; }

.ktc-history-table tbody tr:hover td { background: #f5fafa; }

/* 구분 배지 */
.ktc-badge-credit {
    display: inline-block;
    background: #d4eaea;
    color: #2d5252;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #a8c8c8;
}

.ktc-badge-debit {
    display: inline-block;
    background: #fde8e8;
    color: #7a2020;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #d4a0a0;
}

.ktc-empty {
    text-align: center;
    color: #88aaaa;
    padding: 40px 0;
    font-size: 14px;
}

/* ── KTC→포인트 스왑 ─────────────────────────── */
.ktc-swap-info-box {
    background: #f0f7f7;
    border: 1px solid #a8c8c8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 4px;
}

.ktc-swap-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #c8dcdc;
}
.ktc-swap-info-row:last-child { border-bottom: none; }

.ktc-swap-info-label { color: #6a8a8a; font-weight: 600; }
.ktc-swap-info-val   { color: #2d5252; font-weight: 700; }

.ktc-swap-result-box {
    background: #e8f3f3;
    border: 2px dashed #74a4a4;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.ktc-swap-arrow {
    font-size: 20px;
    color: #74a4a4;
    margin-bottom: 6px;
}

.ktc-swap-get { display: flex; flex-direction: column; gap: 4px; }
.ktc-swap-get-label { font-size: 11px; color: #6a8a8a; text-transform: uppercase; letter-spacing: .04em; }
.ktc-swap-get-val   { font-size: 26px; font-weight: 800; color: #2d5252; }

/* ═══════════════════════════════════════════════
   Wallet 대시보드 KTC 충전 섹션
   wal_after_topup_form_wrapper 훅으로 삽입됨
   ═══════════════════════════════════════════════ */

.ktc-topup-section {
    margin-top: 24px;
}

/* 구분선 "또는 KTC로 충전" */
.ktc-topup-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #6a8a8a;
    font-size: 13px;
    font-weight: 600;
}
.ktc-topup-divider::before,
.ktc-topup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #c8dcdc;
}

/* 안내 박스 (지갑 미연동 시) */
.ktc-topup-notice {
    background: #f0f7f7;
    border: 1px solid #a8c8c8;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    color: #4a6a6a;
}
.ktc-topup-notice p { margin: 0; }
.ktc-topup-notice a { color: #4d8282; font-weight: 600; text-decoration: none; }
.ktc-topup-notice a:hover { text-decoration: underline; }

/* 정보 박스 (지갑 연동 시) */
.ktc-topup-info-box {
    background: #f0f7f7;
    border: 1px solid #a8c8c8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.ktc-topup-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #c8dcdc;
}
.ktc-topup-info-row:last-child { border-bottom: none; }

.ktc-topup-info-label { color: #6a8a8a; font-weight: 600; }
.ktc-topup-info-val   { color: #2d5252; font-weight: 700; }
.ktc-topup-info-val code {
    font-size: 11px;
    background: #e0eeee;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 충전 폼 */
.ktc-topup-form { max-width: 440px; }

.ktc-topup-field { margin-bottom: 14px; }
.ktc-topup-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a6a6a;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

/* 환산 결과 박스 */
.ktc-topup-result {
    background: #e8f3f3;
    border: 2px dashed #74a4a4;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    margin-top: 8px;
}

.ktc-topup-arrow {
    font-size: 18px;
    color: #74a4a4;
    margin-bottom: 6px;
}

.ktc-topup-krw-box  { display: flex; flex-direction: column; gap: 4px; }
.ktc-topup-krw-label { font-size: 11px; color: #6a8a8a; text-transform: uppercase; letter-spacing: .04em; }
.ktc-topup-krw-val  { font-size: 24px; font-weight: 800; color: #2d5252; }

/* ═══════════════════════════════════════════════
   통합 마이페이지 대시보드  .kd-*
   ═══════════════════════════════════════════════ */

.kd-dashboard {
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
    color: #2d5252;
}

/* ── 프로필 카드 ── */
.kd-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, #2d5252 0%, #4d8282 100%);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    color: #fff;
}
.kd-profile-left { display: flex; align-items: center; gap: 18px; }
.kd-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.4);
    object-fit: cover;
    flex-shrink: 0;
}
.kd-username { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: #fff; }
.kd-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
    opacity: .85;
}
.kd-profile-edit-btn {
    flex-shrink: 0;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
    white-space: nowrap;
}
.kd-profile-edit-btn:hover { background: rgba(255,255,255,.28); color: #fff; }

/* ── 요약 카드 4개 ── */
.kd-summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 680px) { .kd-summary-row { grid-template-columns: 1fr 1fr; } }
.kd-summary-card {
    background: #fff;
    border: 1px solid #c8dcdc;
    border-radius: 12px;
    padding: 16px 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(74,130,130,.06);
}
.kd-summary-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6a8a8a; margin-bottom: 8px; }
.kd-summary-val   { font-size: 22px; font-weight: 800; color: #2d5252; }
.kd-summary-unit  { font-size: 13px; font-weight: 500; margin-left: 2px; color: #4d8282; }

/* ── 메뉴 바 (데스크톱: 1행 6열 / 모바일: 3열 2행 Grid) ── */
.kd-tabs-container {
    margin-bottom: 20px;
    position: relative;
}

/* 데스크톱 버전 (> 768px): 가로 1행 6열 & 오른쪽 스크롤바 제거 */
.kd-tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border-bottom: 2px solid #c8dcdc;
    padding-bottom: 0;
    overflow: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.kd-tabs::-webkit-scrollbar,
.kd-tabs-container ::-webkit-scrollbar,
.kd-tabs-container *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.kd-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #6a8a8a;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    user-select: none;
    flex: 1;
    text-align: center;
}

.kd-tab:hover {
    color: #2d5252;
}

.kd-tab.active {
    color: #2d5252;
    font-weight: 700;
    border-bottom-color: #0b7a75;
}

.kd-tab-svg {
    fill: #6a8a8a;
    color: #6a8a8a;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: fill 0.15s, color 0.15s;
}

.kd-tab:hover .kd-tab-svg {
    fill: #2d5252;
    color: #2d5252;
}

.kd-tab.active .kd-tab-svg {
    fill: #0b7a75 !important;
    color: #0b7a75 !important;
}

.kd-tab-text {
    opacity: 1;
    display: inline;
}

.kd-tab-content { display: none; padding: 10px 0 8px; }
.kd-tab-content.active { display: block; }

/* 모바일 버전 (<= 768px): 3열 2행 그리드 배치 (3 Columns x 2 Rows Grid) */
@media (max-width: 768px) {
    .kd-tabs-container {
        margin-bottom: 16px;
    }

    .kd-tabs {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        border-bottom: none !important;
        overflow: visible !important;
        padding-bottom: 0;
    }

    .kd-tab {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 10px 4px;
        background: #ffffff;
        border: 1px solid #c8dcdc;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(45, 82, 82, 0.06);
        color: #2d5252;
        font-size: 12.5px;
        font-weight: 600;
        margin-bottom: 0;
        border-bottom: 1px solid #c8dcdc;
        box-sizing: border-box;
        transition: all 0.2s ease;
        flex: initial;
    }

    .kd-tab:hover {
        background: #f0f7f7;
        color: #2d5252;
    }

    .kd-tab.active {
        background: linear-gradient(135deg, #1e3b3b 0%, #2d5252 100%) !important;
        color: #ffffff !important;
        border-color: #2d5252 !important;
        box-shadow: 0 3px 8px rgba(45, 82, 82, 0.25) !important;
    }

    .kd-tab-svg {
        width: 16px;
        height: 16px;
        fill: #6a8a8a;
    }

    .kd-tab.active .kd-tab-svg {
        fill: #ffffff !important;
        color: #ffffff !important;
    }

    .kd-tab.active .kd-tab-text {
        color: #ffffff !important;
}

/* ── 섹션 헤더 ── */
.kd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.kd-section-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #2d5252; }
.kd-balance-badge {
    background: #e8f3f3;
    border: 1px solid #74a4a4;
    color: #2d5252;
    font-weight: 800;
    font-size: 15px;
    padding: 4px 14px;
    border-radius: 20px;
}
.kd-wallet-chip {
    font-size: 12px;
    background: #e0eeee;
    color: #2d5252;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
}

/* ── 테이블 ── */
.kd-table-wrap { overflow-x: auto; }
.kd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.kd-table th {
    background: #f0f7f7;
    color: #4a6a6a;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #c8dcdc;
    white-space: nowrap;
}
.kd-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e8f0f0;
    vertical-align: middle;
}
.kd-table tr:last-child td { border-bottom: none; }
.kd-table tr:hover td { background: #f8fbfb; }
.kd-td-date { white-space: nowrap; color: #6a8a8a; font-size: 12px; }
.kd-td-items { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kd-credit { color: #0d7a47; font-weight: 700; }
.kd-debit  { color: #c0392b; font-weight: 700; }

/* ── 뱃지 ── */
.kd-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.kd-badge-credit { background: #d4edda; color: #0d7a47; }
.kd-badge-debit  { background: #fde8e8; color: #c0392b; }

/* ── 주문 상태 ── */
.kd-order-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    background: #e8f0f0;
    color: #4a6a6a;
}
.kd-status-completed  { background: #d4edda; color: #155724; }
.kd-status-processing { background: #d1ecf1; color: #0c5460; }
.kd-status-pending    { background: #fff3cd; color: #856404; }
.kd-status-cancelled,
.kd-status-refunded,
.kd-status-failed     { background: #fde8e8; color: #721c24; }

/* ── KTC 잔액 박스 ── */
.kd-ktc-balance-box {
    background: linear-gradient(135deg, #e8f3f3, #d4eaea);
    border: 1px solid #a8c8c8;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
    max-width: 280px;
}
.kd-ktc-bal-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6a8a8a; margin-bottom: 8px; }
.kd-ktc-bal-val   { font-size: 28px; font-weight: 800; color: #2d5252; line-height: 1.75; }
.kd-ktc-bal-krw   { font-size: 14px; color: #4d8282; margin-top: 4px; }

/* ── 계정 정보 그리드 ── */
.kd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 600px) { .kd-info-grid { grid-template-columns: 1fr; } }
.kd-info-group {
    background: #f8fbfb;
    border: 1px solid #c8dcdc;
    border-radius: 12px;
    padding: 18px 20px;
}
.kd-info-group h4 { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #4d8282; text-transform: uppercase; letter-spacing: .05em; }
.kd-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #e0eeee;
    font-size: 13px;
}
.kd-info-row:last-child { border-bottom: none; }
.kd-info-row > span:first-child { color: #6a8a8a; font-weight: 600; flex-shrink: 0; }
.kd-info-row > span:last-child  { color: #2d5252; text-align: right; }
.kd-wallet-full { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.kd-wallet-full code { font-size: 10px; word-break: break-all; background: #e0eeee; padding: 3px 6px; border-radius: 4px; }

/* ── 공통 버튼 / 링크 ── */
.kd-btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;
}
.kd-btn-outline {
    border: 2px solid #74a4a4;
    color: #4d8282;
    background: #fff;
}
.kd-btn-outline:hover { background: #e8f3f3; color: #2d5252; }
.kd-btn-sm { padding: 5px 14px; font-size: 12px; border: 1px solid #a8c8c8; color: #4d8282; background: #f0f7f7; border-radius: 6px; text-decoration: none; }
.kd-link { color: #4d8282; font-weight: 600; text-decoration: none; }
.kd-link:hover { text-decoration: underline; }
.kd-tx-link { font-size: 11px; }
.kd-empty { padding: 24px; text-align: center; color: #6a8a8a; font-size: 14px; background: #f8fbfb; border-radius: 10px; border: 1px dashed #c8dcdc; }
.kd-notice { padding: 14px 18px; background: #f0f7f7; border: 1px solid #a8c8c8; border-radius: 8px; font-size: 14px; color: #4a6a6a; }

/* ── 편집 폼 ── */
.kd-edit-section {
    background: #fff;
    border: 1px solid #c8dcdc;
    border-radius: 12px;
    padding: 22px 24px;
}
.kd-edit-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #4d8282;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8f0f0;
}
.kd-edit-form .kd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 10px;
}
@media (max-width: 580px) { .kd-edit-form .kd-form-row { grid-template-columns: 1fr; } }
.kd-form-field { display: flex; flex-direction: column; gap: 5px; }
.kd-form-field label { font-size: 12px; font-weight: 600; color: #6a8a8a; }
.kd-form-field--wide { grid-column: span 1; }
.kd-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c8dcdc;
    border-radius: 8px;
    font-size: 14px;
    color: #2d5252;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.kd-input:focus { outline: none; border-color: #74a4a4; box-shadow: 0 0 0 3px rgba(116,164,164,.15); }
.kd-input-sm { max-width: 140px; padding: 7px 10px; font-size: 13px; }
.kd-form-msg { margin-left: 12px; font-size: 13px; vertical-align: middle; }
.kd-msg       { font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.kd-msg.info  { background: #e8f3f3; color: #2d5252; }
.kd-msg.ok    { background: #e6f7ee; color: #0d7a47; }
/* ── 뉴스 스크랩 제목 반응형 말줄임 ── */
.kd-scrap-title-link {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
}
.kd-scrap-title-link:hover {
    color: #0b7a75;
    text-decoration: underline;
}
.kd-title-desktop { display: inline; }
.kd-title-mobile  { display: none; }
@media (max-width: 768px) {
    .kd-title-desktop { display: none !important; }
    .kd-title-mobile  { display: inline !important; }
}

/* ── 버튼 primary ── */
.kd-btn-primary {
    background: linear-gradient(135deg, #4d8282, #2d5252);
    color: #fff;
    border: none;
    cursor: pointer;
}
.kd-btn-primary:hover { background: linear-gradient(135deg, #5a9292, #3a6464); color: #fff; }

/* ── Wallet 탭 KTC 충전 패널 ── */
.kd-topup-panel {
    border: 1px solid #a8c8c8;
    border-radius: 10px;
    background: #f0f7f7;
    margin-bottom: 14px;
    overflow: hidden;
}
.kd-topup-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #e0eeee;
    font-size: 13px;
    font-weight: 700;
    color: #2d5252;
}
.kd-topup-rate { font-size: 12px; color: #4d8282; font-weight: 500; }
.kd-topup-panel-body { padding: 12px 16px; }
.kd-topup-fields { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kd-topup-arrow-result { display: flex; align-items: center; gap: 6px; }
.kd-topup-arrow-icon { color: #74a4a4; font-weight: 700; }
.kd-topup-krw-preview { font-size: 16px; font-weight: 800; color: #2d5252; min-width: 70px; }
.kd-inline-link { background: none; border: none; color: #4d8282; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }

/* ── 주문 상세 인라인 ── */
.kd-order-detail-cell {
    background: #f8fbfb;
    padding: 0 !important;
    border-bottom: 2px solid #c8dcdc !important;
}
.kd-order-detail-loading { padding: 16px 20px; color: #6a8a8a; font-size: 13px; }
.kd-order-detail-inner { padding: 16px 20px; }
.kd-od-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}
@media (max-width: 680px) { .kd-od-grid { grid-template-columns: 1fr; } }
.kd-od-block h5 { font-size: 12px; font-weight: 700; color: #4d8282; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.kd-od-items { width: 100%; border-collapse: collapse; font-size: 12px; }
.kd-od-items th, .kd-od-items td { padding: 5px 6px; border-bottom: 1px solid #e0eeee; }
.kd-od-items th { font-weight: 700; color: #6a8a8a; }
.kd-od-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid #eef3f3; color: #4a6a6a; }
.kd-od-row:last-child { border-bottom: none; }
.kd-od-total { font-weight: 800; color: #2d5252; font-size: 14px; margin-top: 4px; padding-top: 6px; border-top: 2px solid #c8dcdc; }
.kd-detail-btn { font-size: 12px; white-space: nowrap; background: none; border: none; padding: 0; }

/* ═══════════════════════════════════════════════
   관리자 패널 스타일
   ═══════════════════════════════════════════════ */

.ktc-admin-hub { max-width: 1100px; }

.ktc-adm-cards {
    display: flex;
    gap: 16px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ktc-adm-card {
    flex: 1;
    min-width: 160px;
    background: #fff;
    border: 1px solid #c8dcdc;
    border-top: 3px solid #74a4a4;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(45,82,82,.06);
}

.ktc-adm-card-num {
    font-size: 32px;
    font-weight: 800;
    color: #2d5252;
    line-height: 1;
    margin-bottom: 6px;
}

.ktc-adm-card-label {
    font-size: 12px;
    color: #6a8a8a;
    font-weight: 600;
}

.ktc-adm-tab-content { padding-top: 20px; }

.ktc-adm-form .form-table th {
    font-weight: 600;
    color: #2d3c3c;
    padding: 10px 0;
    width: 180px;
}

.ktc-adm-select {
    min-width: 300px;
    padding: 6px 10px;
}

.ktc-adm-wallet-info {
    font-size: 12px;
    color: #6a8a8a;
    margin-top: 4px;
}

.ktc-adm-table th { font-size: 12px; }
.ktc-adm-table td { padding: 8px 12px; vertical-align: middle; color: #2d3c3c; }
.ktc-adm-table tr:hover { background: #f5fafa; }

.ktc-adm-result {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.ktc-adm-ok  { background: #e8f5f0; border: 1px solid #74a4a4; color: #2d5252; }
.ktc-adm-err { background: #fde8e8; border: 1px solid #d4a0a0; color: #7a2020; }

.ktc-badge-done {
    background: #d4eaea;
    color: #2d5252;
    border: 1px solid #a8c8c8;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.ktc-badge-status-completed { color: #2d6652; font-weight: 600; }
.ktc-badge-status-pending   { color: #7c5200; }
.ktc-badge-status-failed    { color: #7a2020; }

.ktc-row-done td { opacity: .6; }
