/* ==========================================================================
   JIANBAI · App (workspace / canvas / video / center / account / enterprise)
   ========================================================================== */

/* ---------------- Shell ---------------- */
.app-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(var(--bg-rgb),.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar .brand { font-size: 13px; letter-spacing: .24em; }
.topbar .brand i { font-size: 10px; }
.topbar-sep { width: 1px; height: 18px; background: var(--line-2); }

.ws-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--paper-80);
  transition: border-color .4s, background .4s;
}
.ws-switch:hover { border-color: var(--line-3); background: rgba(var(--fg-rgb),.04); }
.ws-switch .credits {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--brass);
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}
.ws-switch .caret { font-size: 8px; color: var(--paper-42); }

.topbar-spacer { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--paper-60);
  transition: color .4s, background .4s;
}
.icon-btn:hover { color: var(--paper); background: rgba(var(--fg-rgb),.05); }
.icon-btn .dot-live {
  position: absolute; top: 7px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(194,161,118,.14);
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--av-a), var(--av-b));
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--paper-80);
}

/* ---------------- Layout with sidenav ---------------- */
.work-layout {
  display: grid;
  grid-template-columns: 226px 1fr;
  align-items: start;
  flex: 1;
  min-height: calc(100svh - 56px);
}
.sidenav {
  position: sticky;
  top: 56px;
  align-self: start;
  height: calc(100svh - 56px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 20px 12px 28px;
  scrollbar-width: none;
}
.sidenav::-webkit-scrollbar { width: 0; }
.sidenav .grp {
  font-size: 9.5px;
  letter-spacing: .26em;
  color: var(--paper-26);
  text-transform: uppercase;
  padding: 0 10px;
  margin: 24px 0 10px;
}
.sidenav .grp:first-child { margin-top: 4px; }
.sidenav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--paper-60);
  border-radius: 2px;
  transition: color .35s, background .35s, box-shadow .35s;
}
.sidenav a:hover { color: var(--paper); background: rgba(var(--fg-rgb),.04); }
.sidenav a.on {
  color: var(--paper);
  background: rgba(var(--fg-rgb),.055);
  box-shadow: inset 2px 0 0 var(--brass);
}
.sidenav a .n {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--paper-26);
}
.sidenav .mini-plan {
  margin: 22px 6px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.sidenav .mini-plan .lbl { font-size: 10px; letter-spacing: .2em; color: var(--paper-26); text-transform: uppercase; }
.sidenav .mini-plan b { display: block; font-size: 19px; font-weight: 200; margin: 8px 0 10px; letter-spacing: -.02em; }
.meter { height: 2px; background: var(--paper-14); position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper-80); transition: width 1.4s var(--ease); }
.meter--brass i { background: var(--brass); }

.content { padding: clamp(22px, 2.6vw, 40px) clamp(22px, 3vw, 48px) 64px; min-width: 0; }
.content--wide { max-width: 1500px; }

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.page-head-row h1 {
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 200;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.page-head-row .sub { font-size: 12px; color: var(--paper-42); margin-top: 8px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

/* ---------------- Buttons (app) ---------------- */
.abtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--paper-80);
  background: transparent;
  transition: all .4s var(--ease);
  white-space: nowrap;
}
.abtn:hover { border-color: var(--line-3); color: var(--paper); background: rgba(var(--fg-rgb),.04); }
.abtn--primary { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.abtn--primary:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.abtn--ghost { border-color: transparent; }
.abtn--icon { width: 34px; padding: 0; }
.abtn[disabled] { opacity: .32; pointer-events: none; }

/* ---------------- Stats ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-2);
  border-left: 1px solid var(--line);
}
.stats--3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  padding: 20px 20px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .5s var(--ease);
}
.stat:hover { background: rgba(var(--fg-rgb),.028); }
.stat .k { font-size: 10px; letter-spacing: .2em; color: var(--paper-42); text-transform: uppercase; }
.stat .v { font-size: clamp(22px, 2vw, 29px); font-weight: 200; letter-spacing: -.025em; line-height: 1.05; display: flex; align-items: baseline; gap: 5px; }
.stat .v i { font-family: var(--f-serif); font-style: italic; font-size: 11px; color: var(--paper-42); }
.stat .d { font-size: 11px; color: var(--paper-26); }
.stat .d b { color: var(--brass); font-weight: 400; }

/* ---------------- Panels ---------------- */
.panel { border: 1px solid var(--line); background: rgba(var(--fg-rgb),.012); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-size: 13px; letter-spacing: .04em; font-weight: 400; }
.panel-head .more { font-size: 11px; color: var(--paper-42); }
.panel-head .more:hover { color: var(--paper); }
.panel-body { padding: 20px; }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  position: relative;
  padding: 12px 0 14px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--paper-42);
  white-space: nowrap;
  transition: color .35s;
}
.tabs a:hover, .tabs button:hover { color: var(--paper-80); }
.tabs .on { color: var(--paper); }
.tabs .on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--paper);
}
.tabs .cnt { font-family: var(--f-mono); font-size: 10px; color: var(--paper-26); margin-left: 5px; }

