:root {
  --ink: #15201d;
  --muted: #66736f;
  --paper: #f7f5ef;
  --white: #ffffff;
  --line: #dedbd2;
  --steel: #2e4244;
  --clay: #b95638;
  --moss: #6a7a45;
  --gold: #d7a548;
  --shadow: 0 22px 55px rgba(21, 32, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid rgba(222, 219, 210, 0.8);
  backdrop-filter: blur(16px);
}

.brand,
.panel-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 42px;
  padding: 0 12px;
  background: linear-gradient(135deg, #6f1428 0%, #8b1e34 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(21, 32, 29, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.brand small,
.panel-brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #3e4b48;
  font-weight: 650;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-select {
  display: inline-flex;
  align-items: center;
}

.language-select select {
  min-height: 42px;
  min-width: 96px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ghost-button,
.secondary-button,
.primary-button,
.project-tabs button,
.panel-nav,
.close-panel {
  min-height: 42px;
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.ghost-button {
  padding: 0 16px;
  background: var(--ink);
  color: var(--white);
}

.ghost-button.light {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.app-view {
  display: none;
}

body.show-client .public-view,
body.show-client .site-footer,
body.show-company .public-view,
body.show-company .site-footer {
  display: none;
}

body.show-client #area-cliente,
body.show-company #area-empresa {
  display: block;
}

.hero-section {
  position: relative;
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 32px;
  padding: 120px clamp(18px, 5vw, 72px) 56px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(16, 25, 23, 0.85) 0%, rgba(16, 25, 23, 0.55) 48%, rgba(16, 25, 23, 0.12) 100%),
    url("https://images.pexels.com/photos/15124969/pexels-photo-15124969.jpeg?auto=compress&cs=tinysrgb&w=1800") center / cover;
}

.hero-copy {
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.18;
}

.hero-text {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.primary-button {
  background: var(--clay);
  color: var(--white);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.hero-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-card span,
.hero-card small,
.kpi-grid span,
.kpi-grid small {
  color: var(--muted);
}

.hero-card strong {
  display: block;
  margin: 8px 0 20px;
  font-size: 30px;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mini-grid div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mini-grid b {
  display: block;
  font-size: 24px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  padding: 26px clamp(18px, 4vw, 52px);
  background: var(--white);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 6px;
  color: var(--muted);
}

.section {
  padding: 86px clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.about-section {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.about-card {
  padding: 28px;
  background: #fbfaf6;
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
  height: 100%;
}

.about-card p,
.about-card span {
  color: var(--muted);
  line-height: 1.6;
}

.about-card.lead {
  background: linear-gradient(135deg, rgba(21, 32, 29, 0.96) 0%, rgba(46, 66, 68, 0.92) 100%);
  color: var(--white);
}

.about-card.lead p,
.about-card.lead strong {
  color: rgba(255, 255, 255, 0.82);
}

.about-card.stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: stretch;
}

.about-card.stats div {
  padding: 6px 0;
  border-top: 0;
}

.about-card.stats div:first-child {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.about-card.stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

.service-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.project-card,
.work-card,
.kpi-grid article {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.service-card img {
  height: 230px;
  object-fit: cover;
}

.service-card div,
.project-card div {
  padding: 22px;
}

.service-card p,
.project-card span,
.feature-copy p,
.quote-copy p,
.work-card p,
.site-footer span {
  color: var(--muted);
  line-height: 1.55;
}

.service-link-row {
  margin-top: 16px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.service-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  min-height: 560px;
  background: var(--steel);
  color: var(--white);
}

.feature-image {
  background: url("https://images.pexels.com/photos/3990359/pexels-photo-3990359.jpeg?auto=compress&cs=tinysrgb&w=1400") center / cover;
}

.feature-copy {
  align-self: center;
  padding: clamp(36px, 6vw, 84px);
}

.feature-copy h2 {
  max-width: 18ch;
  text-wrap: balance;
}

.feature-copy p {
  color: rgba(255, 255, 255, 0.74);
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  padding-left: 28px;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  background: var(--gold);
}

.project-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tabs button {
  padding: 0 14px;
  background: var(--white);
  color: var(--steel);
  border: 1px solid var(--line);
}

.project-tabs button.active {
  background: var(--steel);
  color: var(--white);
  border-color: var(--steel);
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  overflow: hidden;
}

.project-card img {
  height: 330px;
  object-fit: cover;
}

.project-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card.is-hidden {
  display: none;
}

.quote-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  padding: 86px clamp(18px, 5vw, 72px);
  background: var(--white);
}

.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.quote-form label {
  display: grid;
  gap: 8px;
  color: #3e4b48;
  font-weight: 750;
}

.quote-form label.wide,
.quote-form button,
.form-status {
  grid-column: 1 / -1;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

.quote-form textarea {
  resize: vertical;
}

.compliance-section {
  padding: 86px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
}

.compliance-section .section-heading {
  max-width: 920px;
}

.compliance-section .section-heading p:not(.eyebrow),
.compliance-grid p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.18);
}

.compliance-grid article {
  min-height: 250px;
  padding: 26px;
  background: #1d2b28;
}

.legal-section {
  padding: 86px clamp(18px, 5vw, 72px);
  background: #fbfaf6;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-card {
  padding: 26px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.legal-card p {
  color: var(--muted);
  line-height: 1.65;
}

.legal-card strong {
  color: var(--ink);
}

.legal-card a,
.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compliance-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 24px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 850;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--moss);
  font-weight: 750;
}

.panel-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 79px);
  background: #f5f6f3;
}

.panel-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--ink);
  color: var(--white);
}

.panel-brand {
  margin-bottom: 24px;
}

.panel-nav,
.close-panel {
  width: 100%;
  padding: 0 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.panel-nav.active {
  background: var(--clay);
  color: var(--white);
}

.close-panel {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.14);
}

.panel-content {
  overflow: auto;
  padding: 30px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-header h2 {
  margin-bottom: 0;
  font-size: 34px;
}

.compact {
  min-height: 38px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-grid article {
  padding: 20px;
}

.kpi-grid strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 32px;
}

.company-overview-grid {
  margin-bottom: 24px;
}

.overview-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.overview-card:hover {
  border-color: rgba(163, 81, 53, 0.45);
  box-shadow: 0 8px 24px rgba(21, 32, 29, 0.08);
}

.overview-card span,
.overview-card small,
.overview-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-card strong {
  margin: 0;
}

.overview-card label {
  display: grid;
  gap: 6px;
}

.overview-card select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  cursor: pointer;
}

.work-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.work-card {
  padding: 20px;
}

.invoice-folder,
.request-folder,
.progress-folder {
  margin-top: 24px;
  padding: 26px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.progress-folder {
  margin: 0 clamp(18px, 5vw, 72px) 70px;
}

.upload-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.upload-form.compact-upload {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-form label {
  display: grid;
  gap: 8px;
  color: #3e4b48;
  font-weight: 750;
}

.upload-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.upload-form label.wide,
.upload-form button,
.upload-form .form-status {
  grid-column: 1 / -1;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.upload-form input[type="file"] {
  min-height: 48px;
  padding: 10px;
  cursor: pointer;
}

.camera-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.camera-button {
  min-height: 48px;
  border: 0;
  background: var(--steel);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
}

.file-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.capture-preview {
  width: min(260px, 100%);
  height: 170px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.upload-form textarea {
  resize: vertical;
}

.upload-list,
.progress-gallery {
  display: grid;
  gap: 14px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.request-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.invoice-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.request-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.invoice-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.invoice-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.request-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.request-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.request-list {
  display: grid;
  gap: 16px;
}

.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.request-card-main h3 {
  margin-bottom: 8px;
}

.request-card-main p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.request-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.request-meta article {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
}

.request-meta span,
.request-files span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.request-meta strong {
  display: block;
  font-size: 16px;
}

.request-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.request-actions label {
  display: grid;
  gap: 8px;
  color: #3e4b48;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.request-actions select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
}

.request-files {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
}

.request-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.request-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--line);
}

.upload-item,
.gallery-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.gallery-item {
  grid-template-columns: 210px 1fr;
}

.upload-item img,
.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--line);
}

.gallery-item img {
  height: 170px;
}

.upload-item span,
.gallery-item span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  margin-bottom: 10px;
  background: #e9e6dd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.upload-item h3,
.gallery-item h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.upload-item p,
.gallery-item p,
.empty-state {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.text-button {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--clay);
  cursor: pointer;
  font-weight: 850;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
}

.view-photo-button::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--steel);
  border-radius: 50%;
}

.view-photo-button::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 26px;
  width: 11px;
  height: 3px;
  background: var(--steel);
  transform: rotate(45deg);
  transform-origin: left center;
}

