/* 결제 내역 페이지 전용 스타일 */

.payment-history-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 100px 0 50px;
}

/* 페이지 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.8rem;
    color: #ccc;
}

.page-header h1 {
    margin: 0 0 10px;
    color: #333;
    font-size: 2.2rem;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

/* 결제 통계 */
.payment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-icon.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.pending {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.stat-icon.failed {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.stat-info h3 {
    margin: 0 0 5px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 필터 섹션 */
.filter-section {
    margin-bottom: 30px;
}

.filter-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.filter-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input {
    position: relative;
}

.search-input input {
    padding-right: 40px;
}

.search-input i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-btn,
.reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #5a67d8;
}

.reset-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.reset-btn:hover {
    background: #e9ecef;
}

/* 결제 내역 카드 */
.payment-list-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.export-btn:hover {
    background: #218838;
}

.view-toggle {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.view-btn:hover:not(.active) {
    background: #e9ecef;
}

/* 결제 내역 목록 */
.payment-list {
    min-height: 400px;
}

/* 리스트 뷰 */
.payment-item {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
    cursor: pointer;
}

.payment-item:hover {
    background: #f8f9fa;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-main {
    flex: 1;
    display: grid;
    grid-template-columns: 150px 1fr 120px 100px 100px;
    gap: 20px;
    align-items: center;
}

.payment-id {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.payment-info h4 {
    margin: 0 0 5px;
    color: #333;
    font-size: 1rem;
}

.payment-info p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.payment-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.payment-method i {
    font-size: 1rem;
    color: #667eea;
}

.payment-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.payment-status.completed {
    background: #d4edda;
    color: #155724;
}

.payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

.payment-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.payment-status.cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.payment-status.refunded {
    background: #d1ecf1;
    color: #0c5460;
}

.payment-date {
    font-size: 0.85rem;
    color: #999;
    text-align: right;
}

/* 그리드 뷰 */
.payment-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.payment-card {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.payment-card-id {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.payment-card-body h4 {
    margin: 0 0 8px;
    color: #333;
    font-size: 1rem;
}

.payment-card-body p {
    margin: 0 0 15px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.payment-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.payment-card-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.payment-card-date {
    font-size: 0.8rem;
    color: #999;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

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

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    margin: 0 15px;
    font-size: 0.9rem;
    color: #666;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideInDown 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #666;
}

.modal-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

.primary-btn,
.secondary-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn {
    background: #667eea;
    color: white;
}

.primary-btn:hover {
    background: #5a67d8;
}

.secondary-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.secondary-btn:hover {
    background: #e9ecef;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ccc;
}

.empty-state h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0 0 25px;
    color: #666;
    line-height: 1.5;
}

.empty-state .primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 로딩 상태 */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #667eea;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .payment-history-page {
        padding: 80px 0 30px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .payment-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filter-actions {
        grid-column: 1 / -1;
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .payment-main {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    
    .payment-list.grid-view {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .payment-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}