/* 模型通道管理 → 通道管理 Tab：服务商卡片 + 接入模型配置 */
.pc-root {
    --pc-border: #e5eaf1;
    --pc-soft: #f6f8fb;
    --pc-text: #0f172a;
    --pc-muted: #64748b;
    --pc-faint: #94a3b8;
    --pc-primary: #0d6efd;
    display: flex; flex-direction: column; gap: .75rem;
}

/* 顶部概览条 */
.pc-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
    padding: .55rem .65rem .55rem .75rem; border: 1px solid var(--pc-border); border-radius: .85rem;
    background: linear-gradient(180deg, #fbfcfe, #f7f9fc);
}
.pc-summary { display: flex; align-items: stretch; gap: .35rem; flex-wrap: wrap; }
.pc-stat {
    display: inline-flex; align-items: baseline; gap: .35rem;
    padding: .3rem .65rem; border-radius: .6rem; background: #fff; border: 1px solid var(--pc-border);
}
.pc-stat-value { font-size: .98rem; font-weight: 750; color: var(--pc-text); font-variant-numeric: tabular-nums; }
.pc-stat-label { font-size: .74rem; color: var(--pc-muted); font-weight: 600; }
.pc-stat.is-ok .pc-stat-value { color: #15803d; }
.pc-stat.is-warn .pc-stat-value { color: #b45309; }
.pc-stat.is-danger .pc-stat-value { color: #dc2626; }
.pc-stat-balance { align-items: center; border-style: dashed; background: transparent; }
.pc-stat-icon { display: inline-flex; color: var(--pc-faint); }
.pc-stat-icon svg { width: 15px; height: 15px; }
.pc-topbar-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.pc-hint { font-size: .74rem; color: var(--pc-faint); max-width: 26rem; line-height: 1.4; }
.pc-hint.is-error { color: #dc2626; }
.pc-tip {
    position: relative; display: inline-flex; color: var(--pc-faint); cursor: help;
    border: 0; background: transparent; padding: 0; line-height: 1;
}
.pc-tip svg { width: 15px; height: 15px; }
.pc-tip:hover { color: var(--pc-muted); }
.pc-tip[data-tip]:hover::after {
    content: attr(data-tip); position: absolute; z-index: 30; right: 0; top: calc(100% + 6px);
    width: max-content; max-width: 22rem; padding: .5rem .6rem; border-radius: .5rem;
    background: #0f172a; color: #e2e8f0; font-size: .74rem; font-weight: 500; line-height: 1.5;
    white-space: normal; text-align: left; box-shadow: 0 10px 24px rgba(15, 23, 42, .25);
}
.pc-btn-ghost {
    display: inline-flex; align-items: center; gap: .3rem; height: 1.95rem; padding: 0 .7rem;
    border-radius: .55rem; border: 1px solid var(--pc-border); background: #fff;
    color: #475569; font-size: .78rem; font-weight: 650; cursor: pointer;
}
.pc-btn-ghost svg { width: 14px; height: 14px; }
.pc-btn-ghost:hover { border-color: #c7d2fe; color: #4338ca; background: #f5f7ff; }
.pc-btn-ghost.is-warn:hover { border-color: #fcd34d; color: #b45309; background: #fffbeb; }

/* 左右主从布局：左侧服务商，右侧接入模型配置 */
.pc-layout {
    display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: .85rem; align-items: start;
}
.pc-panel {
    border: 1px solid var(--pc-border); border-radius: .9rem; background: #fff; min-width: 0;
}
.pc-panel-head {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .6rem .75rem; border-bottom: 1px solid #eef2f7;
}
.pc-panel-title { font-size: .9rem; font-weight: 750; color: var(--pc-text); margin: 0; display: inline-flex; align-items: center; gap: .4rem; }
.pc-panel-count {
    min-width: 1.3rem; height: 1.3rem; padding: 0 .4rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2ff; color: #4f46e5; font-size: .7rem; font-weight: 750;
}
.pc-panel-head-tools { margin-left: auto; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pc-text-btn {
    border: 0; background: transparent; color: var(--pc-muted); font-size: .76rem; font-weight: 650;
    padding: .2rem .35rem; border-radius: .4rem; cursor: pointer;
}
.pc-text-btn:hover { color: var(--pc-primary); background: #f1f5ff; }

.pc-providers { position: sticky; top: .75rem; }
.pc-provider-list {
    display: flex; flex-direction: column; gap: .5rem; padding: .6rem;
    max-height: calc(100vh - 14rem); overflow-y: auto; overscroll-behavior: contain;
}

/* 服务商卡片 */
.pc-card {
    border: 1px solid var(--pc-border); border-radius: .75rem; background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.pc-card:hover { border-color: #cbd8ea; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.pc-card.is-selected { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(13, 110, 253, .1); }
.pc-card-head {
    display: flex; align-items: center; gap: .45rem; width: 100%;
    padding: .6rem .65rem .4rem;
    border-radius: .75rem .75rem 0 0;
}
.pc-card-toggle {
    display: flex; align-items: center; gap: .6rem; min-width: 0; flex: 1 1 auto;
    padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.pc-avatar {
    --pc-hue: 220;
    flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .74rem; font-weight: 800; letter-spacing: .02em;
    color: hsl(var(--pc-hue) 55% 35%); background: hsl(var(--pc-hue) 70% 95%);
    border: 1px solid hsl(var(--pc-hue) 55% 88%);
    padding: 0; cursor: pointer; transition: box-shadow .16s ease, border-color .16s ease;
}
.pc-avatar:hover, .pc-avatar.is-open {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
    border-color: hsl(var(--pc-hue) 50% 72%);
}
.pc-avatar.is-missing:hover, .pc-avatar.is-missing.is-open {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, .14);
}
.pc-card-identity { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pc-card-title {
    font-size: .88rem; font-weight: 750; color: var(--pc-text); line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-card-sub {
    font-size: .72rem; color: var(--pc-faint); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-chevron {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; padding: 0; border: 0; background: transparent;
    color: var(--pc-faint); cursor: pointer; border-radius: .4rem; transition: transform .18s ease, color .16s ease;
}
.pc-chevron svg { width: 16px; height: 16px; }
.pc-chevron:hover { color: var(--pc-muted); background: #f1f5f9; }
.pc-card.is-expanded .pc-chevron { transform: rotate(180deg); color: var(--pc-muted); }

.pc-key-panel {
    position: fixed; z-index: 1090; width: min(22.5rem, calc(100vw - 1.25rem));
    padding: .7rem .8rem .75rem; border-radius: .75rem;
    background: #fff; border: 1px solid #d7e0ec;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
}
.pc-key-panel[hidden] { display: none !important; }
.pc-key-panel-title {
    font-size: .78rem; font-weight: 750; color: var(--pc-text); margin: 0 0 .5rem; line-height: 1.3;
}
.pc-key-panel .pc-meta { margin: 0; }

.pc-card-brief {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: 0 .65rem .5rem 3.35rem;
}
.pc-media-chips { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.pc-media-chip {
    display: inline-flex; align-items: center; padding: .05rem .42rem; border-radius: .4rem;
    font-size: .68rem; font-weight: 700; line-height: 1.45; background: #f1f5f9; color: #475569;
}
.pc-media-chip.is-text { background: #eef2ff; color: #4338ca; }
.pc-media-chip.is-image { background: #ecfeff; color: #0e7490; }
.pc-media-chip.is-video { background: #fdf2f8; color: #be185d; }
.pc-media-chip.is-audio { background: #fefce8; color: #a16207; }
.pc-media-chip.is-vision { background: #f0fdf4; color: #15803d; }
.pc-linked-count {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .25rem;
    border: 1px solid transparent; background: transparent; color: var(--pc-muted);
    font-size: .72rem; font-weight: 600; padding: .12rem .4rem; border-radius: .45rem; cursor: pointer;
}
.pc-linked-count b { color: var(--pc-text); font-weight: 750; }
.pc-linked-count svg { width: 12px; height: 12px; }
.pc-linked-count:hover { border-color: #c7d2fe; color: #4338ca; background: #f5f7ff; }
.pc-card.is-selected .pc-linked-count { border-color: #93b4f5; color: var(--pc-primary); background: #eff5ff; }

/* 账户余额 / 账单入口 */
.pc-account {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    margin: 0 .5rem .5rem; padding: .4rem .45rem .4rem .55rem;
    border-radius: .55rem; background: var(--pc-soft); border: 1px dashed #dfe6ef;
}
.pc-account.is-live { border-style: solid; border-color: #dbe7f5; background: #f8fbff; }
.pc-account.is-low { border-color: #fcd34d; background: #fffbeb; }
.pc-account.is-error { border-color: #fecaca; background: #fff7f7; }
.pc-balance { display: flex; align-items: center; gap: .28rem; min-width: 0; flex-wrap: wrap; }
.pc-balance-label {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .72rem; color: var(--pc-muted); font-weight: 650; white-space: nowrap;
}
.pc-balance-label svg { width: 13px; height: 13px; }
.pc-balance-value { font-size: .88rem; font-weight: 750; color: var(--pc-text); font-variant-numeric: tabular-nums; }
.pc-balance-value.is-pending, .pc-stat-value.is-pending { color: #cbd5e1; }
.pc-balance-value.is-low { color: #b45309; }
.pc-balance-value.is-ok { color: #15803d; }
.pc-balance-used { font-size: .7rem; color: var(--pc-muted); font-weight: 600; margin-left: .1rem; }
.pc-refresh-inline {
    width: 1.05rem; height: 1.05rem; padding: 0; border: 0; background: transparent;
    color: var(--pc-faint); display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; flex: 0 0 auto; border-radius: .25rem;
}
.pc-refresh-inline svg { width: 12px; height: 12px; }
.pc-refresh-inline:hover:not(:disabled) { color: #4338ca; }
.pc-refresh-inline:disabled { opacity: .4; cursor: not-allowed; }
.pc-refresh-inline.is-busy { animation: pc-spin .8s linear infinite; color: #4338ca; }
.pc-account-actions { display: flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.pc-icon-btn {
    width: 1.75rem; height: 1.75rem; border-radius: .5rem; border: 1px solid var(--pc-border);
    background: #fff; color: var(--pc-muted); display: inline-flex; align-items: center; justify-content: center;
    padding: 0; cursor: pointer;
}
.pc-icon-btn svg { width: 14px; height: 14px; }
.pc-icon-btn:hover:not(:disabled) { border-color: #a5b4fc; color: #4338ca; background: #eef2ff; }
.pc-bill-btn {
    display: inline-flex; align-items: center; gap: .25rem; height: 1.75rem; padding: 0 .55rem;
    border-radius: .5rem; border: 1px solid var(--pc-border); background: #fff;
    color: #475569; font-size: .74rem; font-weight: 650; cursor: pointer;
}
.pc-bill-btn svg { width: 13px; height: 13px; }
.pc-bill-btn:hover:not(:disabled) { border-color: #a5b4fc; color: #4338ca; background: #eef2ff; }
.pc-icon-btn:disabled, .pc-bill-btn:disabled { opacity: .55; cursor: not-allowed; }
.pc-icon-btn.is-busy { animation: pc-spin .8s linear infinite; }

.pc-bill-dialog { width: min(760px, 100%); max-height: min(80vh, 720px); display: flex; flex-direction: column; }
.pc-bill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.pc-bill-head h4 { margin: 0 0 .2rem; }
.pc-bill-body { min-height: 8rem; overflow: auto; margin: .35rem 0 .75rem; }
.pc-bill-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.pc-bill-table th, .pc-bill-table td { padding: .4rem .45rem; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
.pc-bill-table th { color: var(--pc-muted); font-weight: 650; font-size: .72rem; }
.pc-bill-table td:last-child, .pc-bill-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-bill-foot { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.pc-bill-console { font-size: .78rem; font-weight: 650; color: #4338ca; margin-right: auto; }
.pc-bill-empty, .pc-bill-loading { color: var(--pc-muted); font-size: .82rem; padding: 1.2rem .2rem; }
@keyframes pc-spin { to { transform: rotate(360deg); } }

/* 展开详情 */
.pc-card-detail {
    border-top: 1px solid #eef2f7; padding: .6rem .65rem .7rem;
    display: flex; flex-direction: column; gap: .55rem; background: #fcfdfe;
    border-radius: 0 0 .75rem .75rem;
}
.pc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .6rem; margin: 0; }
.pc-meta-item { min-width: 0; }
.pc-meta-item.is-wide { grid-column: 1 / -1; }
.pc-meta dt { font-size: .68rem; color: var(--pc-faint); font-weight: 650; margin: 0 0 .05rem; }
.pc-meta dd { font-size: .78rem; color: #334155; font-weight: 600; margin: 0; word-break: break-all; }
.pc-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem;
    color: #334155; background: transparent; padding: 0; word-break: break-all;
}
.pc-docs { display: flex; flex-wrap: wrap; gap: .3rem; }
.pc-doc-link {
    display: inline-flex; align-items: center; gap: .25rem; max-width: 100%;
    padding: .12rem .45rem; border-radius: .45rem; border: 1px solid var(--pc-border);
    background: #fff; color: #2563eb; font-size: .72rem; font-weight: 600; text-decoration: none;
}
.pc-doc-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-doc-link svg { width: 12px; height: 12px; flex: 0 0 auto; }
.pc-doc-link:hover { border-color: #93c5fd; background: #eff6ff; }
.pc-detail-section-title { font-size: .72rem; font-weight: 750; color: var(--pc-muted); letter-spacing: .03em; }
.pc-detail-section-title span { color: var(--pc-faint); font-weight: 650; margin-left: .2rem; }
.pc-model-table-wrap { border: 1px solid #eef2f7; border-radius: .55rem; overflow: auto; max-height: 18rem; background: #fff; }
.pc-model-table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.pc-model-table th {
    position: sticky; top: 0; background: #f8fafc; color: var(--pc-faint); font-weight: 700;
    text-align: left; padding: .3rem .45rem; white-space: nowrap; font-size: .68rem;
}
.pc-model-table td { padding: .32rem .45rem; border-top: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.pc-model-table tr.is-off td { color: var(--pc-faint); }
.pc-model-name {
    display: flex; align-items: center; gap: .35rem;
    font-weight: 700; color: var(--pc-text);
}
.pc-model-table tr.is-off .pc-model-name,
.pc-model-table tr.is-off .pc-mono { color: var(--pc-faint); }
.pc-model-choice { font-size: .68rem; color: var(--pc-faint); padding-left: .77rem; }
.pc-dot {
    display: inline-block; width: .42rem; height: .42rem; border-radius: 50%;
    background: #cbd5e1; flex: 0 0 auto; margin: 0;
}
.pc-dot.is-on { background: #22c55e; }
.pc-dot.is-danger { background: #ef4444; }
.pc-muted { color: var(--pc-faint); font-size: .72rem; }
.pc-empty, .pc-empty-inline {
    padding: 1.4rem 1rem; text-align: center; color: var(--pc-muted); font-size: .82rem;
}
.pc-empty-inline { padding: .6rem; }

/* 接入模型配置 */
.pc-defaults .pc-panel-head { row-gap: .5rem; }
.pc-defaults .model-channel-type-tabs { flex-wrap: wrap; }
.pc-filter-pill {
    display: inline-flex; align-items: center; gap: .3rem; height: 1.85rem; padding: 0 .3rem 0 .55rem;
    border-radius: 999px; background: #eff5ff; border: 1px solid #bfd3fb; color: #1d4ed8;
    font-size: .76rem; font-weight: 700;
}
.pc-filter-pill[hidden] { display: none; }
.pc-filter-pill svg { width: 12px; height: 12px; }
.pc-filter-pill button {
    width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 0; background: transparent; color: inherit;
    display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
.pc-filter-pill button:hover { background: rgba(29, 78, 216, .12); }
.pc-search {
    position: relative; display: inline-flex; align-items: center;
}
.pc-search svg { position: absolute; left: .55rem; width: 14px; height: 14px; color: var(--pc-faint); pointer-events: none; }
.pc-search input {
    width: 13rem; height: 1.95rem; padding: 0 .6rem 0 1.85rem; border-radius: .55rem;
    border: 1px solid var(--pc-border); background: #fff; font-size: .78rem; color: var(--pc-text);
}
.pc-search input:focus { outline: none; border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(13, 110, 253, .1); }
.pc-defaults-body { overflow-x: auto; }
.pc-default-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.pc-default-table th {
    background: #f8fafc; color: var(--pc-muted); font-size: .7rem; font-weight: 700; letter-spacing: .02em;
    text-align: left; padding: .42rem .6rem; border-bottom: 1px solid #eef2f7; white-space: nowrap;
}
.pc-default-table td { padding: .45rem .6rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pc-default-table tbody tr:last-child td { border-bottom: 0; }
.pc-default-table tbody tr:hover td { background: #fafcff; }
.pc-default-table tr.is-disabled td { background: #fffafa; }
.pc-default-table tr.is-disabled .pc-default-name { color: var(--pc-faint); }
.pc-col-sort { width: 3.4rem; }
.pc-default-table th.pc-col-model,
.pc-default-table td.pc-col-model { width: 28%; max-width: 0; padding-right: .35rem; }
.pc-default-table th.pc-col-spec,
.pc-default-table td.pc-col-spec { width: 52%; max-width: 0; padding-left: .3rem; }
.pc-default-table th.pc-col-switch,
.pc-default-table td.pc-col-switch {
    width: 2.4rem; text-align: right; padding-left: .15rem; padding-right: .1rem;
}
.pc-default-table th.pc-col-actions,
.pc-default-table td.pc-col-actions {
    width: 2.2rem; text-align: right; padding-left: .1rem; padding-right: .45rem;
}
.pc-sort-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 1.35rem;
    padding: 0 .35rem; border-radius: .4rem; background: #f1f5f9; color: #475569;
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pc-default-name {
    display: flex; align-items: center; gap: .35rem; flex-wrap: wrap;
    font-weight: 700; color: var(--pc-text); line-height: 1.3;
}
.pc-channel-tag {
    display: inline-flex; padding: .02rem .4rem; border-radius: .35rem;
    background: #f5f3ff; color: #6d28d9; font-size: .68rem; font-weight: 700;
}
.pc-default-sub {
    display: flex; align-items: center; gap: .25rem; margin-top: .1rem; min-width: 0;
    font-size: .72rem; color: var(--pc-faint);
}
.pc-provider-link {
    border: 0; background: transparent; padding: 0; color: var(--pc-muted); font-weight: 650; cursor: pointer;
}
.pc-provider-link:hover { color: var(--pc-primary); text-decoration: underline; }
.pc-sep { color: #d5dce6; }
.pc-default-sub .pc-mono { font-size: .7rem; color: var(--pc-faint); }
.pc-spec-btn {
    display: flex; align-items: center; gap: .35rem; width: 100%; min-width: 0;
    padding: .28rem .5rem; border-radius: .5rem; border: 1px solid transparent; background: var(--pc-soft);
    color: #475569; font-size: .74rem; text-align: left; cursor: pointer;
}
.pc-spec-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-spec-btn svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--pc-faint); }
.pc-spec-btn:hover { border-color: #c7d2fe; background: #f5f7ff; color: #4338ca; }
.pc-spec-btn:hover svg { color: #4338ca; }
.pc-spec-btn.is-empty { color: #b45309; background: #fffbeb; }

/* 启用开关 */
.provider-enable-switch {
    position: relative; display: inline-flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; user-select: none;
}
.provider-enable-switch input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.provider-enable-track {
    position: relative; width: 36px; height: 20px; border-radius: 999px;
    background: #cbd5e1; transition: background .18s ease; flex: 0 0 auto;
}
.provider-enable-track::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: transform .18s ease;
}
.provider-enable-switch.is-on .provider-enable-track { background: var(--pc-primary, #0d6efd); }
.provider-enable-switch.is-on .provider-enable-track::after { transform: translateX(16px); }

/* 规格 / 别名弹窗：与模型管理 Tab 的同名类共存，冲突样式按弹窗 ID 隔离 */
#modelSpecModal .provider-spec-check-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .45rem;
}
#modelSpecModal .provider-spec-constraint-hint { font-size: .75rem; color: #6c757d; margin-top: .35rem; }
#modelSpecModal .provider-spec-duration-axis {
    display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; align-items: center;
}
#modelSpecModal .provider-spec-duration-chip {
    min-width: 2.4rem; text-align: center; padding: .28rem .5rem; border-radius: .45rem;
    border: 1px solid #0d6efd; background: #0d6efd; color: #fff;
    font-size: .8rem; display: inline-flex; align-items: center; gap: .25rem; cursor: default;
}
.provider-spec-block-title.has-info { display: inline-flex; align-items: center; gap: .3rem; }
.provider-spec-block-note { font-weight: 500; font-size: .76rem; color: #94a3b8; margin-left: .35rem; }
.provider-spec-input-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .55rem; align-items: start;
}
.provider-spec-input-card {
    border: 1px solid rgba(13,110,253,.16); border-radius: .7rem; background: #f8faff; overflow: visible; min-width: 0;
}
.provider-spec-input-card-head { display: flex; align-items: center; gap: .35rem; padding: .35rem .4rem .35rem .55rem; }
.provider-spec-input-card-head .provider-spec-check {
    flex: 1 1 auto; border: 0; background: transparent; padding: .2rem 0; min-width: 0;
}
/* 展开按钮仅在勾选该输入项后显示（未勾选时无约束可维护） */
.provider-spec-input-toggle {
    display: none; flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border: 0; background: transparent;
    color: #64748b; border-radius: .4rem; align-items: center; justify-content: center; cursor: pointer; line-height: 1;
}
.provider-spec-input-card.is-checked .provider-spec-input-toggle { display: inline-flex; }
.provider-spec-input-toggle:hover { background: rgba(13,110,253,.1); color: #0d6efd; }
.provider-spec-input-toggle svg { width: 14px; height: 14px; transition: transform .18s ease; }
.provider-spec-input-card.is-open .provider-spec-input-toggle svg { transform: rotate(180deg); }
.provider-spec-input-card-body {
    display: none; padding: .6rem .75rem .75rem; border-top: 1px dashed rgba(13,110,253,.16); background: #fff;
}
.provider-spec-input-card.is-checked.is-open .provider-spec-input-card-body { display: flex; flex-direction: column; gap: .6rem; }
.provider-spec-constraint-row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .4rem; align-items: center; }
.provider-spec-constraint-label {
    display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; color: #5b6678; font-weight: 600; white-space: nowrap;
}
.provider-spec-constraint-info {
    display: inline-flex; color: #94a3b8; cursor: help; line-height: 1; border: 0; background: transparent; padding: 0; position: relative;
}
.provider-spec-constraint-info svg { width: 13px; height: 13px; }
.provider-spec-mode-option:disabled { cursor: not-allowed; opacity: .55; }
.provider-spec-constraint-info.is-wide[data-tip]:hover::after { max-width: 26rem; }
.provider-spec-constraint-info[data-tip]:hover::after {
    content: attr(data-tip); position: absolute; z-index: 8; left: 0; bottom: calc(100% + 6px);
    width: max-content; max-width: 16.5rem; padding: .45rem .55rem; border-radius: .45rem;
    background: #0f172a; color: #e2e8f0; font-size: .72rem; font-weight: 500; line-height: 1.45; white-space: normal;
    box-shadow: 0 10px 24px rgba(15,23,42,.28);
}
.provider-spec-range-pair { display: flex; align-items: center; gap: .3rem; width: 100%; min-width: 0; }
.provider-spec-range-pair input { flex: 1 1 0; min-width: 0; width: auto; }
.provider-spec-range-tilde { color: #94a3b8; font-weight: 600; flex: 0 0 auto; }
.provider-spec-format-select { position: relative; width: 100%; min-width: 0; }
.provider-spec-input-card-body .form-control { font-size: .8rem; }
.provider-spec-format-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .35rem;
    min-height: 1.9rem; padding: .2rem .5rem; border: 1px solid #dbe3ef; border-radius: .4rem;
    background: #fff; font-size: .78rem; color: #334155; text-align: left; cursor: pointer;
}
.provider-spec-format-trigger:hover { border-color: #93c5fd; }
.provider-spec-format-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* CHEVRON_SVG 只有 viewBox 没有 width/height，不限定尺寸会按默认替换元素尺寸撑爆按钮 */
.provider-spec-format-trigger svg { flex: 0 0 auto; width: 14px; height: 14px; }
.provider-spec-format-menu {
    display: none; position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 11rem; overflow: auto; padding: .35rem; border: 1px solid #dbe3ef;
    border-radius: .5rem; background: #fff; box-shadow: 0 10px 24px rgba(15,23,42,.12);
}
.provider-spec-format-select.is-open .provider-spec-format-menu { display: flex; flex-direction: column; gap: .15rem; }
.provider-spec-format-option {
    display: flex; align-items: center; gap: .4rem; margin: 0; padding: .28rem .4rem;
    border-radius: .35rem; font-size: .78rem; cursor: pointer;
}
.provider-spec-format-option:hover { background: #eff6ff; }
/* 联动锁定时仅禁用多选框（浏览器原生置灰），文字保持正常样式 */
.provider-spec-check.is-locked { cursor: not-allowed; background: #eef2ff; }
.provider-spec-check.is-locked input[type="checkbox"] { cursor: not-allowed; }
.provider-spec-mode-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-bottom: .65rem; }
.provider-spec-mode-option { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; cursor: pointer; margin: 0; }
.provider-spec-range-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.provider-spec-range-field {
    display: flex; flex-direction: column; gap: .25rem; min-width: 7rem; margin: 0; font-size: .8rem; color: #5b6678;
}
.provider-spec-range-field input { width: 7.5rem; }
.provider-spec-duration-chip-remove {
    border: 0; background: transparent; color: inherit; line-height: 1; padding: 0;
    font-size: .95rem; cursor: pointer; opacity: .85;
}
.provider-spec-duration-chip-remove:hover { opacity: 1; }
.provider-spec-duration-add {
    width: 2.1rem; height: 2.1rem; border-radius: .45rem; border: 1px dashed #0d6efd;
    background: #fff; color: #0d6efd; font-size: 1.15rem; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.provider-spec-duration-add:hover { background: #eff6ff; }
.provider-spec-duration-add-input { width: 4.5rem; height: 2.1rem; font-size: .82rem; }

@media (max-width: 1199.98px) {
    .pc-layout { grid-template-columns: 1fr; }
    .pc-providers { position: static; }
    .pc-provider-list {
        max-height: none; overflow: visible;
        display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start;
    }
    .pc-card.is-expanded { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .pc-search input { width: 100%; }
    .pc-search, .pc-panel-head-tools { width: 100%; }
    .pc-col-spec { width: auto; }
    .pc-hint { display: none; }
}
