:root {
  --accent: #8e5f86;
  --deep: #3a1734;
  --ink: #121016;
  --muted: #686b73;
  --line: #e3e4e5;
  --paper: #ffffff;
  --wash: #f5f8f6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  flex: 0 0 auto;
}

.phone-page {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--wash);
}

.app-header {
  padding: 18px 24px 28px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(14, 20, 26, 0.76), rgba(14, 20, 26, 0.34)),
    var(--app-header-image, linear-gradient(145deg, color-mix(in srgb, var(--deep) 96%, #050505), color-mix(in srgb, var(--accent) 58%, var(--deep)))) center / cover,
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.13), transparent 13rem),
    linear-gradient(145deg, color-mix(in srgb, var(--deep) 96%, #050505), color-mix(in srgb, var(--accent) 58%, var(--deep)));
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  box-shadow: 0 18px 40px rgba(25, 18, 25, 0.18);
}

.status-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 34px;
  margin-bottom: 22px;
}

.status-bar strong {
  font-size: 18px;
}

.status-bar > span {
  width: 126px;
  height: 34px;
  background: #050506;
  border-radius: 999px;
}

.status-bar div {
  display: flex;
  justify-content: end;
  gap: 7px;
}

.status-bar i {
  display: block;
  width: 22px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 4px;
  opacity: 0.96;
}

.status-bar i:first-child {
  width: 4px;
  border-radius: 999px;
  background: #fff;
}

.status-bar i:nth-child(2) {
  width: 18px;
  border: 0;
  border-top: 4px solid #fff;
  border-radius: 999px;
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.title-row h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(30px, 8vw, 34px);
  line-height: 0.95;
  letter-spacing: 0;
}

.title-row p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
  font-weight: 750;
}

.company-logo {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 6px;
  color: #161018;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  text-align: center;
}

.company-logo strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 0.82;
  letter-spacing: 0;
}

.company-logo img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 26px;
  min-height: 196px;
  padding: 28px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.2), transparent 12rem),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 76%, #101012), color-mix(in srgb, var(--deep) 86%, var(--accent)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #bdebd6;
  background: rgba(14, 12, 16, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 2.7;
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 7vw, 28px);
  line-height: 1;
}

.hero-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.28;
}

.hero-summary-card {
  grid-template-columns: 1fr;
  align-items: stretch;
  min-height: 196px;
  gap: 12px;
  padding: 22px 18px;
}

.hero-summary-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-summary-card h2 {
  margin-bottom: 0;
  font-size: clamp(19px, 4.8vw, 22px);
  line-height: 1.08;
}

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

.hero-summary-grid article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
}

.hero-summary-grid article span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 30px;
  height: 30px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-radius: 8px;
}

.hero-summary-grid svg {
  width: 17px;
  height: 17px;
}

.hero-summary-grid strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.hero-summary-grid p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  align-items: center;
  padding: 12px 12px 0;
  overflow-x: visible;
  background: #fff;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  display: grid;
  place-items: center;
  gap: 4px;
  position: relative;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3f4350;
  font-size: 8.2px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.tabs button span {
  display: block;
  max-width: 48px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.tabs button.active {
  color: var(--deep);
  background: transparent;
  box-shadow: none;
}

.tabs button.active::after {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 0;
  height: 3px;
  background: var(--deep);
  content: "";
}

.tabs svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}

.content {
  display: grid;
  gap: 14px;
  padding: 14px 24px 28px;
  min-width: 0;
}

.notice {
  padding: 12px 14px;
  color: #14593b;
  background: #e9f7ef;
  border: 1px solid #c9ead7;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.content > .card,
.content > .two-column,
.content > .suppliers-card,
.content > .invoice-card {
  margin: 0;
}

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

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(17, 19, 22, 0.07);
}

.card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.card-top,
.section-head {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-top button,
.section-head button {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #174f37;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
}

.card-top button svg,
.section-head button svg {
  width: 18px;
  height: 18px;
}

.appointments-card,
.tasks-card,
.snapshot-card,
.day-summary,
.invoice-details,
.customization-card {
  padding: 22px;
}

.day-summary {
  display: grid;
  gap: 16px;
}

.day-summary header h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.day-summary header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

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

.summary-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 9px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.summary-grid article span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border-radius: 8px;
}

.summary-grid svg {
  width: 19px;
  height: 19px;
}

.summary-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 5vw, 23px);
  line-height: 1;
}

.summary-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.appointment-list,
.task-list {
  display: grid;
}

.appointment-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 12px 0;
  border-bottom: 1px solid #eceeef;
}

.appointment-row:last-child,
.task-row:last-child {
  border-bottom: 0;
}

.time-box {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  min-height: 58px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f6f6f7;
  font-weight: 950;
}

.time-box svg {
  width: 25px;
  height: 25px;
}

.appointment-row strong {
  display: block;
  font-size: 18px;
}

