/* @region feature-automation-drift — Reports card (tabs, table, phone list and action bar), schedule dialog */
.ft-automation-drift { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ft-automation-drift-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ft-automation-drift-tabs { flex: 1 1 auto; min-width: 0; }
.ft-automation-drift-tabs .tf-tab { display: inline-flex; align-items: center; gap: 8px; }
.ft-automation-drift-n { height: 20px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.ft-automation-drift-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-automation-drift-period { display: flex; align-items: center; gap: 8px; }
.ft-automation-drift-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.ft-automation-drift-period .select { min-width: 140px; }
.ft-automation-drift-sched { display: inline-flex; align-items: center; gap: 6px; }
.ft-automation-drift-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ft-automation-drift-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.ft-automation-drift-note { margin: 0; font-size: 12px; color: var(--muted); }
.ft-automation-drift-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel-alt); }
.ft-automation-drift-count { font-size: 13px; font-weight: 600; color: var(--text); }
.ft-automation-drift-wrap { border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; }
.ft-automation-drift-table { min-width: 0; }
.ft-automation-drift-table .ft-automation-drift-c-check { width: 44px; }
.ft-automation-drift-table .ft-automation-drift-c-id { width: 76px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ft-automation-drift-table .ft-automation-drift-c-status { width: 150px; }
.ft-automation-drift-table .ft-automation-drift-c-runs { width: 88px; }
.ft-automation-drift-table .ft-automation-drift-c-last { width: 140px; white-space: nowrap; color: var(--muted); }
.ft-automation-drift-table tr.is-selected td { background: var(--accent-soft); }
.ft-automation-drift-table input[type="checkbox"] { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.ft-automation-drift-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; text-decoration: none; }
.ft-automation-drift-title:hover, .ft-automation-drift-title:focus-visible { color: var(--accent); text-decoration: underline; }
.ft-automation-drift-path { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.ft-automation-drift-more { border-top: 0; }
.ft-automation-drift-form { display: grid; gap: 14px; }
.ft-automation-drift-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ft-automation-drift-existing { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 900px) {
  .ft-automation-drift-head { flex-direction: column; align-items: stretch; }
  .ft-automation-drift-seg { width: 100%; }
  .ft-automation-drift-seg > button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .ft-automation-drift-tools { justify-content: space-between; }
  .ft-automation-drift-period { flex: 1 1 auto; }
  .ft-automation-drift-period .select { flex: 1 1 auto; min-width: 0; min-height: 44px; }
  .ft-automation-drift-sched { min-height: 44px; }
  .ft-automation-drift-mall { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--text); }
  .ft-automation-drift-mall input { width: 20px; height: 20px; margin: 0; }
  .ft-automation-drift-mlist { list-style: none; padding: 0; margin: 0 -16px; }
  .ft-automation-drift-mitem { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-soft); background: var(--panel); }
  .ft-automation-drift-mitem:last-child { border-bottom: 0; }
  .ft-automation-drift-mitem.is-selected { background: var(--accent-soft); }
  .ft-automation-drift-mrow { flex: 1 1 auto; min-width: 0; border-bottom: 0; padding-right: 4px; background: transparent; }
  .ft-automation-drift-mrow .tf-m-row-lead { width: 44px; height: 44px; margin-left: -12px; }
  .ft-automation-drift-mrow input { width: 22px; height: 22px; margin: 0; }
  .ft-automation-drift-open { flex: 0 0 44px; min-height: 44px; align-self: center; margin-right: 8px; color: var(--muted); }
  .ft-automation-drift-mbar { justify-content: space-between; }
  .ft-automation-drift-mbar-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
  .ft-automation-drift-mbar .btn { flex: 0 0 auto; padding: 0 18px; }
  .ft-automation-drift-mbar .btn.ghost { padding: 0 12px; }
  /* Long names without spaces wrap inside the row instead of running past the card. */
  .ft-automation-drift-mrow .tf-m-row-main { min-width: 0; }
  .ft-automation-drift-mrow .tf-m-row-title,
  .ft-automation-drift-mrow .tf-m-row-meta,
  .ft-automation-drift-mrow .tf-m-row-meta > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .ft-automation-drift-mbar .ft-automation-drift-count { font-size: 15px; }
}
/* @endregion feature-automation-drift */
