:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
  color: #111827;
  background: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f9fafb 0%, #eef2ff 100%);
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.hero {
  background: linear-gradient(135deg, #111827 0%, #1d4ed8 100%);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.lead,
.muted {
  color: #6b7280;
}

a {
  color: #1d4ed8;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.compact-grid {
  max-width: 280px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
}

.editor {
  min-height: 520px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

textarea:not(.editor) {
  min-height: 100px;
  resize: vertical;
}

.primary-button {
  border: 0;
  border-radius: 14px;
  background: #2563eb;
  color: #ffffff;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  background: #1d4ed8;
}

.submit-button {
  margin-top: 20px;
}

.ghost-button {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
}

.ghost-button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.ghost-button.danger-ghost {
  color: #b91c1c;
  border-color: #fecaca;
}

.ghost-button.danger-ghost:hover {
  background: #fef2f2;
}

.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-groups-toolbar {
  margin-top: 12px;
}

.filter-group-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.filter-group-card-title {
  margin-bottom: 12px;
}

.filter-group-remove-wrap {
  display: flex;
  align-items: flex-end;
}

.model-search {
  margin: 0 0 14px;
}

.full-width {
  grid-column: 1 / -1;
}

.message {
  min-height: 24px;
  margin: 16px 0 0;
  color: #047857;
}

.message.error {
  color: #b91c1c;
}

.hidden {
  display: none;
}

.step-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
  background: #fbfdff;
}

.step-card + .step-card {
  margin-top: 18px;
}

.step-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  flex-shrink: 0;
}

.result-header,
.editor-header,
.inline-form {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: end;
}

.grand-total-wrap {
  text-align: right;
}

.grand-total-wrap span,
.total-box span,
.summary-box span {
  display: block;
  color: #6b7280;
  font-size: 14px;
}

.grand-total-wrap strong {
  font-size: 32px;
}

.totals,
.summary-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.totals {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.total-box,
.summary-box,
.info-box {
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.total-box strong,
.summary-box strong {
  font-size: 20px;
}

.included-list {
  margin: 0;
  padding-left: 20px;
}

.included-list li + li {
  margin-top: 8px;
}

.note {
  background: #eff6ff;
}

.result-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.camera-selection-list {
  display: grid;
  gap: 16px;
}

.camera-card {
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
}

.camera-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.camera-filter-line {
  margin-bottom: 0;
}

.camera-status {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
}

.camera-status.ready {
  background: #dcfce7;
  color: #166534;
}

.model-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.model-card {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  padding: 0;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.model-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.model-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.model-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.model-body {
  padding: 14px;
}

.model-top {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.model-top strong {
  font-size: 15px;
}

.model-body p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  background: #e0e7ff;
  color: #3730a3;
  padding: 6px 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
}

.empty-state {
  margin: 4px 0 0;
}

.inline-form .grow {
  flex: 1;
}

@media (max-width: 720px) {
  .result-header,
  .editor-header,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .camera-card-header,
  .step-heading {
    flex-direction: column;
  }

  .grand-total-wrap {
    text-align: left;
  }
}
