/* Bundle-builder styles */
.bundle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}
@media (max-width: 980px) {
  .bundle-layout { grid-template-columns: 1fr; }
}

/* ─── Toolbar ──────────────────────────────────────────────────────────── */
.bundle-toolbar {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px;
}
.search-box {
  position: relative;
}
.search-box i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted, #95a3bd);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  background: var(--bg-2, rgba(255,255,255,0.03));
  color: var(--text, #e4eaf5);
  border-radius: 10px;
  font-size: 14px;
}
.search-box input:focus {
  outline: none;
  border-color: var(--acc, #6f8cff);
  box-shadow: 0 0 0 3px rgba(111,140,255,0.15);
}
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.chip {
  background: var(--bg-2, rgba(255,255,255,0.03));
  color: var(--text, #e4eaf5);
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--acc, #6f8cff); }
.chip.active { background: var(--acc, #6f8cff); color: #fff; border-color: var(--acc, #6f8cff); }
.chip i { font-size: 11px; opacity: 0.85; }

.seg {
  display: inline-flex;
  background: var(--bg-2, rgba(255,255,255,0.03));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 10px;
  overflow: hidden;
}
.seg-btn {
  background: transparent; color: var(--text, #e4eaf5);
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.seg-btn.active { background: var(--acc, #6f8cff); color: #fff; }
.badge-inline {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.18);
}
.muted.small { font-size: 12px; opacity: 0.7; }

/* ─── Agent grid ──────────────────────────────────────────────────────── */
.agent-grid {
  display: grid; gap: 12px;
}
.agent-card {
  background: var(--bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.15s ease;
}
.agent-card.in-bundle {
  border-color: var(--acc, #6f8cff);
  box-shadow: 0 0 0 1px var(--acc, #6f8cff);
}
.agent-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.agent-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--acc, #6f8cff), var(--acc-2, #8b5cf6));
  border-radius: 10px;
  color: #fff; font-size: 16px;
}
.agent-info h4 { font-size: 14.5px; font-weight: 600; margin: 0; }
.agent-info p { margin: 2px 0 0 0; }
.tier-badge {
  font-size: 10.5px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tier-starter      { background: rgba(34,197,94,0.18);  color: #4ade80; }
.tier-professional { background: rgba(99,102,241,0.20); color: #a5b4fc; }
.tier-business     { background: rgba(245,158,11,0.20); color: #fbbf24; }
.tier-enterprise   { background: rgba(244,63,94,0.20);  color: #fb7185; }

.package-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
@media (max-width: 600px) {
  .package-row { grid-template-columns: repeat(2, 1fr); }
}
.pkg-btn {
  background: var(--bg, rgba(255,255,255,0.02));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center;
  position: relative;
  transition: all 0.15s ease;
  color: var(--text, #e4eaf5);
}
.pkg-btn:hover { border-color: var(--acc, #6f8cff); }
.pkg-btn .pkg-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  opacity: 0.8;
}
.pkg-btn .pkg-price { font-size: 13px; font-weight: 600; }
.pkg-btn .pkg-price small { font-weight: 400; opacity: 0.7; font-size: 10.5px; }
.pkg-btn.on {
  background: var(--acc, #6f8cff); color: #fff; border-color: var(--acc, #6f8cff);
}
.pkg-btn.on .pkg-label { opacity: 1; }
.pkg-btn .check {
  position: absolute; top: 4px; right: 4px;
  font-size: 12px; color: #fff;
}
.pkg-starter    .pkg-label { color: #4ade80; }
.pkg-growth     .pkg-label { color: #a5b4fc; }
.pkg-pro        .pkg-label { color: #fbbf24; }
.pkg-enterprise .pkg-label { color: #fb7185; }
.pkg-btn.on .pkg-label { color: #fff; }

/* ─── Summary ──────────────────────────────────────────────────────────── */
.bundle-summary {
  position: sticky; top: 88px;
}
.summary-card {
  background: var(--bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 20px;
}
.summary-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.summary-head h3 { font-size: 15px; margin: 0; }
.summary-head h3 i { color: var(--acc, #6f8cff); margin-right: 6px; }
.agent-count {
  background: var(--acc, #6f8cff); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 12px;
}

.discount-meter { margin-bottom: 16px; }
.discount-bar {
  position: relative;
  height: 6px;
  background: var(--bg, rgba(255,255,255,0.06));
  border-radius: 3px;
  overflow: visible;
  margin-bottom: 6px;
}
.discount-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #fbbf24, #fb7185);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.discount-fill.maxed {
  box-shadow: 0 0 12px rgba(251,113,133,0.6);
}
.discount-tick {
  position: absolute;
  top: -2px;
  width: 2px; height: 10px;
  background: rgba(255,255,255,0.25);
  transform: translateX(-50%);
}
.discount-label {
  font-size: 11.5px; opacity: 0.75;
  text-align: center;
}

.summary-lines {
  list-style: none; padding: 0; margin: 0 0 16px 0;
  max-height: 280px; overflow-y: auto;
  border-top: 1px dashed var(--line, rgba(255,255,255,0.08));
  padding-top: 10px;
}
.summary-lines li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.05));
  gap: 10px;
}
.summary-lines li:last-child { border-bottom: none; }
.summary-lines .empty {
  justify-content: center; opacity: 0.55; font-size: 13px;
  padding: 18px 0;
  border-bottom: none;
}
.line-main {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.line-name {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px;
}
.line-pkg {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.line-pkg.pkg-starter    { color: #4ade80; }
.line-pkg.pkg-growth     { color: #a5b4fc; }
.line-pkg.pkg-pro        { color: #fbbf24; }
.line-pkg.pkg-enterprise { color: #fb7185; }
.line-side {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
}
.line-remove {
  background: transparent; border: none;
  color: rgba(255,255,255,0.45);
  cursor: pointer; font-size: 12px; padding: 4px;
}
.line-remove:hover { color: var(--err, #fb7185); }

.summary-totals {
  border-top: 1px solid var(--line, rgba(255,255,255,0.08));
  padding-top: 12px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px;
}
.summary-totals .line {
  display: flex; justify-content: space-between;
}
.summary-totals .discount-line { color: var(--ok, #4ade80); }
.summary-totals .discount-line em { font-style: normal; opacity: 0.7; font-size: 11.5px; }
.summary-totals .total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line, rgba(255,255,255,0.08));
  font-size: 15px;
}
.summary-totals .total small {
  font-size: 11px; opacity: 0.7; font-weight: 400;
}

#requestQuoteBtn {
  margin-top: 16px;
}
#requestQuoteBtn:disabled {
  opacity: 0.4; cursor: not-allowed;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  opacity: 0.6;
  background: var(--bg-2, rgba(255,255,255,0.03));
  border: 1px dashed var(--line, rgba(255,255,255,0.08));
  border-radius: 12px;
}

/* ─── Modal ─────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none;
}
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7,8,13,0.78);
  backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  max-width: 520px; width: calc(100% - 32px);
  margin: 60px auto;
  background: var(--bg, #0f1118);
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none; color: rgba(255,255,255,0.5);
  font-size: 18px; cursor: pointer; padding: 8px;
}
.modal-close:hover { color: #fff; }
.modal h3 { margin: 0 0 6px 0; font-size: 18px; }
.modal h3 i { color: var(--acc, #6f8cff); margin-right: 6px; }

.quote-recap {
  background: var(--bg-2, rgba(255,255,255,0.04));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0 18px;
  font-size: 13px;
}
.recap div { margin-bottom: 4px; }
.recap-total {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px dashed var(--line, rgba(255,255,255,0.08));
  font-size: 15px;
}

.form-stack {
  display: flex; flex-direction: column; gap: 12px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-stack label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted, #95a3bd);
}
.form-stack input, .form-stack textarea {
  background: var(--bg-2, rgba(255,255,255,0.03));
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  color: var(--text, #e4eaf5);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.form-stack input:focus, .form-stack textarea:focus {
  outline: none;
  border-color: var(--acc, #6f8cff);
  box-shadow: 0 0 0 3px rgba(111,140,255,0.15);
}

body.modal-open { overflow: hidden; }

#quoteStatus { font-size: 12.5px; min-height: 18px; }
#quoteStatus code {
  background: rgba(111,140,255,0.15); color: #a5b4fc;
  padding: 1px 5px; border-radius: 3px;
}

/* ─── Discount-staffel tegels ─────────────────────────────────────────── */
.discount-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 20px;
}
@media (max-width: 760px) { .discount-tiers { grid-template-columns: repeat(2, 1fr); } }
.tier-card {
  background: var(--bg-2, #0d111c);
  border: 1px solid var(--line, #1f2740);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  position: relative;
  transition: border-color .15s, transform .15s;
}
.tier-card:hover { border-color: var(--gold, #c084fc); transform: translateY(-2px); }
.tier-card.highlight {
  border-color: var(--gold, #c084fc);
  background: linear-gradient(180deg, var(--bg-2, #0d111c), rgba(168,85,247,.04));
  box-shadow: 0 0 0 1px rgba(168,85,247,.18);
}
.tier-num {
  font-size: .75rem;
  color: var(--text-mute, #6c7596);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  margin-bottom: 4px;
}
.tier-pct {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold, #c084fc);
  line-height: 1;
}
.tier-lbl {
  font-size: .82rem;
  color: var(--text-soft, #a8b1cc);
  margin-top: 6px;
}

/* ─── Quick-start bundles ─────────────────────────────────────────────── */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.qs-card {
  background: var(--bg-2, #0d111c);
  border: 1px solid var(--line, #1f2740);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.qs-card:hover { border-color: var(--gold, #c084fc); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.qs-card.highlight {
  border-color: var(--gold, #c084fc);
  background: linear-gradient(180deg, var(--bg-2, #0d111c), rgba(168,85,247,.04));
}
.qs-card.premium {
  border-color: var(--purple, #9d6bff);
  background: linear-gradient(180deg, var(--bg-2, #0d111c), rgba(157,107,255,.05));
}
.qs-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  background: rgba(168,85,247,.15); color: var(--gold, #c084fc);
  padding: 4px 9px; border-radius: 99px;
}
.qs-badge.gold {
  background: linear-gradient(90deg, var(--gold, #c084fc), var(--gold-2, #22d3ee));
  color: #1a1a1a;
}
.qs-ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold, #c084fc), var(--gold-2, #22d3ee));
  color: #1a1a1a; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.qs-card.premium .qs-ico {
  background: linear-gradient(135deg, var(--purple, #9d6bff), #6b3fcf);
  color: white;
}
.qs-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.qs-card p { font-size: .9rem; color: var(--text-soft, #a8b1cc); margin: 0 0 14px; line-height: 1.5; }
.qs-list {
  list-style: none; padding: 0; margin: 0 0 16px;
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.qs-list li {
  font-size: .85rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg, #07080d);
  border: 1px solid var(--line-soft, #1a2138);
  border-radius: 6px;
}
.qs-list.compact li { padding: 4px 10px; font-size: .82rem; }
.qs-pkg {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg-3, #131a2c); color: var(--text-soft, #a8b1cc);
  padding: 2px 7px; border-radius: 4px; font-weight: 600;
}
.qs-totals {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 0 14px; border-top: 1px solid var(--line-soft, #1a2138);
  margin-bottom: 12px; text-align: center;
}
.qs-from { font-size: .72rem; color: var(--text-mute, #6c7596); text-transform: uppercase; letter-spacing: .08em; }
.qs-price { font-size: 1.5rem; font-weight: 800; color: var(--gold, #c084fc); line-height: 1.2; }
.qs-save { font-size: .78rem; color: var(--green, #2ddd7a); }
.qs-card.premium .qs-price { color: var(--purple, #9d6bff); }
