/* ═══════════════════════════════════════════════════════════════════════════
   MotoMagic — Dashboard+ modules
   My Listings · Messages · Notifications · Compare
   Built on the existing design tokens (app.css) and the acx system
   (account-sections.css). Only NEW classes live here — nothing is overridden.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared: segmented tabs / filter bar ─────────────────────────────────── */
.acx-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 22px}
.acx-tab{appearance:none;border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--gray);
  font:600 13.5px/1 var(--font-b);padding:10px 16px;border-radius:99px;cursor:pointer;display:inline-flex;
  align-items:center;gap:8px;transition:.2s ease}
.acx-tab:hover{color:#fff;border-color:var(--line2);background:rgba(255,255,255,.06)}
.acx-tab.on{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 8px 26px -10px rgba(227,6,19,.6)}
.acx-tab .acx-tab-c{min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:rgba(0,0,0,.28);
  display:inline-flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:700}
.acx-tab.on .acx-tab-c{background:rgba(255,255,255,.22)}

.dp-searchbar{position:relative;flex:1;min-width:200px}
.dp-searchbar svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--gray-dim)}
.dp-searchbar input{width:100%;height:44px;border-radius:12px;border:1px solid var(--line);
  background:rgba(255,255,255,.04);color:#fff;font:500 14px var(--font-b);padding:0 14px 0 42px;transition:.2s}
.dp-searchbar input:focus{outline:none;border-color:var(--red);background:rgba(255,255,255,.06)}

/* ═══════════════════════════ MY LISTINGS ═════════════════════════════════ */
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:18px}
.ml-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden;
  display:flex;flex-direction:column;transition:transform .25s var(--ease,ease),border-color .25s,box-shadow .25s}
