/* Dashboard — usage chart, integraties, gesprekken */

.dash-hero { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.dash-hero .crumb { font-size: .9rem; margin-bottom: 12px; }
.dash-hero h1 { margin: 0 0 4px; }
.dash-hero .sub { color: var(--text-soft); margin: 0; }

.dash-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.dash-card h3 { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.dash-card h3 i { color: var(--gold); }
.dash-card h3 .pill {
  margin-left: auto; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  background: var(--gold-soft); color: var(--gold); padding: 3px 8px; border-radius: 4px; font-weight: 600;
}
.dash-card h3 .pill.danger { background: rgba(255,59,59,.12); color: var(--red); }
.dash-card h3 .pill.ok { background: rgba(45,221,122,.12); color: var(--green); }

.usage-meter {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}
.usage-meter .nums { display: flex; align-items: baseline; gap: 8px; }
.usage-meter .nums .big { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.usage-meter .nums .of { color: var(--text-mute); }
.usage-meter .bar { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.usage-meter .bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .4s; }
.usage-meter .bar-fill.over { background: linear-gradient(90deg, var(--yellow), var(--red)); }
.usage-meter .legend { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-mute); }

.chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 140px; padding: 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px;
}
.chart .bar {
  flex: 1; min-width: 0; background: linear-gradient(180deg, var(--gold), var(--gold-2));
  border-radius: 4px 4px 0 0; opacity: .85; transition: opacity .15s, transform .15s;
  position: relative;
}
.chart .bar:hover { opacity: 1; transform: scaleY(1.04); transform-origin: bottom; }
.chart .bar .lbl { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .72rem; color: var(--text-mute); }
.chart .bar .tooltip {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--bg-3); border: 1px solid var(--line); padding: 4px 8px;
  border-radius: 4px; font-size: .72rem; white-space: nowrap; opacity: 0; pointer-events: none;
}
.chart .bar:hover .tooltip { opacity: 1; }
.chart-wrap { padding-bottom: 24px; }

.integ-list { display: flex; flex-direction: column; gap: 10px; }
.integ-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.integ-row .ico { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--gold); flex-shrink: 0; }
.integ-row .meta { flex: 1; min-width: 0; }
.integ-row .meta .name { font-weight: 700; font-size: .95rem; }
.integ-row .meta .sub  { font-size: .8rem; color: var(--text-mute); }
.integ-row .health {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .78rem; padding: 4px 8px; border-radius: 99px;
}
.integ-row .health.ok { background: rgba(45,221,122,.12); color: var(--green); }
.integ-row .health.fail { background: rgba(255,59,59,.12); color: var(--red); }
.integ-row .health.unknown { background: var(--bg-3); color: var(--text-mute); }
.integ-row .revoke {
  background: transparent; border: 1px solid var(--line); color: var(--text-soft);
  padding: 6px 10px; border-radius: 6px; font: inherit; font-size: .82rem; cursor: pointer;
}
.integ-row .revoke:hover { color: var(--red); border-color: var(--red); }

.platform-empty {
  background: var(--bg); border: 1px dashed var(--line); border-radius: 10px;
  padding: 16px; text-align: center; color: var(--text-mute); font-size: .9rem;
}
.platform-empty a { color: var(--gold); }

