/* Common styles for Payment, Order History, Credit History pages */


/* Page Header */

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-top: 76px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.page-header h1 {
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    opacity: 0.9;
}


/* Content Section */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* Main Cards */

.main-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    height: fit-content;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}


/* Card Headers */

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border: none;
    position: relative;
}

.card-header.bg-info,
.card-header.bg-success,
.card-header.bg-warning {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.card-header h5,
.card-header h6 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Loading States */

.loading-spinner {
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem;
    text-align: center;
    border: 2px solid #e9ecef;
    animation: slideInUp 0.6s ease-out;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}


/* Info Items */

.info-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.info-value {
    color: #667eea;
    font-weight: 500;
}


/* Status Badges */

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-pending {
    background: linear-gradient(135deg, #ffd43b 0%, #fff3a0 100%);
    color: #495057;
}

.status-paid {
    background: linear-gradient(135deg, #51cf66 0%, #69db7c 100%);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #339af0 0%, #74c0fc 100%);
    color: white;
}

.status-cancelled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
    color: white;
}


/* Price Display */

.price-display {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Alerts */

.alert {
    border-radius: 15px;
    border: none;
    padding: 1.5rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #69db7c 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fff3a0 100%);
    color: #495057;
}

.alert-info {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%);
    color: white;
}


/* Buttons */

.btn-action {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-pay {
    background: linear-gradient(135deg, #51cf66 0%, #69db7c 100%);
    color: white;
}

.btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.3);
    color: white;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
}


/* Tables */

.table-section {
    background: white;
    border-radius: 15px;
    padding: 0;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

.custom-table {
    margin: 0;
    border: none;
}

.custom-table th {
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
    font-weight: 600;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-table td {
    border: none;
    border-bottom: 1px solid #f8f9fa;
    padding: 1rem;
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: #f8f9fa;
}


/* Pagination */

.pagination-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

.pagination {
    margin: 0;
}

.page-link {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    color: #667eea;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
}


/* Toast */

.toast {
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}


/* Animations */

.animate-section {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Payment Specific Styles */

.payment-info-section,
.payment-status-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 0;
}

.payment-status-section {
    padding: 1.25rem;
    text-align: center;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-info-section {
    text-align: center;
}

.qr-container {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qr-container img {
    max-width: 180px !important;
    height: auto;
}

.bank-info-container {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


/* Order History Specific Styles */

.order-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-code {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: #667eea;
    font-weight: 500;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}


/* Credit History Specific Styles */

.credit-summary-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.credit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.purchased {
    background: linear-gradient(135deg, #51cf66 0%, #69db7c 100%);
}

.stat-icon.used {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
}

.stat-icon.remaining {
    background: linear-gradient(135deg, #339af0 0%, #74c0fc 100%);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.progress-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-label h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.progress-percentage {
    color: #667eea;
    font-weight: 700;
}

.custom-progress {
    height: 20px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
    position: relative;
}

.progress-bar-custom {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-bar-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.token-rates-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.token-rates-info h6 {
    color: #856404;
    margin-bottom: 1rem;
    font-weight: 600;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(133, 100, 4, 0.2);
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-label {
    color: #856404;
    font-weight: 500;
}

.rate-value {
    color: #856404;
    font-weight: 700;
}

.token-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.token-badge.text {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.token-badge.table {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.credit-amount {
    color: #667eea;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Override style for header credit amount to be visible on dark background */

#creditAmount {
    color: #ffd700 !important;
    font-weight: 700 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffd700 !important;
    background-clip: unset !important;
}


/* Empty State */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}


/* Mobile Responsive */

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .content-section {
        padding: 1.5rem;
        margin-top: -2rem;
        border-radius: 15px;
    }
    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .order-details {
        grid-template-columns: 1fr;
    }
    .order-actions {
        justify-content: center;
    }
    .credit-stats {
        grid-template-columns: 1fr;
    }
    .custom-table {
        font-size: 0.9rem;
    }
    .custom-table th,
    .custom-table td {
        padding: 0.75rem 0.5rem;
    }
}