.appointment-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.status {
  display: grid;
  place-items: center;
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.status.green {
  color: #14593b;
  background: #e8f5ee;
}

.status.blue {
  color: #1c3d80;
  background: #edf2ff;
}

.status.gold {
  color: #b86a00;
  background: #fff3dd;
}

.appointment-delete {
  display: grid;
  place-items: center;
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f3e8e7;
  color: #8a2730;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.empty-appointment {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid #eceeef;
}

.empty-appointment strong {
  font-size: 17px;
}

.empty-appointment p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.appointment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eceeef;
  min-width: 0;
}

.appointment-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.appointment-form label span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.appointment-form input,
.appointment-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 0 12px;
}

.appointment-form .appointment-note,
.appointment-form button {
  grid-column: 1 / -1;
}

.appointment-form button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.appointment-form button svg {
  width: 18px;
  height: 18px;
}

.customer-appointments-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
  max-width: 100%;
  overflow: hidden;
}

.customer-appointments-panel .scope-builder-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.customer-appointments-panel h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
}

.customer-appointments-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

.task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #eceeef;
  background: transparent;
  text-align: left;
}

.task-row button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.task-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
}

.task-check span {
  width: 24px;
  height: 24px;
  border: 2px solid #c2c8cd;
  border-radius: 999px;
}

.task-row.done .task-check span {
  display: grid;
  place-items: center;
  border-color: #226345;
  background: #226345;
}

.task-row.done .task-check span::after {
  width: 8px;
  height: 13px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  content: "";
}

.task-open {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.task-row strong {
  font-size: 18px;
  font-weight: 650;
}

.task-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-row.done strong {
  color: #7d858b;
  text-decoration: line-through;
}

.task-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
}

.task-arrow svg {
  width: 18px;
  height: 18px;
}

.task-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eceeef;
}

.task-form label {
  display: grid;
  gap: 6px;
}

.task-form label span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.task-form input,
.task-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: #fbfcfc;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.task-form button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
}

.task-form button svg {
  width: 18px;
  height: 18px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 16px;
  border-top: 1px solid #eceeef;
}

.snapshot-grid button {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #eceeef;
  background: transparent;
  text-align: left;
}

.snapshot-grid button > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #f5f6f7);
  border-radius: 8px;
}

.snapshot-grid button > span.money-icon {
  color: #14593b;
  background: #e9f4ee;
}

.snapshot-grid button > svg {
  width: 18px;
  height: 18px;
  color: #6d7378;
}

.snapshot-grid p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.snapshot-grid strong {
  display: block;
  font-size: clamp(17px, 4.7vw, 20px);
  line-height: 1.12;
}

.edit-grid,
.material-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.edit-grid {
  margin: 16px 0 20px;
}

.edit-grid label,
.material-form label {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.edit-grid span,
.material-form span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.edit-grid input,
.material-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfc;
  font: inherit;
  font-weight: 800;
}

.scope-card,
.material-card,
.suppliers-card {
  padding: 18px;
}

.card header h3,
.section-head h3 {
  margin: 0;
  font-size: clamp(18px, 5vw, 21px);
  line-height: 1.05;
}

.card header p,
.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 650;
}

.scope-list {
  display: grid;
  gap: 13px;
  margin: 20px 0 24px;
}

.scope-list div {
  display: flex;
  gap: 13px;
  align-items: center;
  color: var(--ink);
  font-size: clamp(16px, 4.7vw, 20px);
  font-weight: 750;
}

.scope-list svg {
  width: 24px;
  height: 24px;
  padding: 3px;
  color: #fff;
  background: #226345;
  border-radius: 999px;
  stroke-width: 3;
  flex: 0 0 auto;
}

.customer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.customer-header button {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
}

.customer-header button svg {
  width: 18px;
  height: 18px;
}

.customer-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.customer-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.customer-row.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.customer-row > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--deep);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, #f7f7f8);
}

.customer-row strong {
  display: block;
  font-size: 17px;
}

.customer-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.customer-row > svg {
  width: 18px;
  height: 18px;
  color: #6d7378;
}

.customer-block {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.customer-block > div {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #f7f7f8);
  border-radius: 8px;
}

.customer-block strong {
  display: block;
  font-size: 20px;
}

.customer-block span {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.25;
}

.customer-block span svg {
  width: 16px;
  height: 16px;
  color: #2f7c59;
  fill: #2f7c59;
  stroke: #2f7c59;
}

.customer-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 14px 0 18px;
}

.customer-save-row button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.customer-save-row button.danger {
  border: 1px solid color-mix(in srgb, #ef5343 45%, var(--line));
  background: #fff;
  color: #b83227;
}

.customer-save-row button.danger > span:first-child {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 22px;
  line-height: 1;
}

.customer-save-row svg {
  width: 18px;
  height: 18px;
}

.small-label {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.scope-builder {
  display: grid;
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 8px;
  background: #fbfcfc;
  max-width: 100%;
  overflow: hidden;
}

.scope-builder summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.scope-builder summary::-webkit-details-marker {
  display: none;
}

.scope-head-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}

.scope-head-icon svg {
  width: 23px;
  height: 23px;
}

.scope-builder h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
}

