:root {
  color-scheme: light;
  --ink: #160d0d;
  --muted: #745b55;
  --line: #d9b971;
  --panel: #fff7e8;
  --page: #000000;
  --field: #fffaf3;
  --green: #160d0d;
  --green-dark: #160d0d;
  --blue: #d8a09c;
  --red: #6b4f2a;
  --yellow: #d4a958;
  --gold-soft: rgba(212, 169, 88, 0.22);
  --gold-line: rgba(212, 169, 88, 0.56);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48)),
    url("../tcw-property-bg.png") center / cover,
    linear-gradient(rgba(212, 169, 88, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 169, 88, 0.08) 1px, transparent 1px),
    #000;
  background-size: cover, cover, 34px 34px, 34px 34px, auto;
}

.access-gate[hidden] {
  display: none;
}

.access-card {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--gold-line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.access-card img {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
  border: 1px solid var(--gold-line);
}

.access-card h2 {
  margin: 0;
}

.access-note,
.access-small {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.access-small {
  font-size: 0.9rem;
}

.access-chip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e8;
  color: var(--ink);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.access-chip button {
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--green);
  color: #fff7e8;
  font-weight: 900;
}

body.access-locked .app-shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.cleaning-hidden {
  display: none !important;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42)),
    url("../tcw-property-bg.png") center / cover fixed,
    var(--page);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(212, 169, 88, 0.08), transparent 220px),
    #050303;
  color: #f8f3ea;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(212, 169, 88, 0.48);
  box-shadow: 0 0 22px rgba(212, 169, 88, 0.16), inset 0 0 0 1px rgba(255, 247, 232, 0.12);
}

.brand-monogram {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  background: #160d0d;
  color: #d4a958;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  grid-column: 1 / -1;
  background: #000;
  padding: 0;
}

.brand-mark.has-logo {
  display: block;
}

.brand-mark.has-logo img {
  display: block;
}

.brand-mark.has-logo .brand-monogram,
.brand-mark .brand-monogram {
  display: none;
}

.brand-mark.has-logo span,
.brand-mark span {
  display: none;
}

.brand-mark span:nth-child(1) {
  background: #160d0d;
}

.brand-mark span:nth-child(2) {
  background: #d4a958;
}

.brand-mark span:nth-child(3) {
  background: #d8a09c;
}

.brand h1,
.brand p,
.topbar h2,
.eyebrow,
.section-heading h3,
.paper-header h3,
.paper-kicker {
  margin: 0;
}

.brand h1 {
  font-size: 1rem;
}

