@charset "UTF-8";

/* ==========================================================================
   1. Modern SaaS Workspace Layout (LNB + Main Content)
   ========================================================================== */
:root {
    --sb-primary: #6366f1;
    --sb-primary-hover: #4f46e5;
    --sb-primary-light: rgba(99, 102, 241, 0.15);
    
    /* 캔버스 & 카드 배경 다크화 */
    --sb-bg: #0f172a;
    --sb-surface: #1e293b;
    --sb-border: rgba(255, 255, 255, 0.08);
    
    /* 텍스트 명도 반전 */
    --sb-text-main: #f8fafc;
    --sb-text-sub: #94a3b8;
    --sb-text-muted: #64748b;
    
    --sb-success: #10b981;
    --sb-warning: #f59e0b;
    --sb-danger: #ef4444;
}

/* 상하 여백 35px/60px 확보 (헤더/푸터 맞닿음 해결) */
.sb-workspace-wrapper {
    width: 100% !important;
    max-width: 1440px;
    margin: 0 auto;
    padding: 35px 20px 60px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
    box-sizing: border-box;
    flex: 1;
    background-color: transparent;
    color: var(--sb-text-main);
}

@media (max-width: 992px) {
    .sb-workspace-wrapper {
        grid-template-columns: 1fr;
        padding: 16px 12px 40px; /* 모바일 외곽 여백 축소로 본문 폭 극대화 */
    }
}

.sb-main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ==========================================================================
   2. Left Sidebar (LNB)
   ========================================================================== */
.sb-sidebar {
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 16px;
    padding: 20px 16px;
    position: sticky;
    top: 80px;
    z-index: 10; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 모바일(991px 이하)에서는 사이드바 및 쿠팡 배너 숨김 */
@media (max-width: 991px) {
    .sb-sidebar,
    .sb-sidebar-coupang {
        display: none !important;
    }
}

.sb-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sb-nav-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--sb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0 12px 6px;
}
.sb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sb-text-sub);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.sb-nav-item i {
    font-size: 1.1rem;
    color: var(--sb-text-muted);
    transition: color 0.15s ease;
}
.sb-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.sb-nav-item.active {
    background: var(--sb-primary-light);
    color: #a5b4fc;
    font-weight: 800;
}
.sb-nav-item.active i {
    color: #818cf8;
}

/* Plan Badges */
.plan-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.plan-badge.basic { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.4); }
.plan-badge.pro { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); }
.plan-badge.premium { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.plan-badge.free { background: rgba(255, 255, 255, 0.08); color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.12); }

/* ==========================================================================
   3. Welcome Banner
   ========================================================================== */
.sb-welcome-bar {
    background: linear-gradient(135deg, #1e293b 0%, #0b1329 100%);
    border: 1px solid var(--sb-border);
    border-radius: 16px;
    padding: 28px 34px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.sb-welcome-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.sb-welcome-text h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1.35;
    word-break: keep-all;
}

.sb-welcome-text p {
    margin: 0;
    color: var(--sb-text-sub);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    word-break: keep-all;
}

.dash-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 13px 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
    filter: brightness(1.08);
}

@media (max-width: 768px) {
    .sb-welcome-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px;
        gap: 14px;
    }
    .sb-welcome-text h2 { font-size: 1.2rem; }
    .sb-welcome-text p { font-size: 0.82rem; }
    .dash-btn { width: 100%; padding: 12px 0; }
}

/* ==========================================================================
   4. 좌우 2분할 모던 크레딧 패널 스타일
   ========================================================================== */
.sb-credit-overview-split {
    background: var(--sb-surface) !important;
    border: 1px solid var(--sb-border) !important;
    border-radius: 16px !important;
    padding: 32px 36px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
    display: grid !important;
    grid-template-columns: 1fr 1.3fr !important;
    gap: 32px 24px !important;
    align-items: center !important;
}

.credit-split-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.credit-title-area {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
}

.credit-total-label {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--sb-text-sub) !important;
}

.credit-total-number {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    line-height: 1 !important;
    letter-spacing: -0.5px !important;
}

.credit-total-number small {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #818cf8 !important;
}

.credit-action-group {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.btn-charge-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; 
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}
.btn-charge-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-history-sub {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sb-text-sub);
    border: 1px solid var(--sb-border);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 11px 18px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.btn-history-sub:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.credit-split-right {
    width: 100% !important;
}

.credit-breakdown-box-split {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    padding: 18px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.breakdown-row-split {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 12px !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08) !important;
    gap: 8px !important;
}

.breakdown-row-split:last-child {
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.bd-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    align-items: flex-start !important;
    min-width: 0 !important;
}

.bd-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--sb-text-main) !important;
    white-space: nowrap !important;
}