.scope-builder summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.scope-builder summary > svg {
  width: 18px;
  height: 18px;
  color: #6d7378;
  transition: transform 0.18s ease;
}

.scope-builder[open] summary > svg {
  transform: rotate(90deg);
}

.scope-builder-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

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

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

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

.gallery-stage header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.gallery-stage h5 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
}

.gallery-stage p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.gallery-stage-add {
  display: inline-grid;
  grid-template-columns: 30px auto;
  gap: 7px;
  align-items: center;
  min-width: 86px;
  min-height: 42px;
  padding: 6px 10px 6px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--deep);
  cursor: pointer;
}

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

.gallery-stage-add span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--deep);
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
}

.gallery-stage-add strong {
  font-size: 13px;
  font-weight: 950;
}

.gallery-add-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: var(--deep);
  cursor: pointer;
}

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

.gallery-add-button span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.gallery-add-button strong {
  font-size: 17px;
  font-weight: 950;
}

.gallery-tile {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-tile span {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 44px;
  height: 44px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 9%, #f5f6f7);
  border-radius: 8px;
}

.gallery-tile svg {
  width: 22px;
  height: 22px;
}

.gallery-tile strong {
  font-size: 17px;
  line-height: 1.05;
}

.gallery-tile p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.gallery-photo {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #eef1f2;
}

.gallery-photo input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #e4e7e9;
  border-radius: 7px;
  padding: 0 10px;
  background: #fbfcfc;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
}

.gallery-photo button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 19, 22, 0.78);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.completion-report-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}

.completion-report-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.completion-report-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.completion-report-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.08;
}

.completion-report-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.completion-report-card.is-locked ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.completion-report-card.is-locked li {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.completion-report-card.is-locked li.done {
  color: var(--deep);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.completion-report-card.is-locked li svg {
  width: 16px;
  height: 16px;
}

.completion-pdf-page {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8dcdf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(24, 20, 24, 0.08);
}

.completion-pdf-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--deep);
}

.completion-pdf-top h4 {
  margin: 4px 0 0;
  color: var(--deep);
  font-size: 26px;
  line-height: 0.98;
}

.completion-pdf-top > strong {
  max-width: 120px;
  margin: 0;
  font-size: 14px;
  text-align: right;
}

.completion-photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.completion-photo-pair figure,
.completion-progress-strip figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.completion-photo-pair img,
.completion-progress-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #eef1f2;
}

.completion-photo-pair figcaption,
.completion-progress-strip figcaption {
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.completion-progress-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  align-items: stretch;
}

.completion-progress-strip > div {
  padding: 10px;
  border: 1px solid #eceeef;
  border-radius: 8px;
  background: #fbfcfc;
}

.completion-pdf-page footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eceeef;
}

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

.scope-tile-grid button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  text-align: center;
}

.scope-tile-grid button span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}

.scope-tile-grid button svg {
  width: 22px;
  height: 22px;
}

.scope-tile-grid button strong {
  font-size: 14px;
  line-height: 1.05;
}

.scope-tile-grid button.active {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.scope-tile-grid button.active span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.selected-scope,
.scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-scope p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.selected-scope button {
  min-height: 36px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.selected-scope button {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 11px;
  border: 0;
  background: var(--deep);
  color: #fff;
}

.selected-scope button svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.custom-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.custom-scope input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.custom-scope button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
}

.customer-materials-needed {
  display: grid;
  gap: 12px;
}

.customer-materials-needed h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
}

.customer-materials-needed header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.customer-materials-needed .material-library {
  margin-top: 0;
}

.material-selector {
  background: #fff;
}

.materials-builder {
  margin-top: 12px;
}

.materials-builder .scope-head-icon {
  color: #4a173f;
}

.selected-materials-head {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.selected-materials-head h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
}

.selected-materials-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.material-quote-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}

.material-quote-actions strong,
.material-quote-actions span {
  display: block;
}

.material-quote-actions strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.material-quote-actions span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.material-quote-actions button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
  white-space: nowrap;
}

.material-quote-actions button svg {
  width: 18px;
  height: 18px;
}

.soft-button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  min-height: 46px;
  padding: 0 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 8px;
  background: #f6fbf8;
  color: #174f37;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
}

.soft-button svg {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
}

.materials-list {
  display: grid;
  gap: 8px;
  margin: 22px 0 14px;
}

.materials-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}

.mini-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.7;
}

.materials-list strong {
  font-size: clamp(12px, 3.45vw, 17px);
}

.materials-list em {
  color: var(--ink);
  font-size: clamp(12px, 3.45vw, 17px);
  font-style: normal;
  font-weight: 850;
}

