/* ══════════════════════════════════════════════════════════
   agent-console.css — 角色管理「状态」子 tab
   v5 自治可视化刀 A（2026-08-07）

   审美红线（塔拉 8-02 拍板）：**彩色左边条卡片全域禁用**。
   分类靠 chip 标签 + 小圆点，不靠左边条。

   全部走 CSS 变量，跟随 8 主题；不写死背景色/文字色。
   ══════════════════════════════════════════════════════════ */

.agent-console {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 15px 40px;
    -webkit-overflow-scrolling: touch;
}

/* ── 顶部状态卡 ────────────────────────────────── */
.ac-hero {
    position: relative;
    border-radius: 14px;
    padding: 18px 16px 16px;
    text-align: center;
    overflow: hidden;
    background: var(--card-bg, rgba(0, 0, 0, 0.03));
    border: 1px solid rgba(127, 127, 127, 0.14);
}

/* 状态色只做柔和光晕，不做实心块——避免主题下刺眼 */
.ac-hero::before {
    content: '';
    position: absolute;
    inset: -40% 20% auto;
    height: 120px;
    background: radial-gradient(ellipse at center, var(--ac-state-color, #95a5a6) 0%, transparent 70%);
    opacity: 0.16;
    pointer-events: none;
}

.ac-hero-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 9px;
    display: block;
    position: relative;
}

.ac-hero-avatar-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 9px;
    position: relative;
    background: linear-gradient(135deg, var(--ac-state-color, #95a5a6), transparent);
    opacity: 0.55;
}

.ac-hero-name {
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 3px;
    position: relative;
}

.ac-hero-state {
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: var(--ac-state-color, #95a5a6);
    margin-bottom: 5px;
    position: relative;
}

.ac-hero-hint {
    font-size: 0.74rem;
    opacity: 0.62;
    font-style: italic;
    position: relative;
}

.ac-hero-voice {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid rgba(127, 127, 127, 0.13);
    font-size: 0.76rem;
    line-height: 1.65;
    opacity: 0.78;
    text-align: left;
    position: relative;
}

.ac-hero-voice-label {
    font-size: 0.66rem;
    letter-spacing: 1px;
    opacity: 0.5;
    display: block;
    margin-bottom: 3px;
}

/* ── 分区 ──────────────────────────────────────── */
.ac-section {
    margin-top: 20px;
}

.ac-section-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding-left: 1px;
}

.ac-section-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent, #3498db);
    opacity: 0.7;
    flex-shrink: 0;
}

.ac-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.88;
}

.ac-section-count {
    font-size: 0.72rem;
    opacity: 0.5;
    font-variant-numeric: tabular-nums;
}

.ac-section-note {
    margin-left: auto;
    font-size: 0.68rem;
    opacity: 0.42;
}

/* ── 驱动力条 ──────────────────────────────────── */
.ac-axis-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 7px;
    font-size: 0.78rem;
}

.ac-axis-label {
    width: 30px;
    flex-shrink: 0;
    opacity: 0.82;
}

.ac-axis-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(127, 127, 127, 0.16);
    position: relative;
    overflow: visible;
}

.ac-axis-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    transition: width 0.45s ease;
}

/* 淡竖线 = baseline（角色"平时脾气"），实色条 = 当下 */
.ac-axis-baseline {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.4;
    transform: translateX(-1px);
    pointer-events: none;
}

.ac-axis-val {
    width: 26px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
    flex-shrink: 0;
}

.ac-axis-legend {
    font-size: 0.67rem;
    opacity: 0.42;
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ac-axis-legend i {
    display: inline-block;
    width: 2px;
    height: 9px;
    background: currentColor;
    opacity: 0.55;
}

/* ── 条目卡（线头 / 活动 / 纠错） ──────────────── */
.ac-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--card-bg, rgba(0, 0, 0, 0.025));
    border: 1px solid rgba(127, 127, 127, 0.1);
    margin-bottom: 7px;
}

.ac-item-top {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-wrap: wrap;
}

.ac-item-title {
    font-size: 0.81rem;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}

.ac-item-sub {
    font-size: 0.73rem;
    opacity: 0.6;
    line-height: 1.55;
    margin-top: 4px;
}

