/*
 * Professional UI theme
 * Visual-only override layer. Existing structure, content and interaction logic
 * intentionally remain in index.html, admin.html, script.js and admin.js.
 */

:root {
  --bg: #f2f1ed;
  --paper: #ffffff;
  --ink: #24272a;
  --muted: #73777b;
  --line: #dfe1de;
  --brand: #b9653c;
  --brand-dark: #8f482a;
  --soft: #f1e8e1;
  --green: #3f8a60;
  --shadow: 0 12px 32px rgba(28, 32, 35, 0.07);

  --ui-bg: #f2f1ed;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f7f6f2;
  --ui-surface-tint: #eeece7;
  --ui-sidebar: #202427;
  --ui-sidebar-soft: #2b3033;
  --ui-text: #24272a;
  --ui-muted: #74797d;
  --ui-line: #dde0dc;
  --ui-line-strong: #cdd1cc;
  --ui-copper: #b9653c;
  --ui-copper-dark: #8f482a;
  --ui-copper-soft: #f5ebe5;
  --ui-success: #3f8a60;
  --ui-danger: #bc4c47;

  --system-water: #2878b5;
  --system-water-soft: #eaf4fa;
  --system-electric: #d88a22;
  --system-electric-soft: #fff4df;
  --system-air: #c94f45;
  --system-air-soft: #fcedea;
  --system-network: #7656a8;
  --system-network-soft: #f1ecf8;

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

html {
  scroll-padding-top: 20px;
  background: var(--ui-bg);
}

body {
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(185, 101, 60, 0.2);
}

button,
a,
input,
select,
textarea {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button {
  letter-spacing: 0;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(40, 120, 181, 0.22);
  outline-offset: 2px;
}

input,
select,
textarea {
  accent-color: var(--ui-copper);
}

/* ---------- Shared typography and surfaces ---------- */

.eyebrow {
  margin-bottom: 7px;
  color: var(--ui-copper);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
h4,
strong {
  color: var(--ui-text);
}

h2 {
  letter-spacing: -0.035em;
}

h3 {
  letter-spacing: -0.02em;
}

.app {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--ui-bg);
}

.sidebar,
.admin-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.sidebar {
  z-index: 20;
  padding: 22px 18px;
  border-right: 0;
  background: var(--ui-sidebar);
  color: rgba(255, 255, 255, 0.78);
  backdrop-filter: none;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.sidebar .brand {
  gap: 11px;
  margin-bottom: 26px;
  padding: 0 6px;
}

.sidebar .brand-mark,
.admin-sidebar .brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.sidebar .brand .eyebrow,
.admin-sidebar .brand .eyebrow {
  color: #d99a77;
  font-size: 9px;
}

.sidebar .brand h1,
.admin-sidebar .brand h1 {
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
}

.steps {
  gap: 5px;
}

.step-group {
  gap: 4px;
}

.step {
  min-height: 43px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.step:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.step.done {
  color: rgba(255, 255, 255, 0.72);
}

.step.active {
  border-color: rgba(255, 255, 255, 0.07);
  background: var(--ui-copper);
  color: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.15);
}

.side-subnav {
  gap: 2px;
  margin: 0 0 4px 16px;
  padding: 3px 0 3px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.side-subnav a {
  padding: 8px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 650;
}

.side-subnav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.side-subnav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--ui-copper);
}

.side-subnav a[href="#water-system"]:hover,
.side-subnav a[href="#water-system"].active {
  color: #9bd0f2;
  box-shadow: inset 2px 0 0 var(--system-water);
}

.side-subnav a[href="#electric-system"]:hover,
.side-subnav a[href="#electric-system"].active {
  color: #f5c77b;
  box-shadow: inset 2px 0 0 var(--system-electric);
}

.side-subnav a[href="#air-system"]:hover,
.side-subnav a[href="#air-system"].active {
  color: #f1a39d;
  box-shadow: inset 2px 0 0 var(--system-air);
}

.side-subnav a[href="#network-system"]:hover,
.side-subnav a[href="#network-system"].active {
  color: #c4ade8;
  box-shadow: inset 2px 0 0 var(--system-network);
}

.project-center-card,
.client-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}

.project-center-card {
  margin-top: 22px;
  padding: 14px;
}

.project-center-card h2,
.client-card h2 {
  color: #fff;
  font-size: 15px;
}

.project-center-card label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.project-center-card select {
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--ui-sidebar-soft);
  color: #fff;
}

