/* 전역 기본 설정 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f2f4f6;
    color: #191f28;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 640px;
}

/* 헤더 영역 */
.page-header {
    margin-bottom: 24px;
}

.back-btn {
    display: inline-block;
    color: #4e5968;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #191f28;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #191f28;
}

.subtitle {
    font-size: 14px;
    color: #8b95a1;
    margin-top: 4px;
}

/* 결제 내역 섹션 */
.payment-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f4f6;
}

.badge {
    background-color: #e8f3ff;
    color: #1b64da;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* 결제 카드리스트 */
.payment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-card {
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    padding: 18px;
    background-color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.payment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

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

.order-date {
    font-size: 13px;
    color: #8b95a1;
}

/* 상태 태그 */
.status-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.status-done {
    background-color: #e8f7ee;
    color: #108043;
}

.status-cancel {
    background-color: #fde8e8;
    color: #e02020;
}

.status-ready {
    background-color: #fff8e1;
    color: #b7791f;
}

/* 카드 본문 */
.card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.order-name {
    font-size: 16px;
    font-weight: 600;
    color: #333d4b;
    margin-bottom: 4px;
}

.order-id {
    font-size: 12px;
    color: #8b95a1;
}

.amount-info {
    font-size: 18px;
    font-weight: 700;
    color: #191f28;
}

/* 카드 푸터 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed #f2f4f6;
    font-size: 13px;
}

.pay-method {
    color: #4e5968;
}

.card-detail {
    font-size: 11px;
    color: #8b95a1;
    margin-left: 4px;
}

/* 버튼 스타일 */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-receipt {
    background-color: #f2f4f6;
    color: #4e5968;
}

.btn-receipt:hover {
    background-color: #e5e8eb;
    color: #191f28;
}

/* 빈 상태 / 에러 표출 */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #8b95a1;
    font-size: 15px;
}

.empty-state.error {
    color: #e02020;
}

/* 💡 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e5e8eb;
    background-color: #ffffff;
    color: #333d4b;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: #f2f4f6;
}

.page-btn.active {
    background-color: #3182f6;
    color: #ffffff;
    border-color: #3182f6;
    font-weight: bold;
}

.page-btn:disabled {
    color: #b0b8c1;
    cursor: not-allowed;
    background-color: #f9fafb;
}

/* 버튼 스타일 (기존 css 유지) */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn-receipt {
    background-color: #f2f4f6;
    color: #4e5968;
}

.btn-receipt:hover {
    background-color: #e5e8eb;
    color: #191f28;
}

/* 💡 결제 취소 버튼 스타일 추가 */
.btn-cancel {
    background-color: #fde8e8;
    color: #e02020;
}

.btn-cancel:hover {
    background-color: #fbd5d5;
    color: #9b1c1c;
}
/* ==========================================
   💡 모달 UI 스타일 (토스풍 스타일)
========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background-color: #ffffff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #191f28;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #8b95a1;
    cursor: pointer;
}

.modal-subtitle {
    font-size: 14px;
    color: #4e5968;
    margin-bottom: 16px;
}

/* 라디오 버튼 목록 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e8eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333d4b;
    transition: background-color 0.15s, border-color 0.15s;
}

.radio-item:hover {
    background-color: #f9fafb;
}

.radio-item input[type="radio"] {
    accent-color: #3182f6; /* 토스 블루 포인트 컬러 */
    width: 16px;
    height: 16px;
}

/* 모달 하단 버튼 */
.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-secondary {
    background-color: #f2f4f6;
    color: #4e5968;
}

.btn-secondary:hover {
    background-color: #e5e8eb;
}

.btn-danger {
    background-color: #fde8e8;
    color: #e02020;
}

.btn-danger:hover {
    background-color: #fbd5d5;
}

/* 상세보기 모달 내부 스타일 */
.modal-lg {
    max-width: 550px;
    width: 90%;
}

.detail-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-section h4 {
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #666;
}

.detail-row strong {
    color: #111;
}

.detail-row small {
    font-size: 11px;
    color: #888;
}

.cancel-box {
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.btn-info {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.btn-info:hover {
    background-color: #bae7ff;
}