.conv-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.conv-table th { text-align: left; padding: 6px 8px; color: var(--text-mute); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.conv-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.conv-table tr:last-child td { border-bottom: 0; }
.conv-table .plat { font-size: .72rem; padding: 2px 6px; border-radius: 4px; background: var(--bg-3); color: var(--text-soft); }
.conv-table .msg, .conv-table .reply { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-table .at { color: var(--text-mute); font-size: .78rem; white-space: nowrap; }
.conv-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.conv-modal .inner {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; max-width: 640px; width: 100%; max-height: 80vh; overflow-y: auto;
}
.conv-modal .close { float: right; background: transparent; border: 0; color: var(--text-soft); font-size: 22px; cursor: pointer; }

.add-platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.add-platform-grid a {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 10px; text-align: center; text-decoration: none; color: var(--text-soft);
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .85rem;
  transition: border-color .15s, color .15s;
}
.add-platform-grid a:hover { border-color: var(--gold); color: var(--gold); }
.add-platform-grid a i { font-size: 22px; }

/* Hero row met actions */
.dash-hero-row { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.dash-hero-row .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .dash-hero-row .hero-actions { width: 100%; } }

/* Tabs */
.dash-tabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--line); }
.dash-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 16px; color: var(--text-soft); font: inherit; font-size: .92rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s, border-color .15s;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Agent overview tiles */
.agent-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.agent-card-tile {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
  position: relative;
}
.agent-card-tile:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.agent-card-tile .current-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  background: var(--gold-soft); color: var(--gold); padding: 3px 7px; border-radius: 4px;
}
.tile-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.tile-ico {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  color: #1a1a1a; font-size: 18px; flex-shrink: 0;
}
.tile-meta { flex: 1; min-width: 0; }
.tile-meta .tile-name { font-weight: 700; font-size: 1rem; }
.tile-meta .tile-cat { font-size: .78rem; color: var(--text-mute); margin-top: 2px; }
.tile-action {
  background: transparent; border: 0; color: var(--text-mute); cursor: pointer;
  padding: 6px; border-radius: 6px; font-size: 14px;
}
.tile-action:hover { color: var(--red); background: rgba(255,59,59,.08); }
.tile-tag { font-size: .85rem; color: var(--text-soft); margin: 4px 0 12px; }
.tile-stat { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tile-stat .bar { flex: 1; height: 5px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.tile-stat .bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.tile-stat .bar-fill.over { background: linear-gradient(90deg, var(--yellow), var(--red)); }
.tile-stat .tile-numbers { font-size: .78rem; color: var(--text-mute); font-family: var(--font-mono); white-space: nowrap; }
.tile-plats { display: flex; gap: 6px; flex-wrap: wrap; }
.plat-chip {
  width: 26px; height: 26px; border-radius: 6px; background: var(--bg);
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 11px;
}

/* Shop */
.shop-toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.shop-toolbar .search-box { flex: 1; min-width: 200px; position: relative; }
.shop-toolbar .search-box input {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px 10px 38px; font: inherit; font-size: .95rem;
}
.shop-toolbar .search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }
.shop-toolbar select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; font: inherit; font-size: .92rem; cursor: pointer;
}
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.shop-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: border-color .15s, transform .15s;
}
.shop-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.shop-card.owned { opacity: .75; border-style: dashed; }
.shop-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.shop-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-3); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.shop-head h4 { margin: 0; font-size: .98rem; }
.shop-cat { font-size: .72rem; color: var(--text-mute); margin-bottom: 2px; }
.tier-pill {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px; background: var(--bg-3); color: var(--text-soft);
  font-weight: 600;
}
.tier-pill.starter      { background: rgba(58,166,255,.12);  color: var(--blue); }
.tier-pill.professional { background: rgba(157,107,255,.12); color: var(--purple); }
.tier-pill.business     { background: rgba(248,193,69,.12);  color: var(--yellow); }
.tier-pill.enterprise   { background: rgba(168,85,247,.12);   color: var(--gold); }
.tier-pill.trial        { background: rgba(45,221,122,.12);  color: var(--green); }
.tier-pill.growth       { background: rgba(157,107,255,.12); color: var(--purple); }
.tier-pill.pro          { background: rgba(248,193,69,.12);  color: var(--yellow); }
.shop-tag { font-size: .85rem; color: var(--text-soft); margin: 6px 0 12px; min-height: 36px; }

