/* ============================================
   砍价订单 - 专属样式
   设计理念：展示砍价获得的订单信息 + 砍价联动
   ============================================ */

/* 页面标题卡 */
.page-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-radius: 16px;
    margin-bottom: 16px;
}

.page-header-left {
    color: white;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-desc {
    font-size: 13px;
    opacity: 0.85;
}

.btn-manage-server {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-manage-server:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
}

.btn-manage-server .btn-icon {
    font-size: 18px;
}

.btn-manage-server .btn-arrow {
    opacity: 0.7;
    transition: transform 0.2s;
}

.btn-manage-server:hover .btn-arrow {
    transform: translateX(4px);
}

/* 顶部工具条 */
.toolbar-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    margin-bottom: 16px;
}

.toolbar-tabs {
    display: flex;
    gap: 4px;
}

.toolbar-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-gray);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-tab:hover {
    background: var(--bg-section);
    color: var(--text-body);
}

.toolbar-tab.active {
    background: var(--brand-blue-light);
    color: var(--brand-blue);
    font-weight: 600;
}

.toolbar-tab-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #E9EDF3;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-tab.active .toolbar-tab-count {
    background: var(--brand-blue);
    color: white;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 220px;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid #E9EDF3;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-section);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: white;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

/* 资产概览条 */
.overview-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.overview-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    transition: all 0.2s;
}

