/* Automation screen styles */
.au .au-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.au-recipe { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); transition: border-color .2s, box-shadow .2s; }
.au-recipe.on { border-color: rgba(244,122,32,.45); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-soft); }
.au-recipe h3 { font-size: 15.5px; line-height: 1.35; }
.au-recipe p { font-size: 13.5px; line-height: 1.5; flex: 1; }
.au-r-top { display: flex; align-items: center; justify-content: space-between; }
.au-r-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-soft); color: var(--accent-t); }
.au-r-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 24px; }
.au-r-foot .link { margin-inline-start: auto; }
.au-rule { flex-wrap: wrap; row-gap: 10px; }
.au-rule .grow { flex: 1 1 260px; min-width: 0; }
.au-ctl { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.au-k { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.au-k.event { background: var(--warn-bg); color: var(--warn); } .au-k.schedule { background: var(--info-bg); color: var(--info); } .au-k.watch { background: var(--violet-bg); color: var(--violet); }
.au-sentence { margin-top: 3px; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.au-sentence .w { color: var(--ink3); font-weight: 650; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.au-last { display: grid; gap: 3px; justify-items: end; min-width: 120px; }
.au-filter { width: auto; min-width: 170px; }
/* rule builder: When / If / Then */
.au-block { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface2); }
.au-word { display: flex; align-items: flex-start; }
.au-word span { display: inline-grid; place-items: center; min-width: 56px; height: 32px; padding: 0 10px; border-radius: 10px; font-weight: 800; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }
.when .au-word span { background: var(--warn-bg); color: var(--warn); } .iff .au-word span { background: var(--info-bg); color: var(--info); } .then .au-word span { background: var(--good-bg); color: var(--good); }
.au-body { min-width: 0; }
.au-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.au-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; padding-inline: 12px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); font-size: 13px; font-weight: 600; }
.au-chip button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink3); } .au-chip button:hover { background: var(--surface3); color: var(--ink); }
.au-toggle { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink2); }
.au-toggle.on { background: var(--grad-soft); border-color: rgba(244,122,32,.5); color: var(--accent-t); }
.au-cond { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1.2fr) auto; gap: 8px; align-items: center; }
.au-act { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.au-act-h { display: flex; align-items: center; gap: 8px; }
.au-n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--grad-btn); color: #fff; font-size: 11.5px; font-weight: 800; flex: none; }
.au-add { display: flex; flex-wrap: wrap; gap: 8px; }
.var-pick { height: 32px; font-size: 12.5px; color: var(--ink2); }
.au-adv summary { cursor: pointer; font-weight: 650; color: var(--ink2); font-size: 13.5px; padding: 4px 0; }
.au-test { display: grid; gap: 12px; padding: 16px; border-radius: 18px; border: 1px dashed var(--line-strong); }
.au-result { display: grid; gap: 10px; }
.au-step { padding: 10px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); display: grid; gap: 6px; margin-bottom: 8px; }
.au-prev { display: grid; gap: 4px; font-size: 13px; }
.au-pre { white-space: pre-wrap; word-break: break-word; padding: 10px 12px; border-radius: 12px; background: var(--surface3); font-size: 13px; line-height: 1.55; margin: 0; max-height: 260px; overflow: auto; }
.au-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.au-ep { display: grid; gap: 12px; }
.au-secret { display: block; padding: 12px; border-radius: 12px; background: var(--surface3); border: 1px solid var(--line2); word-break: break-all; font-family: var(--mono); font-size: 13px; text-align: start; }
.au-check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.au-check input { width: 18px; height: 18px; flex: none; }
.au-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; max-height: 230px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; }
.au-note { text-align: start; } .au-note.read { opacity: .65; }
.n-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; align-self: center; }
.good-t { color: var(--good); font-weight: 650; } .bad-t { color: var(--bad); font-weight: 650; }
/* the bell */
.notif-row.au .n-ic { background: var(--warn-bg); color: var(--warn); } .notif-row.au.read { opacity: .6; }
.dd-sec { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); }
.dd-sec .link { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.notif-row .n-t { flex: 1; min-width: 0; }
@media (max-width: 720px) {
  .au-block { grid-template-columns: 1fr; padding: 14px; }
  .au-cond { grid-template-columns: 1fr 1fr; } .au-cond .icon-btn { justify-self: end; }
  .au-last { justify-items: start; }
  .au-recipes, .au-eps { grid-template-columns: 1fr; }
}
.au .tbl td.num, .au .tbl th.num { white-space: nowrap; }
/* in right-to-left the bell sits on the left, so the list opens towards the right */
[dir=rtl] .dropdown.notif { inset-inline-start: auto; inset-inline-end: -60px; }
@media (max-width: 720px) { [dir=rtl] .dropdown.notif { inset-inline-start: 10px; inset-inline-end: 10px; } }
