:root {
  --ink: #17211d;
  --muted: #66706b;
  --paper: #ffffff;
  --cream: #f2efe7;
  --sand: #dfd5c3;
  --green: #49695a;
  --green-dark: #263f34;
  --accent: #c68a52;
  --line: #d9ddd9;
  --shadow: 0 22px 70px rgba(28, 42, 35, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Segoe UI", Arial, sans-serif;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 12%, rgba(103,188,225,.25), transparent 30%),
    linear-gradient(135deg, #eef6fc, #ffffff);
}
.login-card {
  width: min(100%, 430px);
  padding: 38px;
  background: white;
  box-shadow: 0 28px 90px rgba(10,79,159,.16);
}
.login-card img {
  width: 150px;
  height: auto;
  margin-bottom: 22px;
}
.login-card h1 {
  margin: 0 0 10px;
  color: #0a4f9f;
  font-size: 30px;
}
.login-card > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: #5e7188;
  line-height: 1.5;
}
.login-card form {
  display: grid;
  gap: 16px;
}
.login-error {
  min-height: 18px;
  color: #526a80;
  font-size: 13px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(242, 239, 231, .88);
  border-bottom: 1px solid rgba(23, 33, 29, .08);
  backdrop-filter: blur(16px);
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand strong { display: block; font-size: 18px; }
.brand small { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.save-state { color: var(--muted); font-size: 13px; }

.ghost-button, .secondary-button, .primary-button {
  border: 0;
  border-radius: 4px;
  padding: 12px 18px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ghost-button { border: 1px solid var(--line); background: transparent; }
.secondary-button { border: 1px solid var(--green); color: var(--green-dark); background: transparent; }
.primary-button { color: white; background: var(--green-dark); box-shadow: 0 12px 30px rgba(38, 63, 52, .2); }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-2px); }
.primary-button.compact { padding: 12px 16px; }

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
  padding: 80px clamp(24px, 8vw, 128px);
  overflow: hidden;
}
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(48px, 7vw, 92px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.hero h1 span { color: var(--green); font-style: italic; }
.hero-copy > p:not(.eyebrow) { max-width: 620px; margin: 30px 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.hero-orbit { position: relative; min-height: 520px; }
.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 3% 5%;
  border: 1px solid rgba(73, 105, 90, .25);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.orbit-card {
  position: absolute;
  display: grid;
  place-items: center;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.orbit-card-main {
  inset: 18% 12% 16% 14%;
  padding: 48px;
  transform: rotate(3deg);
  text-align: center;
}
.orbit-card-main span, .orbit-card-main small { color: var(--muted); letter-spacing: .12em; }
.orbit-card-main strong { margin: 20px 0 10px; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 70px); color: var(--green-dark); }
.orbit-card-small { width: 82px; height: 82px; border-radius: 50%; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.orbit-card-small:nth-of-type(2) { right: 0; top: 10%; }
.orbit-card-small:nth-of-type(3) { left: 2%; bottom: 2%; }

.admin-home {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.5fr) auto;
  gap: 34px;
  align-items: center;
  min-height: 230px;
  padding: 42px clamp(24px, 7vw, 110px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: white;
}
.admin-home::after {
  content: "";
  position: absolute;
  top: 0;
  right: -60px;
  width: 320px;
  height: 8px;
  transform: skewX(-30deg);
  background: linear-gradient(90deg, #07458f 0 35%, #0868b7 35% 63%, #28a8df 63% 82%, #83d2f1 82%);
}
.admin-home h1 { margin: 0 0 7px; color: var(--green-dark); font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.admin-home > div:first-child > p:last-child { margin: 0; color: var(--muted); }
.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: #f7fbfe;
}
.admin-summary div { min-width: 0; padding: 16px 20px; }
.admin-summary div + div { border-left: 1px solid var(--line); }
.admin-summary span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-summary strong { display: block; overflow: hidden; color: var(--green-dark); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.admin-create { white-space: nowrap; }

/* Compact administrative workspace */
.scene {
  min-height: auto;
  padding: 58px clamp(24px, 7vw, 110px) 68px;
}
.scene-heading { max-width: 980px; margin-bottom: 24px; }
.scene-heading h2 {
  margin-bottom: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.scene-heading > p:last-child,
.scene-instruction { margin-top: 7px; font-size: 14px; line-height: 1.45; }
.form-card, .context-card, .totals-card { padding: clamp(22px, 3vw, 34px); }
.split-heading { align-items: center; }
.terms-editor {
  max-width: 1200px;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
  background: white;
  box-shadow: var(--shadow);
}
.terms-editor-heading h3 { margin: 0 0 6px; color: var(--green-dark); font-size: 25px; }
.terms-editor-heading > p:last-child { color: var(--muted); }
.terms-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.terms-editor-wide { grid-column: 1 / -1; }
.quote-document { display: grid; gap: 36px; }
.provider-editor {
  max-width: 1200px;
  margin: 0 0 28px;
  padding: clamp(24px, 4vw, 42px);
  background: white;
  box-shadow: var(--shadow);
}
.provider-actions {
  display: flex;
  align-items: end;
}
.provider-actions button { width: 100%; }
.terms-paper { display: flex; flex-direction: column; }
.terms-title { margin: 18px 0 16px; padding: 13px 16px; border-left: 6px solid #55b5df; background: #eff9fd; }
.terms-title span { color: #2678b2; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.terms-title h3 { margin: 4px 0 0; color: #123f72; font-size: 19px; }
.terms-summary { display: grid; grid-template-columns: 1fr 1.4fr; margin-bottom: 18px; border: 1px solid #c2deef; }
.terms-summary div { padding: 9px 12px; }
.terms-summary div + div { border-left: 1px solid #c2deef; }
.terms-summary span { display: block; margin-bottom: 3px; color: #5e82a0; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.terms-summary strong { color: #123f72; font-size: 10px; }
.terms-section { margin-bottom: 12px; padding: 12px 14px; border: 1px solid #d3e7f2; border-left: 4px solid #87cbe8; }
.terms-section h4, .terms-bank h4 { margin: 0 0 7px; color: #1769a6; font-size: 9px; }
.terms-section p, .terms-bank p { margin: 0; color: #465b70; font-size: 9px; line-height: 1.55; white-space: pre-line; }
.terms-bank { margin-top: 2px; padding: 14px; background: #eaf7fc; }
.terms-acceptance { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; margin-top: 42px; }
.terms-acceptance div { height: 50px; border-bottom: 1px solid #7699b4; }
.terms-acceptance span { display: block; padding-top: 54px; color: #6b8295; font-size: 8px; text-align: center; }
.terms-legal-note { margin: 36px 0 0; color: #7890a4 !important; font-size: 7.5px !important; text-align: center; }
.terms-paper .paper-footer { margin-top: auto; }

.journey {
  position: sticky;
  top: 77px;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 900px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.journey-step { padding: 20px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: white; text-align: left; }
.journey-step span { display: block; margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 800; }
.journey-step.active { color: white; background: var(--green-dark); }

.scene { min-height: 100vh; padding: 130px clamp(24px, 7vw, 110px) 100px; }
.scene:nth-of-type(even) { background: #e9e4d9; }
.scene-heading { max-width: 760px; margin-bottom: 42px; }
.scene-heading h2 { margin: 0 0 14px; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 64px); font-weight: 400; line-height: 1.05; }
.scene-heading > p:last-child { color: var(--muted); font-size: 17px; }
.split-heading { max-width: none; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.scene-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 28px; }
.scene-grid.single-column { grid-template-columns: minmax(0, 980px); }
.scene-instruction { max-width: 720px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.form-card, .context-card, .totals-card { padding: clamp(24px, 4vw, 48px); background: var(--paper); box-shadow: var(--shadow); }
.form-card { display: grid; gap: 20px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.field-help { color: #7890a6; font-size: 11px; font-weight: 400; }
input[readonly] {
  color: var(--green-dark);
  background: #edf7fd;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: default;
}
input, textarea, select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #bac2bd;
  border-radius: 0;
  padding: 11px 2px;
  color: var(--ink);
  background: transparent;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.context-card { position: relative; overflow: hidden; align-self: stretch; }
.context-card.dark { color: white; background: var(--green-dark); }
.context-number { position: absolute; right: -10px; top: -36px; color: rgba(198, 138, 82, .16); font-family: Georgia, serif; font-size: 180px; line-height: 1; }
.context-card h3 { position: relative; margin-top: 100px; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.context-card p { position: relative; color: var(--muted); line-height: 1.7; }
.context-card.dark p { color: #d8e1dc; }
.tip { margin-top: 40px; padding: 18px; border-left: 3px solid var(--accent); background: #f6f3ed; color: var(--muted); font-size: 13px; line-height: 1.55; }
.context-card dl { position: relative; margin-top: 40px; }
.context-card dl div { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); }
.context-card dt { color: #aebdb5; }
.context-card dd { margin: 0; font-weight: 700; }

.items-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.catalog { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.catalog-label { width: 100%; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.catalog button { padding: 10px 14px; border: 1px solid var(--sand); border-radius: 30px; color: var(--green-dark); background: #f8f6f1; }
.saved-price-catalog {
  margin-top: -4px;
  padding: 14px;
  border: 1px dashed #b7dcee;
  background: #f7fbfe;
}
.saved-price-catalog:empty { display: none; }
.saved-price-catalog .catalog-label { color: #1769a6; }
.saved-price-catalog button { background: white; }
.saved-price-catalog { display: none !important; }
.items-editor { display: grid; gap: 14px; }
.item-card { display: grid; grid-template-columns: 54px 1fr 36px; gap: 14px; padding: 24px; background: var(--paper); box-shadow: 0 10px 30px rgba(28,42,35,.06); }
.item-index { color: var(--accent); font-family: Georgia, serif; font-size: 22px; }
.item-fields { display: grid; gap: 8px; }
.item-title { font-size: 18px; font-weight: 800; }
.item-description { color: var(--muted); line-height: 1.45; }
.item-numbers { display: grid; grid-template-columns: 100px 100px 1fr 140px; gap: 16px; align-items: end; }
.item-numbers strong { padding-bottom: 10px; text-align: right; color: var(--green-dark); font-size: 18px; }
.save-item-price {
  justify-self: start;
  width: fit-content;
  margin-top: 2px;
  padding: 8px 12px;
  border: 1px solid #b7dcee;
  border-radius: 999px;
  color: #15568e;
  background: #f4fbfe;
  font-size: 12px;
  font-weight: 700;
}
.remove-item { align-self: start; border: 0; color: #9a5f51; background: transparent; font-size: 24px; }
.totals-card { position: sticky; top: 170px; display: grid; gap: 16px; background: var(--green-dark); color: white; }
.totals-card > div, .totals-card > label { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); color: #c6d1cb; }
.totals-card label input[type="number"] { width: 58px; color: white; border-color: rgba(255,255,255,.3); text-align: right; }
.switch-label input { width: auto; accent-color: var(--accent); }
.grand-total { margin-top: 6px; border: 0 !important; }
.grand-total strong { color: #f2c594; font-family: Georgia, serif; font-size: 29px; }
.totals-card small { color: #94a59c; }

.export-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quote-paper {
  width: min(100%, 1100px);
  min-height: 1420px;
  margin: 0 auto;
  padding: 60px;
  background: white;
  box-shadow: var(--shadow);
  color: #1d2722;
}
.paper-header, .paper-title, .paper-meta, .paper-bottom, .paper-footer { display: flex; justify-content: space-between; gap: 30px; }
.paper-header { align-items: center; padding-bottom: 24px; border-bottom: 1px solid #9da8a2; }
.paper-brand { display: flex; align-items: center; gap: 14px; }
.paper-logo-image { width: 82px; height: 54px; object-fit: contain; }
.paper-brand strong { display: block; font-size: 24px; }
.paper-brand span, .paper-company span { display: block; color: #5f6964; font-size: 11px; line-height: 1.6; }
.paper-company { text-align: right; }
.paper-title { align-items: end; padding: 38px 0 24px; }
.paper-title > div > span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.paper-title h3 { margin: 7px 0 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.paper-title > strong { color: var(--green-dark); }
.paper-meta { margin-bottom: 28px; background: #f2f0ea; }
.paper-meta section { flex: 1; padding: 24px; }
.paper-meta section + section { border-left: 1px solid #d6d7d2; }
.quote-paper h4 { margin: 0 0 14px; color: var(--green-dark); font-size: 11px; letter-spacing: .14em; }
.quote-paper p { margin: 5px 0; font-size: 11px; line-height: 1.55; }
.paper-description { margin-bottom: 24px; padding: 0 2px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.paper-table th { padding: 11px 8px; color: white; background: var(--green-dark); font-size: 9px; letter-spacing: .08em; text-align: right; }
.paper-table th:nth-child(1), .paper-table th:nth-child(2) { text-align: left; }
.paper-table td { padding: 13px 8px; border-bottom: 1px solid #d9ddd9; vertical-align: top; text-align: right; }
.paper-table td:nth-child(1), .paper-table td:nth-child(2) { text-align: left; }
.paper-table td:nth-child(2) strong { display: block; margin-bottom: 4px; font-size: 11px; }
.paper-table td:nth-child(2) span { color: #69736e; line-height: 1.45; }
.paper-bottom { margin-top: 30px; align-items: start; }
.provider { flex: 1; }
.paper-totals { width: 360px; }
.paper-totals > div { display: flex; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #d9ddd9; font-size: 10px; }
.paper-grand-total { margin-top: 6px; padding: 16px 10px !important; border: 0 !important; color: white; background: var(--green-dark); }
.paper-grand-total strong { font-size: 18px; }
.paper-footer { margin-top: 80px; padding-top: 15px; border-top: 1px solid #9da8a2; color: #66706b; font-size: 9px; letter-spacing: .08em; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero-orbit { min-height: 380px; }
  .admin-home { grid-template-columns: 1fr; gap: 20px; }
  .admin-summary { width: 100%; }
  .admin-create { justify-self: start; }
  .scene-grid, .items-layout { grid-template-columns: 1fr; }
  .totals-card { position: static; }
  .split-heading { align-items: start; flex-direction: column; }
  .journey-step { padding: 13px; font-size: 11px; }
  .quote-paper { padding: 28px; min-height: auto; }
  .item-numbers { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .save-state, .ghost-button { display: none; }
  .brand small { display: none; }
  .field-row, .paper-meta, .paper-bottom { display: grid; grid-template-columns: 1fr; }
  .paper-meta section + section { border-left: 0; border-top: 1px solid #d6d7d2; }
  .paper-header { align-items: start; }
  .paper-company { display: none; }
  .paper-title { align-items: start; flex-direction: column; }
  .paper-totals { width: 100%; }
  .export-actions { width: 100%; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-summary div + div { border-top: 1px solid var(--line); border-left: 0; }
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { background: white; }
  .topbar, .hero, .admin-home, .journey, .scene:not(#resumen), #resumen > .scene-heading { display: none !important; }
  #resumen { min-height: auto; padding: 0; background: white; }
  .quote-paper { width: 100%; min-height: auto; padding: 0; box-shadow: none; zoom: .75; }
  .paper-footer { margin-top: 32px; }
  .paper-table tr, .paper-meta, .paper-bottom { break-inside: avoid; }
}

/* ModernHome visual identity */
:root {
  --ink: #102f57;
  --muted: #5e7188;
  --cream: #eef6fc;
  --sand: #c7dff1;
  --green: #1678c4;
  --green-dark: #0a4f9f;
  --accent: #50b9e9;
  --line: #cbddeb;
  --shadow: 0 22px 70px rgba(10, 79, 159, .14);
}

.topbar {
  background: rgba(238, 246, 252, .92);
  border-bottom-color: rgba(10, 79, 159, .1);
}
.primary-button { box-shadow: 0 12px 30px rgba(10, 79, 159, .24); }
.hero {
  background:
    linear-gradient(118deg, transparent 0 63%, rgba(80,185,233,.12) 63% 69%, transparent 69%),
    linear-gradient(132deg, transparent 0 72%, rgba(10,79,159,.08) 72% 82%, transparent 82%);
}
.hero-orbit::before { border-color: rgba(10, 79, 159, .25); }
.scene:nth-of-type(even) { background: #e3f0f9; }
.context-card.dark p { color: #d9edfb; }
.context-card dt { color: #b8d9f0; }
.tip { border-left-color: var(--accent); background: #eff8fe; }
.catalog button { background: #f5fbff; }
.item-card {
  border-left: 5px solid var(--accent);
  box-shadow: 0 10px 30px rgba(10,79,159,.08);
}
.totals-card > div, .totals-card > label { color: #d7ebf8; }
.grand-total strong { color: #77d3f4; }
.totals-card small { color: #b7d6e9; }

.quote-paper {
  position: relative;
  overflow: hidden;
  color: #16375f;
}
.paper-accent-bars {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 28px;
  margin: -60px -60px 22px;
  overflow: hidden;
  background: #e5f4fc;
}
.paper-accent-bars span {
  width: 34%;
  margin-left: -6%;
  transform: skewX(-30deg);
}
.paper-accent-bars span:nth-child(1) { width: 43%; margin-left: -8%; background: #07458f; }
.paper-accent-bars span:nth-child(2) { background: #0868b7; }
.paper-accent-bars span:nth-child(3) { background: #28a8df; }
.paper-accent-bars span:nth-child(4) { background: #83d2f1; }
.paper-header {
  padding-bottom: 11px;
  border-bottom: 1px solid #9dcce7;
}
.paper-logo-image { width: 68px; height: 42px; }
.paper-brand strong { font-size: 19px; }
.paper-brand span, .paper-company span { font-size: 9px; line-height: 1.45; }
.paper-brand span, .paper-company span { color: #607994; }
.paper-title {
  position: relative;
  align-items: center;
  margin: 12px 0 10px;
  padding: 10px 16px;
  color: white;
  background:
    linear-gradient(120deg, #07458f 0 62%, transparent 62%),
    linear-gradient(120deg, #0868b7 0 79%, transparent 79%),
    linear-gradient(120deg, #28a8df 0 91%, #83d2f1 91%);
}
.paper-title::after {
  display: none;
}
.paper-title > div > span { color: #bce8fa; }
.paper-title > div > span b { margin-left: 12px; color: white; }
.paper-title > strong { color: white; }
.paper-title h3 { margin-top: 3px; font-family: "Segoe UI", Arial, sans-serif; font-size: 17px; font-weight: 600; }
.paper-title > strong { font-size: 10px; letter-spacing: .12em; }
.paper-meta {
  display: grid;
  grid-template-columns: 1fr 1.45fr .75fr .9fr;
  gap: 0;
  margin-bottom: 10px;
  border: 1px solid #bcd8eb;
  background: white;
}
.paper-meta section { min-width: 0; padding: 9px 11px; }
.paper-meta section + section { border-left: 1px solid #bcd8eb; }
.paper-meta h4 { margin-bottom: 5px; font-size: 8px; }
.paper-meta p { margin: 2px 0; font-size: 9px; line-height: 1.35; }
.paper-description {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-top: 1px solid #bcd8eb;
  border-bottom: 1px solid #bcd8eb;
  border-left: 5px solid #1678c4;
  background: #f7fbfe;
}
.paper-description h4 { margin-bottom: 4px; font-size: 8px; }
.paper-description p { margin: 0; font-size: 9px; line-height: 1.4; }
.paper-table th {
  border-right: 1px solid rgba(255,255,255,.2);
  background: #0a4f9f;
}
.paper-table td { border-bottom-color: #c8deed; }
.paper-table tbody tr:nth-child(even) { background: #f3f9fd; }
.paper-table td:nth-child(2) span { color: #637b91; }
.paper-totals > div { border-bottom-color: #c8deed; }
.paper-footer {
  position: relative;
  margin-top: 24px;
  padding: 9px 14px;
  overflow: hidden;
  border-top: 0;
  color: white;
  background:
    linear-gradient(120deg, #07458f 0 63%, transparent 63%),
    linear-gradient(120deg, #0868b7 0 80%, transparent 80%),
    linear-gradient(120deg, #28a8df 0 91%, #83d2f1 91%);
}

.saved-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  border: 0;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 100px rgba(10,79,159,.28);
}
.saved-dialog::backdrop { background: rgba(7,34,66,.58); backdrop-filter: blur(5px); }
.saved-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 30px 32px 20px;
  border-top: 10px solid var(--green-dark);
  border-bottom: 1px solid var(--line);
}
.saved-dialog-header h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.dialog-close { border: 0; color: var(--green-dark); background: transparent; font-size: 32px; line-height: 1; }
.saved-help { margin: 0; padding: 18px 32px; color: var(--muted); background: #f2f8fc; }
.saved-list { display: grid; gap: 10px; padding: 20px 32px 32px; overflow: auto; }
.saved-empty { padding: 32px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.saved-quote {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
}
.saved-quote h3 { margin: 0 0 6px; font-size: 17px; }
.saved-quote p { margin: 3px 0; color: var(--muted); font-size: 13px; }
.saved-quote strong { color: var(--green-dark); }
.saved-quote button { padding: 10px 15px; border: 0; color: white; background: var(--green-dark); }
.status-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px 32px 0;
}
.status-card {
  padding: 15px 16px;
  border: 1px solid #c7e4f2;
  border-left: 5px solid #67bce1;
  background: #f7fbfe;
}
.status-card span {
  display: block;
  color: #5e82a0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.status-card strong {
  display: block;
  margin-top: 5px;
  color: #0a4f9f;
  font-size: 26px;
}
.status-card.approved { border-left-color: #2589c4; }
.status-card.pending { border-left-color: #67bce1; }
.status-card.cancelled { border-left-color: #7890a4; }
.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 32px 0;
}
.status-filters button {
  padding: 9px 13px;
  border: 1px solid #b7dcee;
  border-radius: 999px;
  color: #15568e;
  background: white;
  font-weight: 700;
}
.status-filters button.active {
  color: white;
  border-color: #0a4f9f;
  background: #0a4f9f;
}
.saved-quote {
  grid-template-columns: 1fr minmax(210px, auto);
}
.saved-quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0a4f9f;
  background: #eaf7fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.status-badge.status-aprobada {
  color: #0a4f9f;
  background: #dff2fa;
}
.status-badge.status-pendiente {
  color: #15568e;
  background: #eef9fd;
}
.status-badge.status-cancelada {
  color: #526a80;
  background: #eef2f5;
}
.saved-quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}
.saved-quote-actions button {
  padding: 9px 11px;
  border: 1px solid #b7dcee;
  color: #15568e;
  background: white;
  font-size: 12px;
  font-weight: 700;
}
.saved-quote-actions button[data-load-quote] {
  color: white;
  border-color: #0a4f9f;
  background: #0a4f9f;
}
.saved-quote-actions button[data-set-status="Cancelada"] {
  color: #526a80;
  border-color: #cbddeb;
  background: #f5f8fa;
}
.saved-quote-actions button[data-delete-quote] {
  color: #394b5c;
  border-color: #cbd5df;
  background: #eef2f5;
}
.price-dialog { width: min(920px, calc(100vw - 32px)); }
.price-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr .7fr .8fr;
  gap: 16px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
}
.price-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.price-list { padding-top: 18px; }
.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #67bce1;
  background: #fbfdfe;
}
.price-row h3 { margin: 0 0 5px; color: var(--green-dark); font-size: 16px; }
.price-row p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.price-row-actions { display: flex; gap: 8px; }
.price-row-actions button {
  padding: 9px 12px;
  border: 1px solid #b7dcee;
  color: #15568e;
  background: white;
}
.price-row-actions button[data-delete-price] {
  color: #8a3131;
  border-color: #efc9c9;
}

@media print {
  .quote-paper { overflow: visible; }
  .paper-accent-bars { margin: 0 0 18px; }
  .paper-table thead { display: table-header-group; }
  .paper-table { break-inside: auto; }
  .paper-table tr, .paper-meta, .paper-bottom, .paper-description { break-inside: avoid; }
}

/* A4 portrait document canvas */
.quote-paper {
  width: min(100%, 794px);
  min-height: 1123px;
  padding: 38px;
}
.paper-accent-bars { margin: -38px -38px 18px; }
.paper-meta {
  grid-template-columns: 1fr 1.35fr;
}
.paper-meta section:nth-child(3),
.paper-meta section:nth-child(4) {
  border-top: 1px solid #bcd8eb;
}
.paper-meta section:nth-child(3) { border-left: 0; }
.paper-table {
  table-layout: fixed;
  font-size: 8.5px;
}
.paper-table th:nth-child(1) { width: 7%; }
.paper-table th:nth-child(2) { width: 51%; }
.paper-table th:nth-child(3) { width: 8%; }
.paper-table th:nth-child(4) { width: 9%; }
.paper-table th:nth-child(5) { width: 12%; }
.paper-table th:nth-child(6) { width: 13%; }
.paper-table th { padding: 8px 5px; font-size: 7.5px; }
.paper-table td { padding: 10px 5px; }
.paper-table td:nth-child(2) strong { font-size: 9.5px; }
.paper-table td:nth-child(2) span { font-size: 8px; }
.paper-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 28px;
}
.paper-totals { width: 100%; }

@media (max-width: 840px) {
  .quote-paper { min-height: auto; padding: 24px; }
  .paper-accent-bars { margin: -24px -24px 16px; }
}

@media print {
  html, body { width: 210mm; }
  .quote-paper {
    width: 190mm;
    min-height: 277mm;
    margin: 0;
    padding: 0;
    overflow: visible;
    box-shadow: none;
    zoom: 1;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .paper-accent-bars { margin: 0 0 5mm; }
  .paper-meta { grid-template-columns: 1fr 1.35fr; }
  .paper-bottom { grid-template-columns: minmax(0, 1fr) 72mm; }
}

/* Professional quotation sheet */
.quote-paper {
  border: 0;
  outline: 0;
}
.paper-meta {
  position: relative;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin: 0 0 9px;
  border: 1px solid #b5d7ec;
  background:
    linear-gradient(127deg, rgba(255,255,255,.22) 0 14%, transparent 14% 49%, rgba(255,255,255,.42) 49% 58%, transparent 58%),
    linear-gradient(58deg, transparent 0 71%, rgba(255,255,255,.72) 71% 100%),
    linear-gradient(90deg, #d9f0fb 0%, #c8e7f7 48%, #eaf7fd 100%);
}
.paper-meta::before,
.paper-meta::after {
  content: "";
  position: absolute;
  top: -50%;
  height: 210%;
  transform: rotate(28deg);
  pointer-events: none;
}
.paper-meta::before {
  left: 31%;
  width: 9%;
  background: rgba(59, 160, 216, .08);
}
.paper-meta::after {
  right: 14%;
  width: 18%;
  background: rgba(255,255,255,.3);
}
.paper-info-panel {
  position: relative;
  z-index: 1;
  min-height: 108px;
  padding: 14px 18px !important;
}
.paper-info-panel + .paper-info-panel {
  border-left: 1px solid rgba(75, 155, 203, .2) !important;
}
.paper-info-panel h4 {
  position: relative;
  margin-bottom: 11px;
  padding-bottom: 7px;
  color: #1265a9;
  font-size: 10px;
  letter-spacing: .04em;
}
.paper-info-panel h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72%;
  height: 4px;
  background:
    linear-gradient(90deg, #98cdec 0 42%, transparent 42% 51%, #98cdec 51% 100%);
}
.paper-info-panel p {
  margin: 2px 0;
  color: #465b70;
  font-size: 9.5px;
  line-height: 1.35;
}
.paper-info-panel b { color: #33485e; }
.paper-document-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 9px;
  border: 1px solid #c2deef;
  background: #f7fbfe;
}
.paper-document-strip div {
  min-width: 0;
  padding: 7px 10px;
}
.paper-document-strip div + div { border-left: 1px solid #c2deef; }
.paper-document-strip span {
  display: block;
  margin-bottom: 3px;
  color: #5e82a0;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: .12em;
}
.paper-document-strip strong {
  display: block;
  overflow: hidden;
  color: #103f75;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paper-note {
  align-self: start;
  padding: 12px 14px;
  border-left: 4px solid #75c4e9;
  background: #f3f9fd;
}
.paper-note h4 { margin-bottom: 6px; font-size: 8px; }
.paper-note p { margin: 0; color: #5b7084; font-size: 8.5px; line-height: 1.45; }

@media (max-width: 650px) {
  .terms-editor-grid { grid-template-columns: 1fr; }
  .terms-editor-wide { grid-column: auto; }
  .paper-meta { grid-template-columns: 1fr; }
  .paper-info-panel + .paper-info-panel { border-top: 1px solid #b5d7ec; border-left: 0 !important; }
  .paper-document-strip { grid-template-columns: 1fr 1fr; }
  .paper-document-strip div:nth-child(3) { border-top: 1px solid #c2deef; border-left: 0; }
  .paper-document-strip div:nth-child(4) { border-top: 1px solid #c2deef; }
}

@media print {
  .quote-paper {
    width: 184mm;
    min-height: 271mm;
    margin: 0 auto;
    border: 0;
    outline: 0;
  }
  .paper-info-panel { min-height: 27mm; }
  .paper-document-strip { grid-template-columns: repeat(4, 1fr); }
  .paper-bottom { grid-template-columns: minmax(0, 1fr) 70mm; }
  .quote-document { display: block; }
  .terms-paper { page-break-before: always; break-before: page; }
}

/* Clean celestial document palette */
.paper-accent-bars {
  height: 16px;
  background: #f3fbff;
}
.paper-accent-bars span:nth-child(1) { background: #7bc8ea; }
.paper-accent-bars span:nth-child(2) { background: #9bd9f2; }
.paper-accent-bars span:nth-child(3) { background: #bce8f8; }
.paper-accent-bars span:nth-child(4) { background: #e1f5fc; }
.paper-title {
  color: #123f72;
  border: 1px solid #b7dcee;
  border-left: 6px solid #55b5df;
  background:
    linear-gradient(120deg, rgba(143,210,239,.22) 0 64%, transparent 64%),
    linear-gradient(120deg, rgba(190,232,248,.45) 0 82%, transparent 82%),
    #f8fcfe;
}
.paper-title > div > span { color: #2678b2; }
.paper-title > div > span b { color: #15568e; }
.paper-title > strong { color: #15568e; }
.paper-table th {
  color: #174d7f;
  border-top: 1px solid #afd8ec;
  border-bottom: 2px solid #70bfe2;
  border-right: 1px solid #c7e4f2;
  background: #e9f6fc;
}
.paper-table tbody tr:nth-child(even) { background: #f7fbfd; }
.paper-grand-total {
  color: #123f72;
  border: 1px solid #9fd3ea !important;
  border-left: 6px solid #55b5df !important;
  background: #dff2fb;
}
.paper-grand-total strong { color: #0b4d82; }
.paper-footer {
  color: #174d7f;
  border-top: 1px solid #a8d5e9;
  background:
    linear-gradient(120deg, rgba(120,199,233,.35) 0 63%, transparent 63%),
    linear-gradient(120deg, rgba(165,221,244,.48) 0 81%, transparent 81%),
    #eaf7fc;
}
.paper-info-panel h4::after {
  background:
    linear-gradient(90deg, #70bfe2 0 42%, transparent 42% 51%, #a2d7ed 51% 100%);
}

/* Final document system */
.quote-document,
.quote-paper,
.quote-paper * {
  font-family: "Segoe UI", Arial, sans-serif;
}
.quote-paper {
  color: #173b5f;
  font-size: 10px;
  line-height: 1.4;
}
.quote-paper h3,
.quote-paper h4,
.quote-paper strong { font-family: inherit; }
.paper-brand strong { font-size: 18px; font-weight: 700; }
.paper-title h3 { font-size: 16px; font-weight: 650; }
.paper-title > div > span,
.paper-title > strong,
.quote-paper h4 { font-weight: 700; }
.paper-info-panel p,
.paper-description p,
.paper-note p,
.terms-section p,
.terms-bank p { color: #425c73; }
.terms-compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #b9dceb;
}
.terms-compact-header img { width: 76px; height: 42px; object-fit: contain; }
.terms-compact-header div { text-align: right; }
.terms-compact-header strong,
.terms-compact-header span { display: block; }
.terms-compact-header strong { color: #1769a6; font-size: 9px; letter-spacing: .14em; }
.terms-compact-header span { margin-top: 3px; color: #5e7890; font-size: 8px; }
.terms-title {
  margin: 16px 0 14px;
  padding: 11px 14px;
  border: 1px solid #c9e3ef;
  border-left: 5px solid #67bce1;
  background: #f5fbfd;
}
.terms-title h3 { margin: 0; font-size: 16px; font-weight: 650; }
.terms-acceptance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.acceptance-card {
  padding: 13px;
  border: 1px solid #c8dfeb;
  background: #fbfdfe;
}
.acceptance-card > span {
  display: block;
  color: #1769a6;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .1em;
}
.signature-space {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 48px;
  margin: 8px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #7c9bb1;
  color: #90a5b5;
  font-size: 7px;
}
.acceptance-card p { margin: 5px 0; color: #587084; font-size: 7.5px; }

/* Reliable PDF finishing */
.paper-footer {
  color: #174d7f;
  background: #eaf7fc;
}
.terms-acceptance .acceptance-card {
  height: auto;
  min-height: 105px;
  border: 1px solid #c8dfeb;
  background: #fbfdfe;
}
.terms-acceptance .acceptance-card > span {
  padding-top: 0;
  text-align: left;
}
.terms-acceptance .signature-space {
  height: 38px;
  margin: 7px 0 8px;
}
.terms-legal-note { margin-top: 16px; }

/* Final ModernHome PDF palette: blue only, without gradients */
.quote-paper .paper-accent-bars {
  background: #eaf7fc;
}
.quote-paper .paper-accent-bars span:nth-child(1) { background: #1265a9; }
.quote-paper .paper-accent-bars span:nth-child(2) { background: #2589c4; }
.quote-paper .paper-accent-bars span:nth-child(3) { background: #67bce1; }
.quote-paper .paper-accent-bars span:nth-child(4) { background: #bfe8f7; }
.quote-paper .paper-title {
  color: #123f72;
  background: #edf8fc;
}
.quote-paper .paper-meta {
  background: #e7f5fb;
}
.quote-paper .paper-meta::before,
.quote-paper .paper-meta::after {
  display: none;
}
.quote-paper .paper-info-panel h4::after {
  background: #67bce1;
}
.quote-paper .paper-footer {
  color: #174d7f;
  background: #dff2fa;
}
.paper-logo-image {
  width: 104px;
  height: 58px;
  image-rendering: auto;
}
.paper-brand {
  gap: 18px;
}
.paper-brand strong {
  font-size: 20px;
}
.paper-brand span {
  max-width: 285px;
  color: #315d82;
  font-size: 9.5px;
  font-weight: 600;
}
.terms-compact-header img {
  width: 112px;
  height: 58px;
  image-rendering: auto;
}

@media print {
  @page { size: A4 portrait; margin: 5mm; }
  html, body { width: auto; margin: 0; }
  .provider-editor { display: none !important; }
  .quote-paper {
    width: 200mm;
    min-height: 287mm;
    margin: 0 auto;
    border: 0;
  }
}

.terms-future-annex[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .price-form { grid-template-columns: 1fr; padding: 18px; }
  .price-row { grid-template-columns: 1fr; }
  .price-row-actions { justify-content: flex-start; }
}

/* Softer PDF header blocks */
.quote-paper .paper-title {
  margin: 12px 0 12px;
  padding: 8px 0 12px 14px;
  border: 0;
  border-left: 5px solid #55b5df;
  border-bottom: 1px solid #cfe8f3;
  background: transparent;
}
.quote-paper .paper-title h3 {
  margin-top: 5px;
}
.quote-paper .paper-title > strong {
  align-self: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #15568e;
  background: #eaf7fc;
}
.quote-paper .paper-document-strip {
  margin: 0 0 10px;
  border: 0;
  border-top: 1px solid #d6ebf4;
  border-bottom: 1px solid #d6ebf4;
  background: transparent;
}
.quote-paper .paper-document-strip div {
  padding: 8px 10px 7px 0;
}
.quote-paper .paper-document-strip div + div {
  border-left: 0;
  padding-left: 14px;
}
.quote-paper .paper-description {
  margin: 0 0 13px;
  padding: 9px 0 10px 13px;
  border: 0;
  border-left: 4px solid #55b5df;
  background: #f4fbfe;
}

/* Softer final PDF: editorial lines instead of boxed blocks */
.quote-paper .paper-document-strip {
  position: relative;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 8px 0;
  border: 0;
  background:
    linear-gradient(90deg, rgba(85,181,223,.45), rgba(85,181,223,0)) 0 100% / 100% 1px no-repeat;
}
.quote-paper .paper-document-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: #67bce1;
}
.quote-paper .paper-document-strip div {
  padding: 6px 0;
}
.quote-paper .paper-document-strip div + div {
  padding-left: 0;
}
.quote-paper .paper-document-strip span {
  color: #7a95aa;
  font-size: 6px;
}
.quote-paper .paper-document-strip strong {
  color: #123f72;
  font-size: 9px;
}
.quote-paper .paper-description {
  position: relative;
  margin: 2px 0 14px;
  padding: 8px 0 10px 16px;
  border: 0;
  background: transparent;
}
.quote-paper .paper-description::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(#2589c4, #9bd9f2);
}
.quote-paper .paper-description h4 {
  margin-bottom: 5px;
  color: #1769a6;
}
.quote-paper .paper-description p {
  max-width: 96%;
}

/* Didactic price library */
.price-dialog {
  width: min(1080px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(103,188,225,.2), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f6fbfe 100%);
}
.price-dialog .saved-dialog-header {
  position: relative;
  padding-bottom: 18px;
  border-top: 0;
  border-bottom: 1px solid rgba(103,188,225,.32);
  background:
    linear-gradient(120deg, rgba(18,101,169,.08), rgba(103,188,225,.16)),
    #ffffff;
}
.price-dialog .saved-dialog-header::before {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  top: 0;
  height: 8px;
  background:
    linear-gradient(120deg, #1265a9 0 32%, #2589c4 32% 58%, #67bce1 58% 78%, #bfe8f7 78%);
}
.price-orbit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px 32px 0;
}
.price-orbit span {
  padding: 12px 14px;
  border: 1px solid rgba(103,188,225,.32);
  border-radius: 999px;
  color: #1769a6;
  background: rgba(255,255,255,.75);
  box-shadow: 0 12px 28px rgba(10,79,159,.08);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.price-form {
  grid-template-columns: .9fr 1.35fr .6fr .75fr;
  margin: 18px 32px 8px;
  padding: 20px;
  border: 1px solid rgba(103,188,225,.32);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 18px 48px rgba(10,79,159,.1);
}
.price-list {
  display: grid;
  gap: 20px;
  padding: 18px 32px 34px;
}
.price-area-group {
  padding: 18px;
  border: 1px solid rgba(103,188,225,.28);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(234,247,252,.72), rgba(255,255,255,.92));
}
.price-area-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.price-area-heading span {
  color: #0a4f9f;
  font-size: 18px;
  font-weight: 800;
}
.price-area-heading strong {
  padding: 7px 11px;
  border-radius: 999px;
  color: #1769a6;
  background: #eaf7fc;
  font-size: 11px;
}
.price-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.price-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 310px;
  padding: 17px;
  border: 1px solid rgba(103,188,225,.28);
  border-left: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 34px rgba(10,79,159,.08);
}
.price-row-main h3 {
  margin: 8px 0 7px;
  color: #123f72;
  font-size: 16px;
}
.price-row-main > strong {
  display: block;
  color: #0a4f9f;
  font-size: 20px;
}
.price-row-main p {
  margin: 9px 0 0;
  color: #5e7188;
  font-size: 12px;
  line-height: 1.45;
}
.price-breakdown {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
  padding: 11px 0 0;
  border-top: 1px solid rgba(103,188,225,.28);
}
.price-breakdown div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
}
.price-breakdown dt {
  color: #1769a6;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.price-breakdown dd {
  margin: 0;
  color: #526a80;
  font-size: 11px;
  line-height: 1.35;
}
.price-unit {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1769a6;
  background: #eaf7fc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.price-row-actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.price-row-actions button {
  border-radius: 999px;
}
.price-row-actions button[data-delete-price] {
  color: #526a80;
  border-color: #cbddeb;
  background: #f5f8fa;
}
.price-empty {
  display: grid;
  gap: 8px;
  border-radius: 22px;
  background: rgba(255,255,255,.75);
}
.price-empty strong {
  color: #0a4f9f;
  font-size: 18px;
}
.price-empty span {
  color: #5e7188;
}

@media (max-width: 760px) {
  .price-orbit { grid-template-columns: 1fr 1fr; padding-inline: 18px; }
  .price-form { margin-inline: 18px; grid-template-columns: 1fr; }
  .price-list { padding-inline: 18px; }
}

/* Formal commercial price library */
.price-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
}
.price-orbit {
  display: none;
}
.price-dialog .saved-help {
  padding: 14px 32px;
  background: #f7fbfe;
  border-bottom: 1px solid rgba(103,188,225,.18);
}
.price-area-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 14px 32px 0;
}
.price-area-tabs button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid #c9e3ef;
  border-radius: 12px;
  color: #1769a6;
  background: white;
  box-shadow: 0 10px 24px rgba(10,79,159,.06);
  font-weight: 800;
}
.price-area-tabs button.active {
  color: white;
  border-color: #0a4f9f;
  background: #0a4f9f;
}
.price-area-tabs strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #0a4f9f;
  background: #eaf7fc;
  font-size: 12px;
}
.price-area-tabs button.active strong {
  color: #0a4f9f;
  background: white;
}
.price-form {
  margin: 16px 32px 10px;
  border-radius: 12px;
  box-shadow: none;
}
.price-list {
  max-height: min(440px, calc(100vh - 360px));
  overflow: auto;
  gap: 14px;
  padding-top: 10px;
}
.price-area-group {
  padding: 0;
  border-radius: 14px;
  background: white;
}
.price-area-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #d8ecf5;
  background: #edf8fc;
}
.price-area-heading span {
  font-size: 15px;
}
.price-table {
  display: grid;
}
.price-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 120px minmax(260px, 1.35fr) auto;
  gap: 14px;
  align-items: center;
  min-height: auto;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #e1eff6;
  box-shadow: none;
}
.price-row:last-child {
  border-bottom: 0;
}
.price-row-title {
  display: grid;
  gap: 4px;
}
.price-row-title strong {
  color: #123f72;
  font-size: 14px;
}
.price-row-title small {
  color: #607994;
  font-size: 11px;
  line-height: 1.35;
}
.price-row-value {
  color: #0a4f9f;
  font-size: 17px;
  font-weight: 800;
  text-align: right;
}
.price-row-detail {
  display: grid;
  gap: 3px;
  color: #526a80;
  font-size: 10.5px;
  line-height: 1.25;
}
.price-row-detail b {
  color: #1769a6;
}
.price-row-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
}
.price-row-actions button {
  min-width: 118px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
}
.price-row-actions button[data-use-price] {
  color: white;
  border-color: #0a4f9f;
  background: #0a4f9f;
}

@media (max-width: 920px) {
  .price-area-tabs {
    grid-template-columns: 1fr 1fr;
  }
  .price-row {
    grid-template-columns: 1fr;
  }
  .price-row-value {
    text-align: left;
  }
  .price-row-actions {
    display: flex;
    flex-wrap: wrap;
  }
}