.overview-item:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.overview-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.overview-icon.running { background: #E8F8EC; }
.overview-icon.pending { background: #E8F4FD; }
.overview-icon.expiring { background: #FFF8E6; }
.overview-icon.expired { background: #F5F7FA; }

.overview-content {
    flex: 1;
}

.overview-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 2px;
}

.overview-value {
    font-family: "DIN Alternate", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.overview-value.running { color: var(--status-success); }
.overview-value.pending { color: var(--brand-blue); }
.overview-value.expiring { color: var(--status-warning); }
.overview-value.expired { color: var(--text-light); }

/* 服务器分组 */
.server-group {
    margin-bottom: 16px;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-section);
    border-radius: 10px 10px 0 0;
    border: 1px solid #E9EDF3;
    border-bottom: none;
    cursor: pointer;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.group-count {
    padding: 2px 8px;
    background: white;
    color: var(--text-gray);
    font-size: 12px;
    border-radius: 4px;
}

.group-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: transform 0.3s;
}

.group-header.collapsed .group-toggle {
    transform: rotate(-90deg);
}

.group-content {
    background: white;
    border: 1px solid #E9EDF3;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.group-content.collapsed {
    display: none;
}

/* 订单卡片 */
.server-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #F5F7FA;
    transition: all 0.2s;
}

.server-card:last-child {
    border-bottom: none;
}

.server-card:hover {
    background: #FAFBFC;
}

.server-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.server-icon.running {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.server-icon.pending {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

.server-icon.expiring {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
}

.server-icon.expired {
    background: #E5E7EB;
    filter: grayscale(0.5);
}

.server-main {
    flex: 1;
    min-width: 0;
}

/* 服务器头部行 */
.server-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.server-status {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.server-status.running {
    background: #E8F8EC;
    color: var(--status-success);
}

.server-status.pending {
    background: #E8F4FD;
    color: var(--brand-blue);
}

.server-status.expiring {
    background: #FFF8E6;
    color: var(--status-warning);
}

.server-status.expired {
    background: #F5F7FA;
    color: var(--text-light);
}

.server-id {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn {
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--bg-section);
    color: var(--brand-blue);
}

/* 服务器标题行 */
.server-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.server-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.server-card.expired .server-name {
    color: var(--text-gray);
}

.server-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* 配置标签 */
.server-specs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.spec-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-section);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-body);
}

.spec-chip .icon {
    font-size: 12px;
    color: var(--text-gray);
}

/* 关键字段 */
.server-fields {
    display: flex;
    gap: 24px;
}

.server-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.server-field-label {
    color: var(--text-gray);
}

.server-field-value {
    color: var(--text-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.server-field-value.warning {
    color: var(--status-warning);
}

.server-field-value.danger {
    color: var(--action-red);
}

.expire-days {
    font-size: 11px;
    color: var(--text-gray);
    margin-left: 4px;
}

/* 到期警告提示 */
.expire-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FFF8E6;
    border-radius: 6px;
    font-size: 12px;
    color: #92400E;
}

/* 订单信息面板 - 新增 */
.order-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-section);
    border-radius: 10px;
    min-width: 140px;
    flex-shrink: 0;
}

.order-price-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price-label {
    font-size: 12px;
    color: var(--text-gray);
}

.price-original {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-final {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.price-row.saved {
    padding-top: 6px;
    border-top: 1px dashed #E9EDF3;
}

.price-saved {
    font-size: 14px;
    font-weight: 700;
    color: var(--action-red);
}

.order-source {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #E9EDF3;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #E9EDF3;
}

.order-action {
    width: 100%;
    height: 34px;
    border: 1px solid #D8E0EA;
    border-radius: 8px;
    background: #fff;
    color: var(--text-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.order-action:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.order-action.primary {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
    color: #fff;
}

.order-action.primary:hover {
    background: #162D4A;
    color: #fff;
}

.source-tag {
    font-size: 11px;
    color: var(--brand-blue);
    font-weight: 500;
}

.bargain-date {
    font-size: 11px;
    color: var(--text-light);
}

/* ============================================
   右侧栏
   ============================================ */

/* 控制台入口卡 - 新增 */
.console-entry-card {
    background: linear-gradient(135deg, #F8FAFC 0%, #E8F4FD 100%);
    border-radius: 12px;
    border: 1px solid #D1E9FF;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
}

.console-entry-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.console-entry-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.console-entry-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.btn-console {
    width: 100%;
    height: 44px;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-console:hover {
    background: #162D4A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.console-entry-hint {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 10px;
}

/* 砍价联动卡 */
.bargain-link-card {
    background: linear-gradient(135deg, var(--action-red-light) 0%, white 100%);
    border-radius: 12px;
    border: 1px solid rgba(227, 77, 89, 0.2);
    padding: 20px;
    margin-bottom: 16px;
}

.bargain-link-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bargain-link-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bargain-link-badge {
    padding: 3px 8px;
    background: var(--action-red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

/* 有进行中砍价 */
.bargain-active {
    text-align: center;
}

.bargain-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.bargain-gap {
    font-size: 24px;
    font-weight: 700;
    color: var(--action-red);
    margin-bottom: 12px;
}

.bargain-progress-bar {
    height: 10px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bargain-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--action-red) 100%);
    border-radius: 5px;
}

.bargain-sub {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.bargain-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-bargain {
    height: 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-bargain.primary {
    background: var(--action-red);
    color: white;
}

.btn-bargain.primary:hover {
    background: var(--action-red-dark);
}

.bargain-copy-btns {
    display: flex;
    gap: 8px;
}

.btn-copy {
    flex: 1;
    height: 32px;
    background: white;
    border: 1px solid #E9EDF3;
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-body);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

/* 无进行中砍价 */
.bargain-empty {
    text-align: center;
    padding: 8px 0;
}

.bargain-empty-text {
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 12px;
}

.bargain-empty-text .amount {
    color: var(--action-red);
    font-weight: 700;
}

/* 0元再得CTA卡 */
.cta-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.cta-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.cta-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cta-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.btn-cta {
    width: 100%;
    height: 40px;
    background: var(--action-red);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cta:hover {
    background: var(--action-red-dark);
}

.cta-hint {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 10px;
}

/* 资源统计卡 */
.stats-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
    padding: 16px 20px;
}

.stats-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-section);
    border-radius: 8px;
}

.stats-label {
    font-size: 13px;
    color: var(--text-gray);
}

.stats-value {
    font-family: "DIN Alternate", sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.stats-value.running { color: var(--status-success); }
.stats-value.expiring { color: var(--status-warning); }
.stats-value.expired { color: var(--text-light); }
.stats-value.saved { color: var(--action-red); }

/* 空态 */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 12px;
    border: 1px solid #E9EDF3;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-empty {
    height: 44px;
    padding: 0 28px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-empty.primary {
    background: var(--action-red);
    color: white;
}

.btn-empty.primary:hover {
    background: var(--action-red-dark);
}

.btn-empty.secondary {
    background: white;
    color: var(--text-body);
    border: 1px solid #E9EDF3;
}

.btn-empty.secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}