.favorite-kits,
.material-library {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 8px;
  background: #fbfcfc;
  overflow-anchor: none;
}

.favorite-kits {
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}

.material-section-accordion > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.material-section-accordion > summary::-webkit-details-marker {
  display: none;
}

.material-section-accordion > summary > span {
  display: grid;
  min-width: 42px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
}

.material-section-accordion > summary > svg {
  width: 22px;
  height: 22px;
  color: #687078;
  transition: transform 0.18s ease;
}

.material-section-accordion[open] > summary > svg {
  transform: rotate(90deg);
}

.material-section-accordion:not([open]) {
  padding-bottom: 12px;
}

.material-library-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.library-head h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
}

.library-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.kit-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.kit-head button {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.kit-head button svg {
  width: 17px;
  height: 17px;
}

.kit-list {
  display: grid;
  gap: 9px;
}

.kit-card {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.kit-card.selected {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.kit-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  min-height: 62px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #eceeef;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.quick-kits .kit-add {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
  background: #fff;
}

.quick-kits .kit-add.selected {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.kit-add strong {
  grid-column: 1;
  font-size: 16px;
}

.kit-add span,
.kit-add em {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  font-style: normal;
}

.kit-add small {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  min-width: 64px;
  padding: 8px 9px;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.kit-add[aria-pressed="true"] small {
  background: color-mix(in srgb, var(--accent) 78%, #14593b);
}

.kit-edit summary,
.kit-material summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  color: var(--deep);
  font-weight: 950;
}

.kit-edit summary::-webkit-details-marker,
.kit-material summary::-webkit-details-marker {
  display: none;
}

.kit-edit summary svg,
.kit-material summary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.kit-edit[open] > summary svg,
.kit-material[open] > summary svg {
  transform: rotate(90deg);
}

.kit-edit-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.kit-edit-body label {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.kit-edit-body label span,
.kit-materials p {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.kit-edit-body input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.kit-materials {
  display: grid;
  gap: 8px;
}

.kit-materials p {
  margin: 4px 0 0;
}

.kit-material {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.kit-material summary span {
  color: var(--muted);
  font-size: 13px;
}

.library-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  overflow-anchor: none;
}

.library-group summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 18px;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.library-group summary::-webkit-details-marker {
  display: none;
}

.library-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--deep);
  background: color-mix(in srgb, var(--accent) 10%, #f5f6f7);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
}

.library-group summary strong {
  display: block;
  font-size: clamp(18px, 5.4vw, 24px);
  line-height: 1.02;
}

.library-group summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.library-group summary em {
  color: var(--ink);
  font-size: clamp(18px, 5vw, 24px);
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.library-icon svg {
  width: 24px;
  height: 24px;
}

.library-group summary > svg {
  width: 18px;
  height: 18px;
  color: #6d7378;
  transition: transform 0.18s ease;
}

.library-group[open] summary > svg {
  transform: rotate(90deg);
}

.library-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 11px 12px;
}

.library-options button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: var(--deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.library-edit-toggle {
  justify-self: start;
  min-height: 38px;
  margin: 0 11px 12px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: #fff;
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
}

.library-editor {
  display: grid;
  gap: 10px;
  padding: 0 11px 12px;
  overflow-anchor: none;
}

.library-editor > p {
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.library-option-edit {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.library-option-edit label {
  display: grid;
  gap: 6px;
}

.library-option-edit span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-option-edit input,
.library-add-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.library-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, #fff);
}

.library-add-row button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-weight: 950;
}

.materials-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.material-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.material-detail summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 34px 18px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.material-detail summary::-webkit-details-marker {
  display: none;
}

.material-detail summary strong {
  font-size: clamp(15px, 4vw, 18px);
}

.material-detail summary em {
  font-style: normal;
  font-weight: 950;
}

.material-detail summary > svg {
  width: 18px;
  height: 18px;
  color: #6d7378;
  transition: transform 0.18s ease;
}

.remove-material-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 50%;
  background: #fff;
  color: #8a2730;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.remove-material-button:hover,
.remove-material-button:focus-visible {
  border-color: transparent;
  background: #8a2730;
  color: #fff;
}

.material-detail[open] summary > svg {
  transform: rotate(90deg);
}

.material-form {
  padding: 0 10px 12px;
}

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

.supplier-location-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}

.supplier-location-card > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.supplier-location-card > div > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  color: var(--deep);
}

.supplier-location-card svg {
  width: 22px;
  height: 22px;
}

.supplier-location-card strong {
  display: block;
  font-size: 18px;
  font-weight: 950;
}

.supplier-location-card p,
.supplier-location-card small {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

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

.supplier-location-card label span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.supplier-location-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 0 12px;
}

.supplier-picker {
  display: grid;
  gap: 12px;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid #dfe4e8;
  border-radius: 8px;
  background: #f8faf9;
}

.supplier-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.supplier-picker-head strong {
  display: block;
  font-size: 18px;
  font-weight: 950;
}

.supplier-picker-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.supplier-picker-list {
  display: grid;
  gap: 10px;
}

.supplier-choice {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.supplier-choice-logo {
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f2;
  color: var(--deep);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.supplier-choice-logo img,
.supplier-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
}

.supplier-choice-logo.has-logo,
.supplier-logo.has-logo {
  padding: 4px;
  background: #fff;
}

.supplier-choice-main {
  min-width: 0;
}

.supplier-choice-main strong {
  display: block;
  font-size: 16px;
  font-weight: 950;
}

.supplier-choice-main p {
  margin: 2px 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.supplier-choice-main small {
  display: flex;
  gap: 5px;
  align-items: center;
  color: #2f7c59;
  font-size: 12px;
  font-weight: 850;
}

.supplier-choice-main small svg {
  width: 14px;
  height: 14px;
  fill: #2f7c59;
  stroke: #2f7c59;
}

.supplier-choice button {
  min-width: 64px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.supplier-choice button:disabled {
  background: #e8ecea;
  color: #6b7078;
}

.supplier {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.supplier-logo {
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f5f6f7);
  color: #253044;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.supplier-logo.brand-blue {
  color: #fff;
  background: linear-gradient(145deg, #16346b, #071f49);
}

.supplier-logo.brand-blue.has-logo {
  background: #fff;
  color: var(--deep);
}

.supplier-main {
  min-width: 0;
}

.supplier-main strong {
  display: block;
  font-size: 18px;
}

.supplier-main p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-weight: 650;
}

.supplier-main small {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #2f7c59;
  font-weight: 850;
}

.supplier-main small svg {
  width: 16px;
  height: 16px;
  fill: #2f7c59;
  stroke: #2f7c59;
}

.supplier-main em {
  display: block;
  margin-top: 5px;
  color: #7a8086;
  font-style: normal;
  font-weight: 650;
  line-height: 1.25;
}

.email,
.supplier-action {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  line-height: 1.05;
}

.supplier-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.email {
  border: 0;
  color: #fff;
  background: var(--deep);
}

.email.icon-only {
  width: 46px;
  min-width: 46px;
  padding: 0;
}

.supplier-action {
  border: 1px solid var(--line);
  background: #f7f7f7;
}

.email svg,
.supplier-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.supplier-edit {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow: hidden;
}

.supplier-edit summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  color: var(--deep);
  font-weight: 950;
}

.supplier-edit summary::-webkit-details-marker {
  display: none;
}

.supplier-edit summary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.supplier-edit[open] summary svg {
  transform: rotate(90deg);
}

.supplier-edit .edit-grid {
  margin: 0;
  padding: 0 12px 12px;
}

.arrow {
  position: absolute;
  top: 34px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #70737a;
}

.invoice-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  margin-bottom: 0;
}

.invoice-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  color: #fff;
  background: #14593b;
}

.invoice-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 2.4;
}

.invoice-card p {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.invoice-card strong {
  display: block;
  margin: 2px 0;
  font-size: 35px;
  line-height: 1;
}

.invoice-card span {
  color: var(--muted);
  font-weight: 650;
}

.invoice-card .soft-button {
  grid-column: 1 / -1;
}

.invoice-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
}

.invoice-action {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
}

.invoice-action.primary {
  border-color: transparent;
  background: var(--deep);
  color: #fff;
}

.invoice-action.finalise {
  border-color: transparent;
  background: #eefaf3;
  color: #155d39;
}

.invoice-action.finalise svg {
  stroke-width: 3;
}

.pdf-save-confirmation {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #bfe9d2;
  border-radius: 8px;
  background: #eefaf3;
  color: #155d39;
}

.pdf-save-confirmation svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 8px;
  background: #d8f4e5;
  stroke-width: 3;
}

.pdf-save-confirmation strong {
  display: block;
  color: #155d39;
  font-size: 15px;
  font-weight: 950;
}

.pdf-save-confirmation span {
  display: block;
  margin-top: 2px;
  color: #2f7c59;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.quote-finalised-confirmation {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #bfe9d2;
  border-radius: 8px;
  background: #f2fbf6;
  color: #155d39;
}

.quote-finalised-confirmation svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 8px;
  background: #d8f4e5;
  stroke-width: 3;
}

.quote-finalised-confirmation strong {
  display: block;
  color: #155d39;
  font-size: 15px;
  font-weight: 950;
}

.quote-finalised-confirmation span {
  display: block;
  margin-top: 2px;
  color: #2f7c59;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.invoice-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.invoice-register {
  display: grid;
  gap: 15px;
  padding: 18px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.invoice-register-list {
  display: grid;
  gap: 10px;
}

.invoice-customer-section {
  display: grid;
  gap: 8px;
}

.invoice-customer-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  text-align: left;
}

.invoice-customer-group:first-child {
  margin-top: 0;
}

.invoice-customer-group span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.invoice-customer-group svg {
  width: 16px;
  height: 16px;
}

.invoice-customer-group strong {
  min-width: 0;
  color: var(--deep);
  font-size: 15px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.invoice-customer-group small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.invoice-customer-group > svg {
  grid-column: 3;
  width: 18px;
  height: 18px;
  color: #70737a;
  transition: transform 0.18s ease;
}

.invoice-customer-section.open .invoice-customer-group > svg {
  transform: rotate(90deg);
}

.invoice-customer-invoices {
  display: grid;
  gap: 8px;
}

.invoice-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 82px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.invoice-record.active {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.invoice-record-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--deep);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.invoice-record-icon svg {
  width: 21px;
  height: 21px;
}

.invoice-record div {
  min-width: 0;
}

.invoice-record div strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.invoice-record p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.invoice-record em {
  grid-column: 2;
  justify-self: start;
  align-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff4df;
  color: #805006;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-record em.paid {
  background: #e7f7ef;
  color: #17633d;
}

.invoice-record em.sent {
  background: #eaf0ff;
  color: #244e9a;
}

.invoice-record b {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  color: var(--deep);
  font-size: 22px;
  line-height: 1;
}

.invoice-details dl {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.invoice-details div,
.customization-card label,
.logo-preview {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invoice-details dt,
.customization-card label span,
.logo-preview > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.invoice-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 10, 12, 0.54);
}

.invoice-modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 400px);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.invoice-modal-close {
  position: sticky;
  top: 0;
  justify-self: end;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.invoice-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -42px;
  padding-right: 52px;
}

.invoice-modal-head h3 {
  margin: 0;
  font-size: 22px;
}

.invoice-modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.email-modal {
  z-index: 70;
}

.email-modal-panel {
  background: #fff;
}

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

.email-preview-card label {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.email-preview-card label span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.email-preview-card input {
  width: 100%;
  min-height: 34px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}

.email-message {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.email-message p {
  margin: 0 0 13px;
  color: #242833;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.email-message p:last-child {
  margin-bottom: 0;
}

.quote-attachment {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px dashed #aab2bc;
  border-radius: 8px;
  background: #f7f9fb;
}

.quote-attachment-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #ef5548;
  font-size: 13px;
  font-weight: 950;
}

.quote-attachment strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.quote-attachment span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.quote-attachment .mini-action {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
}

.quote-email-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.email-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.invoice-paper {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #dfe2e4;
  border-radius: 8px;
  background: linear-gradient(#fff, #fbfbfb);
  box-shadow: 0 12px 28px rgba(24, 20, 24, 0.08);
}

.invoice-paper-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eceeef;
  padding-bottom: 12px;
}

.invoice-paper-head strong {
  font-size: 22px;
  line-height: 1;
}

.invoice-paper-head span {
  color: var(--accent);
  font-weight: 950;
}

.invoice-paper p,
.invoice-paper small,
.invoice-to em {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.35;
}

.invoice-to {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f7f7;
}

.invoice-to span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-to strong {
  font-size: 18px;
}

.invoice-work-summary {
  display: grid;
  gap: 10px;
}

.invoice-work-summary article {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #eceeef;
  border-radius: 8px;
  background: #fff;
}

.invoice-work-summary article > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.invoice-work-summary p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.invoice-work-summary ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invoice-work-summary li {
  display: grid;
  gap: 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f0f1f2;
}

.invoice-work-summary li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.invoice-work-summary li strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.invoice-work-summary li span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.invoice-photos {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eceeef;
  border-radius: 8px;
  background: #fbfcfc;
}

.invoice-photos-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.invoice-photos-head span {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-photos-head strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.1;
}

.invoice-photos-head label {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

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

.invoice-photos-head em {
  font-style: normal;
}

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

.invoice-photo-grid figure {
  display: grid;
  gap: 5px;
  margin: 0;
}

.invoice-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #eef1f2;
}

.invoice-photo-grid figcaption,
.invoice-photo-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.pdf-preview-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.pdf-page {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8dcdf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(24, 20, 24, 0.1);
}

.pdf-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--deep);
}

