/* [amo-sync] «Настройки → amoCRM → Синхронизация сделок» и значок «amoCRM» у сделок */

.amos-status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-sunken, #F2F4F7); }
.amos-dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 5px; flex: none; background: var(--ink-faint); }
.amos-status.ok .amos-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(31,157,87,.15); }
.amos-status.busy .amos-dot { background: var(--accent); animation: amos-pulse 1.4s ease-in-out infinite; }
.amos-status.warn { border-color: rgba(224,138,0,.4); background: rgba(224,138,0,.07); }
.amos-status.warn .amos-dot { background: var(--amber-deep, #B54708); }
@keyframes amos-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(10,77,166,.35); } 50% { box-shadow: 0 0 0 6px rgba(10,77,166,0); } }
@media (prefers-reduced-motion: reduce) { .amos-status.busy .amos-dot { animation: none; } }
.amos-st-body { min-width: 0; flex: 1; }
.amos-st-line { font-size: 13.5px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.amos-sub { font-size: 12.5px; color: var(--ink-dim); line-height: 1.45; margin-top: 3px; overflow-wrap: anywhere; }
.amos-errtext { color: var(--amber-deep, #B54708); display: flex; gap: 6px; align-items: flex-start; }
.amos-prog { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 9px 0 2px; }
.amos-prog i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }

.amos-pipes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.amos-pipe { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); cursor: pointer; min-height: 48px; box-sizing: border-box; }
.amos-pipe.on { border-color: rgba(10,77,166,.35); background: rgba(10,77,166,.03); }
.amos-pipe input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.amos-sw { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-bright); flex: none; transition: background .2s; }
.amos-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.amos-pipe input:checked + .amos-sw { background: var(--accent); }
.amos-pipe input:checked + .amos-sw::after { transform: translateX(16px); }
.amos-pipe input:focus-visible + .amos-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.amos-pipe input:disabled + .amos-sw { opacity: .55; }
.amos-pn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.amos-pn b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.amos-pn small { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.amos-keep { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.amos-pipe.on .amos-keep { color: var(--accent); font-weight: 600; }

.amos-modes { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.amos-modes legend { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-faint); margin-bottom: 6px; padding: 0; }
.amos-mode { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); min-height: 34px; cursor: pointer; }
.amos-mode input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.amos-stop { color: var(--red, #C2410C) !important; }
.amos-fields { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 10px 14px; border: 1px dashed var(--line-bright); border-radius: 10px; font-size: 13px; color: var(--ink-dim); }
.amos-fields > span { display: inline-flex; gap: 7px; align-items: center; min-width: 0; }
.amos-how { margin-top: 14px; align-items: flex-start; }
.amos-err { margin-top: 6px; align-items: flex-start; }

/* окно «Поля amoCRM → поля программы» */
.modal.amos-modal { max-width: 640px; }
.modal .amos-search { width: 100%; box-sizing: border-box; }
.amos-only { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-dim); margin: 8px 0 4px; cursor: pointer; }
.amos-flist { display: flex; flex-direction: column; }
/* название группы полей amoCRM (вкладки её карточки) над её полями */
.amos-fgroup { font-size: 13.5px; font-weight: 700; color: var(--ink); padding: 16px 0 6px; border-bottom: 2px solid var(--line-bright); }
.amos-fgroup:first-child { padding-top: 4px; }
.amos-frow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 210px); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.amos-fname { min-width: 0; }
.amos-fname b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.amos-fname small { font-size: 11.5px; color: var(--ink-faint); }
.modal .amos-frow select { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.amos-fixed { font-size: 12.5px; color: var(--ink-dim); }
@media (max-width: 560px) {
  .amos-frow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .amos-keep { display: none; }
}

/* значок «amoCRM» у сделки: на доске, в списке и в карточке */
.crm-amo { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; color: var(--accent); background: rgba(10,77,166,.08); border: 1px solid rgba(10,77,166,.22); text-decoration: none; white-space: nowrap; }
a.crm-amo:hover { background: rgba(10,77,166,.14); }
.crm-amo-head { font-size: 12px; padding: 3px 9px; }
.crm-amo-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-dim); line-height: 1.45; padding: 9px 12px; margin-bottom: 14px; border-radius: 10px; background: rgba(10,77,166,.05); border: 1px solid rgba(10,77,166,.15); }
.crm-amo-lock { display: inline-flex; color: var(--accent); margin-left: 5px; vertical-align: -1px; }
.crm-card.pending { opacity: .6; }
.crm-amo-x { width: 100%; box-sizing: border-box; border: 1px solid var(--line-bright); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px; color: var(--ink); background: var(--bg-card); }
.crm-amo-x:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,77,166,.12); }
.crm-amo-x.err { border-color: var(--red, #D92D20); }
.crm-money .m .crm-amo-edit { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
