/* generator.css — Page Générateur v5 colorful + icônes SVG pro */

/* ===== Hero générateur ===== */
.gen-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 400px at 88% -10%, rgba(22, 184, 201, .35), transparent 60%),
    radial-gradient(540px 380px at 5% 110%, rgba(124, 77, 255, .25), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #e7ecf3; padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}
.gen-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 0);
  background-size: 22px 22px; opacity: .5;
}
.gen-hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.gen-hero h1 {
  color: #fff; font-size: clamp(2rem, 4vw, 2.8rem);
  margin: .55rem 0 .9rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.08;
}
.gen-hero h1 .hl {
  background: linear-gradient(90deg, #a8d8ff 0%, #16b8c9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gen-hero p { color: #d4dde8; max-width: 34rem; font-size: 1.04rem; }
.gen-hero .eyebrow { color: #a8d8ff; }

.gen-hero-mark {
  display: grid; place-items: center; position: relative;
}
.gen-hero-mark svg {
  width: 160px; height: 160px;
  filter: drop-shadow(0 12px 32px rgba(22, 184, 201, .4));
  animation: gentleFloat 4s ease-in-out infinite;
}
@keyframes gentleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ===== Layout ===== */
.gen-layout { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 28px; align-items: start; }
.gen-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 92px;
  box-shadow: var(--shadow-sm);
}
.gen-step {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--body); font-size: .78rem; font-weight: 700;
  color: var(--muted); margin: 20px 0 10px;
  text-transform: uppercase; letter-spacing: .08em;
}
.gen-step:first-child { margin-top: 0; }
.gen-step span {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #fff; font-size: .76rem; font-family: var(--mono); font-weight: 700;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-2 .field { margin-bottom: 14px; }

/* Industry chips (clic = remplit input) */
.industry-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.industry-chips button {
  font-size: .76rem; background: #fff; border: 1px solid var(--grey-200);
  color: var(--navy); padding: .3rem .7rem; border-radius: 16px; cursor: pointer;
  transition: all .12s; font-family: var(--body); font-weight: 500;
}
.industry-chips button:hover {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark);
}

/* Détection automatique du secteur (feedback visible) */
.sector-detected {
  margin-top: 8px; padding: 8px 12px; display: none;
  background: linear-gradient(135deg, var(--accent-soft), var(--cyan-soft));
  border-left: 3px solid var(--cyan); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .82rem; color: var(--navy);
  animation: slideIn .2s ease-out;
}
.sector-detected.show { display: flex; align-items: center; gap: .5rem; }
.sector-detected svg { width: 16px; height: 16px; color: var(--cyan); flex: none; }
.sector-detected b { color: var(--accent-dark); font-weight: 700; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* Suggestions de KPIs */
.suggest-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.suggest-chips .hint-label {
  width: 100%; font-size: .74rem; color: var(--muted); margin-bottom: 4px;
  display: flex; align-items: center; gap: .35rem;
}
.suggest-chips .hint-label svg { width: 13px; height: 13px; color: var(--accent); }
.suggest-chips .hint-label b { color: var(--accent-dark); font-weight: 700; }
.suggest-chips button {
  font-size: .78rem; background: #fff; border: 1px solid var(--grey-200);
  color: var(--navy); padding: .3rem .7rem; border-radius: 14px; cursor: pointer;
  transition: all .12s; font-family: var(--body);
}
.suggest-chips button:hover {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 4px; }
.tag-cloud .tag {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: .3rem .55rem .3rem .8rem; border-radius: 16px;
  box-shadow: 0 2px 6px rgba(10, 110, 209, .25);
}
.tag-cloud .tag .x {
  cursor: pointer; opacity: .85; width: 18px; height: 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .22); font-size: .75rem; line-height: 1;
}
.tag-cloud .tag .x:hover { opacity: 1; background: rgba(255, 255, 255, .35); }

.dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dim-grid button {
  font-size: .8rem; background: #fff; border: 1px solid var(--grey-200); color: var(--navy);
  padding: .42rem .55rem; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; min-height: 34px;
  transition: all .12s; font-family: var(--body);
}
.dim-grid button:hover { border-color: var(--accent); color: var(--accent); }
.dim-grid button.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; border-color: var(--accent-dark);
  box-shadow: 0 2px 6px rgba(10, 110, 209, .25); font-weight: 600;
}
.dim-grid button:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Placeholder (avant génération) ===== */
.gen-placeholder {
  background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%);
  border: 1px dashed var(--grey-300); border-radius: var(--radius);
  padding: 56px 32px; text-align: center;
}
.gen-placeholder .mark {
  width: 82px; height: 82px; margin: 0 auto 22px;
  display: grid; place-items: center; color: var(--accent);
}
.gen-placeholder .mark svg {
  width: 82px; height: 82px;
  filter: drop-shadow(0 6px 18px rgba(10, 110, 209, .3));
  animation: gentleFloat 4s ease-in-out infinite;
}
.gen-placeholder h2 { font-size: 1.3rem; margin-bottom: .55rem; font-weight: 700; }
.gen-placeholder p { max-width: 38rem; margin: 0 auto; }
.placeholder-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 600px; margin: 26px auto 0;
}
.placeholder-features > div {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 12px; background: #fff; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.placeholder-features b { font-size: .9rem; color: var(--navy); }
.placeholder-features span.muted { font-size: .76rem; }
.placeholder-features .pic {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), var(--cyan-soft));
  color: var(--accent);
  display: grid; place-items: center; margin-bottom: 6px;
}
.placeholder-features .pic svg { width: 20px; height: 20px; }