.pdf-top span,
.pdf-parties span,
.pdf-meta span,
.pdf-section h4,
.pdf-total span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pdf-top h2 {
  margin: 4px 0;
  color: var(--deep);
  font-size: 34px;
  line-height: 0.95;
}

.pdf-top p,
.pdf-parties p,
.pdf-section p,
.pdf-notes {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pdf-top > strong {
  max-width: 110px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.05;
  text-align: right;
}

.pdf-parties,
.pdf-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pdf-parties article,
.pdf-meta div,
.pdf-section {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid #eceeef;
  border-radius: 8px;
  background: #fbfcfc;
}

.pdf-parties strong,
.pdf-meta strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pdf-section h4 {
  margin: 0;
}

.pdf-section ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-section li {
  display: grid;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef0f1;
}

.pdf-section li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pdf-section li strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.pdf-section li span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.pdf-lines {
  display: grid;
  border: 1px solid #eceeef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pdf-lines > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  border-bottom: 1px solid #eceeef;
  font-size: 12px;
  font-weight: 800;
}

.pdf-lines > div:first-child {
  color: inherit;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.pdf-lines > div:last-child {
  border-bottom: 0;
}

.pdf-lines strong,
.pdf-lines span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdf-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
}

.pdf-total span {
  color: color-mix(in srgb, #fff 74%, var(--accent));
}

.pdf-total strong {
  font-size: 27px;
  line-height: 1;
}

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

  body * {
    visibility: hidden;
  }

  #invoice-pdf-view,
  #invoice-pdf-view * {
    visibility: visible;
  }

  #invoice-pdf-view {
    position: absolute;
    inset: 0;
    width: auto;
    min-height: auto;
    box-shadow: none;
    border: 0;
    border-radius: 0;
  }
}

