/* 订单中心页面样式 */

/* 订单头部区域 */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.orders-title {
    font-size: 24px;
    margin: 0;
    color: #333;
}

.orders-filter {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* 订单标签页 */
.orders-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    position: relative;
}

.tab.active {
    color: #3498db;
    font-weight: 500;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3498db;
}

/* 订单列表 */
.orders-list {
    margin-bottom: 30px;
}

.order-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.order-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 6px 6px 0 0;
}

.order-id, .order-date {
    font-size: 14px;
    color: #666;
}

.order-status {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.order-status.active {
    background-color: #e1f5fe;
    color: #0288d1;
}

.order-status.pending {
    background-color: #fff8e1;
    color: #ffa000;
}

.order-status.completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.order-status.cancelled {
    background-color: #f5f5f5;
    color: #757575;
}

.order-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.order-info {
    flex: 1;
}

.instance-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.instance-specs {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.instance-specs span {
    margin-right: 5px;
}

.instance-os {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.instance-id, .instance-ip {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

.order-price {
    text-align: right;
    min-width: 150px;
}

.price-type {
    font-size: 13px;
    color: #666;
}

.price-value {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
}

.price-total {
    font-size: 13px;
    color: #666;
}

.price-amount {
    font-size: 16px;
    font-weight: 500;
    color: #e74c3c;
    margin-top: 5px;
}

.order-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-item, .page-prev, .page-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin: 0 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item:hover, .page-prev:hover, .page-next:hover {
    border-color: #3498db;
    color: #3498db;
}

.page-item.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-dialog {
    max-width: 600px;
    margin: 50px auto;
}

.modal-content {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 详情弹窗样式 */
.detail-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.detail-item {
    display: flex;
    margin-bottom: 10px;
}

.detail-label {
    width: 100px;
    color: #666;
    font-size: 14px;
}

.detail-value {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.status-active {
    color: #0288d1;
}

.operation-log {
    border: 1px solid #eee;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    width: 150px;
    font-size: 13px;
    color: #888;
}

.log-action {
    flex: 1;
    font-size: 13px;
    color: #333;
}

/* 连接实例弹窗样式 */
.connect-methods {
    margin-top: 20px;
}

.connect-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.connect-tab {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.connect-tab.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.connect-panel {
    display: none;
    padding: 10px 0;
}

.connect-panel.active {
    display: block;
}

.code-block {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    position: relative;
}

.code-block code {
    font-family: monospace;
    display: block;
    white-space: pre-wrap;
}

.btn-copy {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
}

.connect-note {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    font-size: 13px;
    color: #666;
}

/* 终止实例确认弹窗样式 */
.warning-message {
    display: flex;
    background-color: #fff3e0;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.warning-icon {
    font-size: 24px;
    margin-right: 15px;
}

.warning-text p {
    margin: 5px 0;
}

.confirm-checkbox {
    margin-top: 20px;
}

.confirm-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.confirm-checkbox input {
    margin-right: 10px;
}

/* 支付弹窗样式 */
.payment-instance-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.payment-instance-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.payment-instance-specs {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.payment-instance-os {
    font-size: 13px;
    color: #666;
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.payment-amount-label {
    font-size: 16px;
    color: #333;
}

.payment-amount-value {
    font-size: 20px;
    font-weight: 500;
    color: #e74c3c;
}

.payment-method-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.payment-method-option:hover {
    border-color: #3498db;
}

.payment-method-option input {
    margin-right: 15px;
}

.payment-method-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.payment-method-icon {
    margin-right: 15px;
    font-size: 24px;
}

.payment-method-icon img {
    width: 24px;
    height: 24px;
}

.payment-method-name {
    font-size: 14px;
    font-weight: 500;
}

.payment-method-balance {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
}

/* 续费弹窗样式 */
.renew-instance-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.renew-options {
    margin-bottom: 20px;
}

.renew-billing-type {
    margin-bottom: 15px;
}

.renew-duration {
    margin-bottom: 20px;
}

.duration-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.duration-slider {
    flex: 1;
}

.duration-value {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.renew-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.renew-amount-label {
    font-size: 16px;
    color: #333;
}

.renew-amount-value {
    font-size: 20px;
    font-weight: 500;
    color: #e74c3c;
}

/* 发票申请弹窗样式 */
.invoice-order-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.invoice-form h4 {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check input {
    margin-right: 10px;
}

.form-check label {
    margin-bottom: 0;
    cursor: pointer;
}

.invoice-type-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.invoice-type-option {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.invoice-type-option:hover {
    border-color: #3498db;
}

.invoice-type-option.active {
    border-color: #3498db;
    background-color: #ebf7fd;
}

.invoice-type-option i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #3498db;
}

.invoice-type-option h5 {
    margin: 0;
    font-size: 14px;
}

.invoice-type-option p {
    margin: 5px 0 0;
    font-size: 12px;
    color: #666;
}

.invoice-note {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    font-size: 13px;
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e9e9e9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #d35400;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-disabled, .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 30px;
}

.empty-state-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-left: 15px;
    font-size: 14px;
    color: #666;
}

/* 通知提示 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    display: flex;
    align-items: center;
    max-width: 300px;
    animation: fadeIn 0.3s ease;
}

.toast-success {
    background-color: #2ecc71;
}

.toast-error {
    background-color: #e74c3c;
}

.toast-warning {
    background-color: #f39c12;
}

.toast-info {
    background-color: #3498db;
}

.toast-icon {
    margin-right: 10px;
    font-size: 18px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    margin-left: 10px;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式样式 */
@media (max-width: 992px) {
    .orders-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .orders-title {
        margin-bottom: 15px;
    }
    
    .orders-filter {
        width: 100%;
    }
    
    .filter-group {
        flex: 1;
        min-width: 120px;
    }
    
    .order-body {
        flex-direction: column;
    }
    
    .order-price {
        text-align: left;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .modal-dialog {
        margin: 20px;
    }
}

@media (max-width: 768px) {
    .orders-filter {
        flex-wrap: wrap;
    }
    
    .filter-group {
        width: calc(50% - 8px);
        min-width: auto;
    }
    
    .order-header {
        flex-direction: column;
    }
    
    .order-id, .order-date {
        margin-bottom: 10px;
    }
    
    .order-footer {
        justify-content: center;
    }
    
    .connect-tabs {
        flex-wrap: wrap;
    }
    
    .connect-tab {
        flex: 1;
        text-align: center;
    }
    
    .invoice-type-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .detail-item {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    .filter-group {
        width: 100%;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .instance-name {
        font-size: 15px;
    }
    
    .price-amount {
        font-size: 15px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    .payment-amount-value, .renew-amount-value {
        font-size: 18px;
    }
    
    .btn {
        padding: 7px 14px;
        font-size: 13px;
    }
}