/* Detail back button */
.detail-back { margin-bottom: 16px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-soft); padding: 7px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .9rem; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Knowledge base */
.kb-uploader { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.kb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.kb-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 12px; color: var(--text-soft); font: inherit; font-size: .88rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.kb-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.kb-tab:hover { color: var(--text); }
.kb-tab-body input[type=file] {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; color: var(--text-soft); font: inherit; font-size: .9rem; width: 100%;
}
.kb-tab-body input[type=file]::-webkit-file-upload-button {
  background: var(--gold); color: #1a1a1a; border: 0; padding: 4px 10px; border-radius: 4px; font: inherit; font-size: .82rem; margin-right: 10px; cursor: pointer;
}

.kb-source-list { display: flex; flex-direction: column; gap: 8px; }
.kb-source-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.kb-source-row .ico { width: 32px; height: 32px; border-radius: 6px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 14px; flex-shrink: 0; }
.kb-source-row .meta { flex: 1; min-width: 0; }
.kb-source-row .meta .name { font-weight: 600; font-size: .9rem; }
.kb-source-row .meta .sub { font-size: .76rem; color: var(--text-mute); }

.kb-result {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px;
}
.kb-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kb-score {
  background: var(--gold-soft); color: var(--gold); font-weight: 700;
  font-size: .75rem; padding: 2px 7px; border-radius: 4px;
}
.kb-title { font-weight: 600; font-size: .88rem; }
.kb-snippet { margin: 0; font-size: .85rem; color: var(--text-soft); line-height: 1.45; }

/* KYC verification card */
.kyc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; padding: 3px 10px; border-radius: 99px;
  background: var(--bg-3); color: var(--text-soft); font-weight: 600;
}
.kyc-pill.danger { background: rgba(255,59,59,.12); color: var(--red); }
.kyc-pill.warn   { background: rgba(248,193,69,.12); color: var(--yellow); }
.kyc-pill.ok     { background: rgba(45,221,122,.12); color: var(--green); }

.kyc-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .kyc-tiers { grid-template-columns: 1fr; } }
.kyc-tier {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; opacity: .55; transition: opacity .2s, border-color .2s;
}
.kyc-tier.current { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-soft); }
.kyc-tier.done { opacity: 1; border-color: var(--green); }
.kyc-tier-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kyc-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-3); color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.kyc-tier.current .kyc-num { background: var(--gold-soft); color: var(--gold); }
.kyc-tier.done .kyc-num { background: rgba(45,221,122,.15); color: var(--green); }
.kyc-check { margin-left: auto; color: var(--green); font-size: 1rem; }
.kyc-tier p { margin: 4px 0 10px; font-size: .88rem; color: var(--text-soft); }
.kyc-step { margin-top: 8px; }

/* Recent calls table */
.plat.plat-ok  { background: rgba(45,221,122,.12); color: var(--green); }
.plat.plat-err { background: rgba(255,59,59,.12); color: var(--red); }

/* Prompt-override form */
.prompt-form { display: flex; flex-direction: column; gap: 14px; }
.prompt-row { display: flex; flex-direction: column; gap: 6px; }
.prompt-row-2col { flex-direction: row; gap: 10px; }
.prompt-row-2col > div { flex: 1; }
.prompt-row label { font-size: .82rem; color: var(--text-soft); font-weight: 500; }
.prompt-row label small { color: var(--text-mute); font-weight: 400; margin-left: 6px; }
.prompt-row input[type=text], .prompt-row input[type=email], .prompt-row input[name],
.prompt-row select, .prompt-row textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font: inherit; font-size: .92rem; resize: vertical;
}
.prompt-row input[type=time] {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .85rem;
}
.prompt-row textarea:focus, .prompt-row input:focus, .prompt-row select:focus { outline: 0; border-color: var(--gold); }
.prompt-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); }

