/* RaboTeb ERP — the order desk (میز کار سفارش‌ها): tabs, the person's dashboard, referrals and the path board's
   additions (late cards, referral chips). Uses the tokens of erp-modern.css; loaded after it. */

/* ── Tabs ─────────────────────────────────────────────── */
.od-tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .3rem; margin: 0 0 1rem; background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); box-shadow: var(--ui-sh-1); scrollbar-width: none; }
.od-tabs::-webkit-scrollbar { display: none; }
.od-tabs button { flex: none; display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: var(--ui-ink-2); font-weight: 600; font-size: .9rem; padding: .55rem .95rem; border-radius: var(--ui-r-sm); transition: background-color .15s, color .15s; }
.od-tabs button:hover { background: #f1f5f2; color: var(--ui-ink); }
.od-tabs button.on { background: var(--ui-grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(32, 141, 68, .7); }
.od-tab-badge { min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px; display: inline-grid; place-items: center; font-size: .72rem; background: #e7f6ec; color: var(--ui-green); font-variant-numeric: tabular-nums; }
.od-tabs button.on .od-tab-badge { background: rgba(255, 255, 255, .25); color: #fff; }
.od-tab-badge.hot { background: #fdeceb; color: #d63c3c; animation: od-pulse 2s ease-in-out infinite; }
@keyframes od-pulse { 50% { box-shadow: 0 0 0 4px rgba(229, 72, 77, .15); } }
.od-spin { animation: od-spin 1s linear infinite; display: inline-block; }
@keyframes od-spin { to { transform: rotate(360deg); } }

/* ── Path board additions ─────────────────────────────── */
.od-journey li { padding: 0; overflow: hidden; }
.od-journey li > button { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: transparent; padding: .3rem .8rem; color: inherit; font: inherit; }
.od-journey li.on { box-shadow: 0 0 0 2px var(--ui-green), var(--ui-sh-1); }
.od-card.od-late { border-color: rgba(229, 72, 77, .45); background: linear-gradient(180deg, #fff 0%, #fffafa 100%); }
.od-late-tag { margin-top: .4rem; font-size: .76rem; color: #d63c3c; display: flex; align-items: center; gap: .25rem; }
.od-ref-chip { margin-top: .45rem; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .3rem; font-size: .75rem; font-weight: 600; line-height: 1.5; padding: .25rem .6rem; border-radius: 10px; background: #eef0ff; color: #4f46e5; }
.od-ref-chip.mine { background: #4f46e5; color: #fff; }
.od-ref-chip.late { background: #fdeceb; color: #d63c3c; }
.od-ref-chip small { opacity: .8; font-weight: 500; }
.od-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.od-col.od-flash { animation: od-flash 1.2s var(--ui-ease); }
@keyframes od-flash { 0% { box-shadow: 0 0 0 0 rgba(32, 141, 68, .55); } 100% { box-shadow: 0 0 0 14px rgba(32, 141, 68, 0); } }
.od-refs { background: #f6f7ff; border: 1px solid #e3e5ff; border-radius: var(--ui-r-sm); padding: .6rem .75rem; }
.od-refs h6 { margin: 0 0 .4rem; color: #4f46e5; }
.od-ref { font-size: .82rem; padding: .35rem 0; border-top: 1px dashed #dfe2ff; display: grid; gap: .15rem; }
.od-ref:first-of-type { border-top: 0; }
.od-ref.late small { color: #d63c3c; }

/* ── Dashboard ────────────────────────────────────────── */
.dd { display: grid; gap: 1rem; }
.dd-skeleton { display: grid; gap: 1rem; }
.dd-skeleton > div { height: 150px; border-radius: var(--ui-r); background: linear-gradient(90deg, #eef2ef 25%, #f7f9f8 50%, #eef2ef 75%); background-size: 200% 100%; animation: dd-shine 1.4s linear infinite; }
@keyframes dd-shine { to { background-position: -200% 0; } }

.dd-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.5rem; padding: 1.5rem 1.75rem; border-radius: calc(var(--ui-r) + 4px); color: #fff; background: radial-gradient(600px 240px at 0% 0%, rgba(255, 255, 255, .18), transparent 60%), var(--ui-grad); box-shadow: 0 18px 40px -18px rgba(18, 120, 70, .65); }
.dd-hero::after { content: ""; position: absolute; inset-inline-start: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.dd-hello { font-size: .9rem; opacity: .85; }
.dd-hero h2 { color: #fff; font-weight: 800; font-size: 1.55rem; margin: .2rem 0 .35rem; }
.dd-hero p { margin: 0; opacity: .9; max-width: 46ch; }
.dd-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.dd-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dd-chip.hot { background: #fff; color: #e8590c; }
.dd-chip.hot i { animation: dd-flame 1.6s ease-in-out infinite; }
@keyframes dd-flame { 50% { transform: scale(1.18) rotate(-6deg); } }

.dd-ring { position: relative; width: 150px; height: 150px; flex: none; }
.dd-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dd-ring circle { fill: none; stroke-width: 11; }
.dd-ring-bg { stroke: rgba(255, 255, 255, .22); }
.dd-ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dasharray .9s var(--ui-ease); filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55)); }
.dd-ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.15; }
.dd-ring-text strong { font-size: 2.1rem; font-weight: 800; }
.dd-ring-text span { font-size: .78rem; opacity: .85; }
.dd-ring-text em { font-style: normal; font-size: .75rem; font-weight: 700; margin-top: .2rem; background: #fff; color: var(--ui-green); border-radius: 999px; padding: .1rem .5rem; }

.dd-week { display: flex; align-items: flex-end; gap: .45rem; height: 120px; }
.dd-week-day { display: grid; justify-items: center; gap: .3rem; height: 100%; grid-template-rows: 1fr auto; }
.dd-week-bar { width: 16px; align-self: end; height: max(6px, calc(var(--h) * 1%)); border-radius: 8px; background: rgba(255, 255, 255, .35); transition: height .6s var(--ui-ease); }
.dd-week-day.hit .dd-week-bar { background: #fff; }
.dd-week-day.today .dd-week-bar { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 2px; }
.dd-week-day small { font-size: .72rem; opacity: .85; }

.dd-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.dd-tile { display: flex; align-items: center; gap: .75rem; text-align: start; background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); padding: .9rem; box-shadow: var(--ui-sh-1); color: inherit; transition: transform .18s var(--ui-ease), box-shadow .18s; }
button.dd-tile:hover { transform: translateY(-2px); box-shadow: var(--ui-sh-2); }
.dd-tile > i { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 1.3rem; color: var(--t); background: color-mix(in srgb, var(--t) 12%, #fff); }
.dd-tile strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ui-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.dd-tile span { font-size: .74rem; color: var(--ui-mute); }

.dd-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; align-items: start; }
.dd-card { background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); box-shadow: var(--ui-sh-1); padding: 1rem 1.1rem; }
.dd-card > header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.dd-card h3 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ui-ink); display: flex; align-items: center; gap: .4rem; }
.dd-card h3 i { color: var(--ui-green); }
.dd-count { min-width: 1.6rem; height: 1.6rem; border-radius: 999px; display: grid; place-items: center; background: var(--ui-grad); color: #fff; font-size: .8rem; font-weight: 700; padding: 0 .4rem; }

.dd-legend { display: flex; gap: .75rem; font-size: .78rem; color: var(--ui-mute); }
.dd-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: .3rem; vertical-align: -1px; }
.dd-legend .o::before { background: #8fd4a8; }
.dd-legend .d::before { background: #6366f1; border-radius: 50%; }
.dd-chart { width: 100%; height: auto; max-height: 230px; display: block; }
.dd-chart .grid { stroke: #eef2ef; stroke-dasharray: 3 4; }
.dd-chart .bar { fill: #8fd4a8; transition: fill .15s; }
.dd-chart .bar:hover { fill: var(--ui-green); }
.dd-chart .bar.today { fill: var(--ui-green); }
.dd-chart .line { fill: none; stroke: #6366f1; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dd-chart .dot { fill: #fff; stroke: #6366f1; stroke-width: 2; }
.dd-chart .lbl { font-size: 11px; fill: var(--ui-mute); text-anchor: middle; }
.dd-trend footer { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--ui-ink-2); border-top: 1px solid var(--ui-line); padding-top: .6rem; margin-top: .4rem; }

.dd-flow ol, .dd-leaders ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.dd-stage { position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i n c" "i s s"; align-items: center; column-gap: .7rem; text-align: start; border: 1px solid var(--ui-line); background: #fff; border-radius: var(--ui-r-sm); padding: .6rem .8rem .75rem; transition: border-color .15s, transform .15s var(--ui-ease); }
.dd-stage:hover { border-color: var(--t); transform: translateX(-2px); }
.dd-stage > i { grid-area: i; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; color: var(--t); background: color-mix(in srgb, var(--t) 12%, #fff); }
.dd-stage-name { grid-area: n; font-weight: 600; color: var(--ui-ink); }
.dd-stage-count { grid-area: c; font-size: 1.3rem; font-weight: 800; color: var(--ui-ink); font-variant-numeric: tabular-nums; }
.dd-late, .dd-ok { grid-area: s; font-size: .76rem; display: inline-flex; align-items: center; gap: .25rem; }
.dd-late { color: #d63c3c; font-weight: 600; }
.dd-ok { color: var(--ui-green); }
.dd-stage-bar { position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; width: calc(var(--w) * 1%); background: var(--t); border-radius: 3px; transition: width .6s var(--ui-ease); }

.dd-inbox { display: grid; gap: .4rem; }
.dd-inbox > header { margin-bottom: .35rem; }
.dd-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; text-align: start; width: 100%; border: 1px solid var(--ui-line); background: #fff; border-radius: var(--ui-r-sm); padding: .5rem .65rem; transition: border-color .15s, background-color .15s; }
.dd-item:hover { border-color: var(--t); background: color-mix(in srgb, var(--t) 4%, #fff); }
.dd-item > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--t); background: color-mix(in srgb, var(--t) 12%, #fff); }
.dd-item b { display: block; font-size: .86rem; color: var(--ui-ink); }
.dd-item small { display: block; font-size: .74rem; color: var(--ui-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch; }
.dd-item em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--ui-ink-2); }
.dd-item em.late, .dd-item.late small { color: #d63c3c; }
.dd-more { border: 0; background: transparent; color: var(--ui-green); font-weight: 600; font-size: .82rem; justify-self: start; padding: .2rem 0; }
.dd-empty { text-align: center; color: var(--ui-mute); padding: 1rem 0; }
.dd-empty i { font-size: 2rem; color: var(--ui-green); }
.dd-empty p { margin: .3rem 0 0; }

.dd-leaders li { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: .6rem; padding: .45rem .5rem; border-radius: var(--ui-r-sm); }
.dd-leaders li.me { background: #effaf3; box-shadow: inset 0 0 0 1px #cdeed8; }
.dd-medal { font-size: 1.3rem; text-align: center; font-weight: 800; color: var(--ui-mute); }
.dd-leader b { display: block; font-size: .88rem; color: var(--ui-ink); }
.dd-leader small { font-size: .72rem; color: var(--ui-mute); }
.dd-leader-bar { display: block; height: 5px; border-radius: 3px; margin-top: .3rem; width: calc(var(--w) * 1%); background: var(--ui-grad); transition: width .6s var(--ui-ease); }
.dd-leaders li > strong { font-size: 1.05rem; font-weight: 800; color: var(--ui-green); font-variant-numeric: tabular-nums; }
.dd-rules { font-size: .74rem; color: var(--ui-mute); margin: .75rem 0 0; border-top: 1px dashed var(--ui-line); padding-top: .55rem; }

/* ── Refer dialog ─────────────────────────────────────── */
.rf-dialog h2 { display: flex; align-items: center; gap: .45rem; }
/* The colleague list floats over the fields below it. */
.rf-dialog .user-picker, .rl-pass .user-picker { position: relative; z-index: 5; }
.rf-dialog .user-picker-list, .rl-pass .user-picker-list { position: absolute; inset-inline: 0; top: calc(100% + 2px); background: #fff; box-shadow: var(--ui-sh-2); border-radius: var(--ui-r-sm); max-height: 220px; overflow-y: auto; }
.rf-sub { color: var(--ui-mute); margin: -.4rem 0 .6rem; }
.rf-label { display: block; font-weight: 600; font-size: .86rem; color: var(--ui-ink); margin: .85rem 0 .35rem; }
.rf-quick { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.rf-chip { border: 1px solid var(--ui-line); background: #fff; border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; color: var(--ui-ink-2); transition: all .15s; }
.rf-chip:hover { border-color: var(--ui-green); color: var(--ui-green); }
.rf-chip.on { background: var(--ui-grad); color: #fff; border-color: transparent; }
.rf-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; }
.rf-seg { display: inline-flex; flex-wrap: wrap; background: #f1f5f2; border-radius: var(--ui-r-sm); padding: .2rem; gap: .15rem; }
.rf-seg button { border: 0; background: transparent; border-radius: 8px; padding: .35rem .65rem; font-size: .8rem; color: var(--ui-ink-2); }
.rf-seg button.on { background: #fff; color: var(--ui-ink); font-weight: 700; box-shadow: var(--ui-sh-1); }
.rf-seg button.on.p-high { color: #c77700; }
.rf-seg button.on.p-urgent { background: #e5484d; color: #fff; }
.rf-dialog .mx-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }
.rf-history { margin-top: 1.1rem; border-top: 1px solid var(--ui-line); padding-top: .75rem; }
.rf-history h6 { color: var(--ui-ink-2); }
.rf-history ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.rf-history li { border-inline-start: 3px solid #6366f1; padding: .25rem .65rem; font-size: .82rem; background: #fafbff; border-radius: 0 8px 8px 0; }
.rf-history li.done { border-color: var(--ui-green); }
.rf-history li.cancelled { border-color: #aab4ae; opacity: .75; }
.rf-history li.late { border-color: #e5484d; }
.rf-history p { margin: .15rem 0; color: var(--ui-ink); }
.rf-state { color: var(--ui-mute); }

/* ── Referrals tab ────────────────────────────────────── */
.rl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.rl-tabs { display: inline-flex; gap: .25rem; background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r-sm); padding: .2rem; }
.rl-tabs button { border: 0; background: transparent; border-radius: 8px; padding: .4rem .8rem; font-size: .86rem; font-weight: 600; color: var(--ui-ink-2); }
.rl-tabs button.on { background: #eef0ff; color: #4f46e5; }
.rl-tabs span { font-size: .72rem; background: #f1f5f2; border-radius: 999px; padding: 0 .4rem; margin-inline-start: .2rem; }
.rl-hint { font-size: .8rem; color: var(--ui-mute); }
.rl-empty { text-align: center; padding: 2.5rem 1rem; color: var(--ui-mute); }
.rl-empty i { font-size: 2.4rem; color: var(--ui-green); }
.rl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .85rem; }
.rl-card { background: #fff; border: 1px solid var(--ui-line); border-inline-start: 4px solid #6366f1; border-radius: var(--ui-r); padding: .85rem 1rem; box-shadow: var(--ui-sh-1); display: grid; gap: .5rem; }
.rl-card.p-high { border-inline-start-color: #f59e0b; }
.rl-card.p-urgent { border-inline-start-color: #e5484d; }
.rl-card.late { background: linear-gradient(180deg, #fff 0%, #fffafa 100%); }
.rl-card header { display: flex; align-items: center; gap: .4rem; }
.rl-order { border: 0; background: #f1f5f2; border-radius: 8px; padding: .2rem .55rem; font-weight: 700; color: var(--ui-ink); font-size: .85rem; }
.rl-order:hover { background: #e7f6ec; color: var(--ui-green); }
.rl-pri { font-size: .72rem; font-weight: 700; color: #fff; background: #e5484d; border-radius: 999px; padding: .05rem .5rem; }
.rl-status { margin-inline-start: auto; font-size: .74rem; color: var(--ui-mute); }
.rl-status.doing { color: #4f46e5; font-weight: 600; }
.rl-note { margin: 0; color: var(--ui-ink); white-space: pre-line; }
.rl-people { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--ui-ink-2); }
.rl-avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700; background: #eef0ff; color: #4f46e5; }
.rl-avatar.to { background: #e7f6ec; color: var(--ui-green); }
.rl-card footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .78rem; border-top: 1px dashed var(--ui-line); padding-top: .5rem; }
.rl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.rl-pass { min-width: 150px; }

/* ── Advisor routing board ────────────────────────────── */
.ar-banner { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-radius: var(--ui-r); margin-bottom: 1rem; border: 1px solid; }
.ar-banner.on { background: #effaf3; border-color: #cdeed8; }
.ar-banner.off { background: #fff8eb; border-color: #f5d39b; }
.ar-banner > i { font-size: 1.6rem; color: var(--ui-green); }
.ar-banner.off > i { color: #c77700; }
.ar-banner > div { flex: 1; display: grid; }
.ar-banner span { font-size: .84rem; color: var(--ui-ink-2); }
.ar-rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.ar-rules > div { background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); padding: .85rem; display: grid; gap: .25rem; box-shadow: var(--ui-sh-1); }
.ar-rules i { font-size: 1.4rem; color: var(--ui-green); }
.ar-rules span { font-size: .78rem; color: var(--ui-ink-2); line-height: 1.7; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .9rem; }
.ar-card { background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); padding: 1rem; box-shadow: var(--ui-sh-1); display: grid; gap: .7rem; opacity: .82; }
.ar-card.online { opacity: 1; border-color: #cdeed8; }
.ar-card header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; }
.ar-card header small { display: block; font-size: .75rem; color: var(--ui-mute); }
.ar-avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; background: #eef1ef; color: var(--ui-ink-2); }
.ar-card.online .ar-avatar { background: var(--ui-grad); color: #fff; }
.ar-dot { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 11px; height: 11px; border-radius: 50%; background: #aab4ae; border: 2px solid #fff; }
.ar-card.online .ar-dot { background: #22c55e; }
.ar-score { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ui-green) calc(var(--p) * 1%), #eef2ef 0); }
.ar-score strong { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--ui-ink); }
.ar-new { font-size: .76rem; color: #0f766e; background: #ecfdf5; border-radius: 8px; padding: .3rem .55rem; }
.ar-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.ar-card dl > div { background: #f7f9f8; border-radius: 9px; padding: .4rem .5rem; }
.ar-card dt { font-size: .7rem; color: var(--ui-mute); font-weight: 500; }
.ar-card dd { margin: 0; font-weight: 700; font-size: .88rem; color: var(--ui-ink); font-variant-numeric: tabular-nums; }
.ar-card dd small { font-weight: 400; color: var(--ui-mute); }
.ar-card footer { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Small screens ────────────────────────────────────── */
@media (max-width: 1199.98px) {
    .dd-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dd-grid { grid-template-columns: 1fr; }
    .ar-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .dd-hero { grid-template-columns: 1fr; padding: 1.25rem; text-align: center; justify-items: center; }
    .dd-chips { justify-content: center; }
    .dd-ring { width: 130px; height: 130px; }
    .dd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rf-row { grid-template-columns: 1fr; }
    .rl-list { grid-template-columns: 1fr; }
    .ar-rules { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .od-tab-badge.hot, .dd-chip.hot i, .od-spin, .dd-skeleton > div, .od-col.od-flash { animation: none; }
}

/* ── Product models and kind (shop/product-models) ── */
.pm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.pm-tools .pg-search { flex: 1; min-width: 220px; }
.pm-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .45rem .7rem; border-radius: var(--ui-r-sm); background: #eef0ff; border: 1px solid #dfe2ff; }
.pm-bulk input { width: 220px; }
.pm-group { background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); box-shadow: var(--ui-sh-1); margin-bottom: 1rem; overflow: hidden; }
.pm-group > header { padding: .75rem 1rem; border-bottom: 1px solid var(--ui-line); background: linear-gradient(90deg, #f3faf5, #fff); }
.pm-group.is-single > header { background: #fafbfa; }
.pm-group h2 { margin: 0; font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .45rem; color: var(--ui-ink); }
.pm-group h2 i { color: var(--ui-green); }
.pm-group h2 small { font-weight: 400; font-size: .78rem; color: var(--ui-mute); }
.pm-rows { display: grid; }
.pm-row { display: grid; grid-template-columns: auto 44px minmax(160px, 1.4fr) minmax(140px, 1fr) minmax(120px, .9fr) auto auto; align-items: end; gap: .65rem; padding: .6rem 1rem; border-top: 1px solid #f0f3f1; }
.pm-row:first-child { border-top: 0; }
.pm-row.is-dirty { background: #fffcf2; }
.pm-row > .form-check-input { align-self: center; }
.pm-thumb { width: 44px; height: 44px; border-radius: 10px; background: #f4f7f5; display: grid; place-items: center; overflow: hidden; color: var(--ui-mute); align-self: center; }
.pm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pm-name { display: grid; align-self: center; min-width: 0; }
.pm-name b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-name small { font-size: .72rem; color: var(--ui-mute); }
.pm-brand { color: var(--ui-green) !important; }
.pm-field { display: grid; gap: .15rem; font-size: .72rem; color: var(--ui-mute); }
.pm-kind { display: inline-flex; gap: .15rem; background: #f1f5f2; border-radius: 10px; padding: .15rem; }
.pm-kind button { border: 0; background: transparent; border-radius: 8px; padding: .3rem .55rem; font-size: .78rem; color: var(--ui-ink-2); white-space: nowrap; }
.pm-kind button.on { background: #fff; color: var(--ui-ink); font-weight: 700; box-shadow: var(--ui-sh-1); }
.pm-save { display: inline-flex; gap: .25rem; align-self: center; }
@media (max-width: 991.98px) {
    .pm-row { grid-template-columns: auto 44px 1fr; }
    .pm-field, .pm-kind, .pm-save { grid-column: 2 / -1; }
}

/* ── Brands (shop/brands) ── */
.br-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.br-card { display: grid; grid-template-columns: 64px 1fr; grid-template-areas: "logo body" "actions actions"; gap: .6rem .85rem; background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-r); padding: .9rem; box-shadow: var(--ui-sh-1); }
.br-logo { grid-area: logo; width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--ui-line); display: grid; place-items: center; overflow: hidden; background: #fff; }
.br-logo img { max-width: 56px; max-height: 56px; object-fit: contain; }
.br-logo span { font-size: 1.5rem; font-weight: 800; color: var(--ui-green); }
.br-body { grid-area: body; display: grid; gap: .1rem; min-width: 0; }
.br-body b { font-size: .98rem; }
.br-body small { color: var(--ui-mute); font-size: .76rem; }
.br-body a { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-body p { margin: .2rem 0 0; font-size: .8rem; color: var(--ui-ink-2); line-height: 1.7; }
.br-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: .35rem; border-top: 1px dashed var(--ui-line); padding-top: .55rem; }
