/* ============================================
   Ensemo — 算力值控制台 modal + owner 頁籤（CC-1）
   沿用 office.css 的 --office-* token 與 office-chat 暗色風。
   ============================================ */

/* 算力值頁籤的辨識色（冷藍，跟董事長的暖藍區分）。版面/定位由 office.css 的 .side-rail /
   .side-tab 統一負責（fixed 垂直置中、等距堆疊）；本檔只覆寫配色，不再各自定位。 */
.side-tab--cc {
    background: linear-gradient(180deg, #2a3450, #1d2540);
    color: #e7edff;
}

/* overlay + card */
.cc-overlay {
    position: fixed; inset: 0; z-index: 330;
    background: rgba(8, 11, 22, 0.78);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.cc-card {
    width: 100%; max-width: 520px; height: min(640px, 90vh);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #1d2540, #161d33);
    border: 1px solid var(--office-card-border); border-radius: 20px; overflow: hidden;
}
.cc-head {
    display: flex; align-items: center; gap: 10px;
    padding: 15px 18px; border-bottom: 1px solid var(--office-card-border);
}
.cc-head h3 { flex: 1; font-size: 16px; font-weight: 800; text-align: left; }
.cc-head .cc-sub { font-size: 12px; color: var(--office-text-dim); }
.cc-close {
    background: none; border: none; color: var(--office-text-dim);
    font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; font-family: inherit;
}
.cc-close:hover { color: var(--office-text); }

.cc-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
.cc-hint { color: var(--office-text-dim); font-size: 13px; text-align: center; padding: 18px 6px; line-height: 1.6; }

/* 企業池卡 */
.cc-pool {
    background: rgba(245, 185, 113, 0.08); border: 1px solid rgba(245, 185, 113, 0.4);
    border-radius: 14px; padding: 13px 15px; margin-bottom: 14px;
}
.cc-pool-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin: 3px 0; }
.cc-pool-row span { color: var(--office-text-dim); }
.cc-pool-row b { color: var(--office-warm); font-size: 15px; }
.cc-buy-btn {
    width: 100%; margin-top: 10px; padding: 9px 0; font-size: 13.5px; font-weight: 800;
    border: none; border-radius: 10px; cursor: pointer; font-family: inherit;
    background: linear-gradient(135deg, #f7c98b, #e8985a); color: #3a2410;
}
.cc-buy-btn:hover { filter: brightness(1.08); }

/* 員工列 */
.cc-list { display: flex; flex-direction: column; gap: 9px; }
.cc-emp {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--office-card-border);
    border-left: 3px solid var(--c, #888); border-radius: 12px; padding: 11px 13px;
}
.cc-emp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cc-emp-name { font-size: 14px; font-weight: 700; color: var(--office-text); }
.cc-emp-name span { font-size: 12px; font-weight: 400; color: var(--office-text-dim); margin-left: 5px; }
.cc-emp-bal { font-size: 13px; color: var(--office-text-dim); white-space: nowrap; }
.cc-emp-bal b { font-size: 17px; font-weight: 800; color: var(--c, #fff); }
.cc-emp-res { font-size: 11px; }
.cc-emp-model { display: flex; gap: 8px; align-items: center; margin-top: 9px; }
.cc-emp-model > span { font-size: 12px; color: var(--office-text-dim); flex-shrink: 0; }
.cc-model {
    flex: 1; min-width: 0; padding: 5px 9px; font-size: 12.5px; font-family: inherit;
    border-radius: 8px; border: 1px solid var(--office-card-border);
    background: rgba(0, 0, 0, 0.3); color: var(--office-text); outline: none; cursor: pointer;
}
.cc-model:focus { border-color: var(--c, var(--office-warm)); }
.cc-emp-ctl { display: flex; gap: 6px; align-items: center; margin-top: 9px; }
.cc-amt {
    flex: 1; min-width: 0; padding: 6px 10px; font-size: 13px; font-family: inherit;
    border-radius: 8px; border: 1px solid var(--office-card-border);
    background: rgba(0, 0, 0, 0.25); color: var(--office-text); outline: none;
}
.cc-amt:focus { border-color: var(--c, var(--office-warm)); }
.cc-mini {
    flex-shrink: 0; padding: 6px 13px; font-size: 12.5px; font-weight: 700;
    border: none; border-radius: 8px; cursor: pointer; font-family: inherit;
    background: var(--c, #6a78b0); color: #fff;
}
.cc-mini.cc-ghost { background: rgba(255, 255, 255, 0.08); color: var(--office-text); }
.cc-mini:hover { filter: brightness(1.1); }
.cc-mini:disabled { opacity: 0.6; cursor: wait; }

/* 明細流水 */
.cc-emp-detail { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--office-card-border); }
.cc-led-item { margin: 5px 0; }
.cc-led { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.cc-led span { color: var(--office-text-dim); word-break: break-word; }
.cc-led b { white-space: nowrap; }
/* 真 token 結算的計量子行（模型 + in/out tokens）；對帳用，比主行更淡 */
.cc-led-meta { font-size: 11px; color: var(--office-text-dim); opacity: 0.8; margin-top: 1px; }
.cc-plus { color: #4ade80; }
.cc-minus { color: #f0997b; }

/* 側邊頁籤的手機定位統一在 office.css 的 .side-rail @media 處理（整條軌一起移到左下）。 */
@media (max-width: 560px) {
    .cc-card { height: 92vh; max-width: 100%; }
}