.prompt-toggle { display: flex; gap: 8px; }
.prompt-toggle .opt {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; cursor: pointer; transition: border-color .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.prompt-toggle .opt.on { border-color: var(--gold); background: var(--gold-soft); }
.prompt-toggle .opt small { color: var(--text-mute); font-size: .78rem; }
.prompt-toggle input[type=radio] { margin-right: 6px; accent-color: var(--gold); }

.prompt-section {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.prompt-section summary { cursor: pointer; font-size: .92rem; color: var(--text); }
.prompt-section summary small { color: var(--text-mute); margin-left: 8px; font-weight: 400; }
.prompt-section[open] summary { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Channel overlays */
.channel-row {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px; transition: border-color .15s;
}
.channel-row.enabled { border-color: var(--gold); }
.channel-row-head .channel-toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; user-select: none;
}
.channel-row .ch-name { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.channel-row .ch-name i { color: var(--gold); }
.channel-row .channel-row-body { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.channel-row .channel-row-body input, .channel-row .channel-row-body select, .channel-row .channel-row-body textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; font: inherit; font-size: .88rem; resize: vertical;
}

.bh-days { gap: 6px; }
.bh-row { display: flex; gap: 8px; align-items: center; font-size: .85rem; }
.bh-day { width: 80px; color: var(--text-soft); font-size: .82rem; }
.bh-closed { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--text-mute); cursor: pointer; }
.bh-row input[type=time]:disabled { opacity: .4; }

.prompt-preview, .prompt-test, .prompt-versions {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
}

.version-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.version-list li {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
}
.version-list li button { margin-left: auto; }

.btn-sm { padding: 5px 10px !important; font-size: .82rem !important; }

/* KB-suggesties modal */
.kbs-section {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px;
}
.kbs-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-mute); font-weight: 600;
}
.kbs-section p { margin: 0; font-size: .9rem; color: var(--text); }
.kbs-list { padding-left: 20px; margin: 0; font-size: .88rem; color: var(--text-soft); }
.kbs-list li { margin-bottom: 3px; }

/* AI-assist card + icon picker */
.ai-assist {
  border: 1px solid var(--gold) !important;
  background: linear-gradient(135deg, var(--bg-2), rgba(168,85,247,.04)) !important;
}
.ai-assist textarea { width: 100%; }
.icon-picker {
  margin-top: 8px; padding: 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px; max-height: 240px; overflow-y: auto;
}
.icon-tile {
  width: 100%; aspect-ratio: 1/1; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-2); color: var(--gold); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, transform .12s;
}
.icon-tile:hover { border-color: var(--gold); transform: scale(1.08); }

