/* ==================================================================
   KRON Studio · 设计师工作台
   ================================================================== */

body.studio { overflow-x: hidden; }

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
}
.login-art {
  position: relative; padding: 54px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 30% 20%, rgba(45, 226, 255, .1), transparent 65%),
    radial-gradient(60% 50% at 90% 90%, rgba(138, 92, 255, .12), transparent 60%);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.login-art .bigmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(80px, 15vw, 190px); line-height: .8; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(45, 226, 255, .22);
  position: absolute; bottom: 62px; left: 30px; user-select: none;
}
.login-art h1 { font-size: clamp(30px, 3.6vw, 52px); line-height: 1.08; max-width: 560px; }
.login-art h1 em { font-style: normal; color: var(--cyan); }
.login-art .la-foot { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: var(--mute-2); position: relative; z-index: 2; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-box { width: min(400px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-box h2 { font-size: 17px; margin-bottom: 4px; }
.login-box .demo { border-top: 1px solid var(--line); padding-top: 14px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--mute-2); line-height: 2; }

/* 布局微调 */
.content.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: .01em; }
.page-head .sub { font-size: 12px; color: var(--mute); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { position: relative; padding: 16px 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(11,17,26,.8), rgba(6,10,15,.7)); overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 2px; background: linear-gradient(90deg, var(--cyan), transparent); }
.kpi .k { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; color: var(--mute); text-transform: uppercase; }
.kpi .v { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 8px; line-height: 1; }
.kpi .v small { font-size: 12px; color: var(--mute); margin-left: 3px; font-weight: 400; }
.kpi .d { margin-top: 7px; font-size: 11px; color: var(--mute); }
.kpi.accent { border-color: rgba(45,226,255,.3); background: radial-gradient(80% 120% at 10% 0%, rgba(45,226,255,.12), transparent 60%), #070c13; }

.grid-2 { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; align-items: start; }
.grid-2.rev { grid-template-columns: .65fr 1.35fr; }

.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 13px; letter-spacing: .04em; }
.panel-head .hint { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; color: var(--mute-2); }
.panel-body { padding: 16px 18px; }

/* 列表 */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.05); cursor: pointer; transition: background .18s; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: rgba(45,226,255,.03); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-t { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-s { font-family: var(--font-mono); font-size: 9.5px; color: var(--mute-2); margin-top: 3px; letter-spacing: .06em; }
.list-row .lr-v { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); white-space: nowrap; }

/* 表格容器 */
.tbl-wrap { overflow-x: auto; }
.tbl-wrap .table { min-width: 640px; }
.table td.click { cursor: pointer; }

/* 方案编辑器 */
.editor-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; align-items: start; }
.view-panel { position: relative; }
.view-canvas { position: relative; height: 400px; background: radial-gradient(70% 60% at 50% 40%, rgba(45,226,255,.07), transparent 70%), #05080d; overflow: hidden; }
.view-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.view-tabs { position: absolute; top: 12px; left: 12px; display: flex; border: 1px solid var(--line); background: rgba(4,8,13,.85); }
.view-tabs button { border: 0; background: transparent; color: var(--mute); height: 28px; padding: 0 13px; font-size: 11px; cursor: pointer; border-right: 1px solid var(--line); }
.view-tabs button:last-child { border-right: 0; }
.view-tabs button.active { background: rgba(45,226,255,.14); color: var(--cyan); }

.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.matrix .m { background: #080d14; padding: 13px 15px; }
.matrix .m .k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; color: var(--mute-2); }
.matrix .m .v { font-family: var(--font-display); font-size: 21px; margin-top: 5px; }
.matrix .m .v small { font-size: 10px; color: var(--mute); margin-left: 2px; }

.room-editor { display: flex; flex-direction: column; gap: 8px; }
.re-row { display: grid; grid-template-columns: 1.2fr repeat(5, 72px) 90px 32px; gap: 8px; align-items: center; }
.re-row.head { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; color: var(--mute-2); text-transform: uppercase; }
.re-row input, .re-row select { width: 100%; height: 32px; text-align: center; background: rgba(4,8,13,.9); border: 1px solid rgba(255,255,255,.08); color: var(--ink); font-family: var(--font-mono); font-size: 11.5px; outline: none; }
.re-row input:focus { border-color: var(--cyan); }
.re-row .rname-input { text-align: left; padding: 0 8px; font-family: var(--font-body); }
.re-row .rvol { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); text-align: right; }
.re-row .x { border: 0; background: transparent; color: var(--mute-2); cursor: pointer; font-size: 14px; }
.re-row .x:hover { color: var(--bad); }

