/* ==========================================================================
   App 组件层：菜单、素材槽、画布、参数面板、任务、看板
   ========================================================================== */

.menu-anchor { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 6px; display: none; z-index: 400;
}
.menu.open { display: block; animation: rise 0.16s ease; }
.menu.right { left: auto; right: 0; }
.menu-label { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; font-weight: 600; }
.menu-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-xs);
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: background 0.12s;
}
.menu-item:hover { background: var(--paper-2); }
.menu-item[data-on="true"] { background: var(--paper-2); font-weight: 500; color: var(--ink); }
.menu-item .mi-meta { margin-left: auto; font-size: 11px; color: var(--faint); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 6px; }

/* ---------------- 工作台入口卡 ---------------- */
.entry-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  min-height: 232px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; color: #fff; cursor: pointer; isolation: isolate;
  border: 1px solid rgba(23, 22, 15, 0.08);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.25s;
}
.entry-card:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.entry-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.5s; }
.entry-card:hover img { transform: scale(1.03); }
.entry-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23, 22, 15, 0) 30%, rgba(23, 22, 15, 0.78) 100%);
}
.entry-card .e-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.entry-card .e-sub { font-size: 12.5px; opacity: 0.78; margin-top: 3px; }
.entry-card .e-tools { display: flex; gap: 6px; margin-top: 12px; }
.entry-card .e-tools span {
  font-size: 11px; padding: 3px 8px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

/* ---------------- 工具浏览器 ---------------- */
.tool-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: var(--r-xs);
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; transition: background 0.12s;
}
.tool-item:hover { background: var(--paper-2); }
.tool-item[data-on="true"] { background: var(--ink); color: #faf8f4; }
.tool-item[data-on="true"] .mono { color: rgba(250, 248, 244, 0.55); }
.tool-item .mono { font-size: 9.5px; color: var(--faint); margin-left: auto; }

/* ---------------- 参考素材槽 ---------------- */
.ref-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.ref-slot {
  position: relative; aspect-ratio: 1; border-radius: var(--r-xs);
  border: 1px dashed var(--line-2); background: var(--surface-2);
  display: grid; place-items: center; color: var(--faint); cursor: pointer;
  overflow: hidden; transition: border-color 0.15s, background 0.15s;
}
.ref-slot:hover { border-color: var(--line-3); background: var(--paper-2); }
.ref-slot.filled { border-style: solid; border-color: var(--line); }
.ref-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref-slot .idx {
  position: absolute; left: 4px; top: 4px; z-index: 2; font-size: 9px; line-height: 14px;
  padding: 0 4px; border-radius: 3px; background: rgba(23, 22, 15, 0.62); color: #fff;
  font-family: var(--mono);
}

/* ---------------- 画布 ---------------- */
.canvas {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background-color: #e7e2d7;
  background-image:
    linear-gradient(rgba(23, 22, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 22, 15, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  display: grid; place-items: center; min-height: 340px;
}
.canvas-stage { width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.canvas-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 3px; box-shadow: 0 12px 40px -18px rgba(23, 22, 15, 0.55);
  transition: transform 0.2s ease;
}
.canvas-bar {
  position: absolute; left: 10px; top: 10px; z-index: 5;
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: var(--sh-2); backdrop-filter: blur(8px);
}
.canvas-bar button {
  width: 28px; height: 26px; border-radius: 5px; display: grid; place-items: center;
  color: var(--ink-2); transition: background 0.12s;
}
.canvas-bar button:hover { background: var(--paper-2); }
.canvas-bar button[data-on="true"] { background: var(--ink); color: #faf8f4; }
.canvas-bar .sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.canvas-bar .zoom-lbl { font-size: 10.5px; color: var(--muted); padding: 0 5px; font-variant-numeric: tabular-nums; }

/* ---------------- 参数行 ---------------- */
.param {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.param:last-child { border-bottom: 0; }
.param > .p-label { font-size: 12px; color: var(--muted); flex: none; }
.param > .p-value { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.param .p-value button {
  height: 24px; padding: 0 8px; border-radius: 5px; font-size: 12px;
  border: 1px solid transparent; color: var(--ink-2);
}
.param .p-value button:hover { background: var(--paper-2); }
.param .p-value button[data-on="true"] { background: var(--ink); color: #faf8f4; }

/* ---------------- 报价卡 ---------------- */
.quote {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); padding: 12px 14px;
}
.quote .q-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; color: var(--muted); }
.quote .q-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); }
.quote .q-total b { font-size: 19px; letter-spacing: -0.02em; }

/* ---------------- 列表行 ---------------- */
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .l-main { min-width: 0; flex: 1; }
.list-row .l-title { font-size: 13px; font-weight: 500; }
.list-row .l-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }

/* ---------------- 任务卡 ---------------- */
.task-row {
  display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface);
}
.task-row + .task-row { margin-top: 8px; }

/* ---------------- 分镜 ---------------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shot { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.shot .s-img { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); }
.shot .s-img img { width: 100%; height: 100%; object-fit: cover; }
.shot .s-meta { padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.shot .s-no {
  position: absolute; left: 6px; top: 6px; font-size: 9.5px; font-family: var(--mono);
  background: rgba(23, 22, 15, 0.62); color: #fff; padding: 1px 5px; border-radius: 3px;
}
.shot .s-dur { position: absolute; right: 6px; bottom: 6px; font-size: 9.5px; background: rgba(23,22,15,.62); color:#fff; padding: 1px 5px; border-radius: 3px; }

/* ---------------- 创作日历 ---------------- */
.calendar { display: grid; grid-template-columns: repeat(26, 1fr); gap: 4px; }
.calendar i {
  display: block; aspect-ratio: 1; border-radius: 2px; background: var(--paper-2);
}
.calendar i[data-lv="1"] { background: #ecdcd2; }
.calendar i[data-lv="2"] { background: #dcb7a3; }
.calendar i[data-lv="3"] { background: #c9876a; }
.calendar i[data-lv="4"] { background: var(--clay); }

/* ---------------- 批量操作条 ---------------- */
.batchbar {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #faf8f4; border-radius: var(--r-lg);
  padding: 9px 10px 9px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-3); z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.batchbar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.batchbar .btn { height: 30px; font-size: 12.5px; }
.batchbar .btn-ghost { color: #faf8f4; }
.batchbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.batchbar .divider-v { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.18); }

/* ---------------- 资源网格 ---------------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.asset {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); transition: box-shadow 0.16s, border-color 0.16s; position: relative;
}
.asset:hover { box-shadow: var(--sh-2); border-color: var(--line-2); }
.asset .a-img { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.asset .a-img img { width: 100%; height: 100%; object-fit: cover; }
.asset .a-body { padding: 9px 10px; }
.asset .a-name { font-size: 12.5px; font-weight: 500; display: flex; gap: 5px; align-items: center; }
.asset .a-meta { font-size: 11px; color: var(--faint); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.asset .a-check { position: absolute; left: 8px; top: 8px; z-index: 3; box-shadow: 0 1px 4px rgba(23, 22, 15, 0.28); }
.asset .a-flag { position: absolute; right: 8px; top: 8px; z-index: 3; }
.asset .a-hover {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; padding: 8px; opacity: 0; transition: opacity 0.16s;
  background: linear-gradient(180deg, transparent 55%, rgba(23, 22, 15, 0.55));
}
.asset:hover .a-hover { opacity: 1; }
.asset .a-hover .btn { height: 26px; font-size: 11.5px; padding: 0 8px; }

/* ---------------- 统计条 ---------------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.stat-strip > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.stat-strip > div:last-child { border-right: 0; }

/* ---------------- 企业侧栏 ---------------- */
.ent-shell { display: flex; min-height: 100vh; }
.ent-side {
  width: 232px; flex: none; background: var(--ink); color: #f3efe6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.ent-side .brand { padding: 16px 18px; font-size: 14px; color: #f7f4ec; }
.ent-side .brand .mark { background: var(--clay); }
.ent-side .side-org {
  margin: 4px 12px 10px; padding: 9px 10px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.09);
}
.ent-side nav { padding: 4px 10px; display: flex; flex-direction: column; gap: 1px; }
.ent-side nav a {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px;
  border-radius: var(--r-xs); font-size: 13px; color: rgba(243, 239, 230, 0.66);
  transition: background 0.14s, color 0.14s;
}
.ent-side nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.ent-side nav a[data-on="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; }
.ent-side nav a[data-on="true"] .r-ico { color: var(--clay); }
.ent-side .r-ico { width: 15px; height: 15px; opacity: 0.9; }
.ent-side .side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ent-main { flex: 1; min-width: 0; background: var(--paper); }
.ent-top {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 100;
}

/* ---------------- 平台后台 ---------------- */
.adm-shell { display: flex; min-height: 100vh; background: #f6f5f2; }
.adm-side { width: 208px; flex: none; border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.adm-side nav { padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.adm-side nav a {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
  border-radius: var(--r-xs); font-size: 12.5px; color: var(--ink-2);
}
.adm-side nav a:hover { background: var(--paper-2); }
.adm-side nav a[data-on="true"] { background: var(--ink); color: #faf8f4; }
.adm-main { flex: 1; min-width: 0; padding: 20px 24px 50px; }
.adm-top { height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 20px; background: var(--surface); }

/* ---------------- 进度节点 ---------------- */
.steps { display: flex; align-items: center; gap: 0; }
.steps .step { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--faint); }
.steps .step .n {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; border: 1px solid var(--line-2); background: var(--surface);
}
.steps .step[data-on="true"] { color: var(--ink); font-weight: 500; }
.steps .step[data-on="true"] .n { background: var(--ink); border-color: var(--ink); color: #faf8f4; }
.steps .bar { width: 30px; height: 1px; background: var(--line-2); margin: 0 8px; }

/* ---------------- 提示条 ---------------- */
.notice {
  display: flex; gap: 10px; padding: 11px 13px; border-radius: var(--r-sm);
  background: var(--paper-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
  line-height: 1.6;
}
.notice svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--faint); }
.notice.clay { background: var(--clay-soft); border-color: var(--clay-line); color: var(--clay-hover); }
.notice.clay svg { color: var(--clay); }
.notice.amber { background: var(--amber-soft); border-color: var(--amber-line); color: #6f5210; }
.notice.amber svg { color: var(--amber); }

/* ---------------- 企业后台共享 ---------------- */
.ent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.kpi-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; background: var(--surface);
}
.kpi-band > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.kpi-band > div:last-child { border-right: 0; }
.role-bar { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.role-bar .rb-name { width: 62px; flex: none; font-size: 12.5px; }
.role-bar .rb-track { flex: 1; height: 18px; border-radius: 4px; background: var(--paper-2); overflow: hidden; display: flex; }
.role-bar .rb-track i { display: block; height: 100%; background: var(--clay); }
.role-bar .rb-track i.ghost { background: var(--line-2); }
.role-bar .rb-val { width: 96px; text-align: right; font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
