:root {
  --black: #030303;
  --coal: #0a0a0a;
  --graphite: #151515;
  --steel: #242424;
  --gold: #d7ad55;
  --gold-strong: #e7c36d;
  --white: #ffffff;
  --soft: #dedede;
  --muted: #a4a4a4;
  --line: rgba(255, 255, 255, 0.16);
  --gold-line: rgba(215, 173, 85, 0.42);
  --panel: rgba(10, 10, 10, 0.91);
  --radius: 2px;
  color-scheme: dark;
  font-family: Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--soft);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(135deg, #000 0%, #121212 48%, #050505 100%);
  background-size: 34px 34px, 34px 34px, cover;
}

body.is-locked .app-shell {
  display: none;
}

body:not(.is-locked) .password-gate {
  display: none;
}

body.is-locked {
  overflow: hidden;
}

body.is-locked .password-gate {
  display: grid;
}

body.is-locked .submit-panel {
  display: none;
}

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

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    #030303;
  background-size: 34px 34px, 34px 34px, cover;
}

.gate-panel {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(215, 173, 85, 0.12), rgba(255, 255, 255, 0.02)),
    #050505;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.gate-panel img {
  width: 86px;
  height: 86px;
  border-radius: 18px;
}

.gate-panel h1 {
  margin: 0;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
}

.gate-error {
  min-height: 20px;
  margin: 0;
  color: #f6df99;
  font-size: 0.88rem;
}

.install-panel {
  display: grid;
  gap: 14px;
  margin: 16px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(215, 173, 85, 0.12), rgba(255, 255, 255, 0.018)),
    #050505;
}

.install-panel h2 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: 1.25rem;
  text-transform: uppercase;
}

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

.install-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 12px;
  color: #070707;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ba8730 0%, var(--gold-strong) 42%, #f6df99 52%, var(--gold) 66%, #a87526 100%);
}

.install-button svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.install-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 96px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.93);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 150px;
  max-width: 48vw;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: #fff;
  filter: invert(1);
}

.brand span,
.eyebrow {
  color: var(--gold-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.icon-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  color: var(--gold-strong);
  background: #050505;
}

.icon-button {
  width: 44px;
  height: 44px;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: 44vh;
  display: grid;
  align-items: end;
  gap: 22px;
  padding: 56px 16px 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.68) 50%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(0deg, #030303 0%, rgba(3, 3, 3, 0.34) 42%, rgba(3, 3, 3, 0) 100%),
    url("assets/warehouse-lighting-hero.jpg") center / cover;
}

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

.hero h1 {
  margin: 8px 0 12px;
  color: var(--white);
  font-size: clamp(2.45rem, 10vw, 5.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: #ededed;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions,
.submit-panel,
.media-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn,
.capture-tile {
  position: relative;
  isolation: isolate;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 18px;
  overflow: hidden;
  color: #070707;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, #ba8730 0%, var(--gold-strong) 42%, #f6df99 52%, var(--gold) 66%, #a87526 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.btn::after,
.capture-tile::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -45%;
  z-index: -1;
  width: 42%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: button-shine 5.5s ease-in-out infinite;
}

@keyframes button-shine {
  0%, 42% {
    left: -45%;
  }
  58%, 100% {
    left: 120%;
  }
}

.btn.secondary {
  color: var(--white);
  border: 1px solid var(--gold-line);
  background:
    linear-gradient(90deg, rgba(215, 173, 85, 0.10), rgba(0, 0, 0, 0.92) 28%, rgba(0, 0, 0, 0.94)),
    #050505;
}

.btn.full {
  width: 100%;
}

.audit-form {
  display: grid;
  gap: 16px;
  padding: 16px 16px 96px;
}

.form-section,
.fixture-card,
.quote-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    var(--panel);
}

.form-section {
  display: grid;
  gap: 18px;
  padding: 18px;
  scroll-margin-top: 132px;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: 1.45rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-heading {
  position: relative;
  padding-right: 48px;
}

.collapse-button {
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  color: var(--gold-strong);
  background: #050505;
  font-size: 1.35rem;
  font-weight: 900;
}

.form-section.is-collapsed > :not(.section-heading) {
  display: none;
}

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

label,
legend {
  display: grid;
  gap: 8px;
  color: #eeeeee;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--white);
  background: #050505;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-strong);
  box-shadow: 0 0 0 3px rgba(215, 173, 85, 0.18);
}

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

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

.wide,
.notes-label {
  grid-column: 1 / -1;
}

.option-panel,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(215, 173, 85, 0.055);
}

.option-panel legend,
.segmented legend {
  width: 100%;
  margin-bottom: 4px;
}

.option-panel label,
.segmented label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #050505;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--gold);
}

.fixture-list {
  display: grid;
  gap: 12px;
}

.fixture-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.fixture-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--gold-strong);
}

.area-media {
  display: grid;
  gap: 12px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(215, 173, 85, 0.055);
}

.area-media > strong {
  color: var(--gold-strong);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.small-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.visual-picker {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.picker-button,
.picker-menu button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--white);
  text-align: left;
  background: #050505;
}

.picker-button img,
.picker-menu img {
  width: 64px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: #000;
}

.picker-button small {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-strong);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.picker-button b,
.picker-menu span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  display: none;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 8px;
  background: #030303;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.6);
}

.visual-picker.is-open .picker-menu {
  display: grid;
  gap: 8px;
}

.picker-menu button:hover,
.picker-menu button:focus {
  border-color: var(--gold-strong);
  background: rgba(215, 173, 85, 0.12);
}

.capture-tile {
  display: grid;
  place-items: center;
  min-width: min(220px, 100%);
  min-height: 92px;
}

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

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.media-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050505;
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
}

.media-item span {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-panel.is-hidden {
  display: none;
}

.quote-result {
  padding: 16px;
  border-color: var(--gold-line);
}

.quote-result span {
  color: var(--gold-strong);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-result strong {
  display: block;
  margin: 7px 0;
  color: var(--white);
  font-size: clamp(1.65rem, 7vw, 3.2rem);
  line-height: 1;
}

.quote-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-section {
  padding-bottom: 18px;
}

#reviewOutput {
  min-height: 260px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  color: #ededed;
  background: #050505;
  line-height: 1.45;
}

.submit-panel {
  position: fixed;
  right: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 20;
  width: min(1120px, calc(100% - 24px));
  padding: 10px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.42);
}

.submit-panel .btn {
  flex: 1 1 100%;
}

@media (max-width: 760px) {
  .brand img {
    width: 132px;
  }

  .brand span {
    display: none;
  }

  .hero {
    min-height: 49vh;
    padding-top: 42px;
  }

  .field-grid,
  .field-grid.compact {
    grid-template-columns: 1fr;
  }

  .install-actions {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 15px;
  }

  .capture-tile {
    flex: 1 1 140px;
  }
}
