:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --ink: #182234;
  --muted: #657084;
  --line: #d9e0e9;
  --primary: #e56b2f;
  --primary-dark: #c6531d;
  --secondary: #182234;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(20, 31, 48, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f7f8fb 0%, var(--bg) 55%, #e8edf3 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 46px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 12px;
  color: white;
  background: rgba(17, 24, 39, .98);
  backdrop-filter: blur(14px);
  box-shadow: 0 5px 16px rgba(7, 12, 22, .16);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; background: var(--primary);
  box-shadow: 0 5px 12px rgba(229, 107, 47, .25);
}
.brand-mark svg { width: 25px; height: 25px; overflow: visible; }
.brand-mark .mark-plan { fill: none; stroke: rgba(255,255,255,.78); stroke-width: 1.7; stroke-linejoin: round; }
.brand-mark .mark-line { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.25; stroke-linecap: round; }
.brand-mark .mark-pencil { fill: #fff; stroke: #fff; stroke-width: .65; stroke-linejoin: round; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1; letter-spacing: .015em; white-space: nowrap; }
.brand p { display: none; }
.header-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.header-icon { width:34px; height:34px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: white; }
.header-icon:hover { background: rgba(255,255,255,.14); }
.close-header:hover { background: rgba(185,28,28,.8); border-color: rgba(255,255,255,.12); }
.compact-actions { flex-wrap: nowrap; }

.app-menu { position: relative; }
.app-menu > summary { list-style: none; }
.app-menu > summary::-webkit-details-marker { display:none; }
.app-menu[open] > summary { background: rgba(255,255,255,.16); }
.app-menu-panel {
  position: absolute; top: 40px; right: 0; z-index: 100;
  width: min(330px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid #dbe1e8; border-radius: 13px;
  background: rgba(255,255,255,.99); color: var(--ink);
  box-shadow: 0 18px 45px rgba(8,15,28,.24);
}
.menu-title { padding: 4px 7px 7px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); }
.menu-action {
  width:100%; display:flex; align-items:center; text-align:left;
  border:0; border-radius:9px; padding:9px 10px; background:transparent; color:var(--ink); font-size:12px; font-weight:750;
}
.menu-action:hover { background:#f1f4f7; }
.menu-action-primary { color:#fff; background:var(--primary); }
.menu-action-primary:hover { background:var(--primary-dark); }
.menu-folder { display:flex; gap:7px; align-items:center; margin:6px 5px 2px; padding:7px 8px; border-radius:8px; background:#f4f6f8; font-size:10px; color:var(--muted); }
.menu-folder strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.menu-separator { height:1px; background:#e7ebf0; margin:8px 3px; }
.menu-access-card{display:grid;gap:3px;margin:2px 4px 10px;padding:10px 11px;border-radius:10px;background:#eef3f8;border:1px solid #dce4ed;}
.menu-access-card span{font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#64748b;}
.menu-access-card strong{font-size:12px;color:#172033;}
.menu-save-status{display:flex;align-items:center;gap:8px;margin:6px 5px 8px;padding:8px;border-radius:9px;background:#f4f6f8;color:#64748b;font-size:10px;}
.menu-save-status span{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.14);}
.menu-save-status[data-state="dirty"] span{background:#e6a21a;box-shadow:0 0 0 3px rgba(230,162,26,.16);}
.menu-save-status[data-state="saving"] span{background:#2b74dc;box-shadow:0 0 0 3px rgba(43,116,220,.14);animation:savePulse 1s ease-in-out infinite;}
.menu-save-status[data-state="saved"] span{background:#22a663;box-shadow:0 0 0 3px rgba(34,166,99,.14);}
.menu-save-status[data-state="pending"] span,.menu-save-status[data-state="error"] span{background:#dc3f3f;box-shadow:0 0 0 3px rgba(220,63,63,.14);}
@keyframes savePulse{50%{opacity:.35;transform:scale(.82)}}
body:not([data-access-mode="professional"]) .professional-only{display:none !important;}
body[data-access-mode="professional"] .demo-only{display:none !important;}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(520px, 1fr) 280px;
  gap: 10px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 10px;
  height: calc(100vh - 46px);
  min-height: 0;
}
.panel {
  min-width: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(208, 218, 230, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.left-panel, .right-panel { align-self: stretch; max-height: 100%; overflow: auto; }
.panel-section { padding: 18px; border-bottom: 1px solid #edf0f4; }
.panel-section:last-child { border-bottom: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 2px 0 0; font-size: 17px; }
.eyebrow { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: var(--primary); }
.hint { color: var(--muted); font-size: 11px; }

.button {
  border: 0; border-radius: 11px; padding: 10px 14px; font-weight: 750;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: white; background: var(--primary); box-shadow: 0 8px 18px rgba(229, 107, 47, .25); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: white; background: var(--secondary); }
.button-ghost { color: var(--ink); background: #f3f5f8; border: 1px solid #dbe1e8; }
.app-header .button-ghost { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.button-danger { color: white; background: var(--danger); }
.full { width: 100%; }
.icon-button {
  width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 10px; background: white; color: var(--ink); font-weight: 900; font-size: 18px;
}
.icon-button:hover { background: #f5f7fa; }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }

.dimensions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.room-color-control{margin:0 0 12px}
.room-color-picker{display:flex;align-items:center;gap:9px}
.room-color-picker input[type="color"]{width:46px;height:34px;padding:2px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}
.room-color-picker output{font-size:10px;font-weight:850;color:#596579;letter-spacing:.04em}

label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
label > span { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #8b95a6; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px;
  background: white; color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229, 107, 47, .12); }

.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.category-tab { border: 1px solid var(--line); background: #f6f8fa; padding: 7px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; color: #4a5568; }
.category-tab.active { background: var(--secondary); border-color: var(--secondary); color: white; }
.library-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.library-item {
  min-height: 82px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 9px;
  border: 1px solid var(--line); border-radius: 13px; background: #fbfcfd; text-align: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  user-select: none;
}
.library-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(24, 34, 52, .08); }
.library-item:active { transform: scale(.98); }
.library-icon { font-size: 22px; line-height: 1; }
.library-name { font-size: 11px; font-weight: 800; color: var(--ink); }
.library-size { font-size: 9px; color: var(--muted); }

.workspace-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
.workspace-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff;
}
.view-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eef1f5; flex-wrap: wrap; }
.view-tab { border: 0; border-radius: 9px; padding: 8px 16px; background: transparent; color: var(--muted); font-weight: 800; }
.view-tab.active { color: white; background: var(--secondary); box-shadow: 0 5px 12px rgba(24, 34, 52, .18); }
.tool-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.zoom-label { min-width: 42px; text-align: center; font-size: 11px; color: var(--muted); font-weight: 800; }
.status-bar {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; flex-wrap: wrap;
  color: #5f6a7e; background: #fff8f1; border-bottom: 1px solid #f0e0cf; font-size: 11px;
}
.status-bar strong { color: var(--primary-dark); }

.view-container { display: none; min-height: 0; flex: 1; }
.view-container.active { display: flex; flex-direction: column; }
.canvas-wrap {
  flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center;
  padding: 34px; background:
    linear-gradient(45deg, #f3f5f7 25%, transparent 25%),
    linear-gradient(-45deg, #f3f5f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f5f7 75%),
    linear-gradient(-45deg, transparent 75%, #f3f5f7 75%), #edf1f4;
  background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.plan-svg {
  width: min(100%, 980px); max-height: calc(100vh - 230px); min-height: 520px;
  overflow: visible; background: white; border-radius: 4px; box-shadow: 0 20px 55px rgba(23, 35, 53, .16);
  touch-action: none; user-select: none;
}
.plan-item { cursor: grab; }
.plan-item:active { cursor: grabbing; }
.item-label { pointer-events: none; font-weight: 800; fill: #182234; text-anchor: middle; dominant-baseline: middle; }
.item-subtext { pointer-events: none; fill: #5f6a7e; text-anchor: middle; dominant-baseline: middle; }
.selection-outline { fill: none; stroke: #e56b2f; stroke-width: 12; stroke-dasharray: 32 20; pointer-events: none; vector-effect: non-scaling-stroke; }
.collision-outline { fill: none; stroke: #dc2626; stroke-width: 8; stroke-dasharray: 20 16; pointer-events: none; vector-effect: non-scaling-stroke; }
.dimension-text { fill: #536075; font-size: 60px; font-weight: 800; }
.wall-label { fill: #8b95a6; font-size: 72px; font-weight: 900; letter-spacing: .1em; }

.elevation-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 11px; border-bottom: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; }
.wall-btn { border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: white; color: var(--ink); font-weight: 800; }
.wall-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.elevation-wrap { min-height: 530px; }

.list-view { padding: 18px; overflow: auto; }
.list-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.list-summary > div { padding: 18px; border-radius: 14px; background: #f5f7f9; border: 1px solid var(--line); }
.list-summary span { display: block; font-size: 26px; font-weight: 900; color: var(--primary); }
.list-summary small { color: var(--muted); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #edf0f4; font-size: 12px; }
th { position: sticky; top: 0; background: #f5f7f9; color: #596579; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: 0; }

.empty-selection { min-height: 160px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 8px; border: 1px dashed #bac3d0; border-radius: 50%; font-size: 25px; }
.empty-selection p { margin: 0; max-width: 180px; font-size: 12px; line-height: 1.5; }
.hidden { display: none !important; }
.property-form { display: grid; gap: 12px; }
.selected-title { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff7f1; }
.selected-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--primary); color: white; font-size: 20px; }
.selected-title strong { display: block; font-size: 13px; }
.selected-title small { color: var(--muted); font-size: 10px; }
.dummy-clearance-properties { display: grid; gap: 7px; }
.dummy-clearance-card { display: grid; gap: 4px; padding: 12px; border: 1px solid transparent; border-radius: 12px; }
.dummy-clearance-card.comfortable { color: #166534; background: #ecfdf3; border-color: #bbf7d0; }
.dummy-clearance-card.narrow { color: #92400e; background: #fff7ed; border-color: #fed7aa; }
.dummy-clearance-card.critical,.dummy-clearance-card.collision { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.dummy-clearance-status { font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.dummy-passage-value { font-size: 24px; line-height: 1; }
.dummy-clearance-card small { color: inherit; line-height: 1.4; opacity: .88; }
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.selected-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 4px; }
.selected-actions .button-danger { grid-column: 1 / -1; }

.diagnostics { display: grid; gap: 8px; }
.diagnostic { display: flex; gap: 8px; align-items: flex-start; padding: 9px; border-radius: 10px; font-size: 11px; line-height: 1.4; }
.diagnostic.ok { color: #166534; background: #ecfdf3; }
.diagnostic.warn { color: #92400e; background: #fff7ed; }
.diagnostic.error { color: #991b1b; background: #fef2f2; }
.diagnostic-icon { flex: 0 0 auto; font-weight: 900; }
.shortcuts-section h3 { margin: 0 0 8px; font-size: 13px; }
.shortcuts-section p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
kbd { padding: 2px 5px; border: 1px solid #cbd3df; border-bottom-width: 2px; border-radius: 5px; background: white; color: #3f4b5e; font-size: 9px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px);
  opacity: 0; pointer-events: none; max-width: min(90vw, 520px); padding: 12px 16px; border-radius: 12px;
  color: white; background: #111827; box-shadow: 0 18px 50px rgba(0,0,0,.25); font-size: 12px;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 260px minmax(480px, 1fr); }
  .right-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr .8fr; max-height: none; }
  .right-panel .panel-section { border-bottom: 0; border-right: 1px solid #edf0f4; }
  .right-panel .panel-section:last-child { border-right: 0; }
}

@media (max-width: 820px) {
  .app-header { position: sticky; align-items: center; padding: 5px 9px; }
  .brand h1 { font-size: 16px; }
  .app-shell { display: flex; flex-direction: column; padding: 7px; height:auto; min-height:calc(100vh - 46px); }
  .left-panel, .right-panel { max-height: none; }
  .left-panel { order: 2; }
  .workspace-panel { order: 1; min-height: 620px; height:auto; }
  .right-panel { order: 3; display: block; }
  .right-panel .panel-section { border-right: 0; border-bottom: 1px solid #edf0f4; }
  .workspace-toolbar { align-items: flex-start; flex-direction: column; }
  .tool-actions { width: 100%; overflow-x: visible; padding-bottom: 2px; flex-wrap: wrap; }
  .status-bar { flex-direction: column; }
  .canvas-wrap { min-height: 480px; padding: 22px; }
  .plan-svg { min-width: 620px; min-height: 460px; }
  .list-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .brand-mark { width: 32px; height: 32px; }
  .dimensions-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(3, 1fr); }
  .library-name { font-size: 10px; }
  .workspace-panel { min-height: 560px; }
  .view-tab { padding: 8px 10px; font-size: 11px; }
  #exportBtn { display: inline-flex; }
}

/* v0.2 · propiedades de frentes, encimeras y remates */
.property-subsection {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.property-subtitle {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--primary-dark);
}
.finish-select-row {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  align-items: center;
  gap: 8px;
}
.finish-swatch {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(51,65,85,.25);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45);
}
.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  background: white;
  border: 1px solid var(--line);
  font-size: 11px !important;
  font-weight: 750 !important;
  color: var(--ink) !important;
}
.checkbox-row input { width: 16px; height: 16px; margin: 0; }
.library-preview { width: 62px; height: 44px; display: block; }
.library-preview svg { width: 100%; height: 100%; display: block; }


/* v0.3 · esquineros y materiales */
.finish-swatch { background-size: cover; }
.library-item { min-height: 90px; }


/* v0.4 · biblioteca paramétrica TPC */
.catalog-note { color: var(--muted); font-size: 9px; line-height: 1.4; }
.library-size { line-height: 1.25; min-height: 22px; }
.property-subsection select optgroup { font-weight: 800; color: #374151; }
.property-subsection select option { font-weight: 500; color: #182234; }

/* v0.5 · perspectiva, presupuesto y propuesta comercial */
.perspective-wrap { min-height: 600px; background: linear-gradient(180deg,#edf3f8 0%,#f7f8fa 62%,#e7ebef 100%); }
.perspective-svg { min-height: 560px; background: linear-gradient(180deg,#f7fafc,#ffffff); }
.camera-btn { border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: white; color: var(--ink); font-weight: 800; }
.camera-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.offer-view { padding: 18px; overflow: auto; background: #f5f7fa; }
.offer-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.75fr); gap: 14px; margin: 0 auto 14px; max-width: 1480px; }
.offer-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(24,34,52,.06); }
.offer-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.offer-card h3 { margin: 3px 0 0; font-size: 18px; }
.offer-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.offer-form-grid label, .offer-notes-label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.offer-form-grid label span { display: flex; align-items: center; gap: 7px; }
.offer-form-grid input, .offer-notes-label textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; background: white; color: var(--ink); outline: none; }
.offer-form-grid input:focus, .offer-notes-label textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229,107,47,.12); }
.offer-notes-label { margin-top: 11px; }
.offer-notes-label textarea { resize: vertical; min-height: 70px; font: inherit; }
.totals-card { display: flex; flex-direction: column; gap: 0; }
.offer-total-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0f4; font-size: 12px; }
.offer-total-row strong { font-size: 14px; }
.offer-total-row.subtotal { margin-top: 5px; border-top: 2px solid var(--secondary); font-weight: 900; }
.offer-total-row.grand-total { margin: 5px -8px 0; padding: 14px 8px; border: 0; border-radius: 11px; background: var(--secondary); color: white; }
.offer-total-row.grand-total strong { font-size: 20px; color: #ffd0b9; }
.totals-card small { margin-top: 11px; color: var(--muted); line-height: 1.45; }
.offer-table-wrap { background: white; max-width: 1480px; margin: 0 auto; }
.price-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 980px) {
  .offer-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .offer-view { padding: 10px; }
  .offer-form-grid { grid-template-columns: 1fr; }
  .offer-card-heading { flex-direction: column; }
  #generatePdfBtn { width: 100%; }
}

.fullscreen-body .app-header{position:sticky;top:0;}


/* v0.7 · gestión de proyectos y datos comerciales */
.project-folder-control { display:flex; align-items:center; gap:7px; min-width:0; }
.folder-chip { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:7px 9px; border-radius:999px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); color:#b9c3d3; font-size:10px; font-weight:800; }
.folder-chip.active { color:#fff; background:rgba(21,128,61,.28); border-color:rgba(74,222,128,.34); }
#commercialProperties { background:linear-gradient(180deg,#fbfcfe,#f7f9fc); }
#commercialProperties input { background:#fff; }
@media (max-width: 1180px){
  .project-folder-control{width:100%;}
  .folder-chip{max-width:220px;}
}
@media (max-width: 820px){
  .header-actions{width:100%; display:flex; flex-direction:row; flex-wrap:wrap;}
  .project-folder-control{width:100%;}
}


.perspective-controls-360 { gap: 10px; align-items: stretch; }
.perspective-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; }
.perspective-topline strong { font-size: 14px; color: var(--secondary); }
.perspective-slider-row { display:flex; align-items:center; gap:10px; width:100%; }
.perspective-angle-slider { flex:1; accent-color: var(--primary); }
.perspective-help { color: var(--muted); font-size: 11px; }
.perspective-wrap { touch-action: none; cursor: grab; }
.perspective-wrap.dragging { cursor: grabbing; }

@media (min-width:1181px){
  .panel-section{padding:14px;}
  .workspace-toolbar{padding:8px 10px;}
  .status-bar{padding:5px 10px;}
  .elevation-controls{padding:7px 10px;}
}


/* v0.10.8 · pantalla de bienvenida / inicio */
.project-start-overlay{
  position:fixed; inset:0; z-index:1000; display:grid; place-items:center;
  padding:24px; background:
    radial-gradient(circle at 20% 20%, rgba(229,107,47,.14), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(255,255,255,.08), transparent 22%),
    linear-gradient(135deg,rgba(12,19,31,.98),rgba(28,40,57,.96));
  overflow:auto; isolation:isolate;
}
.project-start-overlay.hidden{display:none;}
.project-start-card{
  width:min(920px,100%); background:#fff; border-radius:22px; overflow:hidden;
  box-shadow:0 30px 90px rgba(0,0,0,.34); border:1px solid rgba(255,255,255,.12);
}
.project-start-brand{display:flex;align-items:center;gap:14px;padding:20px 24px;background:#111827;color:#fff;}
.project-start-brand h1{margin:0;font-size:28px;line-height:1;}
.project-start-brand p{margin:4px 0 0;color:#aeb9ca;font-size:13px;font-weight:700;}
.project-start-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#e56b2f;box-shadow:0 10px 26px rgba(229,107,47,.28);}
.project-start-icon svg{width:30px;height:30px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.project-home-card{position:relative;}
.project-welcome-panel{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:22px;padding:28px 24px 26px;align-items:center;}
.project-welcome-copy h2{margin:8px 0 10px;font-size:34px;line-height:1.08;color:var(--ink);max-width:14ch;}
.project-welcome-copy p{margin:0;color:var(--muted);font-size:15px;line-height:1.6;max-width:58ch;}
.project-welcome-kicker{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;background:#fff3ea;color:#c85b22;font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;}
.project-welcome-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px;}
.welcome-choice-button{min-width:210px;display:grid;gap:3px;text-align:left;justify-items:start;padding:13px 16px;}
.welcome-choice-button strong{font-size:15px;}
.welcome-choice-button small{font-size:10px;font-weight:750;opacity:.78;}
.start-cloud-status{margin-top:14px;display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:#64748b;}
.start-cloud-status::before{content:"";width:8px;height:8px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.14);}
.start-cloud-status[data-state="signed-in"]{color:#167747}.start-cloud-status[data-state="signed-in"]::before{background:#22a663;box-shadow:0 0 0 4px rgba(34,166,99,.14)}
.start-cloud-status[data-state="offline"]{color:#a16207}.start-cloud-status[data-state="offline"]::before{background:#e6a21a;box-shadow:0 0 0 4px rgba(230,162,26,.16)}
.project-welcome-aside{display:grid;gap:14px;align-self:stretch;}
.welcome-pill-group{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;}
.welcome-pill{display:inline-flex;padding:8px 12px;border-radius:999px;background:#eef2f7;border:1px solid #d8e0eb;color:#334155;font-size:12px;font-weight:800;}
.project-welcome-mockup{min-height:270px;border-radius:20px;background:linear-gradient(180deg,#f7f9fc,#eef3f8);border:1px solid #e1e8f0;padding:12px;display:grid;place-items:center;overflow:hidden;}
.project-welcome-photo{background:#f8fafc;box-shadow:0 18px 38px rgba(15,23,42,.10);}
.project-welcome-photo img{display:block;width:100%;height:100%;min-height:246px;object-fit:cover;object-position:center;border-radius:14px;filter:saturate(1.03) contrast(1.02);}

.mockup-room{position:relative;width:100%;aspect-ratio:1.05/1;max-width:320px;}
.mock-wall,.mock-floor,.mock-run,.mock-tall,.mock-worktop{position:absolute;display:block;border-radius:10px;}
.mock-wall.wall-back{left:14%;right:11%;top:12%;height:56%;background:linear-gradient(180deg,#c8d7e7,#b9ccdf);clip-path:polygon(0 0,100% 0,100% 85%,0 100%);}
.mock-wall.wall-side{right:7%;top:16%;width:27%;height:56%;background:linear-gradient(180deg,#d6dde5,#c8d1db);clip-path:polygon(0 0,100% 0,100% 100%,14% 88%);}
.mock-floor{left:18%;right:8%;bottom:8%;height:28%;background:linear-gradient(180deg,#f5f7fa,#e5ebf2);clip-path:polygon(0 0,100% 10%,82% 100%,14% 94%);border:1px solid #dde5ee;}
.mock-run.run-back{left:30%;top:38%;width:50%;height:16%;background:#182234;border:1px solid #0f1726;box-shadow:0 8px 0 #8793a1 inset;}
.mock-run.run-side{right:16%;top:41%;width:16%;height:36%;background:#e5e7eb;border:1px solid #cdd6df;box-shadow:0 8px 0 #4b5563 inset;transform:skewY(12deg);}
.mock-tall{left:22%;top:28%;width:12%;height:43%;background:#d8dbe1;border:1px solid #bdc6d0;box-shadow:inset 0 0 0 3px #f1f4f8;}
.mock-worktop{left:48%;top:51%;width:20%;height:9%;background:#6b7280;transform:skewX(-25deg);border-radius:8px;}
.project-start-form{padding:22px 24px 24px;}
.project-start-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px;}
.project-start-intro h2{margin:0 0 5px;font-size:24px;color:var(--ink);}
.project-start-intro p{margin:0;color:var(--muted);font-size:14px;line-height:1.5;max-width:62ch;}
.project-start-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.project-start-wide{grid-column:1/-1;}
.project-start-form textarea{width:100%;resize:vertical;min-height:88px;border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;color:var(--ink);}
.project-start-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;}
@media(max-width:820px){.project-welcome-panel{grid-template-columns:1fr;padding:22px 20px 20px}.project-welcome-copy h2{font-size:30px;max-width:none}.project-welcome-aside{order:-1}.welcome-pill-group{justify-content:flex-start}.project-welcome-mockup{min-height:210px}.project-welcome-photo img{min-height:190px}.mockup-room{max-width:280px}}
@media(max-width:620px){.project-start-overlay{padding:10px}.project-start-brand{padding:18px 18px}.project-start-brand h1{font-size:24px}.project-start-grid{grid-template-columns:1fr}.project-start-wide{grid-column:auto}.project-start-actions,.project-welcome-actions{flex-direction:column}.project-start-actions .button,.project-welcome-actions .button{width:100%}.project-start-form{padding:18px}.project-welcome-panel{padding:18px}.project-start-intro{display:block}}

.cloud-header-button{position:relative}.cloud-header-button i{position:absolute;right:5px;bottom:5px;width:8px;height:8px;border-radius:50%;background:#94a3b8;border:2px solid #fff}.cloud-header-button i[data-state="signed-in"]{background:#22a663}.cloud-header-button i[data-state="offline"]{background:#e6a21a}.cloud-header-button i[data-state="error"]{background:#dc3f3f}
.header-save-button{position:relative}.header-save-button i{position:absolute;right:5px;bottom:5px;width:8px;height:8px;border-radius:50%;background:#94a3b8;border:2px solid #fff}.header-save-button i[data-state="dirty"]{background:#e6a21a}.header-save-button i[data-state="saving"]{background:#2b74dc;animation:savePulse 1s ease-in-out infinite}.header-save-button i[data-state="saved"]{background:#22a663}.header-save-button i[data-state="pending"],.header-save-button i[data-state="error"]{background:#dc3f3f}
.cloud-overlay{position:fixed;inset:0;z-index:1900;background:rgba(15,23,42,.64);backdrop-filter:blur(6px);display:grid;place-items:center;padding:18px}.cloud-overlay.hidden{display:none}.cloud-dialog{width:min(760px,96vw);max-height:min(820px,94vh);overflow:auto;background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(15,23,42,.35);border:1px solid #dbe3ec}.cloud-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;background:rgba(255,255,255,.96);border-bottom:1px solid #e4e9ef;backdrop-filter:blur(8px)}.cloud-dialog-header h2{margin:3px 0 0;font-size:24px}.cloud-connection-banner{padding:10px 22px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:800}.cloud-connection-banner[data-state="signed-in"]{background:#eaf9f0;color:#167747}.cloud-connection-banner[data-state="offline"]{background:#fff7df;color:#8a5b00}.cloud-connection-banner[data-state="error"]{background:#fff0f0;color:#b42318}
.cloud-login-panel{display:grid;gap:14px;padding:24px 22px}.cloud-login-copy h3{margin:0 0 6px}.cloud-login-copy p{margin:0;color:#64748b;line-height:1.5}.cloud-login-panel label{display:grid;gap:6px;font-size:12px;font-weight:850;color:#334155}.cloud-login-panel input{width:100%;min-height:42px;border:1px solid #cfd8e3;border-radius:10px;padding:9px 11px;font:inherit}.cloud-form-error{min-height:18px;margin:0;color:#b42318;font-size:12px;font-weight:800}
.cloud-projects-panel{padding:20px 22px 24px}.cloud-account-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 14px;border-radius:14px;background:#f4f7fa}.cloud-account-row>div{display:grid;gap:2px}.cloud-account-row small{color:#64748b;font-weight:800}.cloud-account-row strong{font-size:15px}.cloud-account-row span{font-size:12px;color:#64748b}.cloud-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.cloud-project-list{display:grid;gap:10px}.cloud-project-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px;border:1px solid #dce3eb;border-radius:14px;background:#fff}.cloud-project-card.current{border-color:#e56b2f;box-shadow:0 0 0 2px rgba(229,107,47,.12)}.cloud-project-copy{min-width:0}.cloud-project-copy strong,.cloud-project-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cloud-project-copy strong{font-size:14px}.cloud-project-copy span{margin-top:3px;color:#64748b;font-size:11px}.cloud-project-actions{display:flex;gap:7px}.cloud-project-actions button{min-height:34px;padding:6px 10px}.cloud-project-empty{padding:28px;text-align:center;color:#64748b;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc}.cloud-menu-status strong{color:#167747}
@media(max-width:620px){.cloud-overlay{padding:8px;align-items:end}.cloud-dialog{width:100%;max-height:92vh;border-radius:20px 20px 0 0}.cloud-dialog-header{padding:16px}.cloud-login-panel,.cloud-projects-panel{padding:18px 16px}.cloud-account-row{align-items:flex-start}.cloud-toolbar{display:grid}.cloud-toolbar .button{width:100%}.cloud-project-card{grid-template-columns:1fr}.cloud-project-actions{display:grid;grid-template-columns:1fr auto}.cloud-project-actions .button{width:100%}}

/* El visor 360 siempre cabe completo en su panel: sin recorte inferior ni scroll interno. */
.perspective-wrap{min-height:0 !important; overflow:hidden !important; padding:12px !important;}
.perspective-svg{width:100% !important;height:100% !important;min-height:0 !important;max-height:none !important;display:block;}


/* v0.8.2 · modo presentación comercial de Perspectiva */
.perspective-top-actions { display:flex; align-items:center; gap:9px; }
.perspective-presentation-btn { padding:7px 11px; font-size:11px; }
.perspective-exit-btn { display:none; padding:7px 12px; }
body.perspective-presentation-active { overflow:hidden; }
#perspectiveView.presentation-mode {
  position:fixed;
  inset:0;
  z-index:1000;
  display:flex !important;
  flex-direction:column;
  width:100vw;
  height:100vh;
  background:#f7f9fb;
}
#perspectiveView.presentation-mode .perspective-wrap {
  order:1;
  flex:1;
  min-height:0 !important;
  height:100%;
  padding:18px 22px 112px;
  background:#f7f9fb;
}
#perspectiveView.presentation-mode .perspective-svg {
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
}
#perspectiveView.presentation-mode .perspective-controls-360 {
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:4;
  width:min(920px, calc(100vw - 36px));
  padding:10px 14px;
  border:1px solid rgba(203,213,225,.88);
  border-radius:15px;
  background:rgba(255,255,255,.94);
  box-shadow:0 16px 45px rgba(15,23,42,.16);
  backdrop-filter:blur(12px);
}
#perspectiveView.presentation-mode .perspective-help { display:none; }
#perspectiveView.presentation-mode .perspective-presentation-btn { display:none; }
#perspectiveView.presentation-mode .perspective-exit-btn { display:inline-flex; }
#perspectiveView.presentation-mode .perspective-topline { margin-bottom:4px; }
#perspectiveView.presentation-mode .perspective-topline > span { font-weight:850; color:var(--secondary); }
@media (max-width:700px) {
  #perspectiveView.presentation-mode .perspective-wrap { padding:8px 8px 105px; }
  #perspectiveView.presentation-mode .perspective-controls-360 { bottom:8px; width:calc(100vw - 16px); }
  .perspective-presentation-btn { padding:7px 9px; }
}


/* v0.8.4 · presentación recentrada: más baja, sin recorte superior y casi apoyada en el visor */
#perspectiveView.presentation-mode .perspective-wrap {
  padding: 18px 22px 146px !important;
  place-items: center;
}
#perspectiveView.presentation-mode .perspective-svg {
  width: 99% !important;
  height: 99% !important;
  transform: translateY(34px);
  transform-origin: center center;
}
#perspectiveView.presentation-mode .perspective-controls-360 {
  bottom: 14px;
}
@media (max-height:760px) {
  #perspectiveView.presentation-mode .perspective-wrap { padding:14px 16px 132px !important; }
  #perspectiveView.presentation-mode .perspective-svg { width:99% !important; height:99% !important; transform:translateY(24px); }
}
@media (max-width:700px) {
  #perspectiveView.presentation-mode .perspective-wrap { padding:10px 8px 132px !important; }
  #perspectiveView.presentation-mode .perspective-svg { width:99% !important; height:99% !important; transform:translateY(18px); }
  #perspectiveView.presentation-mode .perspective-controls-360 { bottom:6px; }
}

.tutorial-overlay {
  position:fixed; inset:0; z-index:1600; display:grid; place-items:center;
  padding:22px; background:rgba(15,23,42,.54); backdrop-filter:blur(8px);
}
.tutorial-overlay.hidden { display:none; }
.tutorial-dialog {
  width:min(980px,96vw); max-height:90vh; overflow:auto; padding:22px;
  border:1px solid rgba(203,213,225,.95); border-radius:20px; background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.28);
}
.tutorial-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding-bottom:13px; border-bottom:1px solid #e7ebf0; }
.tutorial-header h2 { margin:3px 0 0; font-size:22px; }
.tutorial-intro { margin:15px 0; padding:11px 13px; border-radius:11px; background:#f5f7fa; color:var(--muted); font-size:12px; line-height:1.55; }
.tutorial-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.tutorial-card { display:flex; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#fbfcfd; }
.tutorial-step { flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:var(--secondary); color:#fff; font-weight:900; }
.tutorial-card h3 { margin:1px 0 5px; font-size:14px; }
.tutorial-card p { margin:0; color:var(--muted); font-size:11px; line-height:1.5; }
.tutorial-shortcuts { margin-top:13px; padding:11px 13px; border-radius:11px; background:#fff8f1; color:#596579; font-size:11px; }
.tutorial-footer { display:flex; justify-content:flex-end; margin-top:14px; }
@media(max-width:700px){.tutorial-overlay{padding:9px}.tutorial-dialog{padding:15px;max-height:96vh}.tutorial-grid{grid-template-columns:1fr}.tutorial-header h2{font-size:18px}}

.client-data-warning-overlay{position:absolute;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:rgba(8,14,24,.48);backdrop-filter:blur(4px);}
.client-data-warning-overlay.hidden{display:none;}
.client-data-warning-card{width:min(560px,calc(100% - 24px));background:#fff;border:1px solid #dbe2eb;border-radius:18px;box-shadow:0 26px 80px rgba(8,14,25,.28);padding:24px;display:grid;grid-template-columns:52px 1fr;gap:16px;}
.client-data-warning-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:#fff3e8;color:#c6531d;border:1px solid #f2c8a9;font-size:27px;font-weight:950;}
.client-data-warning-copy h2{margin:2px 0 7px;font-size:19px;color:var(--ink);}
.client-data-warning-copy p{margin:0;color:var(--muted);line-height:1.5;font-size:13px;}
.client-data-warning-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:4px;}
@media(max-width:520px){.client-data-warning-card{grid-template-columns:1fr;text-align:center;padding:20px}.client-data-warning-icon{margin:0 auto}.client-data-warning-actions{flex-direction:column}.client-data-warning-actions .button{width:100%}}

/* v0.9 · Biblioteca visual de puertas TPC */
.door-legacy-select { display:none !important; }
.door-current-card {
  display:grid; grid-template-columns:54px minmax(0,1fr) auto; gap:10px; align-items:center;
  margin:8px 0 12px; padding:10px; border:1px solid var(--line); border-radius:12px; background:#f8fafc;
}
.door-current-swatch { width:54px; height:64px; border-radius:8px; border:1px solid #cfd7e2; background-size:cover !important; background-position:center !important; }
.door-current-copy { min-width:0; display:grid; gap:3px; }
.door-current-copy strong { font-size:12px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.door-current-copy small { color:var(--muted); font-size:10px; line-height:1.3; }
.door-library-open { padding:8px 10px; font-size:11px; white-space:nowrap; }

.door-library-overlay {
  position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:24px;
  background:rgba(11,18,31,.66); backdrop-filter:blur(8px);
}
.door-library-overlay.hidden { display:none; }
.door-library-dialog {
  width:min(1220px,96vw); max-height:92vh; overflow:auto; background:#f3f6fa; border:1px solid #d8e0ea;
  border-radius:20px; box-shadow:0 28px 80px rgba(10,18,30,.34); padding:18px;
}
.door-library-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:4px 4px 14px; }
.door-library-header h2 { margin:3px 0 5px; font-size:23px; }
.door-library-header p { margin:0; max-width:760px; color:var(--muted); font-size:12px; line-height:1.5; }
.door-library-toolbar {
  position:sticky; top:-18px; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:0 -4px 14px; padding:10px 4px; background:rgba(243,246,250,.96); backdrop-filter:blur(10px);
}
.door-library-toolbar label { display:flex; align-items:center; gap:8px; grid-auto-flow:column; }
.door-library-toolbar select { width:auto; min-width:225px; }
.door-collection-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.door-collection-card {
  position:relative; display:grid; grid-template-columns:82px minmax(0,1fr); gap:12px; align-items:center;
  min-height:150px; padding:14px; border:1px solid #d3dce8; border-radius:16px; background:#fff; text-align:left;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; cursor:pointer;
}
.door-collection-card:hover { transform:translateY(-2px); border-color:#9eacbf; box-shadow:0 10px 24px rgba(24,34,52,.09); }
.door-collection-card.future { opacity:.70; }
.door-collection-preview {
  width:82px; height:126px; border-radius:12px; background:#eef2f6; display:grid; place-items:center; overflow:hidden; border:1px solid #e1e7ef;
}
.door-collection-preview img { width:68px; height:108px; object-fit:cover; border:1px solid #aab4c1; background:#fff; }
.door-collection-copy { min-width:0; }
.door-collection-copy h3 { margin:0 0 5px; font-size:16px; }
.door-collection-copy .collection-meta { color:var(--muted); font-size:10px; margin-bottom:8px; }
.door-collection-copy p { margin:0; color:#657084; font-size:10px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.door-phase-badge { position:absolute; right:10px; top:10px; padding:4px 7px; border-radius:999px; font-size:9px; font-weight:800; background:#e9f7ed; color:#166534; }
.door-phase-badge.future { background:#eef1f5; color:#657084; }

.door-finish-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.door-finish-card {
  min-width:0; padding:9px; border:1px solid #d5deea; border-radius:13px; background:#fff; cursor:pointer; text-align:left;
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.door-finish-card:hover { transform:translateY(-2px); border-color:var(--primary); box-shadow:0 8px 18px rgba(24,34,52,.08); }
.door-finish-card.selected { border:2px solid var(--primary); padding:8px; box-shadow:0 0 0 3px rgba(229,107,47,.12); }
.door-finish-swatch { width:100%; aspect-ratio: .72; border-radius:8px; overflow:hidden; border:1px solid #d7dde6; background:#eef2f6; margin-bottom:8px; }
.door-finish-swatch img { width:100%; height:100%; object-fit:cover; display:block; }
.door-finish-swatch .solid-swatch { width:100%; height:100%; }
.door-finish-card strong { display:block; font-size:11px; line-height:1.25; color:var(--ink); }
.door-finish-card small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.door-library-empty { grid-column:1/-1; padding:38px; border:1px dashed #c7d1de; border-radius:14px; background:#fff; text-align:center; color:var(--muted); }
.door-library-empty strong { display:block; color:var(--ink); margin-bottom:6px; }
.door-library-footnote { margin-top:14px; padding:10px 12px; border-radius:10px; background:#e9eef5; color:#657084; font-size:10px; line-height:1.45; }

@media (max-width:1100px){ .door-collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.door-finish-grid{grid-template-columns:repeat(4,minmax(0,1fr))} }
@media (max-width:760px){
  .door-library-overlay{padding:8px}.door-library-dialog{width:100%;max-height:96vh;border-radius:14px;padding:12px}
  .door-collection-grid{grid-template-columns:1fr 1fr}.door-finish-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .door-collection-card{grid-template-columns:64px 1fr;min-height:128px;padding:10px}.door-collection-preview{width:64px;height:104px}.door-collection-preview img{width:52px;height:88px}
  .door-library-toolbar{align-items:stretch;flex-direction:column}.door-library-toolbar label{justify-content:space-between}.door-library-toolbar select{min-width:0;flex:1}
  .door-current-card{grid-template-columns:48px minmax(0,1fr)}.door-library-open{grid-column:1/-1;width:100%}
}
@media (max-width:480px){ .door-collection-grid{grid-template-columns:1fr}.door-finish-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* v0.9.4 · zoom de perspectiva y remates */
.perspective-zoom-control{display:inline-flex;align-items:center;gap:6px;padding-left:8px;margin-left:2px;border-left:1px solid var(--line);white-space:nowrap}
.perspective-zoom-control strong{min-width:46px;text-align:center;font-size:11px;color:var(--muted)}
.design-trim-form{margin-top:4px}
.design-trim-form .trim-title{margin-bottom:8px}
.design-trim-form .property-subsection{margin-top:8px}
@media (max-width:820px){
  .perspective-slider-row{flex-wrap:wrap}
  .perspective-angle-slider{min-width:160px}
  .perspective-zoom-control{margin-left:auto}
}


/* v0.9.5 · inclinación de cámara y zócalo continuo */
.perspective-tilt-row{display:flex;align-items:center;gap:9px;width:100%;font-size:10px;color:var(--muted)}
.perspective-tilt-row>span{font-weight:800;color:#596579;white-space:nowrap}
.perspective-elevation-slider{flex:1;accent-color:var(--secondary);min-width:150px}
.perspective-tilt-row strong{min-width:54px;text-align:right;font-size:10px;color:var(--secondary)}
.perspective-top-actions .perspective-elevation-label{font-size:11px;color:var(--muted)}
@media(max-width:820px){.perspective-tilt-row{flex-wrap:nowrap}.perspective-elevation-slider{min-width:120px}}
#perspectiveView.presentation-mode .perspective-wrap{padding-bottom:170px !important}
@media(max-height:760px){#perspectiveView.presentation-mode .perspective-wrap{padding-bottom:158px !important}}
@media(max-width:700px){#perspectiveView.presentation-mode .perspective-wrap{padding-bottom:158px !important}}

/* K-Planner v0.10 · motor WebGL 3D */
.perspective-wrap { position: relative; min-height: 440px; overflow: hidden; background: #f7f9fb; }
.perspective-canvas { display:block; width:100%; height:100%; min-height:440px; touch-action:none; cursor:grab; outline:none; }
.perspective-wrap.dragging .perspective-canvas { cursor:grabbing; }
.perspective-quick-lighting{position:absolute;right:12px;top:12px;z-index:8;display:flex;flex-direction:column;gap:7px}
.perspective-light-scene{width:38px;height:38px;border:1px solid rgba(190,201,215,.96);border-radius:11px;background:rgba(255,255,255,.94);color:#344154;font-size:20px;line-height:1;cursor:pointer;box-shadow:0 5px 16px rgba(15,23,42,.14);backdrop-filter:blur(10px);transition:transform .16s ease,background .16s ease,color .16s ease,border-color .16s ease}
.perspective-light-scene:hover{transform:translateY(-1px);background:#fff8e9;border-color:#eab84e}
.perspective-light-scene.active{background:#f59e0b;border-color:#d97706;color:#fff;box-shadow:0 6px 18px rgba(180,104,0,.28)}
.perspective-mode-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; }
.perspective-mode-row .button { padding:6px 10px; min-height:32px; }
.perspective-mode-row .button.active { background:#172033; color:#fff; border-color:#172033; }
.perspective-lighting-row { display:flex; align-items:center; gap:8px; width:100%; flex-wrap:wrap; }
.perspective-lighting-row > span { font-size:10px; font-weight:850; color:#596579; white-space:nowrap; }
.perspective-lighting-row .button { min-height:30px; padding:5px 9px; }
.perspective-lighting-row .button.active { color:#7c4a03; background:#fff7df; border-color:#f0cf7a; }
.perspective-lighting-row select { min-height:30px; padding:4px 28px 4px 8px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-size:10px; font-weight:750; }
.perspective-lighting-row input[type="range"] { flex:1; min-width:120px; accent-color:#e5a92f; }
.perspective-lighting-row strong { min-width:38px; text-align:right; color:var(--secondary); font-size:10px; }
.perspective-canvas.kp3d-error { background:repeating-linear-gradient(135deg,#f8fafc 0 16px,#eef2f6 16px 32px); }
.perspective-presentation-active .perspective-wrap { min-height: min(76vh, 820px); }
.perspective-presentation-active .perspective-canvas { min-height: min(76vh, 820px); }

/* v0.9 · UX/UI · separación de áreas y mesa de trabajo */
:root{
  --header-h: 54px;
  --ui-left: 270px;
  --ui-right: 300px;
  --ui-gap: 8px;
}

.app-header{
  height:var(--header-h);
  min-height:var(--header-h);
  padding:6px 10px;
  gap:10px;
  box-shadow:0 3px 14px rgba(7,12,22,.18);
}
.brand{flex:0 0 auto;}
.brand-mark{width:36px;height:36px;border-radius:10px;}
.brand h1{font-size:17px;}

.main-nav{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  padding:3px;
  overflow-x:auto;
  scrollbar-width:none;
}
.main-nav::-webkit-scrollbar{display:none;}
.main-nav-item{
  flex:0 0 auto;
  border:0;
  border-radius:8px;
  padding:8px 12px;
  color:#aeb8c7;
  background:transparent;
  font-size:11px;
  font-weight:800;
  letter-spacing:.01em;
  transition:background .15s ease,color .15s ease,box-shadow .15s ease;
}
.main-nav-item:hover{color:#fff;background:rgba(255,255,255,.08);}
.main-nav-item.active{
  color:#fff;
  background:rgba(255,255,255,.12);
  box-shadow:inset 0 -2px 0 var(--primary);
}

.app-shell{
  grid-template-columns:var(--ui-left) minmax(520px,1fr) var(--ui-right);
  gap:var(--ui-gap);
  padding:8px;
  height:calc(100vh - var(--header-h));
}
.panel{border-radius:14px;box-shadow:0 10px 32px rgba(20,31,48,.08);}
.left-panel,.right-panel{position:relative;}
.panel-section{padding:14px;}
.section-heading{margin-bottom:11px;}
.section-heading h2{font-size:15px;}

/* La navegación principal absorbe Oferta/Listado: en Diseño quedan solo las vistas de diseño. */
.section-route-tab{display:none !important;}
.workspace-toolbar{min-height:52px;padding:8px 10px;gap:10px;}
.view-tabs{padding:3px;border-radius:10px;}
.view-tab{padding:7px 13px;font-size:11px;border-radius:7px;}
.tool-actions .icon-button{width:32px;height:32px;border-radius:8px;font-size:16px;}
.tool-actions .button{padding:8px 11px;border-radius:9px;font-size:11px;}
.status-bar{padding:6px 10px;font-size:10px;}
.canvas-wrap{padding:24px;}

.workspace-context{display:none;min-width:0;}
.project-workspace-context{gap:2px;}
.project-workspace-context strong{display:block;font-size:14px;color:var(--ink);}
.project-workspace-context small{display:block;margin-top:2px;color:var(--muted);font-size:10px;font-weight:650;}
.project-continue-btn{margin-top:12px;}

.panel-edge-toggle{
  display:none;
  position:absolute;
  z-index:8;
  top:10px;
  width:26px;
  height:34px;
  place-items:center;
  border:1px solid var(--line);
  background:#fff;
  color:#526075;
  font-size:18px;
  font-weight:900;
  box-shadow:0 5px 16px rgba(20,31,48,.10);
}
.left-edge-toggle{right:-1px;border-radius:9px 0 0 9px;}
.right-edge-toggle{left:-1px;border-radius:0 9px 9px 0;}

/* PROYECTO = editor arquitectónico: estancia + biblioteca + propiedades. */
body[data-ui-section="project"]{--ui-left:350px;--ui-right:300px;}
body[data-ui-section="project"] .design-trim-section{display:none;}
body[data-ui-section="project"] .panel-edge-toggle{display:grid;}
body[data-ui-section="project"] .workspace-toolbar{justify-content:space-between;}
body[data-ui-section="project"] .project-workspace-context{display:block;}
body[data-ui-section="project"] .workspace-toolbar .view-tabs{display:none;}
body[data-ui-section="project"] .status-bar span:first-child{display:none;}
body[data-ui-section="project"] .left-panel .library-section{border-top:1px solid var(--line);}
body[data-ui-section="project"] .right-panel > .panel-section:first-of-type{padding-top:50px;}

/* DISEÑO = biblioteca de cocina + acabados + lienzo + propiedades contextuales. */
body[data-ui-section="design"] .left-panel .room-section{display:none;}
body[data-ui-section="design"] .panel-edge-toggle{display:grid;}
body[data-ui-section="design"] .left-panel .library-section{padding-top:50px;}
body[data-ui-section="design"] .design-trim-section{display:block;}
body[data-ui-section="design"] .right-panel > .panel-section:first-of-type{padding-top:50px;}

body.ui-library-collapsed[data-ui-section="design"],
body.ui-library-collapsed[data-ui-section="project"]{--ui-left:44px;}
body.ui-properties-collapsed[data-ui-section="design"],
body.ui-properties-collapsed[data-ui-section="project"]{--ui-right:44px;}
body.ui-library-collapsed[data-ui-section="design"] .left-panel .panel-section,
body.ui-library-collapsed[data-ui-section="project"] .left-panel .panel-section{display:none;}
body.ui-properties-collapsed[data-ui-section="design"] .right-panel .panel-section,
body.ui-properties-collapsed[data-ui-section="project"] .right-panel .panel-section{display:none;}
body.ui-library-collapsed[data-ui-section="design"] .left-edge-toggle,
body.ui-library-collapsed[data-ui-section="project"] .left-edge-toggle{
  right:8px;left:8px;width:28px;border-radius:9px;
}
body.ui-properties-collapsed[data-ui-section="design"] .right-edge-toggle,
body.ui-properties-collapsed[data-ui-section="project"] .right-edge-toggle{
  left:8px;right:8px;width:28px;border-radius:9px;
}

/* PROPUESTA y DOCUMENTACIÓN = áreas de trabajo completas, sin barras laterales. */
body[data-ui-section="proposal"],
body[data-ui-section="docs"]{--ui-left:0px;--ui-right:0px;}
body[data-ui-section="proposal"] .left-panel,
body[data-ui-section="proposal"] .right-panel,
body[data-ui-section="docs"] .left-panel,
body[data-ui-section="docs"] .right-panel{display:none;}
body[data-ui-section="proposal"] .app-shell,
body[data-ui-section="docs"] .app-shell{grid-template-columns:minmax(0,1fr);max-width:1680px;}
body[data-ui-section="proposal"] .workspace-toolbar{display:none;}
body[data-ui-section="proposal"] .status-bar{display:none;}
body[data-ui-section="docs"] .workspace-toolbar{justify-content:flex-end;min-height:46px;}
body[data-ui-section="docs"] .workspace-toolbar .view-tabs{display:none;}
body[data-ui-section="docs"] .tool-actions > :not(#exportBtn){display:none;}
body[data-ui-section="docs"] .status-bar{display:none;}

/* Mejor lectura de biblioteca y propiedades en jornadas largas de trabajo. */
.library-grid{gap:7px;}
.library-item{min-height:82px;border-radius:11px;padding:8px;background:#fff;}
.library-item:hover{transform:none;box-shadow:0 5px 14px rgba(24,34,52,.07);}
.category-tabs{gap:5px;}
.category-tab{padding:6px 8px;font-size:10px;}
.property-subsection{border-radius:10px;padding:10px;background:#fafbfc;}
.selected-actions{position:sticky;bottom:0;padding-top:10px;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 24%);}

/* La pantalla de Inicio conserva la ficha, pero con lenguaje de flujo. */
.project-start-brand{padding:20px 24px;}
.project-start-form{padding:22px 24px 24px;}
.project-start-card{border-radius:22px;}

@media (max-width:1180px){
  :root{--ui-left:250px;--ui-right:280px;}
  body[data-ui-section="project"]{--ui-left:300px;}
  .main-nav-item{padding:8px 9px;font-size:10px;}
}

@media (max-width:820px){
  :root{--header-h:52px;}
  .app-header{height:var(--header-h);min-height:var(--header-h);}
  .brand h1{display:none;}
  .brand-mark{width:34px;height:34px;}
  .main-nav{justify-content:flex-start;}
  .main-nav-item{min-width:70px;padding:7px 8px;}
  .app-shell{height:auto;min-height:calc(100vh - var(--header-h));padding:6px;}
  body[data-ui-section="design"] .left-panel .room-section{display:none;}
  body.ui-library-collapsed[data-ui-section="design"] .left-panel,
  body.ui-properties-collapsed[data-ui-section="design"] .right-panel{display:none;}
  body[data-ui-section="design"] .panel-edge-toggle{display:none;}
  body[data-ui-section="project"] .app-shell{display:flex;}
  body[data-ui-section="project"] .left-panel{order:1;}
  body[data-ui-section="project"] .workspace-panel{order:2;}
  body[data-ui-section="project"] .right-panel{order:3;}
  body[data-ui-section="project"] .workspace-panel{order:2;}
}

@media (max-width:560px){
  .header-actions{gap:3px;}
  .header-icon{width:32px;height:32px;}
  .main-nav-item{min-width:64px;font-size:9px;}
}


/* v0.10.5 · metro de diseño + documentación solo de elementos instalables */
.measure-tool{display:none;gap:6px;align-items:center;font-weight:800;white-space:nowrap;}
body[data-ui-section="design"] .measure-tool{display:inline-flex;}
.measure-tool.active{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 0 0 3px rgba(229,107,47,.14);}
.plan-svg.measure-mode{cursor:crosshair;}
.measurement-line{stroke:#e56b2f;stroke-width:12;stroke-dasharray:26 16;stroke-linecap:round;filter:drop-shadow(0 2px 2px rgba(20,30,44,.16));}
.measurement-point{fill:#fff;stroke:#e56b2f;stroke-width:10;}
.measurement-label-bg{fill:#172033;stroke:#fff;stroke-width:5;filter:drop-shadow(0 5px 10px rgba(17,24,39,.2));}
.measurement-label{fill:#fff;font-size:34px;font-weight:900;letter-spacing:.2px;}
.docs-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;padding:16px 18px 8px;background:#fff;}
.docs-intro>div{display:grid;gap:3px;}
.docs-intro strong{font-size:16px;color:var(--ink);}
.docs-intro small{max-width:620px;text-align:right;color:var(--muted);font-size:10px;line-height:1.45;}
@media(max-width:760px){.docs-intro{align-items:flex-start;flex-direction:column}.docs-intro small{text-align:left}.measurement-label{font-size:30px}}


/* v0.10.6 · lectura del metro en el panel lateral de propiedades */
.measurement-panel{display:grid;gap:14px;padding:4px 0 8px;}
.measurement-panel.hidden{display:none;}
.measurement-panel-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:#fff4ee;border:1px solid #ffd5c1;font-size:25px;}
.measurement-panel-copy{display:grid;gap:1px;padding:14px 15px;border:1px solid #ffd2bd;border-radius:14px;background:linear-gradient(180deg,#fff8f4,#fff);box-shadow:0 8px 22px rgba(28,38,55,.05);}
.measurement-panel-kicker{font-size:9px;font-weight:900;letter-spacing:1.5px;color:var(--primary);}
.measurement-panel-value{font-size:34px;line-height:1.05;letter-spacing:-1px;color:var(--ink);font-variant-numeric:tabular-nums;}
.measurement-panel-cm{font-size:15px;font-weight:800;color:#6b7280;font-variant-numeric:tabular-nums;}
.measurement-components{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.measurement-components>div{display:grid;gap:3px;padding:10px 11px;border:1px solid var(--line);border-radius:11px;background:#f8fafc;}
.measurement-components small{font-size:9px;color:var(--muted);font-weight:700;}
.measurement-components strong{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums;}
.measurement-panel-hint{margin:0;padding:10px 11px;border-radius:10px;background:#f7f8fa;color:var(--muted);font-size:10px;line-height:1.5;}
body[data-ui-section="design"] .measurement-panel:not(.hidden)~*{}
@media(max-width:1180px){.measurement-panel-value{font-size:30px;}}


/* v0.10.7 · ángulo de inclinación del metro */
.measurement-angle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid #ffd2bd;border-radius:11px;background:#fff8f4;}
.measurement-angle>div{display:grid;gap:2px;}
.measurement-angle small{font-size:9px;color:var(--muted);font-weight:800;}
.measurement-angle strong{font-size:24px;line-height:1;color:var(--primary);font-variant-numeric:tabular-nums;letter-spacing:-.4px;}
.measurement-angle span{max-width:118px;text-align:right;font-size:9px;line-height:1.35;color:#6b7280;font-weight:700;}
@media(max-width:1180px){.measurement-angle strong{font-size:22px}.measurement-angle span{max-width:105px}}

/* v0.11.1 · confirmación de salida a Inicio */
.home-save-confirm-overlay{
  position:fixed; inset:0; z-index:1400; display:grid; place-items:center; padding:22px;
  background:rgba(8,14,24,.58); backdrop-filter:blur(5px);
}
.home-save-confirm-overlay.hidden{display:none;}
.home-save-confirm-card{
  width:min(620px,calc(100% - 20px)); background:#fff; border:1px solid #dbe2eb;
  border-radius:20px; box-shadow:0 28px 90px rgba(8,14,25,.34); padding:24px;
  display:grid; grid-template-columns:58px 1fr; gap:16px;
}
.home-save-confirm-icon{
  width:58px; height:58px; border-radius:16px; display:grid; place-items:center;
  background:#fff3e8; color:#c6531d; border:1px solid #f2c8a9; font-size:27px;
}
.home-save-confirm-copy .eyebrow{display:block;margin-bottom:5px;}
.home-save-confirm-copy h2{margin:0 0 8px;font-size:20px;line-height:1.25;color:var(--ink);}
.home-save-confirm-copy p{margin:0;color:var(--muted);font-size:13px;line-height:1.5;}
.home-save-confirm-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:4px;}
.danger-ghost{color:#9f3b22;border-color:#e7c4b8;background:#fffaf8;}
.danger-ghost:hover{background:#fff1ec;}
@media(max-width:620px){
  .home-save-confirm-card{grid-template-columns:1fr;text-align:center;padding:20px;}
  .home-save-confirm-icon{margin:0 auto;}
  .home-save-confirm-actions{flex-direction:column;}
  .home-save-confirm-actions .button{width:100%;}
}

/* v0.11.2 · cotas modulares y legibilidad técnica */
.module-dimension-text {
  fill: #48576c;
  font-size: 40px;
  font-weight: 900;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(255,255,255,.96);
  stroke-width: 11px;
  stroke-linejoin: round;
  pointer-events: none;
}
.module-dimension { pointer-events: none; }


/* v0.11.14 · muelle inferior extensible para navegación e iluminación */
#perspectiveView { position:relative; }
#perspectiveView .perspective-controls-360,
#perspectiveView.presentation-mode .perspective-controls-360 {
  position:absolute !important; left:50% !important; right:auto !important; bottom:10px !important;
  transform:translateX(-50%) !important; z-index:12; width:min(880px,calc(100% - 20px)) !important;
  display:flex; flex-direction:column; align-items:stretch; gap:6px !important; padding:0 !important;
  border:0 !important; background:transparent !important; box-shadow:none !important; backdrop-filter:none !important;
  pointer-events:none;
}
.perspective-control-panel {
  pointer-events:auto; overflow:hidden; border:1px solid rgba(190,201,215,.94); border-radius:12px;
  background:rgba(255,255,255,.96); box-shadow:0 8px 24px rgba(15,23,42,.14); backdrop-filter:blur(12px);
}
.perspective-control-panel > summary {
  min-height:40px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px;
  padding:8px 12px; color:#182234; cursor:pointer; user-select:none; list-style:none;
}
.perspective-control-panel > summary::-webkit-details-marker { display:none; }
.perspective-control-panel > summary:hover { background:#f7f9fc; }
.perspective-control-panel > summary > span:first-child { font-size:11px; font-weight:900; letter-spacing:.02em; }
.perspective-control-panel > summary strong { justify-self:end; color:#46556a; font-size:10px; font-variant-numeric:tabular-nums; }
.perspective-panel-chevron { color:#7b8798; font-size:14px; transition:transform .18s ease; }
.perspective-control-panel[open] .perspective-panel-chevron { transform:rotate(180deg); }
.perspective-control-panel[open] > summary { border-bottom:1px solid #e5eaf0; background:#fbfcfe; }
.perspective-control-content { display:grid; gap:9px; padding:10px 12px 12px; }
.perspective-panel-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.perspective-panel-actions small { color:var(--muted); font-size:10px; font-weight:800; }
.perspective-control-panel .perspective-mode-row { margin-top:0; }
.perspective-control-panel .perspective-help { margin:0; }
#perspectiveView.presentation-mode .perspective-wrap { padding:8px !important; }
#perspectiveView.presentation-mode .perspective-canvas,
#perspectiveView.presentation-mode .perspective-svg { width:100% !important; height:100% !important; transform:none !important; }
#perspectiveView.presentation-mode .perspective-exit-btn {
  display:inline-flex !important; pointer-events:auto; position:fixed; top:12px; right:12px; z-index:15;
  box-shadow:0 8px 22px rgba(15,23,42,.20);
}
#perspectiveView.presentation-mode .perspective-quick-lighting{top:58px;right:12px;z-index:15}
@media(max-width:700px){
  #perspectiveView .perspective-controls-360,
  #perspectiveView.presentation-mode .perspective-controls-360 { bottom:6px !important; width:calc(100% - 12px) !important; }
  .perspective-control-panel > summary { min-height:38px; padding:7px 10px; }
  .perspective-control-content { padding:9px 10px 10px; }
  .perspective-control-panel .perspective-slider-row { gap:6px; }
  .perspective-control-panel .perspective-zoom-control { gap:3px; }
  .perspective-lighting-row select { flex:1; min-width:150px; }
  .perspective-lighting-row input[type="range"] { flex-basis:65%; }
  .perspective-quick-lighting{right:8px;top:8px;gap:5px}
  .perspective-light-scene{width:34px;height:34px;border-radius:10px;font-size:18px}
}

/* v0.11.17 · perímetro libre, acabados y biblioteca contextual */
.perimeter-controls,.floor-controls{margin-top:10px;display:grid;gap:9px;}
.perimeter-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;}
.perimeter-controls .button.active{background:#fff1e9;border-color:#e56b2f;color:#b84818;box-shadow:0 0 0 3px rgba(229,107,47,.12);}
.perimeter-edge{cursor:pointer;transition:stroke .15s ease;}
.perimeter-edge:hover{stroke:#e56b2f;}
.perimeter-vertex{fill:#fff;stroke:#e56b2f;stroke-width:10;cursor:move;filter:drop-shadow(0 3px 5px rgba(15,23,42,.22));}
.perimeter-vertex.selected{fill:#e56b2f;stroke:#fff;stroke-width:9;}
.perimeter-open-label{fill:#c6531d;font-size:28px;font-weight:900;paint-order:stroke;stroke:#fff;stroke-width:9;pointer-events:none;}

@media(max-width:820px){
  body[data-ui-section="design"] .left-panel{
    display:block;position:fixed;z-index:45;left:7px;right:7px;bottom:7px;top:auto;
    width:auto;max-height:min(68vh,620px);overflow:auto;order:initial;
    border:1px solid #d8e0e9;border-radius:15px;background:rgba(255,255,255,.98);
    box-shadow:0 18px 55px rgba(15,23,42,.26);backdrop-filter:blur(14px);
  }
  body[data-ui-section="design"] .left-panel .panel-edge-toggle{display:grid;position:sticky;top:7px;left:auto;right:auto;margin-left:auto;margin-right:7px;border-radius:9px;}
  body.ui-library-collapsed[data-ui-section="design"] .left-panel{
    display:block;left:8px;right:auto;width:48px;height:48px;min-height:48px;overflow:hidden;
    border-radius:13px;background:#fff;
  }
  body.ui-library-collapsed[data-ui-section="design"] .left-panel .panel-edge-toggle{
    position:absolute;inset:7px;width:34px;height:34px;margin:0;display:grid;
  }
  body[data-ui-section="design"] .workspace-panel{padding-bottom:58px;}
}

/* v0.11.18 · dossier comercial, portada e iluminación */
.perspective-panel-button-group{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;}
#perspectiveSetCoverBtn{color:#b94d1d;border-color:#f1c6ae;background:#fff8f4;}
#perspectiveSetCoverBtn:hover{background:#fff0e8;}
.offer-cover-card,.offer-lighting-card{margin:14px;}
.offer-cover-preview-wrap{position:relative;min-height:150px;border:1px dashed #cbd5e1;border-radius:13px;overflow:hidden;background:#f7f9fc;}
.offer-cover-preview{display:block;width:100%;height:clamp(190px,32vw,340px);object-fit:cover;}
.offer-cover-empty{min-height:150px;display:grid;place-items:center;padding:24px;text-align:center;color:#6b7280;font-size:12px;line-height:1.55;}
.offer-lighting-card{display:grid;gap:12px;}
.offer-lighting-card .offer-card-heading{margin-bottom:0;}
.offer-lighting-card .checkbox-row{width:auto;margin:0;}

@media(max-width:700px){
  .perspective-panel-button-group{width:100%;justify-content:stretch;}
  .perspective-panel-button-group .button{flex:1;min-width:135px;}
  .offer-cover-card,.offer-lighting-card{margin:8px;}
  .offer-cover-card .offer-card-heading,.offer-lighting-card .offer-card-heading{align-items:flex-start;gap:10px;}
  .offer-cover-card .offer-card-heading{flex-direction:column;}
  .offer-cover-card .offer-card-heading .button{width:100%;}
}


/* v0.12.5-beta.1 · identidad profesional persistente para el dossier */
.offer-brand-card{margin:14px;}
.offer-brand-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.offer-brand-layout{display:grid;grid-template-columns:minmax(220px,.72fr) minmax(0,1.28fr);gap:14px;align-items:center;}
.offer-brand-preview-wrap{min-height:110px;border:1px dashed #cbd5e1;border-radius:13px;background:#f7f9fc;display:grid;place-items:center;padding:14px;overflow:hidden;}
.offer-brand-preview{display:block;max-width:100%;max-height:105px;object-fit:contain;}
.offer-brand-empty{max-width:420px;text-align:center;color:#6b7280;font-size:12px;line-height:1.5;padding:12px;}
.offer-brand-copy{display:grid;gap:5px;color:#475569;line-height:1.5;}
.offer-brand-copy strong{color:#172033;font-size:13px;}
.offer-brand-copy p{margin:0;font-size:12px;}
.offer-brand-copy small{color:#6b7280;font-size:10px;}
@media(max-width:700px){
  .offer-brand-card{margin:8px;}
  .offer-brand-card .offer-card-heading{flex-direction:column;}
  .offer-brand-actions{width:100%;justify-content:stretch;}
  .offer-brand-actions .button{flex:1;}
  .offer-brand-layout{grid-template-columns:1fr;}
}


/* ===== Ficha de control integrada · beta testers v0.12.7 ===== */
.tester-feedback-menu{display:flex!important;align-items:center;justify-content:space-between;gap:12px}
.tester-feedback-menu b{font-size:9px;letter-spacing:.12em;background:#fff0c2;color:#7a4b00;border:1px solid #f2d46a;padding:3px 6px;border-radius:999px}
.tester-feedback-overlay{position:fixed;inset:0;z-index:2100;background:rgba(15,23,42,.72);backdrop-filter:blur(7px);display:grid;place-items:center;padding:14px}
.tester-feedback-overlay.hidden{display:none}
.tester-feedback-dialog{width:min(1120px,97vw);max-height:96vh;overflow:auto;background:#f7f9fc;border:1px solid #d8e0e9;border-radius:24px;box-shadow:0 34px 90px rgba(15,23,42,.42)}
.tester-feedback-header{position:sticky;top:0;z-index:5;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 24px 16px;background:rgba(255,255,255,.97);border-bottom:1px solid #dde4ec;backdrop-filter:blur(10px)}
.tester-feedback-header h2{margin:3px 0 4px;font-size:24px}.tester-feedback-header p{margin:0;color:#64748b;max-width:760px;font-size:13px}
.tester-feedback-toolbar{position:sticky;top:91px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 24px;background:#eef3f8;border-bottom:1px solid #dbe3ec}
.tester-feedback-toolbar-actions{display:flex;flex-wrap:wrap;gap:8px}.tester-feedback-toolbar-actions .button{padding:9px 12px}
.tester-feedback-autosave{display:flex;align-items:center;gap:8px;font-size:12px;color:#486172}.tester-feedback-autosave span{width:9px;height:9px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12)}
.tester-feedback-form{padding:18px 24px 28px;display:grid;gap:16px}
.tester-feedback-card{background:#fff;border:1px solid #dfe6ee;border-radius:18px;padding:18px;box-shadow:0 7px 22px rgba(15,23,42,.045)}
.tester-card-title{display:flex;align-items:center;gap:12px;margin-bottom:15px}.tester-card-title>span{display:grid;place-items:center;min-width:42px;height:42px;border-radius:13px;background:#111827;color:#fff;font-size:12px;font-weight:900;letter-spacing:.08em}.tester-card-title small{font-size:10px;letter-spacing:.14em;color:#778395;font-weight:900}.tester-card-title h3{margin:2px 0 0;font-size:18px}
.tester-grid{display:grid;gap:12px}.tester-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.tester-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.tester-feedback-form label{display:grid;gap:6px;color:#425466;font-size:12px;font-weight:800}.tester-feedback-form input,.tester-feedback-form select,.tester-feedback-form textarea{width:100%;border:1px solid #ccd6e0;border-radius:10px;background:#fff;color:#182230;padding:10px 11px;font:inherit;font-weight:600;outline:none}.tester-feedback-form textarea{resize:vertical;min-height:56px}.tester-feedback-form input:focus,.tester-feedback-form select:focus,.tester-feedback-form textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.tester-rating-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tester-rating-grid label{grid-template-columns:1fr 64px;align-items:center;background:#f8fafc;border:1px solid #e7ecf2;border-radius:11px;padding:8px 9px}.tester-rating-grid select{padding:7px 8px;text-align:center}
.tester-wide{margin-top:12px}.tester-choice-row{display:flex;align-items:center;gap:14px;margin-top:12px;padding:10px 12px;border-radius:11px;background:#f8fafc;border:1px solid #e7ecf2;color:#425466;font-size:12px;font-weight:800}.tester-choice-row.wrap{flex-wrap:wrap}.tester-choice-row>span{margin-right:auto}.tester-choice-row label{display:flex;grid-template-columns:none;align-items:center;gap:5px;white-space:nowrap}.tester-choice-row input{width:auto}
.tester-score-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.tester-score-grid label{background:#111827;color:#fff;border-radius:13px;padding:11px}.tester-score-grid input{background:#fff;text-align:center;font-size:18px;font-weight:900}
.tester-system-info{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.tester-system-info span{font-size:10px;font-weight:800;color:#526476;background:#edf2f7;border:1px solid #dae2ea;padding:5px 8px;border-radius:999px}.tester-help{display:block;margin-top:10px;color:#6b7b8d;line-height:1.5}
.tester-feedback-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:4px 2px}.tester-feedback-footer span{font-size:11px;color:#64748b;text-align:center}
@media(max-width:760px){.tester-feedback-overlay{padding:0;align-items:end}.tester-feedback-dialog{width:100%;max-height:100vh;border-radius:18px 18px 0 0}.tester-feedback-header{padding:16px;position:sticky}.tester-feedback-header h2{font-size:20px}.tester-feedback-toolbar{top:85px;padding:9px 14px;align-items:flex-start;flex-direction:column}.tester-feedback-toolbar-actions{width:100%;display:grid;grid-template-columns:1fr 1fr 1.35fr}.tester-feedback-toolbar-actions .button{font-size:11px;padding:9px 6px}.tester-feedback-form{padding:14px;gap:12px}.tester-feedback-card{padding:14px}.tester-grid.two,.tester-grid.three,.tester-rating-grid,.tester-score-grid{grid-template-columns:1fr}.tester-rating-grid label{grid-template-columns:1fr 72px}.tester-choice-row{align-items:flex-start;flex-wrap:wrap}.tester-choice-row>span{width:100%}.tester-feedback-footer{flex-direction:column}.tester-feedback-footer .button{width:100%}}