.project-actions button {
  border-radius: 8px;
  background: #fff;
  color: var(--ui-sidebar);
  font-size: 11px;
}

.project-actions button:last-child {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.82);
}

.project-center-card > p:last-child,
.client-card p:last-child {
  color: rgba(255, 255, 255, 0.5);
}

.client-card {
  margin-top: 12px;
  padding: 14px;
}

.admin-entry {
  margin-top: 12px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

.admin-entry:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.main {
  min-width: 0;
  padding: 24px 26px 60px;
  background: var(--ui-bg);
}

.system-divider,
.hero,
.review-board,
.plan-solution-item,
.water-overview,
.electric-overview,
.air-overview,
.network-overview,
.style-overview,
.storage-overview,
.craft-overview,
.budget-reference-board,
.supervision-board,
.final-board {
  border-color: var(--ui-line);
  box-shadow: none;
}

.system-divider {
  margin-bottom: 14px;
  padding: 17px 22px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: #e9e5df;
}

.system-divider::before {
  display: none;
}

.system-divider h2 {
  margin-bottom: 5px;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
}

.system-divider p:last-child {
  max-width: 980px;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.55;
}

.system-divider .eyebrow {
  margin-bottom: 4px;
}

#electric-system {
  background: #f7e8ca;
}

#air-system {
  background: #f4ddda;
}

#network-system {
  background: #e8e0f3;
}

#style-space,
#space-storage,
#craft-case,
#budget-reference,
#case-map,
#final-summary {
  background: #eadfd8;
}

.hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-bottom: 14px;
  padding: 17px 22px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: #dcecf6;
}

.hero h2 {
  margin-bottom: 5px;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
}