/* ===== Loading state ===== */
.gen-loading {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 58px 32px; text-align: center; box-shadow: var(--shadow-sm);
}
.gen-loading .mark {
  width: 80px; height: 80px; margin: 0 auto 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  position: relative; display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(10, 110, 209, .35);
  animation: gentleFloat 3s ease-in-out infinite;
}
.gen-loading .mark svg { width: 38px; height: 38px; color: #fff; }
.gen-loading .mark::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: .3;
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing { from { opacity: .35; transform: scale(1); } to { opacity: 0; transform: scale(1.3); } }
.gen-loading h2 { font-size: 1.2rem; margin-bottom: .35rem; font-weight: 700; }
.gen-loading .steps {
  font-size: .85rem; color: var(--muted); margin-top: 18px; font-family: var(--mono);
}

/* ===== Result ===== */
.gen-result {
  min-width: 0; /* CRITIQUE : sans ça, la colonne grid ne se contracte pas et déborde de 500+ px */
  max-width: 100%;
  overflow: hidden;
}
.gen-output {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  min-width: 0; max-width: 100%;
}
.gen-out-head {
  padding: 22px 26px; border-bottom: 1px solid var(--line); background: #fff;
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.gen-out-head h2 { font-size: 1.3rem; margin-bottom: .35rem; font-weight: 700; letter-spacing: -.02em; }
.gen-out-head .source-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--cyan-soft));
  color: var(--accent-dark);
  padding: .28rem .7rem; border-radius: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.gen-out-head .source-badge svg { width: 14px; height: 14px; }
.gen-out-head .source-badge.rules { background: var(--grey-100); color: var(--navy); }
.gen-out-head .meta { font-size: .84rem; color: var(--muted); }
.gen-out-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.gen-dash {
  background: #eef2f7;
  padding: 14px;
  overflow-x: hidden;
  min-width: 0; /* indispensable dans un grid parent pour ne pas déborder */
}
.gen-dash .kpi-row,
.gen-dash .chart-row { max-width: 100%; min-width: 0; }
.gen-dash .chart-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.gen-dash svg { max-width: 100%; height: auto; }
.gen-dash .chart-card { overflow: hidden; min-width: 0; }
.gen-dash .dash-bar {
  background: #fff;
  padding: 9px 14px;
  margin: -14px -14px 14px -14px;
  display: flex; align-items: center; gap: .55rem;
  border-bottom: 1px solid var(--line);
}
.gen-dash .dash-bar .dot { width: 8px; height: 8px; border-radius: 50%; }
.gen-dash .dash-bar .label {
  color: var(--navy); font-size: .82rem; margin-left: auto;
  font-family: var(--body); font-weight: 600;
}
.gen-dash .dash-bar .label::before {
  content: ""; display: inline-block; width: 4px; height: 14px;
  background: var(--accent); border-radius: 2px; vertical-align: -3px; margin-right: 8px;
}

.gen-section { padding: 22px 26px; border-top: 1px solid var(--line); }
.gen-section h3 {
  font-size: .76rem; color: var(--muted); margin-bottom: 14px;
  font-family: var(--body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.gen-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.dim-list, .meas-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.dim-list li, .meas-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: .6rem .85rem; background: var(--grey-50);
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  font-size: .9rem;
}
.dim-list li b, .meas-list li b { color: var(--navy); font-weight: 600; }
.dim-list li .members {
  color: var(--muted); font-size: .82rem; max-width: 60%; text-align: right;
  font-family: var(--mono);
}
.meas-list li .type {
  font-size: .68rem;
  background: var(--accent-soft); color: var(--accent-dark);
  padding: .15rem .55rem; border-radius: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono);
}