.invoice-lines {
  display: grid;
  gap: 0;
  border: 1px solid #eceeef;
  border-radius: 8px;
  overflow: hidden;
}

.invoice-line-head,
.invoice-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px;
  border-bottom: 1px solid #eceeef;
}

.invoice-line-head {
  color: var(--accent);
  background: #f8f9f9;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-line-row {
  font-size: 13px;
  font-weight: 750;
}

.invoice-line-row:last-child {
  border-bottom: 0;
}

.invoice-line-row span,
.invoice-line-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.invoice-line-row .editable-quote-cell {
  min-height: 38px;
  padding: 8px 9px;
  line-height: 1.25;
  text-align: left;
}

.invoice-scope-editor {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid #eceeef;
  border-radius: 10px;
  background: #fbfcfb;
}

.invoice-scope-editor > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
}

.invoice-scope-editor > summary::-webkit-details-marker {
  display: none;
}

.invoice-scope-editor > summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef1f2;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}

.invoice-scope-editor[open] > summary::after {
  content: "-";
}

.invoice-scope-editor > summary span {
  font-weight: 950;
}

.invoice-scope-editor > summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.invoice-scope-editor-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.invoice-scope-editor-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.invoice-scope-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.invoice-scope-option-grid button,
.invoice-selected-scope button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
}