.hero > div > p:last-child {
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero .eyebrow {
  margin-bottom: 4px;
}

.hero-price {
  display: none !important;
  border: 1px solid rgba(40, 120, 181, 0.2);
  border-radius: var(--radius-md);
  background: var(--system-water-soft);
  color: var(--ui-text);
}

.hero-price strong {
  color: var(--system-water);
}

.hero-price span,
.hero-price small {
  color: #5f6f7b;
}

/* ---------- Front-end content ---------- */

.review-board {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "project"
    "needs-nav"
    "needs-detail";
  align-items: start;
  gap: 11px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
}

.review-card,
.need-detail,
.need-card {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.review-card.strong {
  grid-area: project;
  position: static;
  align-self: start;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "project-kicker project-fields project-profile"
    "project-title project-fields project-profile"
    "project-summary project-fields project-profile";
  column-gap: 16px;
  row-gap: 2px;
  width: 100%;
  padding: 15px 16px;
  background: var(--ui-sidebar);
}

.review-card.strong > .eyebrow {
  grid-area: project-kicker;
  align-self: end;
  margin: 0;
}

.review-card.strong > h3 {
  grid-area: project-title;
  align-self: center;
  margin: 2px 0 4px;
  font-size: 20px;
}

.review-card.strong h3,
.review-card.strong strong {
  color: #fff;
}

.review-card.strong > p:not(.eyebrow) {
  grid-area: project-summary;
  align-self: start;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  line-height: 1.55;
}

.review-card.strong .project-fields {
  grid-area: project-fields;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: center;
  gap: 7px;
  margin: 0;
}

.review-card.strong .project-fields label {
  gap: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.review-card.strong .project-fields input {
  min-width: 0;
  padding: 8px 9px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.review-card.strong .project-fields input:focus {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.review-card.strong .need-profile {
  grid-area: project-profile;
  align-self: stretch;
  display: grid;
  align-content: center;
  margin: 0;
  padding: 10px 11px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.review-card.strong .need-profile span {
  margin-bottom: 5px;
  font-size: 10px;
}

.review-card.strong .need-profile strong {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
}

.project-fields input,
.product-admin-form input,
.product-admin-form select,
.product-admin-form textarea,
.project-archive-form input,
.project-archive-form select,
.project-archive-form textarea,
.fee-input-grid input {
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ui-text);
  box-shadow: none;
}

.project-fields input:focus,
.product-admin-form input:focus,
.product-admin-form select:focus,
.product-admin-form textarea:focus,
.project-archive-form input:focus,
.project-archive-form select:focus,
.project-archive-form textarea:focus,
.fee-input-grid input:focus {
  border-color: var(--ui-copper);
  box-shadow: 0 0 0 3px rgba(185, 101, 60, 0.12);
  outline: none;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 7px;
  background: var(--ui-surface-tint);
  color: var(--ui-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.need-card {
  min-height: 68px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 2px 8px;
  padding: 9px 10px;
  background: var(--ui-surface-soft);
}

.need-card:hover,
.need-card.active {
  border-color: rgba(185, 101, 60, 0.45);
  background: var(--ui-copper-soft);
}

.review-grid {
  grid-area: needs-nav;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
}

.need-card > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ui-surface-tint);
  color: var(--ui-copper);
  font-size: 9px;
  font-weight: 850;
}

.need-card.active > span {
  background: var(--ui-copper);
  color: #fff;
}

.need-card > strong {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.need-card > p {
  grid-column: 2;
  margin: 0;
  color: var(--ui-muted);
  font-size: 9px;
  line-height: 1.42;
}

.need-detail {
  grid-area: needs-detail;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  column-gap: 20px;
  padding: 16px 18px;
  border-color: var(--ui-line);
  background: #fff;
}

.need-detail > .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 4px;
}

.need-detail > h3 {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 4px;
  font-size: 21px;
  line-height: 1.3;
}

.need-detail > p:not(.eyebrow) {
  grid-column: 1;
  grid-row: 3;
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.55;
}

.need-status {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
}

.need-status span {
  color: var(--ui-copper-dark);
  font-size: 11px;
}

.need-status em {
  color: var(--ui-success);
  font-size: 10px;
}

.need-subsection {
  grid-column: 1 / -1;
  gap: 9px;
  margin: 13px 0 8px;
}

.need-subsection > span,
.need-note > span {
  color: #555b5f;
  font-size: 12px;
  font-weight: 800;
}

.need-radios {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.need-radios label {
  min-height: 36px;
  padding: 7px 9px;
  border-color: var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
}

.need-radios label:hover {
  border-color: rgba(185, 101, 60, 0.42);
  transform: none;
}

.need-radios label.selected {
  border-color: var(--ui-copper);
  background: var(--ui-copper-soft);
  color: var(--ui-copper-dark);
  box-shadow: inset 3px 0 0 var(--ui-copper);
}

.need-radios strong {
  font-size: 11px;
}

.need-checks {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.need-checks label {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
  font-size: 11px;
  font-weight: 700;
}

.need-checks label:has(input:checked) {
  border-color: rgba(185, 101, 60, 0.36);
  background: var(--ui-copper-soft);
}

.need-checks input {
  width: 15px;
  height: 15px;
}

.need-note {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.need-note textarea,
.need-other-input {
  border-color: var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
  font-size: 13px;
}

.need-next {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(63, 138, 96, 0.16);
  border-radius: var(--radius-sm);
  background: #edf5f0;
}

.need-next span {
  margin-bottom: 3px;
  color: var(--ui-success);
  font-size: 10px;
}

.need-next strong {
  font-size: 11px;
}

.plan-solution-board {
  gap: 18px;
  margin-bottom: 28px;
}

.plan-solution-list {
  gap: 18px;
}

.plan-solution-item {
  padding: 24px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
}

.plan-solution-item.is-selected {
  border-color: rgba(185, 101, 60, 0.56);
  box-shadow: 0 0 0 3px rgba(185, 101, 60, 0.08);
}

.plan-solution-number > span {
  border-radius: 10px;
  background: var(--ui-sidebar);
  color: #fff;
  box-shadow: none;
}

.plan-solution-header-actions button,
.plan-add-solution button,
.floor-action,
.plan-upload-card button,
.plan-drawing-toolbar button {
  border-radius: var(--radius-sm);
}

.plan-add-solution {
  border: 1px dashed var(--ui-line-strong);
  border-radius: var(--radius-md);
  background: transparent;
}

.plan-solution-workbench {
  gap: 16px;
}

.plan-drawing-stage,
.plan-drawing-toolbox,
.plan-upload-card,
.plan-image-panel {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  background: var(--ui-surface);
  box-shadow: none;
}

.plan-drawing-toolbox {
  background: var(--ui-surface-soft);
}

.water-overview,
.electric-overview,
.air-overview,
.network-overview {
  --section-accent: var(--ui-copper);
  --section-tint: var(--ui-copper-soft);
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--ui-line);
  border-top: 3px solid var(--section-accent);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
}

.water-overview {
  --section-accent: var(--system-water);
  --section-tint: var(--system-water-soft);
}

.electric-overview {
  --section-accent: var(--system-electric);
  --section-tint: var(--system-electric-soft);
}

.air-overview {
  --section-accent: var(--system-air);
  --section-tint: var(--system-air-soft);
}

.network-overview {
  --section-accent: var(--system-network);
  --section-tint: var(--system-network-soft);
}

.water-overview .eyebrow,
.electric-overview .eyebrow,
.air-overview .eyebrow,
.network-overview .eyebrow {
  color: var(--section-accent);
}

.water-overview .overview-lecture-tip,
.electric-overview .overview-lecture-tip,
.air-overview .overview-lecture-tip,
.network-overview .overview-lecture-tip,
.water-overview .tray-tip,
.electric-overview .tray-tip,
.air-overview .tray-tip,
.network-overview .tray-tip {
  border-color: color-mix(in srgb, var(--section-accent) 24%, transparent);
  background: var(--section-tint);
}

.water-overview .overview-lecture-tip strong,
.electric-overview .overview-lecture-tip strong,
.air-overview .overview-lecture-tip strong,
.network-overview .overview-lecture-tip strong {
  color: var(--section-accent);
}

.water-overview .overview-lecture-tip span,
.electric-overview .overview-lecture-tip span,
.air-overview .overview-lecture-tip span,
.network-overview .overview-lecture-tip span {
  color: #596064;
}

.overview-head {
  gap: 18px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--ui-line);
}

.overview-head h3 {
  font-size: 24px;
}

.legend {
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-sm);
  background: var(--ui-surface-soft);
}

.plan-board {
  gap: 16px;
}

.plan-canvas,
.plan-explain {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: none;
}

.plan-explain {
  background: var(--ui-surface-soft);
}

#water-system > .plan-board,
.electric-overview > .plan-board,
.air-overview > .plan-board,
.network-overview > .plan-board {
  grid-template-columns: minmax(0, 1fr);
}

.standalone-point-guide {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.standalone-point-guide ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 7px;
}

.standalone-point-guide .eyebrow {
  grid-column: 1;
  margin: 1px 0 4px;
}

.standalone-point-guide h4 {
  grid-column: 1;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.standalone-point-guide li {
  min-height: 58px;
  padding: 9px 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.58);
}

.standalone-point-guide b {
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.3;
}

.standalone-point-guide li span {
  font-size: 11px;
  line-height: 1.4;
}

.water-point-guide {
  background: #dcecf6;
}

.electric-point-guide {
  background: #f7e8ca;
}

.air-point-guide {
  background: #f4ddda;
}

.network-point-guide {
  background: #e8e0f3;
}

.device-tray {
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-md);
  background: var(--ui-surface-soft);
  box-shadow: none;
}

.tray-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ui-line);
}

.clear-placements,
.area-tabs button,
.device-tray button,
.product-picker button,
.confirm-btn,
.pdf-actions button {
  border-radius: var(--radius-sm);
}

.water-overview .area-tabs button.active,
.electric-overview .area-tabs button.active,
.air-overview .area-tabs button.active,
.network-overview .area-tabs button.active {
  border-color: var(--section-accent);
  background: var(--section-accent);
  color: #fff;
}

.tray-items {
  gap: 10px;
}

.tray-device {
  border-color: var(--ui-line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: none;
}

.tray-device:hover,
.tray-device.active,
.tray-device.system-tier-selected {
  border-color: var(--section-accent, var(--ui-copper));
  background: var(--section-tint, var(--ui-copper-soft));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--section-accent, var(--ui-copper)) 12%, transparent);
}

.cards,
.electric-product-grid,
.air-product-grid,
.network-product-grid {
  gap: 13px;
}

.panel,
.detail-panel,
.compact-panel,
.product-picker,
.electric-secondary-panel,
.air-secondary-panel,
.network-secondary-panel {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  background: var(--ui-surface);
  box-shadow: none;
}

.panel:hover,
.product-picker:hover {
  border-color: var(--ui-line-strong);
  box-shadow: var(--shadow);
}

.option-card.option-card-active {
  border-color: rgba(185, 101, 60, 0.58);
  box-shadow: 0 0 0 3px rgba(185, 101, 60, 0.09);
}

.style-overview,
.storage-overview,
.craft-overview,
.professional-fees,
.supervision-board,
.final-board {
  padding: 22px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
  box-shadow: none;
}

.style-progress,
.storage-progress {
  border-radius: var(--radius-sm);
  background: var(--ui-sidebar);
  box-shadow: none;
}

.style-progress strong,
.storage-progress strong {
  color: #fff;
}

.style-progress-alternate strong {
  color: var(--ui-text);
}

.style-directions-summary {
  gap: 12px;
}

.style-directions-summary .style-progress {
  position: relative;
  min-width: 210px;
  min-height: 88px;
  display: grid;
  align-content: center;
  padding: 14px 18px 14px 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #24282b 0%, #343a3d 100%);
  box-shadow: 0 10px 24px rgba(32, 36, 39, 0.14);
}

.style-directions-summary .style-progress::before {
  content: "主";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ui-copper);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
  box-shadow: 0 0 0 6px rgba(185, 101, 60, 0.12);
}