.sample-table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 280px;
}
.sample-table { border-collapse: collapse; font-size: .84rem; width: 100%; min-width: max-content; }
.sample-table th {
  background: var(--grey-100); color: var(--navy); font-weight: 700;
  text-align: left; padding: .6rem .8rem; position: sticky; top: 0;
  border-bottom: 1px solid var(--line); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.sample-table td {
  padding: .5rem .8rem; border-bottom: 1px solid var(--grey-100);
  color: var(--text);
}
.sample-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .82rem; }

/* ===== Boutons de téléchargement ===== */
.dl-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 22px 26px; background: var(--grey-50); border-top: 1px solid var(--line);
}
.dl-row .btn {
  flex: 1 1 200px; min-width: 0; justify-content: center;
  padding: .95rem 1rem; gap: .6rem; line-height: 1.25;
  flex-direction: row; align-items: center; text-align: left;
}
.dl-row .btn svg { width: 22px; height: 22px; flex: none; }
.dl-row .btn .lbl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.dl-row .btn .lbl b { font-weight: 700; font-size: .92rem; }
.dl-row .btn .lbl small {
  display: block; font-size: .7rem; font-weight: 400; opacity: .8;
  font-family: var(--mono);
}

/* ===== Onglets de variantes ===== */
.variant-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 16px 26px 0; background: #fff; border-bottom: 1px solid var(--line);
}
.variant-tab {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2px solid var(--line); border-bottom: 0;
  border-radius: 14px 14px 0 0; padding: 14px 18px; cursor: pointer;
  text-align: left; transition: all .15s; margin-bottom: -1px; position: relative;
  font-family: var(--body);
}
.variant-tab:hover { border-color: var(--grey-300); background: var(--grey-50); }
.variant-tab.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--cyan-soft) 100%);
  z-index: 2;
}
.variant-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 4px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--cyan-soft) 100%);
}
.variant-tab .vt-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; flex: none; box-shadow: 0 4px 12px rgba(10, 110, 209, .25);
}
.variant-tab .vt-icon svg { width: 22px; height: 22px; }
.variant-tab:not(.active) .vt-icon {
  background: var(--grey-100); color: var(--navy); box-shadow: none;
}
.variant-tab .vt-body b {
  display: block; font-family: var(--display); font-size: 1rem;
  color: var(--ink); font-weight: 700; letter-spacing: -.01em;
}
.variant-tab .vt-body span { font-size: .76rem; color: var(--muted); }
.variant-tab.active .vt-body b { color: var(--accent-dark); }

.variant-pane { background: linear-gradient(135deg, var(--accent-soft) 0%, var(--cyan-soft) 100%); padding: 1px 0 0 0; }
.variant-desc {
  padding: 16px 26px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--cyan-soft) 100%);
  color: var(--navy);
  font-size: .92rem; border-bottom: 1px solid rgba(10, 110, 209, .15);
}