/* ---------------- Segmented ---------------- */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; }
.seg button { padding: 6px 15px; border-radius: 999px; font-size: 11.5px; color: var(--paper-42); transition: all .4s var(--ease); }
.seg button:hover { color: var(--paper-80); }
.seg button.on { background: var(--paper); color: var(--ink); }

/* ---------------- Badges / chips ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--paper-60);
  white-space: nowrap;
}
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--paper-42); }
.badge.s-run { color: var(--brass); border-color: rgba(194,161,118,.3); }
.badge.s-run::before { background: var(--brass); animation: pulse 2s infinite; }
.badge.s-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.badge.s-ok::before { background: var(--ok); }
.badge.s-fail { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 32%, transparent); }
.badge.s-fail::before { background: var(--fail); }
.badge.s-idle::before { background: var(--paper-26); }
.badge.no-dot::before { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--paper-60);
  transition: all .35s var(--ease);
}
.chip:hover { color: var(--paper); border-color: var(--line-3); }
.chip.on { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.chip .x { font-size: 10px; opacity: .5; }

/* ---------------- Tables ---------------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 720px; }
.tbl thead th {
  text-align: left;
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper-42);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.tbl tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--paper-80);
  vertical-align: middle;
  white-space: nowrap;
}
.tbl tbody tr { transition: background .3s; }
.tbl tbody tr:hover { background: rgba(var(--fg-rgb),.028); }
.tbl .num { font-family: var(--f-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tbl .t-strong { color: var(--paper); }
.tbl .t-dim { color: var(--paper-42); }
.tbl .t-mono { font-family: var(--f-mono); font-size: 11px; color: var(--paper-42); }

/* ---------------- Asset grid ---------------- */
.assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 16px;
}
.asset { position: relative; }
.asset .ph {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-3);
}
.asset .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; filter: saturate(.92); }
.asset:hover .ph img { transform: scale(1.045); filter: saturate(1); }
.asset .cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; font-size: 11px; color: var(--paper-42); }
.asset .cap b { font-weight: 400; color: var(--paper-80); }
.asset .tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; letter-spacing: .14em;
  padding: 3px 7px;
  background: rgba(10,10,9,.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(242,238,230,.22);
  color: var(--on-scrim-2);
  text-transform: uppercase;
}
.asset .pick {
  position: absolute; top: 8px; right: 8px;
  width: 17px; height: 17px;
  border: 1px solid rgba(242,238,230,.42);
  background: rgba(10,10,9,.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s, background .3s;
}
.asset:hover .pick, .asset.is-picked .pick { opacity: 1; }
.asset.is-picked .pick { background: var(--paper); border-color: var(--paper); }
.asset .pick::after { color: var(--ink); }
.asset.is-picked .pick::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--ink); }

/* ---------------- Mode cards (workspace) ---------------- */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mode-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  isolation: isolate;
  transition: border-color .5s var(--ease);
}
.mode-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(.8) brightness(.52);
  transform: scale(1.02);
  transition: transform 1.4s var(--ease), filter .8s;
}
.mode-card::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10,10,9,.1), rgba(10,10,9,.85));
}
.mode-card:hover { border-color: var(--line-3); }
.mode-card:hover img { transform: scale(1.07); filter: saturate(1) brightness(.62); }
.mode-card .idx { position: absolute; top: 18px; left: 22px; font-family: var(--f-mono); font-size: 10px; color: var(--on-scrim-3); }
.mode-card h3 { font-size: 20px; font-weight: 300; letter-spacing: .01em; margin-bottom: 6px; color: var(--on-scrim); }
.mode-card p { font-size: 11.5px; color: var(--on-scrim-2); line-height: 1.7; }
.mode-card .ar { position: absolute; right: 20px; bottom: 20px; font-size: 12px; color: var(--on-scrim-3); transition: transform .5s var(--ease), color .4s; }
.mode-card:hover .ar { transform: translateX(4px); color: var(--on-scrim); }

/* ---------------- Draft strip ---------------- */
.drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.draft {
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .4s;
}
.draft:hover { border-color: var(--line-3); }
.draft .ph { aspect-ratio: 4/3; overflow: hidden; background: var(--ink-3); }
.draft .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(var(--img-dim)); transition: transform 1s var(--ease); }
.draft:hover .ph img { transform: scale(1.05); }
.draft .mt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.draft .mt b { font-size: 12px; font-weight: 400; color: var(--paper-80); }
.draft .mt span { font-size: 10.5px; color: var(--paper-26); font-family: var(--f-mono); }