.brand p {
  color: rgba(248, 243, 234, 0.68);
  font-size: 0.82rem;
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button,
.status-pill {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.logo-picker {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8f3ea;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.logo-picker input {
  display: none;
}

.ghost-action {
  background: transparent;
  color: rgba(248, 243, 234, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0 13px;
}

.ghost-action:hover,
.logo-picker:hover {
  border-color: rgba(255, 255, 255, 0.34);
}

.primary-action {
  background: linear-gradient(180deg, #2f261b, #000000);
  color: #fff7e8;
  border: 1px solid rgba(212, 169, 88, 0.36);
  padding: 0 14px;
  box-shadow: 0 8px 18px rgba(212, 169, 88, 0.24);
}

.primary-action:hover {
  background: linear-gradient(180deg, #160d0d, #160d0d);
  border-color: rgba(212, 169, 88, 0.7);
}

.secondary-action,
.icon-button {
  background: #fff7e8;
  color: var(--ink);
  border: 1px solid rgba(212, 169, 88, 0.44);
  padding: 0 13px;
}

.secondary-action:hover,
.icon-button:hover {
  border-color: #d4a958;
  box-shadow: 0 0 0 3px rgba(212, 169, 88, 0.14);
}

.compact {
  min-height: 36px;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.primary-action svg,
.secondary-action svg,
.icon-button svg,
.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 10px;
  min-height: 42px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search-field input::placeholder {
  color: rgba(248, 243, 234, 0.5);
}

.quote-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.memory-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
}

.memory-box strong,
.memory-box span {
  display: block;
}

.memory-box span {
  color: rgba(248, 243, 234, 0.66);
  font-size: 0.78rem;
  margin-top: 4px;
}

.memory-box ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  color: #f8f3ea;
  font-size: 0.83rem;
}

.memory-box li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
}

.memory-box li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d4a958;
  margin-top: 7px;
  flex: 0 0 auto;
}

.quote-card {
  text-align: left;
  color: #f8f3ea;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  width: 100%;
}

.quote-card.active {
  border-color: #d4a958;
  background: rgba(212, 169, 88, 0.16);
}

.quote-card strong,
.quote-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-card span {
  color: rgba(248, 243, 234, 0.66);
  font-size: 0.78rem;
  margin-top: 4px;
}

.workspace {
  min-width: 0;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(212, 169, 88, 0.12), transparent 360px),
    linear-gradient(90deg, rgba(212, 169, 88, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(216, 160, 156, 0.045) 0 1px, transparent 1px 100%),
    #000000;
  background-size: 28px 28px;
}

.topbar,
.section-heading,
.line-items-heading,
.paper-header,
.total-box > div,
.line-item {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow,
.paper-kicker {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.15;
  margin-top: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}


.offline-app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(212, 169, 88, 0.55);
  border-radius: 8px;
  background: rgba(255, 247, 232, 0.96);
  color: var(--ink);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.offline-app-card h3 {
  margin-top: 3px;
  font-size: 1rem;
}

.offline-app-card p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

body.is-offline .offline-app-card {
  border-color: var(--yellow);
  background: #fff2c7;
}

.save-status {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(212, 169, 88, 0.5);
  border-radius: 8px;
  background: rgba(255, 247, 232, 0.96);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 12px;
}

.save-status.saved {
  border-color: rgba(47, 111, 88, 0.45);
}

.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff7e8;
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 13px 14px;
  margin-bottom: 14px;
}

.next-action strong {
  display: block;
  margin-top: 3px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 14px;
}

.status-pill.active {
  color: #fff7e8;
  background: var(--green);
  border-color: var(--green);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 247, 232, 0.96), rgba(255, 250, 243, 0.92));
  border: 1px solid rgba(212, 169, 88, 0.42);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 18px;
}

.estimate-panel {
  padding: 12px;
  position: sticky;
  top: 18px;
}

.section-heading {
  justify-content: space-between;
  margin: 8px 0 12px;
}

.section-heading:not(:first-child) {
  margin-top: 24px;
}

.section-heading h3 {
  font-size: 0.95rem;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.client-tools .wide {
  min-width: 0;
}

.communication-panel {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.communication-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.communication-actions a {
  text-decoration: none;
}

.communication-compose {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
}

.communication-compose .wide,
.message-bubbles {
  grid-column: 1 / -1;
}

.message-bubbles {
  align-items: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-bubble {
  background: #fff7e8;
  border: 1px solid rgba(212, 169, 88, 0.55);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 36px;
  padding: 0 12px;
}

.message-bubble.active {
  background: #160d0d;
  border-color: #d4a958;
  color: #fff7e8;
}

.message-history {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.message-history-item {
  background: #fff7e8;
  border: 1px solid rgba(212, 169, 88, 0.48);
  border-radius: 8px;
  color: var(--ink);
  padding: 10px;
}

.message-history-item strong {
  color: #160d0d;
  display: block;
  font-size: 0.78rem;
  margin-bottom: 5px;
}

.message-history-item p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  min-height: 42px;
  padding: 9px 11px;
  outline: 0;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 111, 88, 0.16);
}

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

.quote-lines-help {
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
  margin-bottom: 10px;
}

.cory-checklist-note {
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
  margin-bottom: 10px;
}

.writer-helper,
.calculator,
.price-manager,
.colour-visualizer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.writer-helper .wide,
.calculator .wide,
.price-manager .wide,
.visualizer-controls .wide {
  grid-column: 1 / -1;
}

.writer-helper {
  grid-template-columns: 1fr;
}

.writer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.writer-note {
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
}

.simple-steps {
  border-left: 4px solid var(--green);
  background: #fff7e8;
  border-radius: 8px;
  color: #3d302d;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.45;
  padding: 10px 12px;
}

.scope-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7e8;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
  min-height: 36px;
  padding: 7px 10px;
  cursor: pointer;
}

.scope-chip:hover {
  border-color: var(--yellow);
}

.listening {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(212, 169, 88, 0.26);
}

.writer-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 92px;
  padding: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.writer-output span {
  color: var(--muted);
  font-weight: 700;
}

.calculator-total,
.selected-colour-name {
  color: var(--green);
  font-size: 1rem;
}

.calculator-readout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(190px, 1.2fr);
  gap: 10px;
  align-items: end;
}

.calculator-readout > div,
.material-calculator {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfaf6;
}

.material-calculator,
.labour-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
}

.optional-materials {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.optional-materials summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.optional-materials .material-calculator {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 10px;
  padding: 10px 0 0;
}

.material-calculator legend,
.labour-options legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 4px;
}

.material-source-note {
  grid-column: 1 / -1;
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
}

.labour-help {
  grid-column: 1 / -1;
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
}

.material-calculator .secondary-action {
  grid-column: 1 / -1;
}

.calculator-readout span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.calculator-readout strong {
  display: block;
  margin-top: 3px;
}

.price-manager {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.75fr) minmax(0, 0.75fr) auto;
  align-items: end;
}

.price-source-note {
  grid-column: 1 / -1;
  border-left: 4px solid var(--yellow);
  background: #fbfaf6;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 10px 12px;
}

.price-manager .wide {
  grid-column: auto;
}

.paint-price-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}

.paint-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 0.84rem;
}

.paint-price-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paint-price-row span {
  color: var(--muted);
  font-weight: 800;
}

.paint-price-row button {
  min-height: 32px;
  width: 32px;
}

.colour-visualizer {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(240px, 0.9fr);
  align-items: stretch;
}

