* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
  padding: 16px;
  background-color: #f8fafc;
  color: #1e293b;
}

.quote-container {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
}

.app-title {
  color: #0284c7;
}

h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #0f172a;
}

.hint {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px 0;
}

hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
}

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

.field-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
}

input, select, textarea {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 2px #bae6fd;
}

/* Line groups */
.line-group {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fbfdff;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #0f172a;
}

.btn-remove {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.btn-remove:hover {
  background: #fee2e2;
}

.group-total {
  margin-top: 12px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.filter-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.deviceSearch {
  flex: 1;
}

.results-dropdown {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  background: #ffffff;
  position: relative;
  z-index: 5;
}

.device-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.device-item:hover, .device-item.active {
  background-color: #f0fdf4;
}

.device-item .name {
  font-weight: 500;
}

.device-item .price {
  font-size: 13px;
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 12px;
}

.selected-badge {
  margin-top: 8px;
  padding: 8px 12px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-clear {
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
  color: #0369a1;
  font-size: 14px;
}

.search-section {
  margin-bottom: 12px;
}

.search-section > label {
  display: block;
}

.summary-box {
  margin-top: 20px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

textarea {
  width: 100%;
  resize: vertical;
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0369a1;
}

.btn-primary:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 16px;
  background-color: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 4px;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.status-banner {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

.status-banner.info {
  background: #e0f2fe;
  color: #0369a1;
}

.status-banner.error {
  background: #fee2e2;
  color: #b91c1c;
}

.status-banner.success {
  background: #dcfce7;
  color: #15803d;
}

/* Thank-you screen after a successful quote submit */
.thank-you {
  max-width: 560px;
  margin: 48px auto;
  padding: 32px 28px;
  text-align: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
}

.thank-you h2 {
  color: #15803d;
  margin-top: 0;
}

.thank-you-main {
  font-size: 18px;
  font-weight: 600;
}

.thank-you .btn-secondary {
  margin-top: 12px;
}

/* Promo controls */
.promo-controls {
  margin-top: 12px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 12px;
}

.promo-controls > label {
  display: block;
  margin-bottom: 8px;
}

.credit-checks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.credit-checks > label {
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  color: #0f172a;
}

.credit-checks input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0284c7;
}

.group-preview {
  margin-top: 10px;
  font-size: 13px;
  color: #065f46;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 8px 12px;
}

.group-total .before {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 400;
  margin-right: 8px;
}

/* Ownership toggle (New vs customer-owned BYOD) */
.ownership-toggle {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ownership-btn {
  border: 0;
  background: #f1f5f9;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
}

.ownership-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.byod-note {
  font-size: 13px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* Internet service groups + All-in-One row */
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
}
.checkline input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.internet-group {
  border-left: 4px solid #0ea5e9;
}
.aio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 14px;
}