.bd-order { 
    background: #1e293b; 
    border: 1px solid var(--sb-border); 
    font-size: 0.7rem; 
    font-weight: 800; 
    padding: 2px 8px; 
    border-radius: 6px; 
    color: var(--sb-text-muted); 
    white-space: nowrap !important;
}
.bd-order.bg-safe { 
    background: rgba(16, 185, 129, 0.15); 
    color: #34d399; 
    border-color: rgba(16, 185, 129, 0.3); 
}

.bd-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
}

.bd-amount {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
}

.bd-desc {
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    color: var(--sb-text-muted) !important;
    white-space: nowrap !important;
}

.credit-policy-line-split {
    grid-column: 1 / -1 !important;
    border-top: 1px solid var(--sb-border) !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: var(--sb-text-sub) !important;
    background: #0f172a !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-top: 8px !important;
}

.credit-policy-line-split b {
    color: #818cf8 !important;
}

/* 크레딧 패널 모바일 전용 반응형 */
@media (max-width: 991px) {
    .sb-credit-overview-split {
        grid-template-columns: 1fr !important;
        padding: 18px 14px !important;
        gap: 16px !important;
    }

    .credit-split-left {
        gap: 12px !important;
    }

    .credit-total-number {
        font-size: 1.6rem !important;
    }

    .credit-action-group {
        width: 100% !important;
    }

    .credit-action-group .btn-charge-primary,
    .credit-action-group .btn-history-sub {
        flex: 1 !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 10px 0 !important;
    }

    .credit-breakdown-box-split {
        padding: 12px 12px !important;
        gap: 10px !important;
    }

    .breakdown-row-split {
        padding-bottom: 10px !important;
    }

    .bd-name {
        font-size: 0.82rem !important;
    }

    .bd-amount {
        font-size: 1.0rem !important;
    }

    .bd-desc {
        font-size: 0.70rem !important;
    }

    .credit-policy-line-split {
        padding: 10px 12px !important;
        font-size: 0.76rem !important;
        line-height: 1.45 !important;
        word-break: keep-all !important;
    }
}

/* ==========================================================================
   5. Recent Scenarios Cards Section
   ========================================================================== */
.sb-section-card {
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.sb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sb-section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sb-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenario-list-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 1280px) { .scenario-list-wrapper { grid-template-columns: repeat(2, 1fr); } }

.sc-premium-card {
    background: #0f172a;
    border-radius: 14px;
    border: 1px solid var(--sb-border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 250px;
}
.sc-premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    border-color: #6366f1;
}

.card-top-panel {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.card-image-box {
    width: 96px;
    height: 96px;
    position: relative;
    flex-shrink: 0;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--sb-border);
    background: #07090e;
    position: relative;
    z-index: 3;
}

.card-image-box::before, .card-image-box::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.25s ease;
}
.card-image-box::before { background: #182032; z-index: 1; transform: rotate(-5deg) translate(-3px, 2px); }
.card-image-box::after { background: #131a29; z-index: 2; transform: rotate(4deg) translate(3px, 2px); }
.sc-premium-card:hover .card-image-box::before { transform: rotate(-8deg) translate(-4px, 2px); }
.sc-premium-card:hover .card-image-box::after { transform: rotate(7deg) translate(4px, 2px); }

.card-id-tag {
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 4;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-meta-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 96px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    width: fit-content;
}
.badge-pill.quick { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-pill.studio { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.meta-line {
    font-size: 0.76rem;
    display: flex;
    justify-content: space-between;
}
.meta-line .label { color: var(--sb-text-muted); font-weight: 600; }
.meta-line .val { color: var(--sb-text-main); font-weight: 700; }

.card-bottom-panel {
    margin-top: auto;
    background: #182032;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.topic-label {
    font-size: 0.7rem;
    color: #818cf8;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}

.topic-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sb-text-main);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

@media (max-width: 991px) {
    .sb-section-card {
        padding: 18px 14px;
    }

    .scenario-list-wrapper {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .sc-premium-card {
        min-height: auto;
        padding: 14px;
    }

    .card-top-panel {
        margin-bottom: 12px;
    }
}

/* ==========================================================================
   6. 마이페이지 공통 폼
   ========================================================================== */
.sb-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sb-form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sb-text-sub);
}
.sb-form-control {
    background-color: #0f172a !important;
    border: 1px solid var(--sb-border) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}
.sb-form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
    outline: none;
}
.sb-form-control:disabled,
.sb-form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--sb-text-muted) !important;
    cursor: not-allowed;
}

/* ==========================================================================
   7. 구독 요약 카드 & 결제 내역 테이블 (Dark Theme)
   ========================================================================== */
.sub-summary-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .sub-summary-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 14px;
    }
}