.ml-card:hover{transform:translateY(-3px);border-color:var(--line2);box-shadow:0 22px 44px -26px rgba(0,0,0,.9)}
.ml-media{position:relative;aspect-ratio:16/10;background:linear-gradient(135deg,#161618,#0d0d0e);
  display:flex;align-items:center;justify-content:center;overflow:hidden}
.ml-media img{width:100%;height:100%;object-fit:cover}
.ml-media-ph{width:56px;height:56px;color:#3a3a3d}
.ml-media-ph svg{width:100%;height:100%}
.ml-status{position:absolute;top:12px;left:12px;padding:5px 11px;border-radius:99px;font:700 11px/1 var(--font-b);
  letter-spacing:.3px;text-transform:uppercase;backdrop-filter:blur(8px);display:inline-flex;align-items:center;gap:6px}
.ml-status.active{background:rgba(16,140,60,.24);color:#4ade80;border:1px solid rgba(74,222,128,.35)}
.ml-status.draft{background:rgba(255,255,255,.12);color:#d4d4d8;border:1px solid var(--line2)}
.ml-status.pending{background:rgba(245,158,11,.2);color:#fbbf24;border:1px solid rgba(251,191,36,.35)}
.ml-status.sold{background:rgba(139,92,246,.22);color:#c4b5fd;border:1px solid rgba(196,181,253,.35)}
.ml-status.expired{background:rgba(120,120,128,.2);color:#a1a1aa;border:1px solid var(--line2)}
.ml-status.paused{background:rgba(59,130,246,.2);color:#93c5fd;border:1px solid rgba(147,197,253,.35)}
.ml-boost{position:absolute;top:12px;right:12px;padding:5px 10px;border-radius:99px;font:700 11px/1 var(--font-b);
  background:linear-gradient(135deg,var(--red),var(--accent));color:#fff;display:inline-flex;align-items:center;gap:5px;
  box-shadow:0 6px 20px -6px rgba(227,6,19,.7)}
.ml-boost svg{width:12px;height:12px}
.ml-body{padding:16px 16px 14px;display:flex;flex-direction:column;gap:10px;flex:1}
.ml-title{font:700 16px/1.25 var(--font-d);color:#fff;letter-spacing:-.2px}
.ml-meta{display:flex;flex-wrap:wrap;gap:6px 14px;color:var(--gray);font-size:12.5px}
.ml-meta span{display:inline-flex;align-items:center;gap:5px}
.ml-meta svg{width:13px;height:13px;opacity:.7}
.ml-price{font:700 18px/1 var(--font-d);color:var(--red);margin-top:2px}
.ml-price small{color:var(--gray);font-weight:500;font-size:12px;margin-left:6px}
.ml-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px 0 2px;margin-top:2px;
  border-top:1px solid var(--line)}
.ml-stat{text-align:center}
.ml-stat b{display:block;font:700 16px/1 var(--font-d);color:#fff}
.ml-stat span{display:block;font-size:10.5px;color:var(--gray-dim);text-transform:uppercase;letter-spacing:.4px;margin-top:4px}
.ml-actions{display:flex;flex-wrap:wrap;gap:7px;padding:12px 16px;border-top:1px solid var(--line);background:rgba(255,255,255,.015)}
.ml-abtn{appearance:none;border:1px solid var(--line);background:rgba(255,255,255,.03);color:#d4d4d8;
  font:600 12.5px/1 var(--font-b);padding:8px 11px;border-radius:9px;cursor:pointer;display:inline-flex;
  align-items:center;gap:6px;transition:.18s}
.ml-abtn svg{width:14px;height:14px}
.ml-abtn:hover{color:#fff;border-color:var(--line2);background:rgba(255,255,255,.07)}
.ml-abtn.red{color:#fff;background:var(--red);border-color:var(--red)}
.ml-abtn.red:hover{filter:brightness(1.08)}
.ml-abtn.danger:hover{color:#fca5a5;border-color:rgba(252,165,165,.4);background:rgba(185,28,28,.14)}
.ml-abtn.booston{color:#fbbf24;border-color:rgba(251,191,36,.4)}
.ml-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:0 0 24px}
.ml-sumcard{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);padding:18px 20px}
.ml-sumcard b{display:block;font:700 26px/1 var(--font-d);color:#fff}
.ml-sumcard span{display:block;color:var(--gray);font-size:12.5px;margin-top:6px}
.ml-sumcard i{color:var(--red);font-style:normal}

/* ═══════════════════════════ MESSAGES ════════════════════════════════════ */
.msg-wrap{display:grid;grid-template-columns:340px 1fr;gap:0;border:1px solid var(--line);
  border-radius:var(--r-lg);overflow:hidden;min-height:560px;background:var(--card)}
.msg-list{border-right:1px solid var(--line);display:flex;flex-direction:column;background:rgba(255,255,255,.012)}
.msg-list-head{padding:16px 16px 12px;border-bottom:1px solid var(--line)}
.msg-list-scroll{overflow-y:auto;flex:1}
.msg-conv{display:flex;gap:12px;padding:14px 16px;cursor:pointer;border-bottom:1px solid var(--line);
  transition:background .15s;position:relative}
.msg-conv:hover{background:rgba(255,255,255,.04)}
.msg-conv.on{background:rgba(227,6,19,.08)}
.msg-conv.on::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--red)}
.msg-av{width:46px;height:46px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  font:700 16px var(--font-d);color:#fff;background:linear-gradient(135deg,#2a2a2e,#161618);position:relative}
.msg-av.online::after{content:"";position:absolute;right:1px;bottom:1px;width:11px;height:11px;border-radius:50%;
  background:#22c55e;border:2px solid var(--card)}
.msg-conv-main{flex:1;min-width:0}
.msg-conv-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.msg-conv-name{font:600 14px var(--font-b);color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-conv-time{font-size:11px;color:var(--gray-dim);flex-shrink:0}
.msg-conv-sub{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:3px}
.msg-conv-prev{font-size:12.5px;color:var(--gray);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.msg-conv.unread .msg-conv-prev{color:#e4e4e7;font-weight:600}
.msg-conv.unread .msg-conv-name{font-weight:700}
.msg-unread{min-width:19px;height:19px;padding:0 6px;border-radius:99px;background:var(--red);color:#fff;
  font:700 11px/19px var(--font-b);text-align:center;flex-shrink:0}
.msg-thread{display:flex;flex-direction:column;min-width:0}
.msg-thread-head{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.015)}
.msg-thread-id{flex:1;min-width:0}
.msg-thread-name{font:700 15px var(--font-d);color:#fff}
.msg-thread-status{font-size:12px;color:#22c55e;display:flex;align-items:center;gap:6px}
.msg-thread-status.off{color:var(--gray-dim)}
.msg-thread-status .dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.msg-listing{display:flex;align-items:center;gap:11px;padding:11px 18px;border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.02)}
.msg-listing-thumb{width:52px;height:40px;border-radius:8px;overflow:hidden;background:#161618;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;color:#3a3a3d}
.msg-listing-thumb img{width:100%;height:100%;object-fit:cover}
.msg-listing-thumb svg{width:22px;height:22px}
.msg-listing-info{flex:1;min-width:0}
.msg-listing-info b{display:block;font:600 13.5px var(--font-b);color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-listing-info span{font-size:12px;color:var(--red);font-weight:600}
.msg-scroll{flex:1;overflow-y:auto;padding:20px 18px;display:flex;flex-direction:column;gap:10px}
.msg-day{align-self:center;font-size:11px;color:var(--gray-dim);background:rgba(255,255,255,.05);
  padding:4px 12px;border-radius:99px;margin:6px 0}
.msg-bubble{max-width:74%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.5;position:relative;word-wrap:break-word}
.msg-bubble .t{display:block;font-size:10.5px;margin-top:5px;opacity:.65}
.msg-bubble.them{align-self:flex-start;background:rgba(255,255,255,.07);color:#e4e4e7;border-bottom-left-radius:5px}
.msg-bubble.me{align-self:flex-end;background:var(--red);color:#fff;border-bottom-right-radius:5px}
.msg-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 15px;background:rgba(255,255,255,.07);border-radius:16px;border-bottom-left-radius:5px}
.msg-typing i{width:7px;height:7px;border-radius:50%;background:var(--gray);animation:mmTyping 1.2s infinite}
.msg-typing i:nth-child(2){animation-delay:.2s}.msg-typing i:nth-child(3){animation-delay:.4s}
@keyframes mmTyping{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}
.msg-compose{display:flex;gap:10px;padding:14px 18px;border-top:1px solid var(--line);align-items:flex-end}
.msg-compose textarea{flex:1;resize:none;min-height:44px;max-height:130px;border-radius:12px;border:1px solid var(--line);
  background:rgba(255,255,255,.04);color:#fff;font:500 14px var(--font-b);padding:12px 14px;line-height:1.4}
.msg-compose textarea:focus{outline:none;border-color:var(--red)}
.msg-attach,.msg-send{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);
  color:var(--gray);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:.18s}
.msg-attach:hover{color:#fff;border-color:var(--line2)}
.msg-send{background:var(--red);border-color:var(--red);color:#fff}
.msg-send:hover{filter:brightness(1.08)}
.msg-send:disabled{opacity:.4;cursor:not-allowed;filter:none}
.msg-attach svg,.msg-send svg{width:19px;height:19px}
.msg-empty-thread{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--gray);text-align:center;padding:40px}
.msg-empty-thread svg{width:48px;height:48px;color:#3a3a3d}
@media(max-width:840px){
  .msg-wrap{grid-template-columns:1fr}
  .msg-wrap.thread-open .msg-list{display:none}
  .msg-wrap:not(.thread-open) .msg-thread{display:none}
  .msg-back{display:inline-flex!important}
}
.msg-back{display:none;width:36px;height:36px;border-radius:9px;border:1px solid var(--line);
  background:rgba(255,255,255,.04);color:#fff;align-items:center;justify-content:center;cursor:pointer}
.msg-back svg{width:18px;height:18px}

/* ═══════════════════════════ NOTIFICATIONS ═══════════════════════════════ */
.nt-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px}
.nt-group{margin:0 0 26px}
.nt-group-h{display:flex;align-items:center;gap:10px;margin:0 0 12px;color:var(--gray);
  font:700 12px/1 var(--font-b);letter-spacing:.6px;text-transform:uppercase}
.nt-group-h .nt-gic{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.05);color:var(--red)}
.nt-group-h .nt-gic svg{width:16px;height:16px}
.nt-group-h .nt-gc{margin-left:auto;color:var(--gray-dim);font-weight:600;letter-spacing:0}
.nt-item{display:flex;gap:14px;padding:15px 16px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--card);margin-bottom:9px;transition:.2s;position:relative}
.nt-item:hover{border-color:var(--line2)}
.nt-item.unread{background:linear-gradient(90deg,rgba(227,6,19,.06),var(--card) 60%);border-color:rgba(227,6,19,.2)}
.nt-item.unread::before{content:"";position:absolute;left:16px;top:20px;width:8px;height:8px;border-radius:50%;background:var(--red);box-shadow:0 0 8px var(--red)}
.nt-item.unread .nt-ic{margin-left:14px}
.nt-ic{width:40px;height:40px;border-radius:11px;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.05);color:#d4d4d8;transition:margin .2s}
.nt-ic svg{width:19px;height:19px}
.nt-ic.marketplace{color:#4ade80;background:rgba(74,222,128,.12)}
.nt-ic.orders{color:#93c5fd;background:rgba(147,197,253,.12)}
.nt-ic.messages{color:var(--accent);background:rgba(255,32,32,.12)}
.nt-ic.garage{color:#fbbf24;background:rgba(251,191,36,.12)}
.nt-ic.promotions{color:#c4b5fd;background:rgba(196,181,253,.12)}
.nt-main{flex:1;min-width:0}
.nt-main b{display:block;font:600 14.5px var(--font-b);color:#fff;margin-bottom:3px}
.nt-main p{color:var(--gray);font-size:13px;line-height:1.5;margin:0}
.nt-main .nt-time{display:block;font-size:11.5px;color:var(--gray-dim);margin-top:6px}
.nt-actions{display:flex;flex-direction:column;gap:6px;align-items:flex-end;flex-shrink:0}
.nt-cta{font:600 12.5px var(--font-b);color:var(--red);cursor:pointer;background:none;border:none;padding:0;white-space:nowrap}
.nt-cta:hover{text-decoration:underline}
.nt-dismiss{width:26px;height:26px;border-radius:7px;border:none;background:transparent;color:var(--gray-dim);
  cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s}
.nt-dismiss:hover{background:rgba(255,255,255,.08);color:#fff}
.nt-dismiss svg{width:15px;height:15px}

/* ═══════════════════════════ COMPARE ═════════════════════════════════════ */
.cmp-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card)}
.cmp-table{border-collapse:collapse;width:100%;min-width:640px}
.cmp-table th,.cmp-table td{padding:0;text-align:left;vertical-align:top}
.cmp-col-head{width:200px;position:sticky;left:0;z-index:2;background:var(--card);border-right:1px solid var(--line)}
.cmp-prod-head{padding:0;border-bottom:1px solid var(--line);border-right:1px solid var(--line);min-width:220px}
.cmp-prod{position:relative;padding:18px 16px 16px;display:flex;flex-direction:column;gap:10px}
.cmp-remove{position:absolute;top:10px;right:10px;width:26px;height:26px;border-radius:7px;border:1px solid var(--line);
  background:rgba(0,0,0,.4);color:var(--gray);cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:3}
.cmp-remove:hover{color:#fca5a5;border-color:rgba(252,165,165,.4)}
.cmp-remove svg{width:14px;height:14px}
.cmp-thumb{aspect-ratio:16/11;border-radius:10px;overflow:hidden;background:linear-gradient(135deg,#161618,#0d0d0e);
  display:flex;align-items:center;justify-content:center;color:#3a3a3d}
.cmp-thumb img{width:100%;height:100%;object-fit:cover}
.cmp-thumb svg{width:38px;height:38px}
.cmp-brand{font-size:11.5px;color:var(--gray);text-transform:uppercase;letter-spacing:.5px}
.cmp-name{font:700 15px/1.3 var(--font-d);color:#fff}
.cmp-price{font:700 17px/1 var(--font-d);color:var(--red)}
.cmp-rowlabel{padding:14px 16px;font:600 13px var(--font-b);color:var(--gray);background:rgba(255,255,255,.02);
  border-bottom:1px solid var(--line);white-space:nowrap}
.cmp-cell{padding:14px 16px;font-size:13.5px;color:#e4e4e7;border-bottom:1px solid var(--line);border-right:1px solid var(--line)}
.cmp-cell.best{color:#4ade80;font-weight:700}
.cmp-cell .muted{color:var(--gray-dim)}
.cmp-tr:hover .cmp-cell,.cmp-tr:hover .cmp-rowlabel{background:rgba(255,255,255,.03)}
.cmp-actions-row td{padding:16px;border-right:1px solid var(--line)}
.cmp-add-col{display:flex;align-items:center;justify-content:center;min-width:200px;padding:20px}
.cmp-add{width:100%;min-height:120px;border:1.5px dashed var(--line2);border-radius:12px;background:transparent;
  color:var(--gray);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  font:600 13px var(--font-b);transition:.2s}
.cmp-add:hover{border-color:var(--red);color:#fff;background:rgba(227,6,19,.05)}
.cmp-add svg{width:26px;height:26px}
.cmp-seg{display:inline-flex;border:1px solid var(--line);border-radius:99px;padding:3px;margin:0 0 22px;background:rgba(255,255,255,.03)}
.cmp-seg button{border:none;background:transparent;color:var(--gray);font:600 13px var(--font-b);padding:8px 18px;
  border-radius:99px;cursor:pointer;transition:.2s}
.cmp-seg button.on{background:var(--red);color:#fff}
