.reference-automations {
  gap:12px;
  color:#eee7dc;
}
.reference-automations .metric-card {
  min-height:108px;
  border-color:rgba(248,189,36,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    linear-gradient(135deg, rgba(18,17,14,.98), rgba(6,6,6,.98));
}
.reference-automations .metric-card small.good,
.reference-automations .metric-card small.warn { color:var(--green); }
.reference-automations .metric-card small.bad { color:var(--red); }
.reference-automations .automation-actions {
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 8px;
}
.reference-automations .metric-grid {
  margin-bottom:4px;
}
.reference-automations .automation-builder {
  display:grid;
  grid-column:1 / -1;
}
.reference-automations .automation-layout {
  grid-template-columns:minmax(0, 1.55fr) minmax(360px, .85fr);
}
.reference-automations .kanban-column {
  min-height:220px;
  max-height:620px;
  overflow:auto;
}
.reference-automations .automation-bottom {
  grid-template-columns:1fr;
}
.reference-automations .automation-history .table-scroll {
  max-height:212px;
}
.automation-command {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:86px;
  padding:18px 20px;
  border:1px solid rgba(248,189,36,.18);
  border-radius:10px;
  background:
    linear-gradient(90deg, rgba(248,189,36,.105), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045);
}
.automation-command h2 {
  margin:3px 0 0;
  font-size:22px;
  line-height:1.15;
}
.eyebrow {
  color:var(--gold);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.automation-command-stats {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.automation-command-stats span {
  min-height:40px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:rgba(0,0,0,.22);
  color:#bfb7ac;
  font-size:12px;
}
.automation-command-stats strong {
  color:#fff2c5;
  font-size:18px;
  line-height:1;
}
.automation-layout {
  display:grid;
  grid-template-columns:minmax(0, 1.55fr) minmax(360px, .85fr);
  gap:14px;
  align-items:start;
}
.automation-board {
  padding:16px;
  overflow:visible;
}
.operation-feedback {
  margin:2px 0 14px;
}
.operation-feedback.ok {
  border-color:rgba(42,207,112,.35);
  background:rgba(42,207,112,.08);
}
.operation-feedback.bad {
  border-color:rgba(255,82,82,.38);
  background:rgba(255,82,82,.08);
}
.automation-board-header {
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(220px, 300px);
  gap:14px;
  align-items:start;
  margin-bottom:16px;
}
.automation-board-header > div:first-child {
  display:grid;
  gap:12px;
  min-width:0;
}
.automation-board-tools {
  display:grid;
  grid-template-columns:minmax(180px, 1fr) minmax(86px, auto);
  gap:8px;
  align-items:center;
  min-width:260px;
}
.automation-board-tools input {
  height:36px;
  padding:8px 10px;
}
.automation-board-tools .mini-button {
  width:92px;
  height:36px;
  padding:0;
  color:var(--gold);
  border-color:rgba(248,189,36,.55);
  background:rgba(248,189,36,.1);
}
.info-dot {
  display:inline-grid;
  place-items:center;
  width:16px;
  height:16px;
  margin-left:5px;
  border:1px solid rgba(255,255,255,.36);
  border-radius:50%;
  color:#bdb5a9;
  font-size:11px;
  font-weight:800;
}
.chip-row { display:flex; gap:8px; flex-wrap:wrap; }
.chip-row .chip-button {
  min-height:30px;
  padding:6px 16px;
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.025);
  color:#c8c1b7;
}
.chip-row .active { color:var(--gold); border-color:var(--gold); background:rgba(248,189,36,.12); box-shadow:0 0 18px rgba(248,189,36,.1); }
.kanban {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  overflow:visible;
  padding-bottom:0;
}
.kanban-column {
  min-height:360px;
  max-height:520px;
  overflow:auto;
  min-width:0;
  padding:12px;
  border-color:rgba(255,255,255,.075);
  background:
    linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.008)),
    rgba(8,8,7,.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.kanban-column header {
  min-height:50px;
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.kanban-column header > span {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.09);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  color:#9f978b;
  font-weight:900;
  font-size:12px;
}
.kanban-column h3 {
  color:#f4f0e8;
  font-size:15px;
  line-height:1.2;
}
.kanban-column header small {
  display:block;
  margin-top:3px;
  font-size:12px;
}
.kanban-column.is-running h3 { color:var(--gold); }
.kanban-column.is-waiting h3 { color:#ffcf7a; }
.kanban-column.is-done h3 { color:var(--green); }
.flow-title,
.active-exec,
.mini-flow,
.queue-row { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; }
.flow-title,
.active-exec { grid-template-columns:42px minmax(0, 1fr) auto; }
.flow-title > div,
.active-exec > div,
.mini-flow > div {
  min-width:0;
  display:grid;
  gap:4px;
}
.flow-title strong,
.active-exec strong,
.mini-flow strong {
  white-space:normal;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.flow-title small,
.active-exec small,
.mini-flow small {
  display:block;
  white-space:normal;
}
.flow-title span,
.mini-flow span,
.active-exec > span {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(248,189,36,.16);
  border-radius:10px;
  background:rgba(248,189,36,.09);
  color:var(--gold);
  font-size:21px;
}
.flow-card .progress,
.active-exec .progress { width:100%; margin-top:4px; }
.flow-card {
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.052), rgba(255,255,255,.014)),
    rgba(9,9,8,.78);
  margin-bottom:10px;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}
.flow-card-head {
  display:grid;
  grid-template-columns:42px minmax(0, 1fr);
  gap:10px;
  align-items:center;
}
.flow-icon {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(248,189,36,.16);
  border-radius:10px;
  background:rgba(248,189,36,.09);
  color:var(--gold);
  font-size:21px;
}
.flow-name {
  min-width:0;
  display:grid;
  gap:3px;
}
.flow-name strong {
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  white-space:normal;
  line-height:1.25;
}
.flow-name small,
.flow-card-meta span,
.flow-progress-line small {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.flow-card-meta {
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  align-items:center;
}
.flow-card-meta i,
.flow-title i {
  max-width:92px;
  padding:4px 8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  color:#d5cec2;
  background:rgba(255,255,255,.035);
  font-style:normal;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.flow-progress-line {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin:0;
}
.flow-progress-line em,
.active-exec em {
  color:#c7c0b6;
  font-style:normal;
  font-size:12px;
}
.flow-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:2px;
}
.flow-actions .mini-button {
  min-height:30px;
  padding:5px 10px;
}
.flow-actions .mini-button.active {
  border-color:rgba(248,189,36,.55);
  color:#201706;
  background:linear-gradient(180deg, #ffd35a, #c88a11);
}
.progress {
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.16);
}
.progress span {
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #ffd95e, #ffb000);
  box-shadow:0 0 12px rgba(248,189,36,.32);
}
.add-flow {
  width:100%;
  justify-content:center;
  margin-top:4px;
  color:var(--gold);
}
.automation-bottom {
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:12px;
}
.automation-side {
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  align-content:start;
}
.automation-active,
.automation-queue {
  min-height:124px;
}
.automation-builder {
  min-width:0;
}
.automation-models,
.automation-history,
.automation-active,
.automation-queue { padding:16px; }
.automation-models .panel-header,
.automation-history .panel-header,
.automation-active .panel-header,
.automation-queue .panel-header { margin-bottom:10px; }
.active-exec,
.queue-row,
.mini-flow { padding:10px 0; border-bottom:1px solid rgba(255,255,255,.06); }
.active-exec {
  grid-template-columns:42px minmax(0, 1fr) 42px 48px;
}
.active-exec > small {
  color:#c7c0b6;
  text-align:right;
}
.queue-row {
  grid-template-columns:28px minmax(0, 1fr) auto;
  min-height:46px;
}
.queue-row > span {
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:#111;
  background:var(--gold);
  text-align:center;
  font-weight:900;
}
.queue-row strong {
  font-weight:500;
  min-width:0;
}
.queue-row div {
  min-width:0;
  display:grid;
  gap:2px;
}
.queue-row small {
  color:#bdb5a9;
}
.queue-row em,
.mini-flow em {
  color:var(--gold);
  font-style:normal;
  padding:4px 9px;
  border-radius:999px;
  background:rgba(248,189,36,.08);
  font-size:12px;
  white-space:nowrap;
}
.mini-flow em {
  color:#cfc7bc;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.025);
}
.count-badge { display:inline-grid; place-items:center; min-width:24px; height:24px; border-radius:999px; background:rgba(255,255,255,.08); color:#d8d2c8; font-size:12px; }
.builder-compat {
  max-height:none;
  overflow:visible;
  opacity:1;
}
.automation-history table th,
.automation-history table td {
  height:38px;
  padding:7px 10px;
  font-size:13px;
}
.automation-history table td {
  overflow-wrap:anywhere;
}
.automation-history .table-scroll {
  max-height:320px;
  overflow:auto;
}
.automation-metrics {
  grid-template-columns:repeat(3, minmax(0, 1fr));
}
@media (max-width: 1380px) {
  .reference-automations .automation-layout,
  .automation-layout {
    grid-template-columns:1fr;
  }
  .automation-board-header {
    grid-template-columns:minmax(0, 1fr);
  }
  .automation-board-tools {
    grid-template-columns:minmax(0, 1fr) 92px;
    min-width:0;
  }
  .automation-side {
    grid-template-columns:1fr;
  }
  .automation-metrics {
    grid-template-columns:repeat(3, minmax(150px, 1fr));
  }
}
@media (max-width: 1100px) {
  .kanban,
  .automation-side,
  .automation-metrics {
    grid-template-columns:1fr;
  }
}
