/* Image scam (OCR) card - only what the sibling Aegis cards do not already have */
.am-mod-cardwrap{position:relative;display:flex;flex-direction:column}
.am-mod-cardwrap>.am-mod-card{flex:1}
.am-mod-card.has-sub{padding-bottom:54px}
.am-mod-sub{position:absolute;left:20px;right:20px;bottom:16px;display:flex;flex-direction:row;flex:none;min-width:0;
  align-items:center;justify-content:flex-start;gap:8px;text-align:left;
  font-size:.8rem;line-height:1.3;color:rgba(232,217,184,.75);cursor:pointer}
.am-mod-sub input{display:inline-block;width:16px;height:16px;min-width:16px;margin:0;padding:0;flex:none;
  background:transparent;accent-color:#d4af37;cursor:pointer}
.am-mod-sub input:disabled{cursor:not-allowed}
.am-mod-sub.is-off{opacity:.55}
/* settings gear (bottom-right of the card, sibling of the card button) + punishment popover */
.am-mod-sub{right:64px}
.isg-wrap{position:absolute;right:14px;bottom:10px}
.isg-btn{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border-radius:50%;cursor:pointer;
  border:1px solid rgba(212,175,55,.35);background:#12100c;color:#e2c27a;transition:transform .2s ease,border-color .16s ease,background .16s ease}
.isg-btn:hover{border-color:rgba(226,194,122,.85);background:rgba(212,175,55,.14);transform:rotate(45deg)}
.isg-btn:focus-visible{outline:2px solid #e2c27a;outline-offset:2px}
.isg-btn.is-locked{opacity:.55}
.isg-btn:disabled{opacity:.5;cursor:wait}
.upgrade-modal.isg-overlay{display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;z-index:1000}
.isg-pop{width:min(520px,100%);margin:auto;text-align:left}
.isg-pop h2{font-family:Playfair Display,Georgia,serif;color:#fff;font-size:1.3rem}
.isg-hint{color:rgba(232,217,184,.75)!important;font-size:.9rem;margin-bottom:12px!important}
.isg-opts{display:flex;flex-direction:column;gap:8px}
.isg-opt{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:12px;cursor:pointer;
  border:1px solid rgba(197,160,89,.3);background:#12100c;color:#e8d9b8;text-align:left}
.isg-opt input{margin:3px 0 0;width:16px;height:16px;min-width:16px;accent-color:#d4af37;flex:none;cursor:pointer}
.isg-opt-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.isg-opt-txt b{color:#fff;font-size:.95rem}
.isg-opt-txt small{color:rgba(232,217,184,.6);font-size:.8rem;line-height:1.35}
.isg-opt.is-on{border-color:rgba(212,175,55,.7);background:rgba(212,175,55,.12)}
.isg-opt.is-on b{color:#e2c27a}
.isg-pop .isg-dur{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;color:#e8d9b8;font-size:.9rem;text-align:left}
.isg-pop .isg-dur .msg-input{width:auto;min-width:140px;padding:9px 12px}
.isg-note{font-size:.78rem!important;color:rgba(232,217,184,.5)!important;margin-top:12px!important;line-height:1.4}
@media (max-width:760px){.upgrade-modal.isg-overlay{padding:118px 12px 20px}}
@media (max-width:520px){.isg-pop{padding:18px}.isg-pop .isg-dur{flex-direction:column;align-items:stretch}.isg-pop .isg-dur .msg-input{width:100%}}

/* Aegis v2 (Card04): advanced-detection toggles in the gear popover + stats card above the Aegis grid */
.av2-sec{margin-top:16px;padding-top:14px;border-top:1px solid rgba(197,160,89,.22)}
.av2-sec h3{font-family:Playfair Display,Georgia,serif;color:#fff;font-size:1.05rem;margin:0 0 2px}
.av2-lead{font-size:.8rem!important;color:rgba(232,217,184,.6)!important;margin:0 0 8px!important}
.isg-pop label.av2-row{display:flex;flex-direction:row;flex:none;min-width:0;font-size:inherit;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;margin:0 -10px;border-radius:10px;cursor:pointer;color:#e8d9b8;text-align:left}
.av2-row:hover{background:rgba(212,175,55,.06)}
.av2-row.is-dim{opacity:.5}
.av2-txt{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.av2-txt b{color:#fff;font-size:.9rem;font-weight:600}
.av2-row.is-on .av2-txt b{color:#e2c27a}
.av2-txt small{color:rgba(232,217,184,.55);font-size:.76rem;line-height:1.35}
.isg-pop input.av2-sw{appearance:none;padding:0;box-shadow:none;-webkit-appearance:none;flex:none;width:40px;min-width:40px;height:22px;margin:0;border-radius:11px;position:relative;cursor:pointer;
  background:#2a2620;border:1px solid rgba(197,160,89,.35);transition:background .15s ease}
.isg-pop input.av2-sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#8c7f66;transition:left .15s ease,background .15s ease}
.isg-pop input.av2-sw:checked{background:rgba(212,175,55,.85);border-color:#d4af37}
.isg-pop input.av2-sw:checked::after{left:20px;background:#12100c}
.isg-pop input.av2-sw:disabled{cursor:not-allowed}
.isg-pop input.av2-sw:focus-visible{outline:2px solid #e2c27a;outline-offset:2px}
.isg-pop .av2-thr select.msg-input{width:auto;min-width:76px;padding:7px 10px;flex:none}
.av2-stats{margin:4px 0 14px;padding:12px 16px;border-radius:16px;border:1px solid rgba(197,160,89,.3);background:linear-gradient(180deg,rgba(212,175,55,.06),rgba(18,16,12,.9))}
.av2-st-h{margin:0 0 8px!important;font-size:.72rem!important;letter-spacing:.12em;text-transform:uppercase;color:#c5a059!important;font-weight:700}
.av2-st-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 28px}
.av2-kpi{display:flex;flex-direction:column;gap:2px;min-width:0}
.av2-kpi small{font-size:.74rem;color:rgba(232,217,184,.6)}
.av2-kpi b{font-size:1.35rem;color:#fff;font-weight:700;line-height:1.1;white-space:nowrap}
.av2-kpi em{font-style:normal;font-size:.78rem;font-weight:500;color:rgba(232,217,184,.6)}
.av2-kpi em.ok{color:#7fd6a0}.av2-kpi em.warn{color:#e8a25a}
.av2-spark{display:flex;align-items:flex-end;gap:4px;height:36px;margin-left:auto}
.av2-spark span{display:flex;flex-direction:column-reverse;width:9px;gap:1px}
.av2-spark i{display:block;width:9px;min-height:2px;border-radius:2px;background:#d4af37}
.av2-spark i.fp{background:#7fd6a0;min-height:0}
/* the fixed top tools (z 430) sit above the taller popover while it scrolls: hide them while the gear is open */
body:has(.isg-overlay) .desk-top-tools,body:has(.isg-overlay) .lang-toggle-float{visibility:hidden}
@media (max-width:520px){.av2-st-row{gap:10px 18px}.av2-kpi b{font-size:1.15rem}.av2-spark{margin-left:0;width:100%;justify-content:flex-start}}

/* Card05: state pill before NEW */.am-mod-pills{display:inline-flex;align-items:center;gap:6px;flex-wrap:nowrap;flex-shrink:0}.am-mod-card:not(.is-on) .am-mod-new.am-mod-state{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.03);color:rgba(255,255,255,.45)}.am-mod-card.is-on .am-mod-new.am-mod-state{border-color:rgba(212,175,55,.45);background:rgba(212,175,55,.12);color:#e2c27a}

/* Card06: Aegis backlog scan (old messages) */
.bl-sec .bl-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 2px}
.isg-pop button.bl-run{appearance:none;border:1px solid #d4af37;background:linear-gradient(180deg,#e2c27a,#c5a059);color:#14110a;font-weight:700;font-size:.86rem;border-radius:999px;padding:9px 16px;cursor:pointer;letter-spacing:.01em}
.isg-pop button.bl-run:disabled{opacity:.45;cursor:not-allowed}
.isg-pop button.bl-stop{appearance:none;border:1px solid rgba(237,66,69,.55);background:transparent;color:#ff8a8c;font-weight:600;font-size:.84rem;border-radius:999px;padding:8px 14px;cursor:pointer}
.bl-hint{font-size:.78rem!important;color:rgba(232,217,184,.6)!important;margin:4px 0 0!important}
.bl-err{font-size:.8rem!important;color:#ff8a8c!important;margin:4px 0 0!important}
.bl-box{margin-top:10px;padding:10px 12px;border-radius:12px;border:1px solid rgba(197,160,89,.3);background:rgba(18,16,12,.85)}
.bl-box.has-hits{border-color:rgba(237,66,69,.45)}
.bl-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bl-top b{color:#e2c27a;font-size:.9rem}.bl-top small{color:rgba(232,217,184,.55);font-size:.74rem}
.bl-bar{height:6px;border-radius:3px;background:#2a2620;margin:8px 0;overflow:hidden}
.bl-bar i{display:block;height:100%;background:linear-gradient(90deg,#c5a059,#e2c27a);border-radius:3px;transition:width .4s ease}
.bl-box.is-run .bl-bar i{background:linear-gradient(90deg,#c5a059,#f3d995,#c5a059);background-size:200% 100%;animation:blsh 1.2s linear infinite}
@keyframes blsh{to{background-position:-200% 0}}
.bl-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.bl-kpis div{display:flex;flex-direction:column}
.bl-kpis b{color:#fff;font-size:1.1rem;line-height:1.1}.bl-kpis small{color:rgba(232,217,184,.55);font-size:.72rem}
.bl-kpis .hot b{color:#ff8a8c}
.bl-cur{font-size:.76rem!important;color:rgba(232,217,184,.6)!important;margin:6px 0 0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bl-hits,.bl-skip{margin-top:8px;font-size:.78rem;color:#e8d9b8}
.bl-hits small{color:rgba(232,217,184,.55)}
.bl-hits ul,.bl-skip ul{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:3px}
.bl-hits li,.bl-skip li{display:flex;justify-content:space-between;gap:10px}
.bl-hits li b,.bl-skip li b{font-weight:600;color:#fff;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bl-hits li span{color:#ff8a8c;flex:none}.bl-skip li span{color:#e8a25a;flex:none;text-align:right}
.bl-skip summary{cursor:pointer;color:#e8a25a}
.bl-note{font-size:.76rem!important;margin:8px 0 0!important;color:#7fd6a0!important}.bl-note.warn{color:#e8a25a!important}
.bl-card{display:flex;align-items:center;gap:8px;margin:6px 0 0;padding:6px 10px;min-height:30px;box-sizing:border-box;border-radius:10px;border:1px solid rgba(197,160,89,.28);background:rgba(18,16,12,.7);font-size:.76rem;line-height:1.25;color:#e8d9b8}
.bl-card span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.am-mod-cardwrap:has(>.bl-card) .am-mod-sub{bottom:52px}
.am-mod-cardwrap:has(>.bl-card) .isg-wrap{bottom:46px}
.bl-card i{width:8px;height:8px;border-radius:50%;background:#7fd6a0;flex:none}
.bl-card.is-run i{background:#e2c27a;animation:blp 1s ease-in-out infinite}
.bl-card.has-hits{border-color:rgba(237,66,69,.45)}
@keyframes blp{50%{opacity:.25}}
.isg-pop label.av2-row.av2-all{margin:4px -10px 10px;padding:10px;border:1px solid rgba(212,175,55,.35);background:rgba(212,175,55,.06)}.isg-pop label.av2-row.av2-all .av2-txt b{font-weight:700}
