/* 页面级组件补充（沿用 styles.css 的设计变量，不覆盖工作台骨架） */

/* ------------------------------- 列表项 ------------------------------- */
.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.item + .item {
  margin-top: 8px;
}
.item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-flat);
}
.item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.item-side {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.item-title {
  font-size: 13.5px;
  font-weight: 620;
  overflow-wrap: anywhere;
}
.item-main .hint,
.item .hint {
  font-size: 12px;
}
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ------------------------------- 计时看板 ------------------------------- */
.clock-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}
.clock {
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.clock .side {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock .num {
  margin: 3px 0 1px;
  font-family: var(--mono);
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock .team {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clock.active {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--primary-soft);
}
.clock.warn .num {
  color: var(--warn);
}
.clock.over .num {
  color: var(--danger);
}
.clock-vs {
  display: grid;
  place-items: center;
  min-width: 32px;
  padding: 0 2px;
  font-size: 10.5px;
  font-weight: 660;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.bar {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.3s linear;
}
.bar.warn > i {
  background: var(--warn-raw);
}
.bar.over > i {
  background: var(--danger);
}

/* ------------------------------- 键值表 ------------------------------- */
.kv {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 7px 14px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-2);
}

/* ------------------------------- 表格补充 ------------------------------- */
.table-rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.table-rows th,
.table-rows td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  vertical-align: middle;
}
.table-rows th {
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.table-rows tbody tr:hover {
  background: var(--surface-2);
}
.table-rows tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------- 提示条 ------------------------------- */
.banner-no-voice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--warn) 26%, transparent);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12.5px;
  font-weight: 560;
}
.banner-no-voice b {
  white-space: nowrap;
}

/* ------------------------------- 表单行 ------------------------------- */
.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.input-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.input-inline .input {
  flex: 1 1 140px;
  min-width: 0;
}

/* ------------------------------- 角色 / 权限标签 ------------------------------- */
.role-pill.primary {
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  background: var(--primary-soft);
  color: var(--primary-text);
}
.perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.perm-tag {
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

/* ------------------------------- 辩题条目 ------------------------------- */
/* 辩题条目：单列排版，标签在上、辩题居中、时间在下 */
.topic-item {
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start;
}
.topic-item + .topic-item {
  margin-top: 0;
}
.topic-item .topic-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.topic-item .topic-text {
  font-size: 15px;
  font-weight: 640;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--foreground);
  overflow-wrap: anywhere;
}

/* ------------------------------- 骨架 ------------------------------- */
.empty-mini {
  padding: 16px 4px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.skeleton-row {
  height: 12px;
  margin: 9px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: yf-shimmer 1.4s infinite linear;
}
.skeleton-row.w80 { width: 80%; }
.skeleton-row.w60 { width: 60%; }
.skeleton-row.w40 { width: 40%; }
@keyframes yf-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.sf-title {
  margin: 4px 0 10px;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.dev-code {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* ------------------------------- 移动端：表格卡片化 ------------------------------- */
@media (max-width: 720px) {
  .table-rows thead {
    display: none;
  }
  .table-rows tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  }
  .table-rows tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border: none;
    font-size: 12.5px;
  }
  .table-rows tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
  }
  .table-rows tbody td > * {
    text-align: right;
  }
  .clock-pair {
    grid-template-columns: 1fr;
  }
  .clock-vs {
    display: none;
  }
}