/* ===== Story Blueprint ===== */
.blueprint { padding: 24px 26px; background: #fff; border-top: 1px solid var(--line); }
.bp-head h3 {
  font-family: var(--display); font-size: 1.15rem; color: var(--ink);
  font-weight: 700; letter-spacing: -.018em;
  margin-bottom: .35rem;
  display: flex; align-items: center; gap: .55rem;
}
.bp-head h3 svg { width: 22px; height: 22px; color: var(--accent); }
.bp-head p { font-size: .9rem; margin-bottom: 20px; color: var(--muted); }
.bp-pages { display: flex; flex-direction: column; gap: 14px; }
.bp-page {
  background: var(--grey-50); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.bp-page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bp-page-num {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .8rem;
}
.bp-page-head b { font-family: var(--display); font-size: 1rem; color: var(--ink); font-weight: 700; }
.bp-steps { list-style: none; margin: 0; padding: 0; }
.bp-steps li {
  position: relative; padding: 6px 0 6px 22px; font-size: .92rem; line-height: 1.55;
  border-bottom: 1px dashed var(--grey-200);
}
.bp-steps li:last-child { border-bottom: 0; }
.bp-steps li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.bp-steps b { color: var(--navy); font-weight: 700; }
.bp-steps code {
  background: var(--accent-soft); color: var(--accent-dark);
  padding: .1rem .4rem; border-radius: 4px;
  font-family: var(--mono); font-size: .86em;
}
.bp-filters {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--grey-200);
  font-size: .82rem; color: var(--muted);
}
.bp-filters b { color: var(--navy); font-weight: 600; }

@media (max-width: 1000px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-form { position: static; }
  .gen-hero-grid { grid-template-columns: 1fr; text-align: left; }
  .gen-hero-mark { display: none; }
  .gen-cols { grid-template-columns: 1fr; }
  .placeholder-features { grid-template-columns: 1fr; }
  .dl-row .btn { flex-direction: column; align-items: center; text-align: center; }
  .dl-row .btn .lbl { align-items: center; }
}
@media (max-width: 900px) {
  .variant-tabs { grid-template-columns: 1fr; padding: 14px 20px 0; }
  .variant-tab { border-radius: 12px; border-bottom: 2px solid var(--line); margin-bottom: 0; }
  .variant-tab.active { border-bottom-color: var(--accent); }
}

/* ===== Mode de génération : 3 niveaux d'ambition ===== */
.data-mode-tabs {
  display: flex; gap: 0; margin: 0 0 1rem;
  background: var(--grey-50); padding: 4px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.dm-tab {
  flex: 1; background: transparent; border: 0; padding: .55rem .35rem;
  border-radius: calc(var(--radius-sm) - 2px); cursor: pointer;
  font-family: var(--body); font-size: .8rem; font-weight: 500;
  color: var(--muted); transition: all .12s;
}
.dm-tab:hover { color: var(--navy); background: rgba(0,0,0,.03); }
.dm-tab.active {
  background: #fff; color: var(--accent);
  box-shadow: var(--shadow-sm); font-weight: 600;
}

/* ===== Panneau CSV / Structure vide ===== */
.csv-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(22, 184, 201, .04), rgba(10, 110, 209, .04));
  border: 1px solid rgba(22, 184, 201, .25);
  border-radius: var(--radius-sm);
}
.csv-intro {
  font-size: .82rem; color: var(--navy); line-height: 1.5;
  margin: 0 0 .5rem;
}
.csv-rgpd {
  display: flex; align-items: center; gap: .4rem;
  font-size: .76rem; color: #197a3c;
  background: rgba(25, 122, 60, .08);
  padding: .4rem .6rem;
  border-radius: 4px; border-left: 3px solid #197a3c;
  margin: .4rem 0 .8rem;
}
.csv-rgpd svg { width: 14px; height: 14px; flex: none; }

.csv-drop {
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem; border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; transition: all .15s;
}
.csv-drop:hover, .csv-drop:focus-within {
  border-color: var(--accent); background: var(--grey-50);
}
.csv-drop svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.csv-drop-text {
  font-size: .85rem; color: var(--navy); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.csv-status {
  margin-top: .6rem; padding: .55rem .8rem; border-radius: 4px;
  font-size: .8rem; font-weight: 500;
}
.csv-status.loading { background: rgba(10, 110, 209, .08); color: var(--accent); }
.csv-status.success { background: rgba(25, 122, 60, .08); color: #197a3c; }
.csv-status.error { background: rgba(184, 65, 46, .08); color: #b8412e; }

/* Validation pour SAC Modeler */
.csv-validation {
  margin-top: .6rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden;
}
.csv-val-head {
  background: var(--grey-50); padding: .45rem .7rem;
  font-size: .75rem; font-weight: 600; color: var(--navy);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .04em;
}
.csv-val-issue {
  padding: .45rem .7rem; font-size: .78rem;
  border-bottom: 1px solid var(--line);
}
.csv-val-issue:last-child { border-bottom: 0; }
.csv-val-error { color: #b8412e; background: rgba(184, 65, 46, .04); }
.csv-val-warn { color: #b07300; background: rgba(176, 115, 0, .04); }

/* Analyse colonnes & mapping */
.csv-analysis { margin-top: .7rem; }
.csv-mapping-title {
  font-size: .82rem; color: var(--navy); margin: 0 0 .5rem;
  font-weight: 600;
}
.csv-col-rows {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.csv-col-row {
  display: grid; grid-template-columns: 1fr 95px 90px;
  gap: .4rem; padding: .5rem .6rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.csv-col-row:last-child { border-bottom: 0; }
.csv-col-row:hover { background: var(--grey-50); }
.csv-col-name {
  font-size: .82rem; font-weight: 600; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.csv-col-sub {
  font-size: .7rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.csv-col-role, .csv-col-target {
  font-family: var(--body); font-size: .75rem;
  padding: .3rem .4rem; border: 1px solid var(--line);
  border-radius: 4px; background: #fff;
  min-width: 0;
}
.csv-col-role:focus, .csv-col-target:focus {
  outline: 2px solid var(--accent); outline-offset: -1px;
  border-color: var(--accent);
}

.csv-actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: .8rem;
}
.csv-actions .btn { flex: 1; min-width: 120px; }

@media (max-width: 640px) {
  .csv-col-row { grid-template-columns: 1fr; }
  .csv-col-role, .csv-col-target { width: 100%; }
}
