:root { --canvas: #f4f7fc; --table-line: #e6edf6; background: var(--canvas); }
[data-workbench] .shell { max-width: 90rem; }
[data-workbench] .toolbar-inner { min-height: 3.75rem; }
.workbench-banner { position: relative; isolation: isolate; overflow: hidden; margin-top: .95rem; border-radius: 1.3rem; background: #edf3fa; border: 1px solid #e2ebf6; }
.banner-content { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.35rem); padding: 1.45rem 1.55rem; }
.banner-content .urba-logo { height: clamp(2rem, 5vw, 3.25rem); flex: none; }
.workbench-banner h1 { font-size: clamp(1.98rem,3.35vw,3.12rem); margin: .44rem 0 .34rem; }
.workbench-banner p { color: #3e5c7d; font-size: .91rem; }
.banner-visual { position: absolute; z-index: -1; inset: 0 0 0 auto; width: min(29%,21rem); overflow: hidden; }
.banner-visual img { position: absolute; height: 9rem; right: 2.8rem; top: .65rem; }
[data-workbench] .project-bar { margin: 1.05rem 0 .9rem; }
[data-workbench] .segments { grid-template-columns: repeat(2,1fr); }
.template-date { color: var(--muted); font-size: .77rem; }
.template-date time { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: .2rem; }
[data-workbench] .workspace { display: block; }
[data-workbench] #summary { position: static; margin-top: 1rem; }
[data-workbench] .summary-card { display: grid; grid-template-columns: 1fr 1fr; }
[data-workbench] .summary-body { align-self: center; display: block; }
[data-workbench] .summary-hero { background: #143c69; }
.area-cover-list { display: grid; gap: .5rem; }
.area-module { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; background: white; border: 1px solid var(--line); border-radius: .85rem; }
.area-module .module-tile { width: 100%; min-height: 3.25rem; border: 0; flex-wrap: nowrap; }
.area-disclosure { display: contents; }
.area-disclosure::details-content { grid-column: 1 / -1; }
.area-disclosure summary { grid-column: 2; grid-row: 1; align-self: center; padding: .7rem .65rem; cursor: pointer; color: #155aa7; white-space: nowrap; font-size: .78rem; }
.area-contents { grid-column: 1 / -1; margin: 0 .8rem .4rem; padding: 0; list-style: none; color: var(--muted); font-size: .8rem; }
.area-disclosure:not([open]) .area-contents { display: none; }
.area-contents li { padding: .4rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.area-module-gym { isolation: isolate; grid-template-rows: clamp(7.25rem,14vw,11rem) auto; }
.area-module-gym::before {
  content: "";
  grid-area: 1 / 1 / 2 / -1;
  align-self: stretch;
  z-index: -1;
  border-radius: .8rem .8rem 0 0;
  background: linear-gradient(90deg,#121519e8,#12151955 55%,#121519c9), url("assets/gym-cover.jpg") center 63% / cover no-repeat, #262321;
}
.area-module-gym:not(:has(details[open]))::before { border-radius: .8rem; }
.area-module-gym .module-tile { grid-area: 1 / 1; height: 100%; padding-inline: .85rem; }
.area-module-gym .module-tile, .area-module-gym .module-tile:hover { background: transparent; }
.area-module-gym .module-tile:hover { box-shadow: inset 0 0 0 2px #ffffffa8; }
.area-module-gym .module-label strong, .area-module-gym .module-label small,
.area-module-gym .module-value, .area-module-gym .tile-chevron,
.area-module-gym .area-disclosure summary { color: white; }
.area-module-gym .area-disclosure summary { background: #181c20bd; border-radius: .5rem; margin-right: .55rem; }
.room-module-section { margin-top: 1.6rem; }
.room-cover-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 1rem; }
.room-cover-grid .room-card { min-width: 0; margin: 0; }
.room-render { display: block; width: 100%; height: auto; max-height: 22rem; aspect-ratio: 120 / 49; object-fit: cover; object-position: 50% 76%; border-radius: .75rem; margin-bottom: .85rem; background: #e8e0d5; }
.allocation-rules { margin: 0 0 .8rem; }
.allocation-rules p, .ledger-allocation { margin-top: .4rem; color: var(--muted); font-size: .82rem; }
.allocation-rules ul { margin-bottom: 0; padding-left: 1.2rem; }
.allocation-rules li + li { margin-top: .65rem; }
.include-module { flex: none; align-self: center; margin: .25rem; padding: .35rem .45rem; min-height: 2rem; border: 1px solid #d3e1f1; border-radius: .5rem; background: #fff; color: #155aa7; white-space: nowrap; font-size: .73rem; font-weight: 670; }
.include-module[aria-pressed="true"] { background: #e8f1fc; border-color: #c2d9f5; }
.room-module-option { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; align-self: start; min-width: 0; border: 1px solid var(--line); border-radius: .76rem; background: white; }
.room-module-option .module-tile { border: 0; }
.room-module-option .include-module { min-height: 2.75rem; }
.room-module-option .tile-chevron { display: block; }
.room-module-option [aria-expanded="true"] .tile-chevron { transform: rotate(90deg); }
.module-preview { grid-column: 1 / -1; list-style: none; padding: 0 .65rem; margin: 0; }
.module-preview-item { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: .5rem; padding: .38rem 0; border-top: 1px solid var(--line); font-size: .83rem; }
.module-preview-description { overflow-wrap: anywhere; }
.module-preview-description span { display: block; color: var(--muted); font-size: .76rem; }
.module-preview-price { text-align: right; font-variant-numeric: tabular-nums; }
.module-preview-item .button { min-height: 2.75rem; padding-inline: .5rem; }
[data-stock-field="price"] { scroll-margin-top: 5rem; }
.room-price-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: .78rem; }
.room-price-pair > div { min-width: 0; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: .68rem; }
.room-price-pair > div:last-child { background: #edf4fd; border-color: #dce9f9; }
.room-price-pair span { display: block; color: var(--muted); font-size: .8rem; }
.room-price-pair strong { display: block; margin-top: .17rem; color: #123866; font-size: clamp(1.14rem,2.3vw,1.55rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.room-price-pair small { font-size: .72rem; font-weight: 600; white-space: nowrap; }
.room-price-pair span.room-price-note { margin-top: .14rem; color: #765225; }
@media(max-width:35rem) {
  [data-workbench] .module-grid { grid-template-columns: 1fr; }
}
.detail-navigation { display: flex; margin: 0 0 .65rem; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; border: 0; border-radius: .55rem; padding: .35rem .55rem; background: transparent; color: #155aa7; font-size: .86rem; font-weight: 670; }
.back-link span { font-size: 1.4rem; line-height: 1; }
.back-link:hover { background: #e8f1fc; }
[data-workbench] .module-tile, .back-link { scroll-margin-top: 5rem; }
.pending-summary { margin-top: .42rem; font-size: .74rem; color: #ffdda9; }
.ledger { display: grid; grid-template-columns: 10.25rem minmax(0,1fr); align-items: start; border: 1px solid #dde7f3; border-radius: 1.15rem; background: #fff; }
.ledger-rail { background: #edf3fb; align-self: stretch; padding: .87rem .58rem; border-right: 1px solid #e2ebf5; border-radius: 1.1rem 0 0 1.1rem; }
.ledger-rail h2 { padding: .26rem .4rem .7rem; font-size: .84rem; color: #49617e; }
.rail-list { display: grid; gap: .3rem; }
.rail-entry { display: flex; align-items: center; gap: .46rem; padding: .53rem .45rem; min-width: 0; width: 100%; text-align: left; border: 1px solid transparent; border-radius: .75rem; background: transparent; }
.rail-entry:hover { background: #f8fbff; }
.rail-entry[aria-pressed="true"] { background: white; border-color: #d7e5f8; box-shadow: 0 2px 8px #2a52820b; }
.rail-entry .module-icon { width: 1.95rem; height: 1.95rem; border-radius: .57rem; }
.rail-label { min-width: 0; }
.rail-label strong, .rail-label small { display: block; overflow-wrap: anywhere; }
.rail-label strong { font-size: .86rem; }
.rail-label small { color: var(--muted); font-size: .69rem; margin-top: .1rem; }
.rail-add { width: 100%; margin-top: .52rem; background: transparent; }
.ledger-main { min-width: 0; padding: 1rem 1.05rem .8rem; }
.ledger-heading, .ledger-heading-actions, .stock-toolbar, .stock-total { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ledger-heading { align-items: flex-end; }
.ledger-heading h2 { font-size: 1.65rem; line-height: 1.22; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ledger-heading p, .stock-toolbar p, .ledger-info { color: var(--muted); font-size: .75rem; }
.ledger-info { margin-top: .35rem; }
.count-label, .include-label { display: flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .79rem; color: #405a75; }
.count-label input { width: 4rem; padding: .28rem .34rem; }
.include-label input, .stock-use input { accent-color: #196bc6; width: 1rem; height: 1rem; min-height: auto; }
.module-selector { display: flex; flex-wrap: wrap; gap: .35rem; margin: .78rem 0 .35rem; }
.module-selector button { border: 1px solid #e4edf8; border-radius: .5rem; background: #f3f6fb; flex: 0 0 auto; min-height: 2.18rem; padding: .32rem .55rem; font-size: .76rem; color: #465e78; font-weight: 670; }
.module-selector button:hover { background: #e8f2ff; }
.module-selector button[aria-pressed="true"] { background: #e6f1ff; color: #14579f; border-color: #bedbfc; }
.module-selector button span { margin-left: .14rem; color: #8a501b; font-size: .64rem; }
.stock-toolbar { margin-top: .78rem; margin-bottom: .53rem; }
.stock-toolbar h3 { font-size: 1rem; }
.stock-scroll { overflow: auto; border-radius: .65rem; border: 1px solid var(--table-line); }
.stock-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .79rem; }
.stock-table th { background: #f2f6fc; color: #48617d; font-weight: 650; text-align: left; padding: .48rem .29rem; white-space: nowrap; font-size: .73rem; }
.stock-table th:first-child { text-align: center; width: 2.4rem; }
.stock-table th:nth-child(3) { width: 3.6rem; }
.stock-table th:nth-child(4) { width: 4.4rem; }
.stock-table th:nth-child(5) { width: 5.2rem; }
.stock-table th:nth-child(6) { width: 5rem; text-align: right; }
.stock-table th:nth-child(7) { width: 1.9rem; }
.stock-table td { border-top: 1px solid var(--table-line); padding: .25rem .28rem; }
.stock-table td:first-child { text-align: center; }
.stock-table td > input:not([type="checkbox"]), .stock-table td label input { width: 100%; min-height: 1.9rem; padding: .21rem .28rem; border-color: transparent; background: transparent; }
.stock-table td > input:hover:not([type="checkbox"]), .stock-table td label input:hover { border-color: #d9e5f4; background: white; }
.stock-table td > input:focus:not([type="checkbox"]), .stock-table td label input:focus { outline-offset: -2px; background: white; }
.stock-table input.stock-note { min-height: 1.45rem !important; color: #526782; font-size: .68rem; }
.stock-table td label > span { display: none; }
.stock-table tr[data-inactive] { background: #f6f8fc; }
.stock-table td.stock-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 720; }
.stock-qty input, .stock-price input { font-variant-numeric: tabular-nums; }
.not-counted { color: var(--muted); font-weight: 500; font-size: .68rem; }
.pending-chip { display: inline-flex; border-radius: .32rem; background: #fff0dd; color: #805021; font-size: .68rem; padding: .13rem .27rem; }
.stock-total { padding: .67rem .18rem .1rem; color: var(--muted); font-size: .78rem; }
.stock-total strong { color: #173e6c; font-size: 1.1rem; }
.remove-stock { width: 1.5rem; height: 1.68rem; display: grid; place-items: center; border: 0; background: transparent; color: #9b4638; border-radius: .35rem; font-size: 1rem; }
.remove-stock:hover { background: #fdece7; }
.workbench-once { margin-top: 1.1rem; }
.visually-hidden { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

@media (max-width: 78rem) {
  .ledger { grid-template-columns: 8.6rem minmax(0,1fr); }
  [data-workbench] .shell { width: calc(100% - 3rem); }
}
@media (max-width: 65rem) {
  .ledger { grid-template-columns: 1fr; }
  .ledger-rail { border-radius: 1.1rem 1.1rem 0 0; border: 0; border-bottom: 1px solid #e2ebf5; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; padding: .55rem .65rem; }
  .ledger-rail h2 { padding: 0 .25rem; }
  .rail-list { display: flex; flex-wrap: wrap; }
  .rail-entry { width: auto; }
  .rail-add { width: auto; margin-top: 0; }
}
@media (max-width: 48rem) {
  [data-workbench] .shell { width: calc(100% - 1.4rem); }
  [data-workbench] .summary-card { display: block; }
  [data-workbench] .summary-body { display: none; }
  .pending-summary { grid-column: 1 / -1; }
  .banner-visual { width: 29%; }
  .banner-visual img { height: 6.6rem; right: -.85rem; top: .8rem; }
}
@media (max-width: 35rem) {
  .banner-content { padding: .85rem .8rem 1rem; }
  .workbench-banner p { max-width: 15rem; }
  .template-date { display: none; }
  [data-workbench] .panel-heading { align-items: flex-start; }
  [data-workbench] .panel-heading p, .area-contents { font-size: .875rem; }
  [data-workbench] .module-label strong, [data-workbench] .module-value { font-size: .9rem; }
  [data-workbench] .summary-total { font-size: clamp(1.42rem, 7vw, 2rem); }
  .room-render { aspect-ratio: 16 / 9; object-position: 50% 75%; }
  [data-workbench] .segments { width: 100%; }
  [data-workbench] .segments button, .module-selector button { min-height: 2.75rem; }
  [data-workbench] input:not([type="checkbox"]), [data-workbench] select { font-size: 1rem; }
  .ledger-main { padding: .75rem .68rem; }
  .ledger-heading { align-items: flex-start; }
  .ledger-heading h2 { font-size: 1.43rem; }
  .ledger-heading-actions { align-items: flex-end; flex-direction: column; }
  .stock-table, .stock-table tbody { display: block; }
  .stock-table thead { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; }
  .stock-table tr { display: grid; grid-template-columns: 2rem repeat(3, minmax(0,1fr)); align-items: end; gap: .12rem; padding: .4rem .35rem .55rem; }
  .stock-table tr + tr { border-top: 1px solid var(--table-line); }
  .stock-table td { border: 0; padding: .08rem .17rem; }
  .stock-use { grid-column: 1; grid-row: 1; align-self: center; }
  .stock-description { grid-column: 2 / -1; grid-row: 1; }
  .stock-unit { grid-column: 2; }
  .stock-qty { grid-column: 3; }
  .stock-price { grid-column: 4; }
  .stock-amount { grid-column: 2 / -1; grid-row: 3; font-size: .9rem; }
  .stock-amount::before { content: "合价 "; color: var(--muted); font-weight: 500; }
  .stock-remove { grid-column: 1; grid-row: 2; align-self: end; }
  .stock-table td label > span { display: block; font-size: .76rem; color: var(--muted); padding-left: .23rem; }
  .stock-table td label input { min-height: 2.35rem; border-color: #e3eaf3; background: white; }
}
@media (max-width: 22rem) {
  [data-workbench] .toolbar-actions { gap: .35rem; }
  .banner-visual img { right: -2rem; }
  .rail-entry .module-icon { display: none; }
}