.room-preview {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #d8d1c3;
  isolation: isolate;
}

.wall-photo-preview {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ebe6dd;
}

.wall-photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.wall-photo-placeholder svg {
  width: 34px;
  height: 34px;
}

#wallColourPhoto {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.wall-photo-preview.has-photo #wallColourPhoto {
  display: block;
}

.wall-photo-preview.has-photo .wall-photo-placeholder {
  display: none;
}

.wall-photo-tint {
  position: absolute;
  inset: 0;
  background: #fffef6;
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}

.room-wall {
  position: absolute;
  top: 0;
  bottom: 29%;
  transition: background 180ms ease;
}

.wall-main {
  left: 16%;
  right: 16%;
  background: #d8d1c3;
  box-shadow: inset 0 -40px 60px rgba(0, 0, 0, 0.07);
  z-index: 1;
}

.wall-left {
  left: 0;
  width: 24%;
  background: #cfc7b7;
  clip-path: polygon(0 0, 100% 0, 68% 100%, 0 100%);
  filter: brightness(0.93);
  z-index: 1;
}

.wall-right {
  right: 0;
  width: 24%;
  background: #cfc7b7;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 32% 100%);
  filter: brightness(0.9);
  z-index: 1;
}

.room-floor {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 34%;
  background:
    linear-gradient(90deg, rgba(55, 42, 33, 0.1) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #b89267, #8a684b);
  transform: perspective(360px) rotateX(58deg);
  transform-origin: bottom center;
  z-index: 2;
}

.window {
  position: absolute;
  top: 34px;
  right: 11%;
  width: 74px;
  height: 92px;
  background: #e8f1f1;
  border: 8px solid #f6f2ea;
  box-shadow: 0 10px 22px rgba(35, 35, 35, 0.12);
}

.window span {
  position: absolute;
  background: #f6f2ea;
}

.window span:first-child {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
}

.window span:last-child {
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
}

.art-frame {
  position: absolute;
  top: 54px;
  left: 13%;
  width: 72px;
  height: 54px;
  border: 8px solid #5b4a3d;
  background: linear-gradient(135deg, #0f0a08 0 48%, #d4a958 48% 100%);
  box-shadow: 0 10px 20px rgba(35, 35, 35, 0.14);
}

.sofa {
  position: absolute;
  left: 23%;
  right: 23%;
  bottom: 24%;
  height: 60px;
  background: #160d0d;
  border-radius: 8px 8px 5px 5px;
  z-index: 3;
  box-shadow: 0 18px 28px rgba(35, 35, 35, 0.18);
}

.sofa::before,
.sofa::after {
  content: "";
  position: absolute;
  bottom: -16px;
  width: 24%;
  height: 28px;
  background: #000000;
  border-radius: 0 0 8px 8px;
}

.sofa::before {
  left: 8%;
}

.sofa::after {
  right: 8%;
}

.plant {
  position: absolute;
  right: 8%;
  bottom: 25%;
  width: 38px;
  height: 56px;
  border-radius: 50% 50% 8px 8px;
  background: #6d5552;
  z-index: 4;
  box-shadow: inset -12px 0 0 rgba(0, 0, 0, 0.12);
}

.plant::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: -24px;
  height: 28px;
  background: #7b5743;
  border-radius: 3px 3px 8px 8px;
}

.exterior-sky,
.house-body,
.house-roof,
.house-door,
.house-window,
.fence-preview {
  display: none;
  position: absolute;
}

.exterior-sky {
  inset: 0;
  background: linear-gradient(#dbe8ef 0 58%, #c7d0bc 58% 100%);
}

.house-body {
  left: 18%;
  right: 18%;
  bottom: 18%;
  height: 46%;
  background: #fffef6;
  border: 1px solid rgba(22, 13, 13, 0.18);
  z-index: 4;
}

.house-roof {
  left: 11%;
  right: 11%;
  bottom: 60%;
  height: 28%;
  background: #160d0d;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  z-index: 5;
}

.house-door {
  left: 45%;
  bottom: 18%;
  width: 10%;
  height: 24%;
  background: #6d5552;
  z-index: 6;
}

.house-window {
  bottom: 42%;
  width: 13%;
  height: 14%;
  background: #e8f1f1;
  border: 5px solid #fff7e8;
  z-index: 6;
}

.house-window-left {
  left: 28%;
}

.house-window-right {
  right: 28%;
}

.fence-preview {
  left: 8%;
  right: 8%;
  bottom: 18%;
  height: 48%;
  background:
    repeating-linear-gradient(90deg, rgba(22, 13, 13, 0.16) 0 2px, transparent 2px 42px),
    #fffef6;
  border-top: 10px solid rgba(22, 13, 13, 0.15);
  border-bottom: 10px solid rgba(22, 13, 13, 0.15);
  z-index: 5;
}

.room-preview[data-preview-type="exterior"] .room-wall,
.room-preview[data-preview-type="exterior"] .room-floor,
.room-preview[data-preview-type="exterior"] .window,
.room-preview[data-preview-type="exterior"] .art-frame,
.room-preview[data-preview-type="exterior"] .sofa,
.room-preview[data-preview-type="exterior"] .plant,
.room-preview[data-preview-type="fence"] .room-wall,
.room-preview[data-preview-type="fence"] .room-floor,
.room-preview[data-preview-type="fence"] .window,
.room-preview[data-preview-type="fence"] .art-frame,
.room-preview[data-preview-type="fence"] .sofa,
.room-preview[data-preview-type="fence"] .plant,
.room-preview[data-preview-type="roof"] .room-wall,
.room-preview[data-preview-type="roof"] .room-floor,
.room-preview[data-preview-type="roof"] .window,
.room-preview[data-preview-type="roof"] .art-frame,
.room-preview[data-preview-type="roof"] .sofa,
.room-preview[data-preview-type="roof"] .plant {
  display: none;
}

.room-preview[data-preview-type="exterior"] .exterior-sky,
.room-preview[data-preview-type="exterior"] .house-body,
.room-preview[data-preview-type="exterior"] .house-roof,
.room-preview[data-preview-type="exterior"] .house-door,
.room-preview[data-preview-type="exterior"] .house-window,
.room-preview[data-preview-type="fence"] .exterior-sky,
.room-preview[data-preview-type="fence"] .fence-preview,
.room-preview[data-preview-type="roof"] .exterior-sky,
.room-preview[data-preview-type="roof"] .house-body,
.room-preview[data-preview-type="roof"] .house-roof,
.room-preview[data-preview-type="roof"] .house-door,
.room-preview[data-preview-type="roof"] .house-window {
  display: block;
}

.visualizer-controls {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  align-content: start;
}

.chart-note {
  grid-column: 1 / -1;
  border-left: 4px solid var(--yellow);
  background: #fff7e8;
  border-radius: 8px;
  color: #514b43;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 11px;
}

.chart-link {
  grid-column: 1 / -1;
  text-decoration: none;
}

.main-colour-choice {
  border: 2px solid rgba(212, 169, 88, 0.32);
  border-radius: 8px;
  background: #fff7e8;
  padding: 10px;
}

.main-colour-choice select {
  font-size: 1rem;
  font-weight: 900;
}

.colour-swatches {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 3px;
}

.advanced-colour {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.advanced-colour summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.advanced-colour[open] {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.advanced-colour[open] summary {
  grid-column: 1 / -1;
}

.colour-swatch {
  min-height: 58px;
  border: 2px solid #fff;
  border-radius: 8px;
  color: #160d0d;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 7px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(35, 35, 35, 0.18), 0 2px 8px rgba(35, 35, 35, 0.1);
}

.colour-swatch.active {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.visualizer-controls .primary-action {
  grid-column: 1 / -1;
}

.job-photos-panel {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.photo-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 14px;
}

.job-photo-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  background: #f3eee7;
}

.job-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-photo-thumb .icon-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  background: rgba(255, 247, 232, 0.94);
}

.preview-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.preview-photos:empty {
  display: none;
}

.preview-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.file-picker {
  position: relative;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.file-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.system-presets {
  display: grid;
  gap: 10px;
}

.paint-system-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.paint-system-builder .wide,
.paint-system-builder .primary-action {
  grid-column: 1 / -1;
}

.customer-paint-option {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff7e8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  padding: 8px 10px;
}

.customer-paint-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.prep-options {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.prep-options legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 4px;
}

.prep-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: #fff7e8;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 10px;
}

.prep-options input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.system-button {
  text-align: left;
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

.system-button strong {
  display: block;
  color: var(--green);
}

.system-button span {
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.84rem;
}

.system-button:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(212, 169, 88, 0.16);
}

.preset-button {
  min-height: 44px;
  justify-content: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 800;
}

.preset-button:hover {
  border-color: var(--green);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  padding: 8px 10px;
}

.checklist input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.send-ready-box {
  background: linear-gradient(180deg, #fffaf3, #fff7e8);
  border: 1px solid rgba(212, 169, 88, 0.52);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 12px;
}

.send-ready-box > div {
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 10px;
}

.send-ready-box ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.send-ready-box li {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 850;
  min-height: 42px;
  padding: 8px 10px;
}

.send-ready-box li span {
  border-radius: 999px;
  color: #fff7e8;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 950;
  padding: 4px 7px;
  text-transform: uppercase;
}

.send-ready-box li.done {
  border-color: rgba(212, 169, 88, 0.26);
}

.send-ready-box li.done span,
.selected-colour-name.ready {
  background: #160d0d;
}

.send-ready-box li.missing {
  border-color: rgba(212, 169, 88, 0.7);
}

.send-ready-box li.missing span {
  background: #d4a958;
  color: #160d0d;
}

.acceptance-box,
.daily-log-box {
  background: linear-gradient(180deg, #fffaf3, #fff7e8);
  border: 1px solid rgba(212, 169, 88, 0.46);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.acceptance-box .wide,
.daily-log-box textarea,
.daily-log-list {
  grid-column: 1 / -1;
}

.signature-pad {
  display: grid;
  gap: 8px;
}

.signature-pad-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.signature-pad canvas {
  background: #fffaf3;
  border: 1px dashed rgba(212, 169, 88, 0.5);
  border-radius: 8px;
  height: 170px;
  max-width: 100%;
  touch-action: none;
  width: 100%;
}

.signature-pad span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.signature-preview {
  background: #fffaf3;
  border: 1px solid rgba(212, 169, 88, 0.45);
  border-radius: 8px;
  display: block;
  margin: 10px 0;
  max-height: 120px;
  max-width: 100%;
}

.daily-log-list {
  display: grid;
  gap: 8px;
}

.daily-log-item {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.daily-log-item p {
  color: var(--muted);
  margin-top: 4px;
  white-space: pre-wrap;
}

.staff-member-list {
  display: grid;
  gap: 10px;
}

.staff-member-card,
.contractor-list {
  display: grid;
  gap: 10px;
}

.contractor-empty {
  background: #fff7e8;
  border: 1px dashed rgba(212, 169, 88, 0.7);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
  padding: 12px;
}

.staff-member-card,
.contractor-card {
  align-items: end;
  background: #fffaf3;
  border: 1px solid rgba(212, 169, 88, 0.44);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) 42px;
  padding: 12px;
}

.staff-member-card .wide,
.contractor-card .wide {
  grid-column: 1 / 3;
}

.staff-member-card .remove-staff-member,
.contractor-card .remove-contractor {
  align-self: end;
}

.staff-signoff {
  align-items: center;
  background: #fff7e8;
  border: 1px solid rgba(212, 169, 88, 0.52);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 10px;
}

.staff-signoff span {
  color: var(--muted);
  flex: 1 1 220px;
  font-size: 0.84rem;
  font-weight: 900;
}

.line-item {
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.line-item .description {
  flex: 1 1 220px;
}

.line-item .small-number {
  flex: 0 0 120px;
}

.line-item label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  gap: 4px;
}

.line-item .remove-line {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.quote-paper {
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  border: 1px solid rgba(212, 169, 88, 0.38);
}

.paper-header {
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.paper-header h3 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin-top: 4px;
}

.paper-header p {
  color: var(--muted);
}

.paper-status {
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(212, 169, 88, 0.12);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.paper-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.paper-meta span,
.total-box span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.paper-meta strong,
.total-box strong {
  display: block;
  margin-top: 3px;
}

.preview-notes {
  color: #46423d;
  white-space: pre-wrap;
  margin-bottom: 16px;
  line-height: 1.5;
}

.preview-concerns,
.preview-safety {
  background: #fff7e8;
  border: 1px solid rgba(212, 169, 88, 0.56);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 12px 0 16px;
  padding: 12px;
}

.preview-concerns strong,
.preview-safety strong {
  display: block;
  margin-bottom: 6px;
}

.preview-concerns ul,
.preview-safety ul {
  margin: 0;
  padding-left: 18px;
}

.preview-concerns li + li,
.preview-safety li + li {
  margin-top: 5px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.preview-table th,
.preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  text-align: right;
  vertical-align: top;
}

.preview-table th:first-child,
.preview-table td:first-child {
  text-align: left;
  width: 48%;
}

.total-box {
  margin: 18px 0;
  margin-left: auto;
  max-width: 280px;
  display: grid;
  gap: 8px;
}

.total-box > div {
  justify-content: space-between;
  gap: 16px;
}

.grand-total {
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}

.grand-total strong {
  font-size: 1.35rem;
}

.discount-total span,
.discount-total strong {
  color: var(--green);
}

.deposit-total {
  color: var(--green);
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.pricing-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.fine-print {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 16px 0 0;
}

.terms-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.terms-section h4 {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--green);
}

.terms-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.42;
}

.terms-section li + li {
  margin-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: #232323;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  font-weight: 700;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .quote-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    max-height: 220px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .estimate-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .workspace,
  .sidebar {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .next-action,
  .topbar-actions .primary-action,
  .topbar-actions .secondary-action,
  .offline-app-card .secondary-action {
    width: 100%;
  }

  .next-action {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid.two,
  .client-tools,
  .writer-actions,
  .paint-system-builder,
  .calculator,
  .price-manager,
  .colour-visualizer,
  .paper-meta,
  .pricing-controls {
    grid-template-columns: 1fr;
  }

  .client-tools .primary-action,
  .client-tools .secondary-action,
  .client-tools .icon-button {
    width: 100%;
  }

  .paint-system-builder .wide,
  .paint-system-builder .primary-action {
    grid-column: 1;
  }

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

  .price-manager .wide {
    grid-column: 1;
  }

  .paint-price-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .paint-price-row strong {
    white-space: normal;
  }

  .paint-price-row span:nth-of-type(2) {
    grid-column: 1 / -1;
  }

  .calculator-readout {
    grid-template-columns: 1fr;
  }

  .visualizer-controls {
    grid-template-columns: 1fr;
  }

  .photo-controls,
  .photo-controls label {
    min-width: 0;
    width: 100%;
  }

  .room-floor {
    left: 0;
    right: 0;
  }

  .line-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
  }

  .line-item .description {
    grid-column: 1 / -1;
  }

  .line-item .small-number {
    flex: 1 1 auto;
    width: auto;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .status-strip,
  .form-panel,
  .next-action,
  .pricing-controls,
  .toast {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .content-grid {
    display: block;
    padding: 0;
    min-height: 0;
  }

  .estimate-panel,
  .quote-paper {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.76)),
      url("../tcw-property-bg.png") 68% top / auto 100vh fixed,
      var(--page);
  }

  .access-gate {
    align-items: start;
    padding: 14px;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.7)),
      url("../tcw-property-bg.png") 70% top / auto 100vh,
      #000;
  }

  .access-card {
    margin-top: 12px;
    padding: 18px;
  }

  .access-card img {
    width: 68px;
    height: 68px;
  }

  .access-chip {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: space-between;
  }
}

.offline-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 9000;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gold-line);
  background: #fff7e8;
  color: #160d0d;
  font-weight: 900;
  text-align: center;
}

body.is-offline .offline-banner {
  display: block;
}

body.is-offline .save-status {
  border-color: var(--yellow);
  background: #fff7e8;
  color: #160d0d;
}

/* Premium dark skin: image-led, no cream/gold-heavy panels */
:root {
  --ink: #f4f1eb;
  --muted: #b9b1a6;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(15, 14, 13, 0.92);
  --field: rgba(7, 7, 7, 0.88);
  --green: #050505;
  --green-dark: #000000;
  --blue: #c8b9a5;
  --red: #9b6a4f;
  --yellow: #a88955;
  --gold-soft: rgba(168, 137, 85, 0.12);
  --gold-line: rgba(168, 137, 85, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62)),
    url("../tcw-property-bg.png") center / cover fixed,
    #000;
}

.access-card,
.access-chip,
.panel,
.form-panel,
.estimate-panel,
.communication-panel,
.job-photos-panel,
.offline-app-card,
.next-action,
.save-status,
.quote-card,
.memory-box,
.safety-card,
.acceptance-card,
.concern-card,
.job-log-card,
.staff-card,
.contractor-card,
.message-history-item,
.scope-suggestions,
.price-manager,
.paint-system-panel,
.calculator-panel,
.materials-panel,
.cory-checklist-panel,
.client-safety-panel,
.client-acceptance-panel,
.staff-panel,
.contractor-panel,
.concerns-panel,
.work-charge-panel {
  background: rgba(16, 15, 14, 0.92) !important;
  color: var(--ink) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: var(--shadow);
}

.workspace {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.88)),
    radial-gradient(circle at top left, rgba(168, 137, 85, 0.08), transparent 360px),
    #000000;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.92), rgba(0, 0, 0, 0.96)),
    url("../tcw-property-bg.png") 18% center / cover fixed;
  border-right-color: rgba(255, 255, 255, 0.1);
}

.sidebar::before {
  background: rgba(0, 0, 0, 0.58);
}

.logo,
.brand-logo,
.access-card img {
  border-color: rgba(168, 137, 85, 0.32) !important;
}

.eyebrow,
.paper-kicker,
.service-card span,
.quote-card strong,
.section-heading h3,
.topbar h2,
.offline-app-card h3,
.next-action strong {
  color: #f7f2e8 !important;
}

label,
.access-note,
.access-small,
.message-history-item p,
.offline-app-card p:not(.eyebrow),
.quote-lines-help,
.cory-checklist-note,
.help-text,
small {
  color: var(--muted) !important;
}

input,
select,
textarea,
.search-field,
.search-field input,
.status-pill,
.line-item,
.quote-lines-help,
.cory-checklist-note,
.scope-chip,
.colour-match-choice,
.price-row,
.system-card,
.photo-card,
.check-item,
.send-ready-item {
  background: rgba(5, 5, 5, 0.76) !important;
  color: var(--ink) !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
}

input::placeholder,
textarea::placeholder,
.search-field input::placeholder {
  color: rgba(244, 241, 235, 0.42) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(168, 137, 85, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(168, 137, 85, 0.14) !important;
}

.primary-action,
.secondary-action,
.icon-button,
.status-pill.active,
button {
  background: linear-gradient(180deg, #151311, #050505) !important;
  color: #f7f2e8 !important;
  border-color: rgba(168, 137, 85, 0.28) !important;
}

.primary-action:hover,
.secondary-action:hover,
.icon-button:hover,
button:hover {
  border-color: rgba(244, 241, 235, 0.36) !important;
}

.next-action,
.quote-lines-help,
.cory-checklist-note,
body.is-offline .offline-app-card,
body.is-offline .save-status {
  border-left-color: rgba(168, 137, 85, 0.44) !important;
  background: rgba(18, 16, 14, 0.94) !important;
}

.paper,
.quote-paper,
.preview-paper,
.quote-preview,
.invoice-paper {
  background: #f7f7f4 !important;
  color: #151311 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.paper *,
.quote-paper *,
.preview-paper *,
.quote-preview *,
.invoice-paper * {
  color: inherit;
}

.offline-banner {
  background: #11100f !important;
  color: #f7f2e8 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.supply-price-row {
  grid-template-columns: minmax(150px, 1fr) minmax(110px, auto) 88px auto auto;
}

.supply-price-row label {
  gap: 4px;
  min-width: 72px;
  font-size: 0.72rem;
}

.supply-price-row input {
  min-height: 34px;
  padding: 6px 8px;
}

.supply-price-row .secondary-action {
  width: auto;
  min-height: 34px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .supply-price-row {
    grid-template-columns: 1fr;
  }

  .supply-price-row .secondary-action,
  .supply-price-row .icon-button {
    width: 100%;
  }
}

/* Readable neutral skin: practical first, no cream/gold clutter */
:root {
  --ink: #101010;
  --muted: #555555;
  --line: #d7d7d7;
  --panel: #f4f4f3;
  --field: #ffffff;
  --green: #050505;
  --green-dark: #000000;
  --blue: #2f2f2f;
  --red: #7b2f2f;
  --yellow: #777777;
  --gold-soft: rgba(0, 0, 0, 0.06);
  --gold-line: #d7d7d7;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

body {
  color: #f5f5f5;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58)),
    url("../tcw-property-bg.png") center / cover fixed,
    #000;
}

.workspace {
  background: rgba(0, 0, 0, 0.82) !important;
}

.topbar h2,
.topbar .eyebrow,
.workspace > .section-heading h3,
.workspace > .line-items-heading h3 {
  color: #ffffff !important;
}

.panel,
.form-panel,
.estimate-panel,
.communication-panel,
.job-photos-panel,
.offline-app-card,
.next-action,
.price-manager,
.paint-system-builder,
.material-calculator,
.access-calculator,
.exterior-calculator,
.calculator,
.send-ready-box,
.acceptance-box,
.daily-log-box,
.staff-member-list,
.contractor-list,
.concern-box,
.cory-checklist-note,
.quote-lines-help,
.memory-box,
.safety-card,
.acceptance-card,
.concern-card,
.job-log-card,
.staff-card,
.contractor-card,
.message-history-item,
.scope-suggestions,
.line-item,
.status-pill,
.price-row,
.system-card,
.photo-card,
.check-item,
.send-ready-item {
  background: rgba(246, 246, 244, 0.97) !important;
  color: #101010 !important;
  border-color: #d7d7d7 !important;
  box-shadow: var(--shadow) !important;
}

.panel *,
.form-panel *,
.estimate-panel *,
.communication-panel *,
.job-photos-panel *,
.offline-app-card *,
.next-action *,
.price-manager *,
.paint-system-builder *,
.material-calculator *,
.access-calculator *,
.exterior-calculator *,
.calculator *,
.send-ready-box *,
.acceptance-box *,
.daily-log-box *,
.staff-member-list *,
.contractor-list *,
.concern-box *,
.cory-checklist-note *,
.quote-lines-help *,
.memory-box *,
.safety-card *,
.acceptance-card *,
.concern-card *,
.job-log-card *,
.staff-card *,
.contractor-card *,
.message-history-item *,
.scope-suggestions *,
.line-item *,
.status-pill *,
.price-row *,
.system-card *,
.photo-card *,
.check-item *,
.send-ready-item * {
  color: inherit;
}

label,
small,
.help-text,
.price-source-note,
.material-source-note,
.offline-app-card p:not(.eyebrow),
.message-history-item p,
.paint-price-row span,
.quote-card span,
.preview-notes {
  color: #555555 !important;
}

.panel h3,
.form-panel h3,
.estimate-panel h3,
.price-manager h3,
.section-heading h3,
.offline-app-card h3,
.next-action strong,
.paint-price-row strong,
.quote-paper h3,
.paper-kicker,
.eyebrow {
  color: #101010 !important;
}

input,
select,
textarea,
.search-field input {
  background: #ffffff !important;
  color: #101010 !important;
  border: 1px solid #cfcfcf !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder,
.search-field input::placeholder {
  color: #777777 !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111111 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12) !important;
}

button,
.primary-action,
.secondary-action,
.icon-button,
.status-pill.active {
  background: #050505 !important;
  color: #ffffff !important;
  border: 1px solid #2a2a2a !important;
}

button *,
.primary-action *,
.secondary-action *,
.icon-button *,
.status-pill.active * {
  color: #ffffff !important;
}

.save-status {
  background: #ffffff !important;
  color: #101010 !important;
  border-color: #cfcfcf !important;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.96)),
    url("../tcw-property-bg.png") 18% center / cover fixed !important;
  color: #ffffff !important;
}

.sidebar *,
.brand-text h1,
.brand-text p {
  color: #ffffff !important;
}

.sidebar .quote-card,
.sidebar .memory-card,
.sidebar .search-field,
.sidebar .save-status {
  background: rgba(16, 16, 16, 0.9) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.sidebar .quote-card span,
.sidebar .memory-card span,
.sidebar .search-field input::placeholder {
  color: rgba(255, 255, 255, 0.68) !important;
}

.quote-paper,
.paper,
.preview-paper,
.quote-preview,
.invoice-paper {
  background: #ffffff !important;
  color: #101010 !important;
  border-color: #d7d7d7 !important;
}

.quote-paper *,
.paper *,
.preview-paper *,
.quote-preview *,
.invoice-paper * {
  color: #101010 !important;
}

.preview-concerns,
.preview-safety,
.preview-notes {
  background: #f1f1f1 !important;
  color: #101010 !important;
  border-color: #d7d7d7 !important;
}

.offline-banner {
  background: #050505 !important;
  color: #ffffff !important;
  border-bottom-color: #333333 !important;
}

body.is-offline .offline-app-card,
body.is-offline .save-status {
  background: #f0f0f0 !important;
  color: #101010 !important;
  border-color: #999999 !important;
}

/* Sidebar reminder contrast fix */
.sidebar .memory-box {
  background: rgba(16, 16, 16, 0.9) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.sidebar .memory-box *,
.sidebar .memory-box strong,
.sidebar .memory-box h2,
.sidebar .memory-box p,
.sidebar .memory-box span,
.sidebar .memory-box li {
  color: #ffffff !important;
}

.sidebar .memory-box small,
.sidebar .memory-box .muted {
  color: rgba(255, 255, 255, 0.68) !important;
}

/* Meeting-ready property manager view */
.property-manager-card {
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px;
  background: #ffffff !important;
  color: #101010 !important;
  border: 1px solid #d7d7d7 !important;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.property-manager-logo {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  position: relative;
  background: #050505 !important;
  color: #ffffff !important;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.property-manager-logo span {
  color: #ffffff !important;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0;
}

.property-manager-logo svg {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  color: #f6f6f4 !important;
  stroke-width: 2.4;
}

body[data-role="property_manager"] .property-manager-card {
  display: grid;
}

.property-manager-request-card {
  display: none;
  margin-bottom: 18px;
  padding: 20px;
  background: #ffffff !important;
  color: #101010 !important;
  border: 1px solid #d7d7d7 !important;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

body[data-role="property_manager"] .property-manager-request-card {
  display: block;
}

.property-manager-request-card *,
.property-manager-request-card h3,
.property-manager-request-card p {
  color: #101010 !important;
}

.pm-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pm-step {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  background: #f6f6f4 !important;
  color: #101010 !important;
  border: 2px solid #101010 !important;
  border-radius: 8px;
  text-decoration: none;
}

.pm-step strong {
  font-size: 1rem;
  color: #101010 !important;
}

.pm-step span {
  color: #333333 !important;
  line-height: 1.45;
}

.pm-step:hover,
.pm-step:focus-visible {
  background: #101010 !important;
}

.pm-step:hover *,
.pm-step:focus-visible * {
  color: #ffffff !important;
}

.pm-review-grid .pm-step {
  min-height: 146px;
}

.pm-step-alert {
  border-color: #7a1f1f !important;
  background: #fff7f7 !important;
}

.pm-step-alert strong {
  color: #7a1f1f !important;
}

.pm-note {
  margin-top: 14px !important;
  padding: 12px 14px;
  background: #f1f1f1;
  border-left: 4px solid #101010;
  border-radius: 6px;
}

.property-manager-card *,
.property-manager-card h3,
.property-manager-card p {
  color: #101010 !important;
}

.property-manager-card .eyebrow {
  color: #5c4a24 !important;
}

.mockup-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 8px;
  background: #101010 !important;
  color: #ffffff !important;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.property-manager-card h3 {
  margin: 2px 0 8px;
  font-size: 1.25rem;
}

.property-manager-card p {
  margin: 0;
  line-height: 1.55;
}

.property-manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.property-manager-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: #ffffff !important;
  color: #101010 !important;
  border: 2px solid #101010 !important;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 800;
}

.property-manager-actions .secondary-action *,
.property-manager-actions .secondary-action svg {
  color: #101010 !important;
  stroke: #101010 !important;
}

.property-manager-actions .secondary-action:hover,
.property-manager-actions .secondary-action:focus-visible {
  background: #101010 !important;
  color: #ffffff !important;
}

.property-manager-actions .secondary-action:hover *,
.property-manager-actions .secondary-action:hover svg,
.property-manager-actions .secondary-action:focus-visible *,
.property-manager-actions .secondary-action:focus-visible svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

@media (max-width: 760px) {
  .property-manager-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .pm-step-grid {
    grid-template-columns: 1fr;
  }

  .property-manager-logo {
    width: 64px;
    height: 64px;
  }

  .property-manager-actions {
    justify-content: stretch;
  }

  .property-manager-actions .secondary-action {
    width: 100%;
  }
}
