:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #101827;
  --ink: #111827;
  --muted: #667085;
  --line: #dfe4ea;
  --soft-line: #edf0f4;
  --amber: #f59e0b;
  --amber-soft: #fff7e8;
  --green: #0f8a5f;
  --green-soft: #e9f8f0;
  --red: #be3434;
  --red-soft: #fff0f0;
  --blue: #24466f;
  --blue-soft: #edf4ff;
  --shadow: 0 22px 58px rgba(17, 24, 39, .12);
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }
.shell { min-height: 100vh; }

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(16, 24, 39, .96), rgba(17, 24, 39, .88)),
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, .22), transparent 34%);
}
.login-card {
  width: min(430px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.login-logo { height: 38px; width: auto; display: block; margin-bottom: 28px; }
.eyebrow {
  margin: 0 0 8px;
  color: #8a4300;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.login-card h1, .topbar h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.login-form { display: grid; gap: 16px; margin-top: 24px; }
.login-form label, .search-box {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
.login-form input, .search-box input, .review-note {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.login-form input, .search-box input { height: 42px; padding: 0 12px; }
.login-form input:focus, .search-box input:focus, .review-note:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}
.form-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.primary-button, .secondary-button, .ghost-button, .danger-button {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 850;
}
.primary-button { background: var(--amber); color: #111827; }
.secondary-button { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ghost-button { background: transparent; border-color: var(--line); color: #344054; }
.danger-button { background: var(--red); color: #fff; }

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 22px 18px;
  background: var(--surface-strong);
  color: #fff;
}
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: transparent;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}
.mobile-menu-head,
.menu-scrim {
  display: none;
}
.brand img { height: 34px; width: auto; display: block; }
.side-nav { display: grid; gap: 8px; }
.side-link {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #cbd5e1;
  font-weight: 800;
  text-align: left;
  padding: 0 12px;
}
.side-link:hover, .side-link.is-active { background: rgba(255,255,255,.1); color: #fff; }
.logout-button { margin-top: auto; border-color: rgba(255,255,255,.18); color: #e5e7eb; }

.workspace { min-width: 0; padding: 22px; }
.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.topbar-actions { display: flex; align-items: end; gap: 10px; }
.search-box { width: 280px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 16px;
}
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.metric strong { display: block; margin-top: 7px; font-size: 28px; line-height: 1; }

.kanban-column, .detail-panel {
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(17,24,39,.05);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--soft-line);
}
.panel-head h2 { margin: 0; font-size: 14px; line-height: 1.15; }
.panel-head span { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.kanban {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  padding-bottom: 10px;
}
.mobile-board { display: none; }

.module-view {
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(17,24,39,.05);
  padding: 18px;
}

.module-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--soft-line);
}

.module-head h2 {
  margin: 0;
  font-size: 22px;
}

.module-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.module-card {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 14px;
}

.module-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
}

.module-card p {
  margin: 8px 0 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
}

.agents-head { align-items: center; }
.agent-summary { display: flex; gap: 8px; }
.agent-summary span {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.agent-summary strong { color: var(--ink); font-size: 16px; }
.agent-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.agent-phase {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #f7f9fc;
  padding: 10px;
}
.agent-phase header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.agent-phase header strong { color: var(--muted); font-size: 10px; }
.agent-card {
  min-height: 132px;
  margin-top: 8px;
  border: 1px solid var(--soft-line);
  border-left: 4px solid #94a3b8;
  border-radius: 6px;
  background: #fff;
  padding: 11px;
}
.agent-card.is-working,
.agent-card.is-reviewing { border-left-color: #12b76a; }
.agent-card.is-queued { border-left-color: #3b82f6; }
.agent-card.is-blocked { border-left-color: #f59e0b; }
.agent-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.agent-index {
  color: #9a4f00;
  font-size: 11px;
  font-weight: 900;
}
.agent-card > strong { display: block; font-size: 14px; line-height: 1.25; }
.agent-card p { min-height: 34px; margin: 8px 0; color: #475467; font-size: 11px; line-height: 1.45; }
.agent-state-label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.human-gate {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 130px 180px 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid #f4c267;
  border-left: 5px solid #f59e0b;
  border-radius: var(--radius);
  background: #fff8e8;
  padding: 13px 16px;
}
.human-gate span { color: #9a4f00; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.human-gate p { margin: 0; color: #475467; font-size: 12px; }
.agent-roster {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.agent-row {
  display: grid;
  grid-template-columns: 12px minmax(150px, .7fr) 1.5fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 11px 12px;
}
.agent-row strong,
.agent-row small { display: block; }
.agent-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.agent-row p { margin: 0; color: #475467; font-size: 13px; }
.agent-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.agent-status-dot.is-working,
.agent-status-dot.is-reviewing { background: #12b76a; box-shadow: 0 0 0 4px #e9f8f0; }
.agent-status-dot.is-queued { background: #3b82f6; }
.agent-status-dot.is-blocked { background: #f59e0b; }

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-button {
  min-height: 32px;
  padding: 0 10px;
  margin: 0;
}

.table-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  background: #fff;
}

.permissions-cell {
  max-width: 360px;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 160px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.settings-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.settings-grid input:not([type="checkbox"]) {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  outline: 0;
}

.setting-check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px !important;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 12px;
}

.settings-note {
  margin-top: 0;
}

.kanban-column {
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.kanban-column.is-drag-over {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.kanban-list {
  display: grid;
  gap: 8px;
  padding: 8px;
  align-content: start;
  flex: 1;
}

.kanban-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.queue-item {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
  text-align: left;
}
.queue-item:hover, .queue-item.is-selected { border-color: var(--amber); background: var(--amber-soft); }
.queue-item:active { cursor: grabbing; }
.queue-line { display: grid; grid-template-columns: 1fr; gap: 5px; }
.queue-item strong { display: block; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.queue-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 900;
}
.badge.pending, .badge.high, .badge.oportunidade_aberta { background: var(--amber-soft); color: #8a4300; }
.badge.selecionado_para_producao { background: var(--blue-soft); color: var(--blue); }
.badge.approved { background: var(--green-soft); color: var(--green); }
.badge.rejected { background: var(--red-soft); color: var(--red); }
.badge.medium { background: var(--blue-soft); color: var(--blue); }

.detail-panel { min-height: auto; box-shadow: none; border: 0; }
.empty-detail {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
  padding: 30px;
}
.empty-detail h2 { margin: 0; color: var(--ink); }
.empty-detail p { margin: 0; }
.detail-header {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--soft-line);
}
.detail-header h2 { margin: 0; font-size: 24px; line-height: 1.15; }
.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.meta-box { border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 10px; }
.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.meta-box strong { display: block; margin-top: 4px; font-size: 13px; }
.mobile-flow-card { display: none; }
.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 16px;
  padding: 18px;
}
.detail-section { border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 14px; }
.detail-section + .detail-section { margin-top: 12px; }
.detail-section h3 { margin: 0 0 10px; font-size: 15px; }
.detail-section p, .detail-section li { color: #475467; font-size: 14px; line-height: 1.55; }
.detail-section p { margin: 0; }
.detail-section ul { margin: 0; padding-left: 18px; }
.checklist { display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; color: #344054; font-size: 14px; }
.check-item input { margin-top: 2px; }
.review-note { min-height: 98px; resize: vertical; padding: 10px 12px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 18px 18px; }
.detail-header .detail-actions { padding: 0; }
.logs-list { display: grid; gap: 8px; }
.log-row { border-left: 3px solid var(--line); padding-left: 10px; color: #475467; font-size: 13px; line-height: 1.45; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 39, .58);
}

.modal-card {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.user-modal-card {
  width: min(520px, 100%);
}

.user-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.user-form h2 {
  margin: 0;
  font-size: 24px;
}

.user-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.user-form input,
.user-form select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  outline: 0;
}

.user-form-actions {
  padding: 0;
  margin-top: 4px;
}

@media (max-width: 1080px) {
  .app-view { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }
  .side-nav { grid-auto-flow: column; grid-auto-columns: max-content; margin-left: auto; }
  .logout-button { margin-top: 0; }
  .detail-body { grid-template-columns: 1fr; }
  .workspace { padding: 14px; }
  .kanban { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { background: #eef2f6; }
  .login-view {
    place-items: start center;
    padding: 18px;
  }
  .login-card {
    margin-top: 18px;
    padding: 22px;
  }
  .login-logo {
    height: 34px;
    margin: 0 auto 22px;
  }
  .login-card .eyebrow,
  .login-card h1 {
    text-align: center;
  }
  .login-card h1,
  .topbar h1 {
    font-size: 26px;
  }
  .app-view { display: block; }
  .workspace { padding: 14px 12px 20px; }
  .topbar {
    display: grid;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 14px;
  }
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }
  .search-box { width: 100%; }
  .topbar-actions .secondary-button { width: 100%; }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
  .metric {
    padding: 12px;
    min-height: 76px;
  }
  .metric span {
    min-height: 28px;
    font-size: 12px;
    line-height: 1.15;
  }
  .metric strong {
    font-size: 26px;
  }
  .sidebar {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    scrollbar-width: none;
    overflow: visible;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }
  .brand {
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-width: 88px;
    padding-right: 8px;
    background: var(--surface-strong);
  }
  .brand img { height: 26px; }
  .side-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    align-content: start;
    width: min(82vw, 320px);
    height: 100dvh;
    gap: 8px;
    margin-left: 0;
    padding: 18px 14px;
    border: 0;
    border-radius: 0;
    background: var(--surface-strong);
    box-shadow: 24px 0 60px rgba(15, 23, 42, .34);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }
  .sidebar.is-menu-open .side-nav {
    transform: translateX(0);
  }
  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .mobile-menu-head img {
    height: 30px;
    width: auto;
  }
  .mobile-menu-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius);
    background: transparent;
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }
  .menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    border: 0;
    background: rgba(15, 23, 42, .5);
  }
  .sidebar.is-menu-open .menu-scrim {
    display: block;
  }
  .side-link {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: 15px;
  }
  .logout-button {
    margin-left: auto;
    min-width: 66px;
    height: 36px;
    padding: 0 10px;
    background: var(--surface-strong);
  }
  .kanban {
    display: block;
    gap: 10px;
    padding: 0 0 12px;
    overflow: visible;
  }
  .mobile-board { display: grid; gap: 12px; }
  .mobile-status-tabs {
    display: flex;
    gap: 8px;
    margin: 0 -12px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-status-tabs::-webkit-scrollbar { display: none; }
  .mobile-status-tab {
    flex: 0 0 auto;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: #344054;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 850;
  }
  .mobile-status-tab span {
    color: var(--muted);
    font-size: 11px;
  }
  .mobile-status-tab.is-active {
    border-color: var(--amber);
    background: var(--amber-soft);
    color: #8a4300;
  }
  .mobile-list {
    display: grid;
    gap: 10px;
  }
  .mobile-list-card {
    display: grid;
    gap: 12px;
    width: 100%;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 14px;
    text-align: left;
    box-shadow: 0 10px 24px rgba(17,24,39,.05);
  }
  .mobile-list-card.is-selected,
  .mobile-list-card:hover {
    border-color: var(--amber);
    background: var(--amber-soft);
  }
  .mobile-list-card strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
  }
  .mobile-list-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }
  .kanban-column {
    display: none;
  }
  .panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
  }
  .queue-item {
    padding: 12px;
  }
  .queue-item strong {
    font-size: 14px;
  }
  .queue-item small {
    font-size: 12px;
  }
  .badge {
    min-height: 22px;
    font-size: 10px;
  }
  .modal { padding: 8px; }
  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }
  .modal-close {
    right: 10px;
    top: 10px;
  }
  .detail-header,
  .detail-body {
    padding: 14px;
  }
  .detail-header h2 {
    padding-right: 38px;
    font-size: 22px;
  }
  .detail-meta {
    grid-template-columns: 1fr 1fr;
  }
  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }
  .detail-header .detail-actions {
    padding: 0;
  }
  .detail-actions button {
    width: 100%;
  }
  .mobile-flow-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid #f8c56f;
    border-radius: var(--radius);
    background: var(--amber-soft);
    padding: 12px;
  }
  .mobile-flow-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .mobile-flow-card span {
    color: #8a4300;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .mobile-flow-card strong {
    color: #111827;
    font-size: 13px;
    text-align: right;
  }
  .detail-actions [data-action="selecionado_para_producao"] {
    font-size: 0;
  }
  .detail-actions [data-action="selecionado_para_producao"]::after {
    content: "Mover para Selecionados";
    font-size: 15px;
  }
  .module-view {
    padding: 14px;
  }
  .module-head {
    display: grid;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .agent-summary { width: 100%; }
  .agent-summary span { flex: 1; }
  .agent-pipeline { grid-template-columns: 1fr; }
  .human-gate { grid-column: auto; grid-template-columns: 1fr; gap: 4px; }
  .agent-row {
    grid-template-columns: 10px 1fr auto;
  }
  .agent-row p {
    grid-column: 2 / -1;
  }
  .table-wrap {
    margin-inline: -14px;
    padding-inline: 14px;
  }
  .data-table {
    min-width: 760px;
  }
  .user-form {
    padding: 22px 16px 16px;
  }
}

@media (max-width: 420px) {
  .workspace { padding-inline: 10px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 10px; }
  .metric strong { font-size: 24px; }
  .mobile-status-tabs { margin-inline: -10px; padding-inline: 10px; }
}