.invoice-scope-option-grid button span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eef1f2;
  color: var(--deep);
}

.invoice-scope-option-grid button.active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, #fff);
  color: var(--deep);
}

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

.invoice-selected-scope em {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.invoice-selected-scope button span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f3e8e7;
  color: #8a2730;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.invoice-custom-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.invoice-custom-scope input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.invoice-custom-scope button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  padding: 0 14px;
  font-weight: 950;
}

.editable-quote-cell {
  min-height: 28px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: text;
}

.editable-quote-cell:hover,
.editable-quote-cell:focus {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  outline: none;
}

.invoice-line-row strong {
  font-weight: 950;
}

.remove-quote-line-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #f3e8e7;
  color: #8a2730;
  font-size: 21px;
  font-weight: 850;
  line-height: 1;
}

.invoice-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #eceeef;
  font-weight: 950;
}

.invoice-total strong {
  font-size: 24px;
}

.invoice-line-editor {
  display: grid;
  gap: 12px;
}

.invoice-more-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.invoice-more-editor > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
}

.invoice-more-editor > summary::-webkit-details-marker {
  display: none;
}

.invoice-more-editor > summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef1f2;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
}

.invoice-more-editor[open] > summary::after {
  content: "-";
}

.invoice-more-editor > summary span {
  font-weight: 950;
}

.invoice-more-editor > summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.invoice-editor-panel {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.invoice-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.invoice-editor-head h4 {
  margin: 0;
  font-size: 18px;
}

.invoice-editor-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.invoice-editor-head button,
.remove-line-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 8px;
  background: #fff;
  color: var(--deep);
  font-weight: 950;
}

.remove-line-button {
  color: #8a2730;
}

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

.invoice-line-editor label,
.line-total {
  display: grid;
  gap: 7px;
}

.invoice-line-editor label span,
.line-total span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.invoice-line-editor input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e6e8e9;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfc;
  font: inherit;
  font-weight: 800;
}

.line-total {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f7f7;
}

.line-total strong {
  font-size: 20px;
}

.customization-card {
  display: grid;
  gap: 12px;
}

.customization-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 850;
}

.customization-card input[type="color"] {
  height: 48px;
  padding: 4px;
}

