:root {
  --ink: #15171d;
  --muted: #667085;
  --line: #dde2ea;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --soft-2: #eef4ff;
  --red: #d92d20;
  --red-dark: #aa1e16;
  --blue: #155eef;
  --green: #087443;
  --amber: #b54708;
  --shadow: 0 16px 40px rgba(20, 24, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

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

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 18px;
  background: #15171d;
  color: #ffffff;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: #aeb6c2;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.nav-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #d5dae3;
  text-align: left;
}

.nav-item.active {
  background: #ffffff;
  color: var(--ink);
}

.sidebar-meta {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.sidebar-meta span,
label > span,
.summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-meta span {
  color: #aeb6c2;
}

.sidebar-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.workspace {
  padding: 26px;
}

.hidden {
  display: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

h2 {
  font-size: 17px;
  line-height: 1.2;
}

.topbar p {
  margin-top: 8px;
  color: var(--muted);
}

.actions,
.status-row,
.import-row {
  display: flex;
  gap: 10px;
}

.button,
.mini-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--red);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary,
.mini-button,
.file-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.button.dark {
  align-self: end;
  background: var(--ink);
  color: #ffffff;
}

.import-row {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

label {
  min-width: 0;
}

.import-row label {
  flex: 0 0 160px;
}

.import-row .wide {
  flex: 1 1 320px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

input,
select {
  height: 42px;
  margin-top: 7px;
  padding: 0 12px;
}

textarea {
  margin-top: 8px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.13);
}

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

.summary,
.panel,
.client-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.summary {
  min-width: 0;
  padding: 16px;
}

.summary strong,
.summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary strong {
  margin-top: 8px;
  font-size: 18px;
}

.summary small {
  margin-top: 6px;
  color: var(--muted);
}

.main-grid,
.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head span {
  color: var(--muted);
  font-weight: 800;
}

.checklist {
  display: grid;
  gap: 12px;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  padding-bottom: 12px;
}

.check-title {
  min-width: 0;
  font-weight: 800;
}

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

.seg-option {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.seg-option.active {
  border-color: rgba(217, 45, 32, 0.45);
  background: #fff1f0;
  color: var(--red-dark);
}

.file-button {
  position: relative;
  min-height: 36px;
  padding: 0 12px;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.camera-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.camera-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101217;
}

.camera-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.camera-stage:not(.live) video {
  visibility: hidden;
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #d5dae3;
  font-weight: 800;
  text-align: center;
}

.camera-stage.live .camera-placeholder {
  display: none;
}

.camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-camera-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(21, 94, 239, 0.32);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--soft-2);
  color: var(--blue);
  font-weight: 900;
  overflow: hidden;
}

.mobile-camera-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.shot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.shot-button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  text-align: left;
}

.shot-button::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #98a2b3;
  border-radius: 50%;
}

.shot-button.active {
  border-color: rgba(21, 94, 239, 0.45);
  background: var(--soft-2);
}

.shot-button.done::before {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 2px #ffffff;
}

.shot-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #d0d5dd;
}

.photo-card span {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.timeline-panel,
.notes-panel {
  align-self: start;
}

.status-row {
  align-items: end;
  margin-bottom: 14px;
}

.status-row label:first-child {
  flex: 0 0 210px;
}

.status-row label:last-child {
  flex: 1 1 auto;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 12px 40px;
  background: var(--soft);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.accept {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-weight: 800;
}

.accept input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.accept span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
}

.public-top {
  align-items: center;
}

.client-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
}

.client-hero {
  grid-column: 1 / -1;
  padding: 24px;
  background: linear-gradient(135deg, #17191f 0%, #272b35 58%, #531713 100%);
  color: #ffffff;
}

.client-hero span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 900;
}

.client-hero h2 {
  margin-top: 18px;
  font-size: clamp(26px, 3vw, 42px);
}

.client-hero p {
  max-width: 860px;
  margin-top: 10px;
  color: #e1e7ef;
}

.public-checks {
  display: grid;
  gap: 8px;
}

.public-check {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
  padding: 9px 0;
}

.public-check strong {
  min-width: 0;
}

.public-check span {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

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

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    height: auto;
    gap: 18px;
  }

  .nav {
    display: flex;
    margin: 0;
  }

  .sidebar-meta {
    margin: 0 0 0 auto;
    border-top: 0;
    padding-top: 0;
  }

  .summary-grid,
  .main-grid,
  .client-layout {
    grid-template-columns: 1fr 1fr;
  }

  .client-hero {
    grid-column: 1 / -1;
  }
}

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

  .sidebar {
    display: grid;
  }

  .sidebar-meta {
    margin-left: 0;
  }

  .topbar,
  .actions,
  .import-row,
  .status-row {
    display: grid;
  }

  .import-row label,
  .status-row label:first-child {
    flex-basis: auto;
  }

  .summary-grid,
  .main-grid,
  .client-layout,
  .photo-grid,
  .shot-list {
    grid-template-columns: 1fr;
  }

  .check-item {
    grid-template-columns: 1fr;
  }
}