/* ---------------- Task rows ---------------- */
.task {
  display: grid;
  grid-template-columns: 28px 1fr 90px 96px;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: 0; }
.task .ic {
  width: 28px; height: 34px;
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.task .ic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.8); }
.task .nm { font-size: 12.5px; color: var(--paper-80); }
.task .mt { font-size: 10.5px; color: var(--paper-26); margin-top: 3px; font-family: var(--f-mono); }
.task .pr { font-size: 11px; color: var(--paper-42); text-align: right; }
.task .st { text-align: right; }

/* ---------------- Editor (canvas / video) ---------------- */
.editor {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 376px;
  height: calc(100svh - 56px);
  min-height: 0;
}
.editor-l, .editor-r {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.editor-l { border-right: 1px solid var(--line); padding: 18px 12px 40px; }
.editor-r { border-left: 1px solid var(--line); display: flex; flex-direction: column; }

.tool-list .grp { font-size: 9.5px; letter-spacing: .24em; color: var(--paper-26); text-transform: uppercase; padding: 0 10px; margin: 20px 0 8px; }
.tool-list .grp:first-child { margin-top: 0; }
.tool-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--paper-60);
  transition: all .35s;
}
.tool-list a:hover { color: var(--paper); background: rgba(var(--fg-rgb),.04); }
.tool-list a.on { color: var(--paper); background: rgba(var(--fg-rgb),.06); box-shadow: inset 2px 0 0 var(--brass); }
.tool-list a .k { margin-left: auto; font-family: var(--f-mono); font-size: 9.5px; color: var(--paper-26); }

.editor-c {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--stage);
}
.canvas-bar {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(var(--bg-rgb),.6);
}
.canvas-bar .spacer { flex: 1; }
.canvas-bar .vsep { width: 1px; height: 16px; background: var(--line-2); margin: 0 4px; }
.canvas-bar .zoom { font-family: var(--f-mono); font-size: 11px; color: var(--paper-42); padding: 0 6px; }

.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}
.stage .frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  box-shadow: var(--sh-2);
  transition: transform .8s var(--ease);
}
.stage .frame img { max-height: calc(100svh - 260px); width: auto; max-width: 100%; object-fit: contain; }
.stage .frame .rule-line {
  position: absolute;
  background: var(--brass);
  opacity: .0;
  transition: opacity .4s;
}
.stage .frame:hover .rule-line { opacity: .8; }
.stage .note {
  position: absolute;
  left: 28px; bottom: 22px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--paper-26);
}
.stage .marquee-hint {
  position: absolute;
  right: 28px; bottom: 22px;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--paper-26);
  text-transform: uppercase;
}

/* selection corners */
.pickbox { position: absolute; border: 1px dashed rgba(194,161,118,.9); }
.pickbox span {
  position: absolute; width: 6px; height: 6px;
  background: var(--brass);
}
.pickbox span:nth-child(1) { top: -3px; left: -3px; }
.pickbox span:nth-child(2) { top: -3px; right: -3px; }
.pickbox span:nth-child(3) { bottom: -3px; left: -3px; }
.pickbox span:nth-child(4) { bottom: -3px; right: -3px; }

/* result strip */
.strip {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip .thumb {
  position: relative;
  width: 58px; height: 58px;
  flex: none;
  border: 1px solid var(--line);
  overflow: hidden;
  opacity: .72;
  transition: opacity .3s, border-color .3s;
}
.strip .thumb img { width: 100%; height: 100%; object-fit: cover; }
.strip .thumb:hover { opacity: 1; }
.strip .thumb.on { border-color: var(--paper); opacity: 1; }
.strip .thumb.is-upload::after {
  content: "原";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px;
  color: var(--on-scrim-2);
  background: rgba(10,10,9,.5);
}

/* ---------------- Right panel ---------------- */
.panel-scroll { flex: 1; overflow-y: auto; padding: 20px 22px 24px; }
.rp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rp-head .t { font-size: 13px; letter-spacing: .04em; }
.rp-head .sub { font-size: 10px; color: var(--paper-26); font-family: var(--f-mono); }

.prompt-box {
  border: 1px solid var(--line-2);
  background: rgba(var(--fg-rgb),.02);
  padding: 14px;
  transition: border-color .4s;
}
.prompt-box:focus-within { border-color: var(--line-3); }
.prompt-box textarea {
  width: 100%;
  min-height: 74px;
  resize: none;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--paper);
  letter-spacing: .01em;
}
.prompt-box textarea::placeholder { color: var(--paper-26); }
.prompt-tools { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.prompt-tools .hint { margin-left: auto; font-size: 10px; color: var(--paper-26); font-family: var(--f-mono); }

.refs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ref {
  position: relative;
  width: 54px; height: 54px;
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref .idx {
  position: absolute; top: 0; left: 0;
  font-family: var(--f-mono); font-size: 8px;
  padding: 1px 3px;
  background: rgba(10,10,9,.75);
  color: var(--on-scrim);
}
.ref--add {
  display: grid; place-items: center;
  border-style: dashed;
  color: var(--paper-26);
  font-size: 16px;
  transition: color .35s, border-color .35s;
}
.ref--add:hover { color: var(--paper-80); border-color: var(--line-3); }

/* option rows */
.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.opt:last-child { border-bottom: 0; }
.opt .lb { font-size: 12px; color: var(--paper-42); flex: none; }
.opt .vl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--paper-80); text-align: right; }
.opt .vl .cv { font-size: 8px; color: var(--paper-26); }
.opt:hover .vl { color: var(--paper); }