.logo-preview {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.logo-preview > span {
  color: var(--accent);
}

@media (min-width: 760px) {
  body {
    background:
      linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
      radial-gradient(circle at top, color-mix(in srgb, var(--accent) 28%, #fff), #eeeeee 60%);
    padding: 22px;
  }

  .phone-page {
    border: 14px solid #050506;
    border-radius: 54px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  }

  .supplier {
    grid-template-columns: 74px 1fr minmax(164px, 0.5fr);
  }

  .supplier-actions {
    grid-column: auto;
  }

  .arrow {
    position: static;
  }

  .invoice-card {
    grid-template-columns: 68px 1fr 150px;
  }

  .invoice-card .soft-button {
    grid-column: auto;
  }
}

@media (min-width: 400px) {
  .supplier {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .supplier-actions {
    grid-column: 1 / -1;
  }

  .arrow {
    position: static;
  }
}

@media (max-width: 759px) {
  .tabs {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 10px 10px 0;
  }

  .tabs button {
    min-height: 50px;
    padding-bottom: 10px;
  }

  .tabs button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tabs svg {
    width: 23px;
    height: 23px;
  }

  .appointment-form {
    grid-template-columns: 1fr;
  }

  .appointment-row {
    grid-template-columns: 82px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .time-box {
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    text-align: center;
  }

  .appointment-row strong {
    font-size: 16px;
  }

  .appointment-row p {
    font-size: 14px;
  }
}

@media (max-width: 399px) {
  .tabs {
    padding-inline: 8px;
  }

  .tabs button {
    min-height: 48px;
  }

  .tabs svg {
    width: 22px;
    height: 22px;
  }

  .tabs button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .content {
    gap: 12px;
    padding-inline: 16px;
  }

  .tasks-card,
  .scope-card,
  .material-card,
  .suppliers-card,
  .invoice-details,
  .customization-card {
    padding: 16px;
  }

  .edit-grid,
  .material-form,
  .task-form,
  .invoice-line-editor,
  .invoice-editor-panel {
    gap: 12px;
  }

  .edit-grid label,
  .material-form label,
  .task-form label,
  .invoice-line-editor article {
    padding: 13px;
    border-radius: 10px;
  }

  .edit-grid span,
  .material-form span,
  .task-form label span,
  .invoice-line-editor label span,
  .line-total span {
    font-size: 12px;
    line-height: 1.2;
  }

  .edit-grid input,
  .material-form input,
  .task-form input,
  .task-form select,
  .invoice-line-editor input,
  .gallery-photo input {
    min-height: 50px;
    font-size: 16px;
  }

  .task-form button,
  .invoice-editor-head button,
  .remove-line-button,
  .gallery-add-button {
    min-height: 50px;
  }

  .gallery-stage header,
  .completion-report-card > header,
  .completion-pdf-top,
  .completion-pdf-page footer {
    align-items: stretch;
    flex-direction: column;
  }

  .completion-pdf-top > strong {
    max-width: none;
    text-align: left;
  }

  .completion-progress-strip {
    grid-template-columns: 1fr;
  }

  .invoice-editor-head,
  .invoice-photos-head {
    grid-template-columns: 1fr;
  }

  .invoice-scope-option-grid,
  .invoice-custom-scope {
    grid-template-columns: 1fr;
  }

  .invoice-scope-editor > summary {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .invoice-scope-editor > summary small {
    text-align: left;
  }

  .invoice-line-head,
  .invoice-line-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
  }

  .invoice-line-head {
    display: grid;
    font-size: 10px;
  }

  .invoice-line-head span:first-child {
    line-height: 1.15;
  }

  .invoice-line-row {
    align-items: start;
  }

  .invoice-line-row .editable-quote-cell:first-child {
    grid-column: auto;
    width: auto;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 14px;
    line-height: 1.22;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .remove-quote-line-button {
    align-self: center;
  }

  .invoice-editor-head button,
  .invoice-photos-head label {
    width: 100%;
  }

  .invoice-line-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
    align-items: center;
    padding: 10px 8px;
  }

  .remove-quote-line-button {
    justify-self: center;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .editable-quote-cell {
    min-height: 36px;
    padding: 7px 5px;
    border-color: #e6e8e9;
    background: #fbfcfc;
    font-size: 13px;
    text-align: center;
  }

  .invoice-line-row .editable-quote-cell:first-child {
    text-align: left;
  }

  .invoice-photo-grid {
    grid-template-columns: 1fr;
  }

  .supplier-picker-head,
  .supplier-choice {
    grid-template-columns: 1fr;
  }

  .supplier-picker-head .text-button,
  .supplier-choice button {
    width: 100%;
  }

  .supplier-choice-logo {
    width: 52px;
    height: 52px;
  }

  .supplier {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .supplier-logo {
    grid-row: auto;
  }

  .supplier-main {
    grid-column: 2;
  }

  .supplier-actions {
    grid-column: 1 / -1;
  }

  .email,
  .supplier-action {
    padding: 0 8px;
    font-size: 13px;
  }
}

@media (max-width: 349px) {
  .app-header,
  .tabs,
  .two-column,
  .suppliers-card,
  .invoice-card {
    margin-left: 18px;
    margin-right: 18px;
  }

  .app-header {
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .tabs {
    padding-left: 18px;
    padding-right: 18px;
  }

  .title-row h1 {
    font-size: 31px;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

}
