/* Ottocast AI 平台扩展样式:工作区背景、智能体二级导航、账号权限、日志筛选 */

/* ---- 工作区背景(内容区) ---- */
.layout > .content:not(.embedded-view), .kbm-main {
  background: #f3fbf9 url("/assets/workspace-bg.jpg") center / cover no-repeat fixed;
}

/* ---- 智能体配置:二级导航 + 单列分区 ---- */
.agent-sections { margin: 0 0 8px; }
.agent-sections .nav-link { font-size: 12px; }
#agentView .workspace { display: block; }
#agentView .config-area, #agentView .test-area { max-width: 980px; width: auto; flex: none; }
#agentView .test-area { margin-top: 0; }
#agentView .test-card { position: static; }
#agentView .test-card .messages { min-height: 380px; }

/* ---- 账号管理:占满内容区 ---- */
#accountView .account-page { max-width: none; }
.acct-top { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr); gap: 14px; margin-bottom: 14px; }
.acct-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; box-shadow: 0 2px 8px #00695c0a; }
.acct-card h3 { margin: 0 0 10px; color: var(--teal-dark); font-size: 14px; }
.acct-me { display: flex; flex-direction: column; gap: 4px; }
.acct-me small { color: #7f9a95; font-size: 11px; }
.acct-me b { font-size: 18px; color: var(--teal-dark); }
.acct-me span { color: #5f7a74; font-size: 12px; }
.acct-me button { align-self: flex-start; margin-top: 8px; }
.acct-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-inline input { flex: 1; min-width: 180px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; }
.acct-perm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.acct-perm-head p { margin: 0; color: #5f7a74; font-size: 12px; }
.acct-create { padding: 14px; margin-bottom: 14px; background: #f7fcfb; border: 1px dashed var(--line); border-radius: 9px; }
.acct-picker { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid #edf5f3; }
.acct-picker label { display: block; width: min(420px, 100%); color: #4b6761; font-size: 12px; }
.acct-picker select, .acct-picker .ss-main { width: 100%; margin-top: 5px; }
.acct-user-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-bottom: 6px; font-size: 12px; color: #5f7a74; }
.acct-user-meta b { font-size: 15px; color: var(--teal-dark); }
.acct-user-meta .on { color: #1b7a50; }
.acct-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.perm-tree { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 14px; }
.perm-node { border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.perm-node.off { background: #fafcfc; }
.perm-top, .perm-child { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
.perm-top { background: #f1f9f7; }
.perm-child { padding-left: 34px; border-top: 1px solid #f0f6f4; }
.perm-top span, .perm-child span { flex: 1; min-width: 0; }
.perm-top b, .perm-child b { display: block; font-size: 12.5px; color: #183c38; }
.perm-top small, .perm-child small { display: block; font-size: 10px; color: #8aa39e; }
.perm-top em, .perm-child em { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 9px; background: #e3f3ef; color: var(--teal-dark); }
.perm-child em { background: #eef2f6; color: #546170; }
.perm-child input:disabled + span { opacity: .45; }

/* ---- 日志筛选:条件独立展示 ---- */
.log-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; }
.log-filter-grid .lf { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.log-filter-grid .lf > span { color: #5f7a74; font-size: 11px; }
.log-filter-grid .lf input, .log-filter-grid .lf select { width: 100%; height: 34px; padding: 0 10px; font-size: 11.5px; }
.log-filter-grid .lf-narrow { width: 128px; max-width: 128px; justify-self: start; }
.log-filter-grid .lf-narrow .ss-main { min-width: 0 !important; width: 100%; }
.log-filter-grid .date-filter { flex-direction: column; align-items: stretch; height: auto; padding: 0; border: 0; background: none; box-shadow: none; }
.log-filter-grid .date-filter > span { padding: 0; margin: 0; font-weight: 400; color: #5f7a74; font-size: 11px; }
.log-filter-grid .date-filter input { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.log-filter-grid .lf-actions { display: flex; gap: 8px; align-items: center; }
.log-filter-grid .lf-actions button { height: 34px; padding: 0 16px; }

@media (max-width: 900px) {
  .acct-top { grid-template-columns: 1fr; }
  .log-filter-grid .lf-narrow { max-width: none; }
}

/* 二级导航由 shell.css 的悬浮二级菜单承担 */
#kbmView { background: #f3fbf9 url("/assets/workspace-bg.jpg") center / cover no-repeat fixed; }
#kbmView iframe { background: transparent !important; }