.ratio-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.ratio-grid button {
  height: 42px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--paper-42);
  transition: all .35s var(--ease);
}
.ratio-grid button:hover { border-color: var(--line-3); color: var(--paper); }
.ratio-grid button.on { border-color: var(--paper); color: var(--paper); background: rgba(var(--fg-rgb),.05); }
.ratio-grid i {
  display: block;
  border: 1px solid currentColor;
  opacity: .55;
}
.r-1-1 { width: 14px; height: 14px; }
.r-16-9 { width: 20px; height: 11px; }
.r-9-16 { width: 11px; height: 20px; }
.r-4-3 { width: 17px; height: 13px; }
.r-3-4 { width: 13px; height: 17px; }
.r-3-2 { width: 19px; height: 13px; }
.r-2-3 { width: 13px; height: 19px; }
.r-21-9 { width: 22px; height: 9px; }

.quote-box {
  border-top: 1px solid var(--line-2);
  padding-top: 16px;
  margin-top: 8px;
}
.quote-rowe { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--paper-42); padding: 4px 0; }
.quote-rowe b { color: var(--paper-80); font-weight: 400; font-family: var(--f-mono); font-size: 11px; }
.quote-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.quote-total .k { font-size: 11px; letter-spacing: .16em; color: var(--paper-42); text-transform: uppercase; }
.quote-total .v { font-size: 24px; font-weight: 200; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 5px; }
.quote-total .v i { font-family: var(--f-serif); font-style: italic; font-size: 11px; color: var(--paper-42); }

.submit-bar {
  flex: none;
  padding: 14px 22px 16px;
  border-top: 1px solid var(--line);
  background: rgba(var(--bg-rgb),.92);
}
.submit-bar .btn-submit {
  width: 100%;
  height: 44px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: .12em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .45s var(--ease);
}
.submit-bar .btn-submit:hover { background: var(--solid-hover); letter-spacing: .16em; }
.submit-bar .tip { text-align: center; font-size: 10px; color: var(--paper-26); margin-top: 9px; letter-spacing: .04em; }

/* ---------------- Section helpers ---------------- */
.sec-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
}
.sec-title h4 { font-size: 13px; letter-spacing: .04em; font-weight: 400; }
.sec-title span { font-size: 10px; color: var(--paper-26); font-family: var(--f-mono); }
.sec-title .line { flex: 1; height: 1px; background: var(--line); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* ---------------- Approval / credit apply ---------------- */
.apply-row {
  display: grid;
  grid-template-columns: 1fr 120px 110px 90px;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.apply-row .who { display: flex; align-items: center; gap: 10px; }
.apply-row .who .av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg,var(--av-a),var(--av-b)); color: var(--paper-80); display: grid; place-items: center; font-size: 10px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 18px);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 11px 20px;
  border-radius: 2px;
  z-index: 8000;
  opacity: 0;
  pointer-events: none;
  transition: all .5s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Empty state ---------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 20px;
  border: 1px dashed var(--line-2);
  color: var(--paper-26);
  font-size: 12px;
  letter-spacing: .06em;
}
.empty .big { font-family: var(--f-serif); font-style: italic; font-size: 26px; color: var(--paper-26); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .editor { grid-template-columns: 190px minmax(0,1fr) 340px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .work-layout { grid-template-columns: 1fr; }
  .sidenav {
    position: static; height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex; gap: 4px; overflow-x: auto;
    padding: 10px 12px;
  }
  .sidenav .grp { display: none; }
  .sidenav .mini-plan { display: none; }
  .sidenav a { white-space: nowrap; }
  .editor { grid-template-columns: minmax(0,1fr) 340px; }
  .editor-l { display: none; }
  .mode-cards { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: auto; }
  .editor-r { border-left: 0; border-top: 1px solid var(--line); }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .assets { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .topbar .ws-switch .credits { display: none; }
}