.sub-info-group {
    display: flex;
    align-items: center;
    gap: 18px;
}
.sub-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.sub-text-box h4 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sub-text-box p {
    margin: 0;
    font-size: 0.88rem;
    color: #94a3b8;
}
.sub-text-box p b {
    color: #f8fafc;
}

.btn-upgrade {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 11px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

/* 🌟 공통 반응형 테이블 래퍼 */
.table-responsive-box {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

/* 🌟 결제 내역 테이블 (고유 너비 보장 및 충돌 해소) */
.payment-history-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}
.payment-history-table th {
    background: #111827;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}
.payment-history-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    white-space: nowrap;
}
.payment-history-table tbody tr:last-child td {
    border-bottom: none;
}
.payment-history-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* 결제 구분 & 상태 뱃지 */
.badge-pay-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-pay-type.sub {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.badge-pay-type.topup {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-pay-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-pay-status.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-pay-status.cancel {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   8. 크레딧 이력 테이블 & 트랜잭션 뱃지 (Dark Theme - 반응형 완전 통합)
   ========================================================================== */
.credit-history-table {
    width: 100%;
    min-width: 680px; /* 🌟 모바일 압축 방지 */
    border-collapse: collapse;
}

.credit-history-table th {
    background: #111827;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.credit-history-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    white-space: nowrap; /* 🌟 셀 줄바꿈 방지 */
}

.credit-history-table tbody tr:last-child td {
    border-bottom: none;
}

.credit-history-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* 영수증 키 / 부모 키: 긴 식별키 말줄임 처리 */
.ref-text {
    font-size: 0.74rem;
    color: #64748b;
    font-family: monospace;
    margin-top: 3px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 트랜잭션 구분 뱃지 (USE: 사용 / REFUND: 환불) */
.badge-trx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap; /* 🌟 '사/용' 분리 방지 */
    line-height: 1;
}

.badge-trx.use {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-trx.refund {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 차감 출처 뱃지 (보너스 / 구독 / 충전) */
.badge-credit-src {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap; /* 🌟 '구독' 분리 방지 */
    line-height: 1;
}

@media (max-width: 768px) {
    .payment-history-table th,
    .credit-history-table th {
        padding: 10px;
        font-size: 0.76rem;
    }

    .payment-history-table td,
    .credit-history-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   9. 계정 및 보안 설정 전용 다크 스타일 (Account Setting)
   ========================================================================== */
.account-compact-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .account-compact-card {
        padding: 18px 14px;
    }
}

.setting-sub-section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.setting-sub-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 10px;
}

.sub-sec-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.sub-sec-title .title-left {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sub-sec-title .sec-desc {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

/* 기본 계정 정보 4열 그리드 */
.account-static-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr;
    gap: 14px;
}
@media (max-width: 992px) {
    .account-static-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 576px) {
    .account-static-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    margin: 0;
}

/* 읽기 전용 정적 폼 */
.form-control-static {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.form-control-static.email-static {
    color: #94a3b8;
    font-weight: 500;
}

/* 비밀번호 3열 그리드 */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 992px) {
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 인풋 그룹 및 비밀번호 눈 버튼 */
.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}
.input-group-custom .sb-form-control {
    width: 100%;
    padding-right: 42px;
}
.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}
.toggle-password-btn:hover {
    color: #ffffff;
}

/* 안내 메시지 및 뱃지 */
.msg-info {
    font-size: 0.78rem;
    min-height: 18px;
    margin-top: 2px;
}
.caps-warning-box {
    color: #fbbf24;
    font-size: 0.76rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.badge-pw-warning {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-pw-notice {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 하단 액션 바 */
.account-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
}
@media (max-width: 768px) {
    .account-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
.action-helper-text {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
}
.btn-save-setting {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-save-setting:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.5);
    filter: brightness(1.08);
}

/* ==========================================================================
   사이드바 하단 광고 공통 카드 디자인
   ========================================================================== */
.sb-sidebar-ad-section {
    margin-top: auto;
    padding-top: 18px;
    /* 🌟 쨍한 흰색 점선(#e2e8f0) -> 다크 테마용 은은한 경계선으로 수정 */
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* 광고 카드 공통 박스 (쿠팡 & 애드핏 동일 적용) */
.sb-ad-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    padding: 8px 0 10px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.sb-ad-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

/* 상단 미니 뱃지 (광고 표시 표준화) */
.sb-ad-badge {
    align-self: flex-start;
    margin-left: 10px;
    margin-bottom: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* 광고 컨텐츠 래퍼 */
.sb-ad-body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sb-ad-body.coupang-body {
    border-radius: 8px;
    overflow: hidden;
}

.sb-ad-body.adfit-body {
    min-height: 250px;
}

/* 쿠팡 공정위 필수 안내 문구 */
.sb-ad-notice {
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.35;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
    padding: 0 10px;
}