:root {
  --ink: #06152b;
  --muted: #526477;
  --blue: #235b8a;
  --blue-dark: #08233f;
  --orange: #ff9900;
  --line: #d7e2ec;
  --surface: #ffffff;
  --page: #eef4f9;
  --soft: #f7fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(35, 91, 138, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8fbfd 0%, var(--page) 100%);
  color: var(--ink);
}

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

.app-shell {
  width: min(1480px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero > div:first-child {
  min-height: 290px;
  padding: 44px;
  color: white;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-top: 4px solid var(--orange);
  box-shadow: 0 24px 70px rgba(8, 35, 63, 0.18);
}

.brand {
  display: grid;
  width: max-content;
  margin-bottom: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand strong {
  color: var(--orange);
  font-size: 2rem;
  font-weight: 950;
}

.brand span {
  margin-top: 6px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.5em;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 770px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
  line-height: 1.55;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  box-shadow: 0 18px 50px rgba(8, 35, 63, 0.1);
}

.hero-panel strong {
  font-size: 1.45rem;
}

.hero-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.12);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.form-panel,
.summary-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(8, 35, 63, 0.08);
}

.form-panel {
  padding: 34px;
}

.notice {
  margin-bottom: 26px;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(255, 153, 0, 0.12), rgba(255, 255, 255, 0.92));
  border-left: 4px solid var(--orange);
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.notice p {
  margin: 0;
  color: var(--muted);
}

.summary-panel {
  padding: 26px;
  border-top: 4px solid var(--orange);
}

.sticky {
  position: sticky;
  top: 22px;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 12px 0 22px;
  padding-top: 10px;
}

.section-heading:not(:first-child) {
  margin-top: 42px;
  border-top: 1px solid var(--line);
}

.section-heading span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--orange);
  border-radius: 50%;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--blue-dark);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #b9c9d8;
  background: white;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.18);
}

textarea {
  resize: vertical;
}

.notes {
  margin-top: 24px;
}

.rental-config {
  display: grid;
  gap: 20px;
}

.included-kit {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 153, 0, 0.42);
  border-left: 4px solid var(--orange);
  background: rgba(255, 153, 0, 0.08);
}

.included-kit strong {
  color: #00438a;
}

.extras-box {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.extras-box h3,
.discount-table h3 {
  margin: 0 0 8px;
  color: #00438a;
}

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

label small {
  margin-top: -4px;
  color: var(--orange);
  font-weight: 900;
}

.calculation-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  overflow: hidden;
}

.calculation-strip > div {
  min-height: 112px;
  padding: 20px;
  background: #f4f8fc;
  border-right: 1px solid var(--line);
}

.calculation-strip > div:last-child {
  border-right: 0;
}

.calculation-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.calculation-strip strong {
  white-space: pre-line;
  color: #002f68;
  font-size: 1.35rem;
  line-height: 1.25;
}

.calculation-strip .total {
  background: #031022;
}

.calculation-strip .total span,
.calculation-strip .total strong {
  color: white;
}

.discount-table {
  border: 1px solid var(--line);
  background: white;
}

.discount-table h3 {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td:last-child {
  color: #00438a;
  font-weight: 900;
}

.signature-grid {
  margin-top: 22px;
}

.signature-pad {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.signature-pad h3 {
  margin: 0 0 6px;
  color: #00438a;
}

.signature-pad p {
  margin: 0;
  color: var(--muted);
}

#signature-canvas {
  width: 100%;
  height: 170px;
  touch-action: none;
  background:
    linear-gradient(transparent calc(100% - 42px), rgba(35, 91, 138, 0.22) calc(100% - 41px), transparent calc(100% - 40px)),
    #ffffff;
  border: 1px dashed #9fb3c6;
  cursor: crosshair;
}

.small-button {
  justify-self: start;
  min-height: 40px;
  padding: 0 18px;
}

.summary-panel h2 {
  margin-bottom: 18px;
}

dl {
  display: grid;
  gap: 0;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  background: var(--soft);
}

dt,
dd {
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  background: white;
  font-weight: 900;
}

dt:last-of-type,
dd:last-of-type {
  border-bottom: 0;
}

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

.send-status {
  display: none;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--blue-dark);
  font-weight: 850;
  line-height: 1.35;
}

.send-status.is-visible {
  display: block;
}

.send-status.is-ok {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.1);
  color: #11612f;
}

.send-status.is-error {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

button {
  min-height: 48px;
  border: 1px solid var(--line);
  background: white;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 900;
}

button:hover {
  border-color: var(--orange);
  color: var(--blue);
}

.primary {
  color: white;
  background: linear-gradient(135deg, #0d62c5, #064ca0);
  border-color: #064ca0;
  box-shadow: 0 16px 28px rgba(6, 76, 160, 0.22);
}

.primary:hover {
  color: white;
  filter: brightness(1.05);
}

.plain-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 900;
}

.privacy-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

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

  .extras-box,
  .calculation-strip {
    grid-template-columns: 1fr;
  }

  .calculation-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 24px, 1480px);
    padding-top: 14px;
  }

  .hero > div:first-child,
  .form-panel,
  .summary-panel {
    padding: 22px;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}
