/* 兴展后台 · 通用列表表样式 */

.xz-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.xz-toolbar__search {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.xz-toolbar__search .form-control {
    display: inline-block;
    width: 280px;
    max-width: 100%;
    height: 36px;
    margin: 0;
    border-radius: 6px;
    vertical-align: middle;
}

.xz-toolbar__search .btn {
    flex-shrink: 0;
    height: 36px;
    margin: 0;
    white-space: nowrap;
    vertical-align: middle;
}

.xz-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.xz-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.xz-table thead th {
    padding: 12px 16px;
    border: 0;
    /*border-bottom: 2px solid #e8edf2;*/
    /*background: #f7fafb;*/
    color: #5d6978;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
}

.xz-table tbody td {
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    font-size: 13px;
    vertical-align: middle;
}

.xz-table tbody tr:last-child td {
    border-bottom: 0;
}

.xz-table tbody tr {
    transition: background-color 0.15s ease;
}

.xz-table tbody tr:hover td {
    /*background: #f4fbfa;*/
}

.xz-table__id {
    color: #9aa5b3;
    font-variant-numeric: tabular-nums;
}

.xz-table__name {
    font-weight: 600;
    /*color: #243040;*/
}

.xz-table__muted {
    color: #8b95a5;
}

.xz-table__empty {
    padding: 48px 16px !important;
    text-align: center;
    color: #9aa5b3;
    background: #fafbfc !important;
}

.xz-table__actions {
    white-space: nowrap;
}

.xz-table__actions a,
.xz-table__actions button {
    display: inline-block;
    margin: 0 2px;
    padding: 4px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.xz-table__actions .xz-act-edit {
    color: #1f9e91;
}

.xz-table__actions .xz-act-edit:hover {
    background: rgba(31, 158, 145, 0.1);
    color: #157f75;
}

.xz-table__actions .xz-act-copy {
    color: #3b82f6;
}

.xz-table__actions .xz-act-copy:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.xz-table__actions .xz-act-del {
    color: #d64545;
}

.xz-table__actions .xz-act-del:hover {
    background: rgba(214, 69, 69, 0.1);
    color: #b53636;
}

.xz-badge {
    display: inline-block;
    min-width: 52px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.xz-badge--ok {
    background: rgba(31, 158, 145, 0.12);
    color: #157f75;
}

.xz-badge--off {
    background: #eef1f5;
    color: #7a8696;
}

.xz-badge--admin {
    background: rgba(56, 132, 210, 0.12);
    color: #2f6fad;
}

.xz-badge--user {
    background: #f0f3f7;
    color: #6a7583;
}

.xz-pager {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.xz-pager .pagination {
    margin: 0;
}

.xz-badge--pending {
    background: #eef1f5;
    color: #6a7583;
}

.xz-badge--developing {
    background: rgba(56, 132, 210, 0.12);
    color: #2f6fad;
}

.xz-badge--beta {
    background: rgba(230, 162, 60, 0.15);
    color: #b67a1d;
}

.xz-badge--released {
    background: rgba(31, 158, 145, 0.12);
    color: #157f75;
}

.xz-badge--mass {
    background: rgba(31, 158, 145, 0.12);
    color: #157f75;
}

.xz-badge--testing {
    background: rgba(230, 162, 60, 0.15);
    color: #b67a1d;
}

.xz-badge--in_progress {
    background: rgba(56, 132, 210, 0.12);
    color: #2f6fad;
}

.xz-badge--completed {
    background: rgba(31, 158, 145, 0.12);
    color: #157f75;
}

.xz-badge--delayed {
    background: rgba(217, 83, 79, 0.12);
    color: #c0392b;
}

.xz-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e8edf2;
    background: #f7fafb;
}

.xz-thumb--lg {
    width: 72px;
    height: 72px;
}

.xz-thumb-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.xz-preview-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.xz-render-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.xz-render-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: normal;
}

.xz-dial-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
}

.xz-dial-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e8edf2;
    border-radius: 6px;
    background: #fafbfc;
}

.xz-dial-actions {
    display: flex;
    gap: 4px;
}

.xz-dial-actions .btn {
    min-width: 28px;
    padding: 2px 6px;
}

.xz-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.xz-detail-item--full {
    grid-column: 1 / -1;
}

.xz-detail-label {
    margin-bottom: 6px;
    color: #8b95a5;
    font-size: 12px;
}

.xz-detail-value {
    color: #243040;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.xz-ellipsis {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* 软件版本 · 按子项目聚合 */
.xz-soft-group {
    margin-bottom: 12px;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.xz-soft-group__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #f7fafb;
}

.xz-soft-group__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #243040;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.xz-soft-group__chevron {
    transition: transform 0.15s ease;
    color: #8b95a5;
}

.xz-soft-group.is-open .xz-soft-group__chevron {
    transform: rotate(90deg);
}

.xz-soft-group__title {
    font-weight: 600;
}

.xz-soft-group__meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.xz-soft-group__body {
    padding: 4px 8px 10px;
    border-top: 1px solid #eef2f6;
}

.xz-soft-changelog {
    max-width: 420px;
    color: #3a4656;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.xz-soft-files {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xz-soft-files a {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 首页仪表盘 */
.xz-section-title {
    margin: 8px 0 14px;
    color: #243040;
    font-size: 16px;
    font-weight: 650;
}

.xz-section-title:not(:first-child) {
    margin-top: 28px;
    padding-top: 8px;
    border-top: 1px solid #eef2f6;
}

.xz-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.xz-stat-grid--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.xz-stat-grid--7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.xz-stat-card {
    padding: 16px 18px;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    background: #fff;
}

.xz-stat-card__label {
    margin-bottom: 8px;
    color: #8b95a5;
    font-size: 13px;
}

.xz-stat-card__value {
    color: #243040;
    font-size: 28px;
    font-weight: 650;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.xz-stat-card--muted .xz-stat-card__value { color: #6a7583; }
.xz-stat-card--info .xz-stat-card__value { color: #2f6fad; }
.xz-stat-card--ok .xz-stat-card__value { color: #157f75; }
.xz-stat-card--danger .xz-stat-card__value { color: #c0392b; }

.xz-progress {
    position: relative;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f6;
}

.xz-progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #33cabb, #1f9e91);
    transition: width 0.2s ease;
}

.xz-progress__text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #243040;
    font-size: 11px;
    font-weight: 600;
}

.xz-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 220px;
    overflow-x: auto;
    overflow-y: hidden;
}

.xz-chart-wrap--fixed {
    height: 280px;
}

.xz-chart-wrap canvas {
    width: 100% !important;
}

.xz-table-wrap--scroll {
    max-height: 360px;
    overflow: auto;
}

@media (max-width: 1200px) {
    .xz-stat-grid--6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .xz-stat-grid,
    .xz-stat-grid--6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .xz-detail-grid {
        grid-template-columns: 1fr;
    }

    .xz-stat-grid,
    .xz-stat-grid--6 {
        grid-template-columns: 1fr;
    }
}