/* Template gallery */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tpl-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s;
}
.tpl-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tpl-card.incompatible { opacity: .55; }
.tpl-card.incompatible:hover { border-color: var(--line); transform: none; }
.tpl-ico {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1a1a; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tpl-card .tpl-cat { font-size: .72rem; color: var(--text-mute); }
.tpl-card h4 { margin: 2px 0; font-size: 1rem; }
.tpl-card p { margin: 0; font-size: .82rem; color: var(--text-soft); flex: 1; }

.tpl-fields .tpl-field { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.tpl-fields .tpl-field h5 { margin: 0 0 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mute); font-weight: 600; }
.tpl-fields .tpl-field p { margin: 0; font-size: .9rem; color: var(--text); }

/* Upgrade modal */
.cycle-toggle {
  display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px; margin: 14px 0 16px;
}
.cycle-toggle button {
  background: transparent; border: 0; padding: 7px 16px; border-radius: 99px;
  color: var(--text-soft); font: inherit; font-size: .88rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.cycle-toggle button.on { background: var(--gold); color: #1a1a1a; font-weight: 600; }
.cycle-toggle .save-badge {
  font-size: .68rem; background: rgba(45,221,122,.15); color: var(--green);
  padding: 2px 6px; border-radius: 4px; font-weight: 600;
}
.cycle-toggle button.on .save-badge { background: rgba(0,0,0,.18); color: #1a1a1a; }

.upgrade-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 600px) { .upgrade-grid { grid-template-columns: 1fr; } }
.upgrade-tile {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column;
}
.upgrade-tile.current { border-color: var(--green); }
.upgrade-tile h4 { margin: 0 0 4px; font-size: 1.05rem; }
.up-price { font-size: 1.8rem; font-weight: 800; color: var(--gold); margin: 10px 0 0; }
.up-price small { font-size: .55em; color: var(--text-mute); font-weight: 400; }
.up-custom { font-size: 1.05rem; color: var(--text-soft); }
.up-sub { font-size: .8rem; color: var(--text-mute); margin-bottom: 8px; }
.up-features { list-style: none; padding: 0; margin: 12px 0; font-size: .84rem; color: var(--text-soft); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.up-features li { padding-left: 18px; position: relative; }
.up-features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* Info table */
.info-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.info-table th { text-align: left; padding: 8px; color: var(--text-mute); font-weight: 600; width: 180px; }
.info-table td { padding: 8px; }
.info-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.info-table tbody tr { border-bottom: 1px solid var(--line-soft); }
.info-table tbody tr:last-child { border-bottom: 0; }

/* ───────────────────────────────────────────────────────────────
   Chat progress-track + inline attachment chips (WhatsApp/Claude-stijl)
   Patroon overgenomen van masterbrain.phantrium.com — staat in
   DOM-flow direct boven de input-row, niet zwevend.
   ─────────────────────────────────────────────────────────────── */
.progress-track {
  display: none; flex-direction: column; gap: 6px;
  padding: 8px 12px; margin: 0 0 10px; width: 100%;
  background: rgba(0, 255, 136, .04);
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  pointer-events: none;
  transition: opacity .3s ease;
}
.progress-track.active { display: flex; animation: ptIn .25s ease-out; }
.progress-track.fading { opacity: 0; }
@keyframes ptIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.progress-track .plabel { display: flex; align-items: center; gap: 10px; font-size: .78rem; min-height: 16px; }
.progress-track .plabel .pdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold-glow);
  animation: pdotPulse 1.2s ease-in-out infinite; flex: 0 0 7px;
}
.progress-track .plabel .ptext {
  flex: 1; color: var(--text); font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.progress-track .plabel .ppct {
  color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: .72rem; letter-spacing: .04em; flex: 0 0 auto;
}
.progress-track .pbar {
  height: 4px; border-radius: 999px;
  background: rgba(0, 255, 136, .1);
  overflow: hidden;
  border: 1px solid var(--gold-soft);
}
.progress-track .pfill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold));
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width .55s cubic-bezier(.2, .8, .2, 1);
  animation: pflow 2.4s linear infinite;
  box-shadow: 0 0 10px var(--gold-glow);
}
@keyframes pflow { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
@keyframes pdotPulse { 0%, 100% { opacity: .5; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }

/* Inline attachment chips in chat-bubble — beschikbaar voor toekomstige
   upload-features (KB-test pane, file-aware prompt-test, etc) */
.bubble-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bubble-attachments:empty { display: none; }
.bubble-att {
  position: relative; display: inline-flex; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.bubble-att:hover { transform: translateY(-1px); border-color: var(--gold); }
.bubble-att.img { padding: 0; flex-direction: column; line-height: 0; max-width: 240px; }
.bubble-att.img img { width: 100%; max-width: 240px; max-height: 240px; object-fit: cover; display: block; cursor: zoom-in; }
.bubble-att.img .img-meta {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 10px; line-height: 1.3; font-size: .68rem;
  color: var(--text-soft); background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.bubble-att.img .img-meta .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.bubble-att.img .img-meta .s { color: var(--text-mute); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.bubble-att.file {
  align-items: center; gap: 10px; padding: 9px 12px 9px 9px;
  max-width: 260px; min-width: 180px;
}
.bubble-att.file .ftype {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  color: #061010; text-shadow: 0 1px 0 rgba(255, 255, 255, .18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35) inset;
}
.bubble-att.file .finfo { flex: 1; min-width: 0; line-height: 1.3; }
.bubble-att.file .fname { font-size: .82rem; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-att.file .fsub { font-size: .7rem; color: var(--text-mute); margin-top: 2px; }
.bubble-att.file .flab { color: var(--gold); font-weight: 600; }
