
/* 继承仪表盘的基础变量 */
:root {
    /* 颜色已在dashboard.css中定义，这里只是作为参考 */
    --primary-color: #4169e1;    /* 主色调 - 皇家蓝 */
    --primary-dark: #3050c0;     /* 深色主色调 */
    --primary-light: #6384ff;    /* 浅色主色调 */
    --secondary-color: #2a3b55;  /* 侧边栏背景色 - 暗蓝色 */
    --accent-color: #00c9ff;     /* 强调色 - 亮蓝色 */
    --text-color: #333;          /* 主文本色 */
    --text-light: #777;          /* 次要文本色 */
    --bg-color: #f5f7fa;         /* 背景色 */
    --card-bg: #ffffff;          /* 卡片背景色 */
    --border-color: #e0e6ed;     /* 边框色 */
    --success-color: #28a745;    /* 成功色 */
    --warning-color: #ffc107;    /* 警告色 */
    --danger-color: #dc3545;     /* 危险色 */
}


/* 账单卡片样式 */
.billing-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.billing-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    flex: 1;
    min-width: 280px;
    transition: all 0.3s ease;
}

.billing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.billing-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.billing-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(65, 105, 225, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.billing-card-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.billing-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
}

.billing-card-amount {
    font-size: 28px;
    font-weight: 700;
    margin: 15px 0;
    color: var(--text-color);
}

.billing-card-info {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.billing-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 账单详情表格 */
.billing-table-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.billing-table-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.billing-table-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.billing-table-actions {
    display: flex;
    gap: 10px;
}

.billing-table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th {
    background-color: rgba(0, 0, 0, 0.02);
    text-align: left;
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.billing-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.billing-table tr:last-child td {
    border-bottom: none;
}

.billing-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.billing-table .subtotal td {
    border-top: 2px solid var(--border-color);
    font-weight: 500;
}

.billing-table .total td {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
}

/* 发票/付款状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.status-badge.paid {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.status-badge.overdue {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.status-badge.processing {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.status-badge.refunded {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* 付款方式卡片 */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.payment-method-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.payment-method-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.payment-method-card.default {
    border: 2px solid var(--primary-color);
}

.payment-method-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.payment-method-icon {
    font-size: 24px;
    margin-right: 10px;
    color: var(--text-light);
}

.payment-method-icon.visa {
    color: #1a1f71;
}

.payment-method-icon.mastercard {
    color: #eb001b;
}

.payment-method-icon.amex {
    color: #006fcf;
}

.payment-method-icon.paypal {
    color: #003087;
}

.payment-method-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.payment-method-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.payment-method-details {
    margin-bottom: 20px;
    color: var(--text-light);
}

.payment-method-details p {
    margin: 5px 0;
}

.payment-method-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 账单历史记录 */
.history-filters {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.history-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.history-filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.history-filter-label {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-light);
}

.history-filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.history-filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.2);
}

.history-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* 账单历史卡片布局（billing.html） */
.billing-history-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.billing-history-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.billing-history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    border-color: rgba(65, 105, 225, 0.3);
}

.billing-history-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.billing-history-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.12), rgba(99, 132, 255, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.billing-history-card-icon i {
    font-size: 18px;
}

.billing-history-card-meta {
    flex: 1;
}

.billing-history-order-id {
    font-weight: 600;
    font-size: 14px;
}

.billing-history-date {
    font-size: 12px;
    color: var(--text-light);
}

.billing-history-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.billing-history-amount {
    font-size: 20px;
    font-weight: 700;
}

.billing-history-billing-cycle {
    font-size: 13px;
    color: var(--text-light);
}

.billing-history-items {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.billing-history-items .primary-item {
    font-weight: 500;
    color: var(--text-color);
}

.billing-history-items .secondary-item {
    opacity: 0.8;
}

.billing-history-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.billing-history-loading,
.billing-history-empty,
.billing-history-error {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-light);
}

.billing-history-empty i {
    font-size: 32px;
    color: var(--border-color);
    margin-bottom: 10px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.pagination-info {
    color: var(--text-light);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(65, 105, 225, 0.05);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--bg-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 16px;
}

/* 发票明细模态框 */
.invoice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.invoice-modal.active {
    display: flex;
}

.invoice-modal-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.invoice-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--card-bg);
    z-index: 10;
}

.invoice-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.invoice-modal-close {
    background-color: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.invoice-modal-close:hover {
    color: var(--danger-color);
}

.invoice-modal-body {
    padding: 20px;
}

.invoice-details-section {
    margin-bottom: 30px;
}

.invoice-details-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.invoice-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.invoice-details-item {
    margin-bottom: 15px;
}

.invoice-details-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.invoice-details-value {
    font-size: 15px;
    font-weight: 500;
}

.invoice-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background-color: var(--card-bg);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .billing-summary {
        flex-direction: column;
    }
    
    .payment-methods-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .billing-table-container {
        overflow-x: auto;
    }
    
    .billing-table {
        min-width: 700px;
    }
    
    .history-filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .invoice-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .billing-card {
        padding: 15px;
    }
    
    .billing-card-amount {
        font-size: 24px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-info {
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
} 