body.camera-open {
  overflow: hidden;
}

.camera-modal,
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(21, 32, 29, 0.78);
}

.camera-modal[aria-hidden="false"],
.photo-modal[aria-hidden="false"] {
  display: flex;
}

.camera-panel,
.photo-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.camera-header,
.camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.camera-header h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.camera-panel video {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 18px 0;
  background: var(--ink);
  object-fit: contain;
}

.secondary-action {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.camera-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

body.photo-open {
  overflow: hidden;
}

.photo-panel img {
  width: 100%;
  max-height: 68vh;
  margin: 18px 0;
  object-fit: contain;
  background: #f0eee7;
}

.document-preview-panel {
  width: min(1040px, 100%);
}

.document-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0;
}

.document-preview-body {
  padding: 24px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.document-sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  padding: 34px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(21, 32, 29, 0.08);
}

.document-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.document-sheet-title {
  font-size: 30px;
  margin-bottom: 6px;
}

.document-sheet-meta,
.document-sheet-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.document-sheet-meta article,
.document-sheet-summary article {
  padding: 14px;
  background: #fbfaf6;
  border: 1px solid var(--line);
}

.document-sheet-meta span,
.document-sheet-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.document-sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
}

.document-sheet-table th,
.document-sheet-table td {
  padding: 12px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.document-sheet-table th {
  background: #f7f5ef;
  text-align: left;
}

.document-sheet-total {
  display: grid;
  justify-items: end;
  gap: 4px;
  margin-bottom: 18px;
}

.document-sheet-note {
  padding: 14px;
  background: #fbfaf6;
  border: 1px solid var(--line);
  color: #3e4b48;
}

.photo-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.photo-details div {
  padding: 14px;
  background: #fbfaf6;
}

.photo-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.photo-details dd {
  margin: 6px 0 0;
  font-weight: 800;
}

body.quote-open {
  overflow: hidden;
}

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(21, 32, 29, 0.78);
}