.style-directions-summary .style-progress span {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.style-directions-summary .style-progress strong {
  font-size: 18px;
  line-height: 1.3;
}

.style-directions-summary .style-progress-alternate {
  border-color: #dfd5cd;
  background: linear-gradient(135deg, #f6f1ed 0%, #ebe2dc 100%);
  box-shadow: 0 10px 24px rgba(74, 58, 48, 0.08);
}

.style-directions-summary .style-progress-alternate::before {
  content: "备";
  background: #fff;
  color: var(--ui-copper-dark);
  box-shadow: 0 0 0 1px rgba(185, 101, 60, 0.24), 0 0 0 6px rgba(185, 101, 60, 0.08);
}

.style-directions-summary .style-progress-alternate span {
  color: #8b776b;
}

.style-directions-summary .style-progress-alternate strong {
  color: #6e625b;
}

.budget-cost-grid article,
.fee-service-card,
.inspection-node-card,
.supervision-principles article,
.delivery-entry-grid > a,
.miniprogram-entry {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: none;
}

.budget-cost-grid article:hover,
.fee-service-card:hover,
.inspection-node-card:hover,
.delivery-entry-grid > a:hover {
  border-color: var(--ui-line-strong);
  box-shadow: var(--shadow);
}

.final-ticket,
.final-budget,
.final-checklist {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
}

/* ---------- Admin ---------- */

.admin-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  background: var(--ui-bg);
}

.admin-sidebar {
  z-index: 20;
  padding: 22px 16px;
  border-right: 0;
  background: var(--ui-sidebar);
  color: rgba(255, 255, 255, 0.76);
}

.admin-sidebar > .brand {
  gap: 11px;
  margin-bottom: 28px;
  padding: 0 6px;
}

.admin-nav {
  gap: 4px;
}

.admin-nav a,
.back-to-config {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 700;
}

.admin-nav a:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav a.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--ui-copper);
  color: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.16);
}