.quote-mini { display: flex; flex-direction: column; gap: 12px; }
.qm-total { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -.01em; }
.qm-sub { font-size: 11px; color: var(--mute); }
.qm-row { display: flex; justify-content: space-between; font-size: 11.5px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.qm-row .v { font-family: var(--font-mono); color: var(--ink-2); }

.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 抽屉式详情 */
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.detail-hero .dh-t { font-size: 20px; }
.detail-hero .dh-s { font-family: var(--font-mono); font-size: 10px; color: var(--mute); margin-top: 5px; letter-spacing: .08em; }

.tl { display: flex; flex-direction: column; }
.tl .it { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl .it::before { content: ""; position: absolute; left: 4px; top: 18px; bottom: -4px; width: 1px; background: var(--line); }
.tl .it:last-child::before { display: none; }
.tl .dot2 { width: 9px; height: 9px; border: 1px solid var(--cyan); margin-top: 4px; flex: none; background: #05080d; }
.tl .it.first .dot2 { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.tl .t { font-size: 12.5px; color: var(--ink-2); }
.tl .d { font-family: var(--font-mono); font-size: 9.5px; color: var(--mute-2); margin-top: 2px; }

/* 提案单 */
.proposal { background: #0b121a; padding: 30px 34px; color: var(--ink); }
.proposal h2 { font-size: 24px; }
.proposal .p-meta { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 10px; color: var(--mute); margin: 10px 0 18px; letter-spacing: .08em; }
.proposal .p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.proposal .p-cell { border: 1px solid var(--line); padding: 12px; }
.proposal .p-cell em { display: block; font-style: normal; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .16em; color: var(--mute-2); }
.proposal .p-cell b { display: block; font-family: var(--font-display); font-size: 20px; margin-top: 5px; }
.proposal table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.proposal th, .proposal td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.07); }
.proposal th { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; color: var(--mute); font-weight: 400; }
.proposal td.num { font-family: var(--font-mono); text-align: right; }
.proposal .p-total { display: flex; justify-content: flex-end; gap: 20px; padding-top: 14px; font-size: 12px; }
.proposal .p-total b { font-family: var(--font-display); font-size: 26px; color: var(--cyan); }
.proposal .p-foot { margin-top: 22px; font-size: 9.5px; color: var(--mute-2); line-height: 1.9; border-top: 1px solid var(--line); padding-top: 12px; }

/* 附件 */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.att { border: 1px solid var(--line); background: rgba(4, 8, 13, .6); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.att-thumb { height: 92px; background: #05080d; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(45, 226, 255, .1); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-ext { font-family: var(--font-mono); font-size: 11px; color: var(--mute); letter-spacing: .16em; }
.att-load { font-family: var(--font-mono); font-size: 11px; color: var(--mute-2); }
.att-name { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-sub { font-size: 9px; color: var(--mute-2); }
.att-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* 空/加载 */
.loading { display: grid; place-items: center; min-height: 60vh; font-family: var(--font-mono); font-size: 10px; letter-spacing: .24em; color: var(--mute); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .editor-grid, .grid-2, .grid-2.rev { grid-template-columns: 1fr; }
  .re-row { grid-template-columns: 1fr 64px 64px 64px 64px 64px 80px 28px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr; }
  .re-row { display: none; }
  .re-row.head { display: none; }
}