.quote-modal[aria-hidden="false"] {
  display: flex;
}

.quote-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quote-template-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.quote-document {
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.quote-doc-header {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.55fr);
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.quote-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-logo span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: var(--clay);
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

.quote-logo strong {
  font-size: 22px;
}

.quote-doc-header > div:last-child,
.quote-fields {
  display: grid;
  gap: 14px;
}

.quote-doc-header > div:last-child {
  grid-template-columns: 1fr 1fr;
}

.quote-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
}

.quote-lines {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.quote-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quote-lines-head h3 {
  margin-bottom: 0;
}

.quote-lines-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.quote-line-list {
  display: grid;
  gap: 10px;
}

.quote-line-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 120px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.quote-line-row.material-row {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) 110px 120px 160px 130px 110px minmax(180px, 0.9fr) minmax(180px, 0.9fr) auto;
}

.quote-line-row.other-row {
  grid-template-columns: minmax(240px, 1fr) 150px 120px auto;
}

.supplier-links-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.supplier-links-bar a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.supplier-links-bar a:hover {
  border-color: rgba(163, 81, 53, 0.45);
  color: var(--accent);
}

.material-search-actions {
  display: grid;
  gap: 6px;
}

.material-search-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.quote-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-left: auto;
  width: min(620px, 100%);
  background: var(--line);
}

.quote-totals div {
  padding: 16px;
  background: var(--white);
}

.quote-totals span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-totals strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.quote-template-form label {
  display: grid;
  gap: 8px;
  color: #3e4b48;
  font-weight: 750;
}