body:has(.admin-main :target) .admin-nav a.active {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

body:has(#product-admin:target) .admin-nav a[href="#product-admin"],
body:has(#explainer-admin:target) .admin-nav a[href="#explainer-admin"],
body:has(#style-gallery-admin:target) .admin-nav a[href="#style-gallery-admin"],
body:has(#storage-gallery-admin:target) .admin-nav a[href="#storage-gallery-admin"],
body:has(#living-wall-library-admin:target) .admin-nav a[href="#living-wall-library-admin"],
body:has(#craft-library-admin:target) .admin-nav a[href="#craft-library-admin"],
body:has(#price-admin:target) .admin-nav a[href="#price-admin"],
body:has(#inspection-admin:target) .admin-nav a[href="#inspection-admin"],
body:has(#archive-admin:target) .admin-nav a[href="#archive-admin"] {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--ui-copper);
  color: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.16);
}

.back-to-config {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.back-to-config:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.admin-main {
  min-width: 0;
  padding: 24px 26px 60px;
  background: var(--ui-bg);
}

.admin-hero {
  margin-bottom: 20px;
  padding: 27px 30px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
  box-shadow: none;
}

.admin-hero h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.admin-hero p:last-child {
  max-width: 980px;
  color: var(--ui-muted);
}

.product-admin-board,
.admin-placeholder-grid article {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-lg);
  background: var(--ui-surface);
  box-shadow: none;
}

.product-admin-board > .overview-head {
  margin-bottom: 18px;
}

.product-admin-layout,
.explainer-admin-layout {
  gap: 16px;
}

.product-admin-form,
.product-library-panel {
  border: 1px solid var(--ui-line);
  border-radius: var(--radius-md);
  background: var(--ui-surface-soft);
  box-shadow: none;
}

.product-admin-form {
  gap: 13px;
  padding: 18px;
}

.product-admin-form label,
.project-archive-form label {
  gap: 6px;
  color: #5d6266;
  font-size: 11px;
  font-weight: 800;
}

.product-admin-form input,
.product-admin-form select,
.product-admin-form textarea,
.project-archive-form input,
.project-archive-form select,
.project-archive-form textarea {
  padding: 10px 11px;
  font-size: 13px;
}

.product-admin-form textarea,
.project-archive-form textarea {
  line-height: 1.6;
  resize: vertical;
}

.product-library-panel {
  padding: 18px;
  background: #fff;
}

.library-toolbar {
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--ui-line);
}

.library-actions,
.style-board-actions,
.library-crud-actions,
.project-archive-form-actions,
.craft-group-actions {
  gap: 8px;
}

.product-admin-form button,
.product-library-panel button,
.library-toolbar button,
.style-board-actions button,
.project-archive-form-actions button,
.craft-group-actions button,
.craft-option-manager button,
.archive-toolbar button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 750;
}

.product-admin-form button[type="submit"],
.style-board-actions button[type="submit"],
.project-archive-form-actions button[type="submit"],
.archive-toolbar > button {
  border-color: var(--ui-copper);
  background: var(--ui-copper);
  color: #fff;
}

.danger-button {
  border-color: rgba(188, 76, 71, 0.32) !important;
  background: #fff !important;
  color: var(--ui-danger) !important;
}

.danger-button:hover {
  border-color: var(--ui-danger) !important;
  background: #fdf0ef !important;
}

.product-library-list,
.device-explainer-library,
.style-board-admin-preview,
.craft-admin-preview,
.inspection-admin-preview,
.archive-list {
  gap: 10px;
}

.product-library-list > *,
.device-explainer-library > *,
.style-board-admin-preview > *,
.craft-admin-preview > *,
.inspection-admin-preview > *,
.archive-list > * {
  border-color: var(--ui-line);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.craft-surface-tabs {
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface-tint);
}

.craft-surface-tabs button {
  border-radius: 7px;
}

.craft-surface-tabs button.active {
  background: #fff;
  color: var(--ui-text);
  box-shadow: 0 2px 8px rgba(28, 32, 35, 0.06);
}

.craft-group-manager,
.craft-option-manager,
.living-wall-admin-fields,
.project-archive-form {
  border-color: var(--ui-line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: none;
}

.form-help {
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.65;
}

/* ---------- Responsive safeguards ---------- */

@media (max-width: 1240px) {
  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar,
  .admin-sidebar {
    padding-inline: 13px;
  }

  .main,
  .admin-main {
    padding-inline: 18px;
  }

  .plan-solution-item,
  .water-overview,
  .electric-overview,
  .air-overview,
  .network-overview {
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .app,
  .admin-shell {
    display: block;
  }

  .sidebar,
  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 14px;
  }

  .sidebar .brand,
  .admin-sidebar > .brand {
    margin-bottom: 12px;
  }

  .steps,
  .admin-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .step-group {
    display: contents;
  }

  .step,
  .admin-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .side-subnav,
  .project-center-card,
  .client-card,
  .admin-entry,
  .back-to-config {
    display: none;
  }

  .main,
  .admin-main {
    padding: 16px 14px 44px;
  }

  .hero,
  .review-board,
  .product-admin-layout,
  .explainer-admin-layout {
    grid-template-columns: 1fr;
  }

  .review-board {
    grid-template-areas:
      "project"
      "needs-nav"
      "needs-detail";
  }

  .review-card.strong {
    position: static;
    grid-template-columns: 140px minmax(0, 1fr);
    grid-template-areas:
      "project-kicker project-fields"
      "project-title project-fields"
      "project-summary project-fields"
      "project-profile project-profile";
  }

  .review-card.strong .need-profile {
    margin-top: 8px;
  }

  .hero-price {
    min-height: 120px;
  }

  .standalone-point-guide {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .standalone-point-guide .eyebrow,
  .standalone-point-guide h4,
  .standalone-point-guide ol {
    grid-column: 1;
    grid-row: auto;
  }

  .standalone-point-guide ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .standalone-point-guide ol {
    grid-template-columns: 1fr;
  }

  .system-divider,
  .hero,
  .review-board,
  .plan-solution-item,
  .water-overview,
  .electric-overview,
  .air-overview,
  .network-overview,
  .style-overview,
  .storage-overview,
  .craft-overview,
  .professional-fees,
  .supervision-board,
  .final-board,
  .admin-hero,
  .product-admin-board,
  .admin-placeholder-grid article {
    padding: 15px;
    border-radius: var(--radius-md);
  }

  .system-divider h2,
  .hero h2,
  .admin-hero h2 {
    font-size: 24px;
  }

  .overview-head,
  .tray-head,
  .plan-solution-header,
  .library-toolbar {
    align-items: flex-start;
  }

  .library-actions,
  .style-board-actions,
  .library-crud-actions {
    width: 100%;
  }

  .library-actions button,
  .style-board-actions button,
  .library-crud-actions button {
    flex: 1 1 auto;
  }

  .review-grid,
  .need-radios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-card.strong {
    grid-template-columns: 1fr;
    grid-template-areas:
      "project-kicker"
      "project-title"
      "project-summary"
      "project-fields"
      "project-profile";
  }

  .review-card.strong .project-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 9px;
  }

  .need-detail {
    grid-template-columns: 1fr;
  }

  .need-detail > .eyebrow,
  .need-detail > h3,
  .need-detail > p:not(.eyebrow),
  .need-status {
    grid-column: 1;
    grid-row: auto;
  }

  .need-status {
    margin-top: 10px;
  }

  .need-checks {
    grid-template-columns: 1fr;
  }
}