.ac-item-time {
    font-size: 0.71rem;
    opacity: 0.5;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* 可续旧线的状态标（搁置 / 卡住 / 很久没碰）。
   走 chip 的字号与克制度，但不加彩色 —— 审美红线：分类不靠颜色分区。
   它是「它自己当初的判断 + 系统的观察」，不是一个需要抢注意力的告警。 */
.ac-item-state {
    font-size: 0.68rem;
    opacity: 0.55;
    flex-shrink: 0;
    white-space: nowrap;
}

/* chip：分类标签。红线——不用彩色左边条，分类只走 chip */
.ac-chip {
    display: inline-block;
    font-size: 0.66rem;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 20px;
    background: rgba(127, 127, 127, 0.13);
    opacity: 0.82;
    flex-shrink: 0;
    white-space: nowrap;
}

.ac-chip-warn {
    background: rgba(230, 126, 34, 0.16);
    color: #e67e22;
    opacity: 1;
}

.ac-chip-tool {
    font-variant-numeric: tabular-nums;
}

/* ── 空态 ──────────────────────────────────────── */
.ac-empty {
    padding: 16px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(127, 127, 127, 0.24);
    font-size: 0.76rem;
    line-height: 1.7;
    opacity: 0.5;
    text-align: center;
}

.ac-empty strong {
    display: block;
    opacity: 0.85;
    margin-bottom: 3px;
    font-weight: 600;
}

.ac-loading,
.ac-error {
    padding: 42px 0;
    text-align: center;
    font-size: 0.78rem;
    opacity: 0.4;
}

/* ── 顶部工具行 ────────────────────────────────── */
.ac-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ac-toolbar-spacer {
    flex: 1;
}

.ac-refresh-btn {
    border: 1px solid rgba(127, 127, 127, 0.2);
    background: transparent;
    color: inherit;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.72rem;
    cursor: pointer;
    opacity: 0.72;
    touch-action: manipulation;
}

.ac-refresh-btn:hover {
    opacity: 1;
}

.ac-scope-label {
    font-size: 0.7rem;
    opacity: 0.45;
}

/* ── 自由兴趣面三区（批 B 2026-08-24）：最近在追 / 兴趣池 / 探索池 ──
   设计语言沿用 ac-item / ac-chip / ac-empty；不变色左条、不写死主题色。 */
.ac-pool-add-row {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.ac-pool-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(127, 127, 127, 0.22);
    background: var(--card-bg, rgba(0, 0, 0, 0.03));
    color: inherit;
    font-size: 0.78rem;
}

.ac-pool-input:focus {
    outline: none;
    border-color: var(--accent, rgba(127, 127, 127, 0.5));
}

.ac-pool-add-btn {
    flex-shrink: 0;
    border: 1px solid rgba(127, 127, 127, 0.22);
    background: transparent;
    color: inherit;
    border-radius: 9px;
    padding: 0 13px;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    touch-action: manipulation;
}

.ac-pool-add-btn:hover {
    opacity: 1;
    background: rgba(127, 127, 127, 0.1);
}

.ac-pool-del-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    align-self: center;
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.4;
    touch-action: manipulation;
}

.ac-pool-del-btn:hover {
    opacity: 1;
    background: rgba(127, 127, 127, 0.14);
}

.ac-pool-item-flex {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ac-pool-item-flex .ac-item {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.ac-pool-error {
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 6px;
}

/* ── 池区折叠（塔拉 8-24：池子只会越来越长，页面不能一直加长）────────────
   🔴 只有池区可折叠；「最近在追」永远展开 —— 它是 Run 派生的、有界的，
      而且是这块面板最该被一眼看到的东西。 */
.ac-section--foldable > .ac-section-head--toggle {
    cursor: pointer;
    user-select: none;
}
.ac-section--foldable > .ac-section-head--toggle:focus-visible {
    outline: 2px solid var(--ac-state-color, #95a5a6);
    outline-offset: 2px;
    border-radius: 6px;
}
.ac-fold-caret {
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--ac-text-dim, #9aa5b1);
    transition: transform .15s ease;
    flex: 0 0 auto;
}
/* note 存在时它自己会占右侧，caret 靠 margin-left:auto 仍然收在最右 */
.ac-section--collapsed .ac-fold-caret { transform: rotate(-90deg); }
/* 收起：条目 / 空态 / 新增行 / 错误行全部收掉，只留头部（含计数） */
.ac-section--collapsed > .ac-pool-item-flex,
.ac-section--collapsed > .ac-empty,
.ac-section--collapsed > .ac-pool-add-row,
.ac-section--collapsed > .ac-pool-error { display: none; }

/* v0.4 W2: 兴趣与线头工作台入口（状态页瘦身后的唯一管理入口） */
.ac-workbench-entry { padding: 2px 0 8px; }
.ac-workbench-btn {
  width: auto; margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 0; font-size: 12px; font-weight: 600; cursor: pointer;
  background: transparent; border: 0; color: inherit; border-radius: 6px;
}
.ac-workbench-btn:hover { color: var(--accent, currentColor); }
.ac-workbench-arrow { font-size: 16px; opacity: 0.7; }