.quote-template-form label.wide {
  grid-column: 1 / -1;
}

.quote-template-form input,
.quote-template-form select,
.quote-template-form textarea,
.saved-quote-meta select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.quote-template-form textarea {
  resize: vertical;
}

.quote-modal-actions {
  display: flex;
  gap: 12px;
}

.panel-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.panel-status {
  min-width: 220px;
  text-align: right;
}

.saved-quotes {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.quote-list-heading h3 {
  margin-bottom: 0;
}

.saved-quote-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
  gap: 18px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.saved-quote-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.saved-quote-card .inline-editor-grid {
  margin-top: 14px;
}

.saved-quote-meta {
  display: grid;
  align-content: start;
  gap: 8px;
}

.saved-quote-meta strong {
  font-size: 20px;
}

.saved-quote-meta span {
  color: var(--muted);
  font-weight: 750;
}

.saved-quote-meta label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.request-editor,
.inline-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.inline-editor-grid.single-column {
  grid-template-columns: 1fr;
}

.request-editor label,
.inline-editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-editor .wide,
.inline-editor-grid .wide {
  grid-column: 1 / -1;
}

.request-editor input,
.request-editor select,
.request-editor textarea,
.inline-editor-grid input,
.inline-editor-grid select,
.inline-editor-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.request-editor textarea,
.inline-editor-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.editable-card {
  display: grid;
  gap: 14px;
}

.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.danger-button {
  color: #7f1029;
}

.company-tab {
  display: none;
}

.company-tab.active {
  display: block;
}

.data-list {
  display: grid;
  gap: 14px;
}

.client-documents-section {
  margin-top: 24px;
}

.client-documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.document-card {
  padding: 22px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.compact-heading {
  margin-bottom: 14px;
}

.data-list article,
.tracking-grid article,
.client-note,
.client-project,
.client-summary,
.roadmap-card,
.payments-card {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.data-list article {
  padding: 22px;
}

.tracking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tracking-grid article {
  min-height: 190px;
  padding: 22px;
}

.area-hero {
  padding: 32px clamp(18px, 5vw, 72px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(21, 32, 29, 0.88), rgba(21, 32, 29, 0.48)),
    url("https://images.pexels.com/photos/5493654/pexels-photo-5493654.jpeg?auto=compress&cs=tinysrgb&w=1800") center / cover;
}

.client-access-panel {
  padding: 32px clamp(18px, 5vw, 72px) 18px;
}

.company-access-panel {
  padding: 32px clamp(18px, 5vw, 72px) 18px;
}

.client-access-card {
  max-width: 720px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(21, 32, 29, 0.08);
}

.company-access-card {
  max-width: 760px;
}

.client-access-card h1 {
  max-width: 18ch;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.04;
  text-transform: uppercase;
}

.client-access-card h1 span {
  display: block;
}

.client-access-card p:not(.eyebrow):not(.form-status):not(.client-access-hint) {
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
}

.client-access-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

.client-access-form label {
  display: grid;
  gap: 8px;
  color: #3e4b48;
  font-weight: 750;
}

.client-access-form input,
.client-access-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.client-access-form .form-status {
  grid-column: 1 / -1;
}

.client-access-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.client-workspace[hidden] {
  display: none;
}

#companyWorkspace[hidden] {
  display: none;
}

.area-hero h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.area-hero p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.back-button {
  min-height: 38px;
  padding: 0 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px) 18px;
}

.client-project {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}

.client-project img {
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.client-project div,
.client-note,
.client-summary {
  padding: 26px;
}

.client-project h2 {
  margin-top: 14px;
  font-size: 28px;
}

.client-summary {
  display: grid;
  align-content: stretch;
  gap: 1px;
  padding: 0;
  background: var(--line);
}

.client-summary div {
  display: grid;
  align-content: center;
  padding: 20px;
  background: var(--white);
}

.client-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 27px;
}

.client-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  grid-template-areas:
    "roadmap payments"
    "roadmap note";
  gap: 18px;
  padding: 0 clamp(18px, 5vw, 72px) 70px;
}

.roadmap-card {
  grid-area: roadmap;
  padding: 26px;
}

.payments-card {
  grid-area: payments;
  padding: 26px;
}

.client-note {
  grid-area: note;
}

.module-heading h2 {
  margin-bottom: 22px;
  font-size: clamp(24px, 3vw, 34px);
}

.roadmap-list,
.payment-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.roadmap-list article,
.payment-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: #fbfaf6;
}

.roadmap-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 750;
}

.roadmap-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--moss);
}

.roadmap-list span {
  min-width: 128px;
  text-align: right;
  color: var(--muted);
  font-weight: 850;
}

.roadmap-list article.complete {
  border-left: 5px solid var(--moss);
}

.roadmap-list article.current {
  border-left: 5px solid var(--clay);
  background: #fff7f1;
}

.payment-list {
  gap: 10px;
  background: transparent;
}

.payment-list article {
  display: block;
  border: 1px solid var(--line);
}

.payment-list span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  margin-bottom: 12px;
  background: #e9e6dd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.payment-list article.paid span {
  background: var(--moss);
  color: var(--white);
}

.payment-list article.due span {
  background: var(--clay);
  color: var(--white);
}

.payment-list h3 {
  font-size: 18px;
}

.payment-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 18px;
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.status.lead {
  background: var(--moss);
}

.status.quote {
  background: var(--gold);
  color: var(--ink);
}

.status.active {
  background: var(--clay);
}

progress {
  width: 100%;
  height: 8px;
  accent-color: var(--clay);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
}

@media (max-width: 980px) {
  .main-nav {
    gap: 10px;
    font-size: 14px;
  }

  .hero-section,
  .feature-band,
  .quote-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 96px;
  }

  .hero-card {
    max-width: 420px;
  }

  .trust-strip,
  .about-grid,
  .service-grid,
  .project-grid,
  .legal-grid,
  .kpi-grid,
  .request-summary,
  .work-board,
  .compliance-grid,
  .client-dashboard,
  .tracking-grid,
  .upload-form,
  .photo-details {
    grid-template-columns: 1fr 1fr;
  }

  .client-dashboard {
    grid-template-areas:
      "roadmap roadmap"
      "payments note";
  }

  .panel-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .panel-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .panel-brand,
  .close-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header,
  .main-nav,
  .section-heading.split,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav a,
  .ghost-button,
  .nav-tools,
  .language-select,
  .language-select select {
    flex: 1;
  }

  .nav-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 40px;
  }

  .trust-strip,
  .about-grid,
  .service-grid,
  .project-grid,
  .legal-grid,
  .quote-form,
  .kpi-grid,
  .request-summary,
  .work-board,
  .compliance-grid,
  .client-dashboard,
  .tracking-grid,
  .client-layout,
  .client-project,
  .upload-form,
  .upload-form.compact-upload,
  .upload-item,
  .gallery-item,
  .invoice-summary,
  .photo-details {
    grid-template-columns: 1fr;
  }

  .invoice-folder,
  .progress-folder {
    padding: 20px;
  }

  .upload-item img,
  .gallery-item img {
    height: 220px;
  }

  .camera-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .camera-actions .primary-button,
  .camera-actions .secondary-action {
    width: 100%;
  }

  .quote-doc-header,
  .quote-doc-header > div:last-child,
  .quote-fields,
  .quote-line-row,
  .quote-line-row.material-row,
  .quote-line-row.other-row,
  .quote-totals,
  .saved-quote-card,
  .request-card,
  .request-meta,
  .request-gallery,
  .client-access-form {
    grid-template-columns: 1fr;
  }

  .quote-modal-actions {
    flex-direction: column;
  }

  .quote-modal-actions .primary-button,
  .quote-modal-actions .secondary-action {
    width: 100%;
  }

  .client-dashboard {
    grid-template-areas:
      "roadmap"
      "payments"
      "note";
  }

  .roadmap-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .roadmap-list span {
    min-width: 0;
    text-align: left;
  }

  .quote-form label.wide,
  .quote-form button,
  .form-status {
    grid-column: auto;
  }

  .project-card img,
  .service-card img {
    height: 240px;
  }
}
