/* SHEKAR screens */

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(52,211,153,.25), rgba(4,20,12,.9) 70%); border: 1px solid var(--border-2); overflow: hidden; position: relative; }
[data-theme="light"] .brand-mark { background: radial-gradient(circle at 50% 50%, rgba(13,159,110,.25), #0b2a1c 75%); }
.brand-mark .sweep { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(181,240,74,.55), transparent 22%, transparent); animation: sweep 3.2s linear infinite; border-radius: 50%; }
.brand-mark svg { position: relative; z-index: 1; }
@keyframes sweep { to { transform: rotate(360deg); } }
.brand-name { font-size: 20px; font-weight: 900; letter-spacing: -.3px; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-lat); font-size: 10px; letter-spacing: 3px; color: var(--accent); font-weight: 800; }

/* ---------- home ---------- */
.greet { margin: var(--s2) 0 var(--s4); }
.greet h1 { font-size: 22px; }
.hero {
  overflow: hidden; padding: var(--s5); border-radius: var(--r-xl);
  background: radial-gradient(130% 120% at 100% 0%, rgba(52,211,153,.22), transparent 55%), linear-gradient(160deg, var(--surface-solid-2), var(--surface-solid));
  border: 1px solid var(--border-2); box-shadow: var(--shadow-2);
}
.hero-grid { display: grid; grid-template-columns: 1fr 132px; gap: var(--s4); align-items: center; }
.hero-mini-radar { width: 132px; height: 132px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s4); }
.hero-stats .stat { background: rgba(0,0,0,.18); border-color: var(--border); padding: 10px 12px; }
[data-theme="light"] .hero-stats .stat { background: rgba(255,255,255,.7); }
@media (max-width: 360px) { .hero-grid { grid-template-columns: 1fr 96px; } .hero-mini-radar { width: 96px; height: 96px; } .hero-stats .stat-val { font-size: 18px; } }

.ticker { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 2px var(--s4) 4px; scroll-snap-type: x mandatory; }
.ticker::-webkit-scrollbar { display: none; }
.tick-card {
  flex: 0 0 auto; width: 152px; scroll-snap-align: start; padding: 12px 14px; border-radius: var(--r-md); cursor: pointer;
  background: linear-gradient(160deg, var(--gold-soft), transparent 70%), var(--surface-solid); border: 1px solid var(--border);
  transition: transform var(--t-fast) var(--ease);
}
.tick-card:active { transform: scale(.97); }
.tick-name { font-size: 12px; color: var(--text-2); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.tick-price { font-size: 16px; font-weight: 800; margin: 2px 0; white-space: nowrap; }
.tick-price small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.tick-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 700; }
.spark { width: 64px; height: 22px; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--r-md); background: var(--surface-solid); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-2); cursor: pointer; text-align: center; min-height: 80px; }
.qa .li-icon { width: 40px; height: 40px; }
.qa:active { transform: scale(.96); }

/* ---------- radar ---------- */
.radar-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; margin: 0 auto; }
.radar-stage canvas { width: 100%; height: 100%; display: block; }
.radar-center-label { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); }
.radar-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--s3); }
.countdown { font-family: var(--font-lat); font-weight: 800; font-size: 26px; letter-spacing: 1px; direction: ltr; }
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; right: 7px; width: 2px; background: var(--border-2); border-radius: 1px; }
.tl-item { position: relative; padding: 4px 0 14px; }
.tl-item::before { content: ""; position: absolute; right: -20px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 10px var(--accent); }
.tl-item.error::before { background: var(--danger); box-shadow: 0 0 0 3px var(--bg); }
.tl-item.skipped::before { background: var(--text-3); box-shadow: 0 0 0 3px var(--bg); }
.tl-time { font-size: 12px; color: var(--text-3); }
.tl-msg { font-size: 13.5px; }
.src-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.src-dot.ok { background: var(--emerald-2); box-shadow: 0 0 8px var(--emerald-2); }
.src-dot.degraded { background: var(--warn); }
.src-dot.down, .src-dot.unauthorized { background: var(--danger); }
.src-dot.disabled { background: var(--text-3); }

/* ---------- deal card ---------- */
.deal-card { padding: 0; overflow: hidden; }
.deal-top { padding: var(--s4) var(--s4) var(--s3); }
.deal-title { font-size: 16px; font-weight: 800; line-height: 1.5; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.deal-meta span { display: inline-flex; align-items: center; gap: 3px; }
.deal-prices { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s3); align-items: end; margin-top: var(--s3); }
.price-lbl { font-size: 11.5px; color: var(--text-3); }
.price-val { font-size: 17px; font-weight: 800; white-space: nowrap; }
.price-val.strike { color: var(--text-2); font-weight: 700; font-size: 15px; }
.diff-pill { min-width: 70px; text-align: center; padding: 6px 10px; border-radius: 14px; font-weight: 900; font-size: 18px; line-height: 1.2; background: var(--accent-soft); color: var(--emerald-2); }
.diff-pill small { display: block; font-size: 10px; font-weight: 700; opacity: .9; }
.diff-pill.exceptional { background: linear-gradient(135deg, rgba(181,240,74,.22), rgba(52,211,153,.18)); color: var(--lime); box-shadow: 0 0 0 1px rgba(181,240,74,.3); }
.diff-pill.near { background: var(--info-soft); color: var(--info); }
.diff-pill.above { background: var(--danger-soft); color: var(--danger); }
.diff-pill.insufficient { background: var(--surface-solid-2); color: var(--text-3); font-size: 13px; }
.deal-score { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); font-size: 12px; color: var(--text-2); }
.deal-score .meter { flex: 1; }
.risk-box { margin: 0 var(--s4) var(--s3); padding: 10px 12px; border-radius: 12px; font-size: 12.5px; background: var(--warn-soft); }
.risk-box.high { background: var(--danger-soft); }
.risk-box.low { background: var(--accent-soft); }
.risk-box ul { margin: 4px 0 0; padding-inline-start: 18px; }
.safety { margin: 0 var(--s4) var(--s3); font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: flex-start; }
.safety svg { color: var(--warn); flex: none; margin-top: 3px; }
.deal-actions { display: flex; border-top: 1px solid var(--border); }
.deal-actions button { flex: 1; min-height: 48px; border: 0; background: none; color: var(--text-2); font-size: 12px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-inline-start: 1px solid var(--border); }
.deal-actions button:first-child { border-inline-start: 0; }
.deal-actions button.on { color: var(--accent); }
.deal-actions button:active { background: var(--surface-hi); }
.deal-actions .primary { color: var(--accent); }
.deal-card.ignored { opacity: .55; }
.unavail { margin: 0 var(--s4) var(--s3); }

/* ---------- watcher card ---------- */
.w-card .w-hd { display: flex; gap: var(--s3); align-items: flex-start; }
.w-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; position: relative; }
.w-ic.paused { background: var(--surface-solid-2); color: var(--text-3); }
.w-ic.active::after { content: ""; position: absolute; inset: -3px; border-radius: 18px; border: 2px solid var(--accent); opacity: .0; animation: ring 2.4s infinite; }
@keyframes ring { 0% { opacity: .6; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.18); } }
.w-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: var(--s3) 0; }
.w-stats div { background: var(--surface-solid-2); border-radius: 12px; padding: 8px 10px; }
.w-stats b { display: block; font-size: 16px; }
.w-stats span { font-size: 11px; color: var(--text-3); }
.w-actions { display: flex; gap: var(--s2); }
.w-actions .btn { flex: 1; }

/* ---------- wizard ---------- */
.steps { display: flex; gap: 6px; margin-bottom: var(--s4); }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-solid-2); transition: background var(--t-med); }
.steps i.on { background: linear-gradient(90deg, var(--lime), var(--emerald-2)); }
.cat-pick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.cat-opt { padding: var(--s5) var(--s4); border-radius: var(--r-lg); border: 2px solid var(--border); background: var(--surface-solid); cursor: pointer; text-align: center; transition: all var(--t-fast); }
.cat-opt .li-icon { margin: 0 auto var(--s2); width: 56px; height: 56px; border-radius: 18px; }
.cat-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.opt { min-height: 48px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-solid); cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--text-2); text-align: center; }
.opt.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.wiz-foot { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); display: flex; gap: var(--s2); margin-top: var(--s5); padding: var(--s3); border-radius: var(--r-lg); background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow-2); z-index: 5; }
.wiz-foot .btn { flex: 1; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--surface-solid-2); border: 1px solid var(--border); min-height: 48px; }
.tag-input input { flex: 1; min-width: 100px; border: 0; background: none; padding: 6px; }
.locked { position: relative; }
.locked::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface-solid) 50%, transparent); border-radius: inherit; }
.pro-tag { font-family: var(--font-lat); font-size: 10px; font-weight: 900; letter-spacing: 1px; padding: 2px 7px; border-radius: 6px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #241a02; }

/* ---------- notifications ---------- */
.n-item { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-inline: 0; border-top: 0; width: 100%; text-align: start; color: var(--text); }
.n-item.unread { background: var(--surface-hi); }
.n-item.unread .li-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; vertical-align: 2px; }

/* ---------- plans ---------- */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.plan { padding: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface-solid); }
.plan.pro { border-color: rgba(217,180,90,.45); background: radial-gradient(120% 80% at 100% 0%, var(--gold-soft), transparent 60%), var(--surface-solid); }
.plan h3 { font-size: 18px; display: flex; align-items: center; gap: 6px; }
.plan ul { list-style: none; padding: 0; margin: var(--s3) 0 0; font-size: 12.5px; }
.plan li { display: flex; gap: 6px; padding: 5px 0; color: var(--text-2); }
.plan li svg { color: var(--accent); flex: none; margin-top: 3px; }
.plan.pro li svg { color: var(--gold); }
@media (max-width: 380px) { .plan-grid { grid-template-columns: 1fr; } }

/* ---------- profile ---------- */
.avatar { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; font-size: 26px; font-weight: 900; background: linear-gradient(135deg, var(--emerald-2), #065f46); color: #eafff4; box-shadow: var(--glow); flex: none; }

/* ---------- nabz (gold accent scope) ---------- */
.nabz { --accent: var(--gold); --accent-soft: var(--gold-soft); --border-2: rgba(217,180,90,.25); }
[data-theme="light"] .nabz { --border-2: rgba(167,128,31,.28); }
.nabz .card.hi { background-image: linear-gradient(160deg, var(--gold-soft), transparent 60%); }
.nabz-hero { padding: var(--s5); border-radius: var(--r-xl); border: 1px solid rgba(217,180,90,.3); background: radial-gradient(120% 120% at 0% 0%, rgba(217,180,90,.18), transparent 55%), radial-gradient(100% 100% at 100% 100%, rgba(16,185,129,.15), transparent 60%), var(--surface-solid); }
.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 640px) { .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.asset { padding: 14px; border-radius: var(--r-lg); background: var(--surface-solid); border: 1px solid var(--border); cursor: pointer; transition: transform var(--t-fast), border-color var(--t-fast); }
.asset:active { transform: scale(.98); }
.asset:hover { border-color: var(--border-2); }
.asset-name { font-size: 12.5px; color: var(--text-2); font-weight: 700; }
.asset-price { font-size: 18px; font-weight: 900; margin: 4px 0 0; line-height: 1.35; }
.asset-unit { font-size: 11px; color: var(--text-3); font-weight: 600; }
.asset-chg { font-size: 12.5px; font-weight: 800; display: flex; gap: 6px; align-items: center; }
.asset .spark { width: 100%; height: 34px; margin: 8px 0 4px; }
.asset-foot { font-size: 10.5px; color: var(--text-3); display: flex; justify-content: space-between; gap: 4px; }
.bubble-card { padding: var(--s4); }
.bubble-bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--emerald-2) 0 16.7%, var(--warn) 16.7% 50%, var(--danger) 50% 100%); opacity: .85; margin: 12px 0 4px; direction: ltr; }
.bubble-bar i { position: absolute; top: -5px; width: 4px; height: 20px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--surface-solid); transform: translateX(-50%); }
.bubble-scale { position: relative; height: 16px; font-size: 10.5px; color: var(--text-3); direction: ltr; }
.bubble-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.bubble-scale span:first-child { transform: none; } .bubble-scale span:last-child { transform: translateX(-100%); }
.car-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.car-row:last-child { border-bottom: 0; }
.formula { font-family: var(--font-lat); direction: ltr; text-align: left; font-size: 12.5px; background: var(--surface-solid-2); border-radius: 10px; padding: 10px 12px; line-height: 1.9; overflow-x: auto; }


/* ================= Smart assistant «دستیار شکار» (CONTRACT §15) ================= */
.assist-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-lg); cursor: pointer;
  background: radial-gradient(130% 140% at 100% 0%, var(--accent-soft), transparent 55%), var(--surface); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease); }
.assist-card:active { transform: scale(.985); }
.assist-av, .msg-av { flex: none; display: grid; place-items: center; border-radius: 16px; color: var(--on-accent);
  background: linear-gradient(140deg, var(--emerald), var(--lime)); box-shadow: 0 0 0 4px var(--accent-soft); }
.assist-av { width: 50px; height: 50px; }
.assist-chips .chip { white-space: normal; text-align: start; min-height: 34px; padding-block: 6px; line-height: 1.6; }

.screen.assistant { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }
.chat { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s2); }
.msg { display: flex; gap: var(--s2); align-items: flex-end; max-width: 100%; animation: msgIn var(--t-med) var(--ease) both; }
.msg-av { width: 34px; height: 34px; border-radius: 12px; }
.msg-body { max-width: min(86%, 560px); display: flex; flex-direction: column; gap: var(--s2); }
.msg-text { padding: 10px 14px; border-radius: 18px; line-height: 2; font-size: 14px; word-break: break-word; }
.msg.bot .msg-text { background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 6px; }
.msg.user { flex-direction: row-reverse; }
.msg.user .msg-text { background: linear-gradient(140deg, var(--emerald-2), var(--emerald)); color: var(--on-accent); border-end-end-radius: 6px; }
.msg.err .msg-text { background: var(--danger-soft); }
.msg-meta { display: flex; gap: var(--s2); align-items: center; font-size: 11px; color: var(--text-3); }
.msg.typing .msg-body { padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .35; animation: dotPulse 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.acard { display: block; width: 100%; text-align: start; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface-solid); border: 1px solid var(--border); color: var(--text); font: inherit; }
.acard.tap, button.acard { cursor: pointer; }
.acard.deal { display: flex; align-items: center; gap: var(--s3); }
.acard.deal .li-body { flex: 1; min-width: 0; }
.acard-hd { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.acard.draft { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface-solid); }
.acard.draft.done { border-color: var(--border); opacity: .92; }
.acard-sum { font-weight: 700; line-height: 1.9; }
.acard-ok { display: flex; align-items: center; gap: 6px; margin-top: var(--s3); color: var(--accent); font-weight: 700; font-size: 13px; }
.acard-ok .card-link { margin-inline-start: auto; }
.acard.help summary { display: flex; gap: 6px; align-items: center; cursor: pointer; font-weight: 700; list-style: none; }
.acard.help summary::-webkit-details-marker { display: none; }
.acard .kv { padding: 6px 0; }

.chat-suggest { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding: var(--s3) 0 var(--s2); margin-inline: calc(var(--s4) * -1); padding-inline: var(--s4); }
.chat-suggest::-webkit-scrollbar { display: none; }
.chat-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 6px); z-index: 5; display: flex; gap: var(--s2); align-items: flex-end;
  padding: 8px; border-radius: 22px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow-2); }
@supports (backdrop-filter: blur(1px)) { .chat-bar { background: var(--surface); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); } }
.chat-bar textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.8; padding: 8px 10px; }
.chat-send { flex: none; width: 44px; height: 44px; border-radius: 16px; border: 0; cursor: pointer; display: grid; place-items: center; color: var(--on-accent); background: linear-gradient(140deg, var(--emerald), var(--lime)); }
.chat-send svg { transform: scaleX(-1); }
.chat-send:focus-visible, .chat-bar textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-foot { text-align: center; padding: var(--s2) var(--s4) 0; line-height: 1.8; }
.chat-ctx { display: flex; align-items: center; gap: var(--s2); padding: 6px 6px 6px 12px; margin-bottom: var(--s2); border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.chat-ctx .icon-btn { width: 32px; height: 32px; min-height: 32px; }
@media (prefers-reduced-motion: reduce) { .msg, .dots i { animation: none; } }

/* ================= Price-drop watch (CONTRACT §16) ================= */
.track-card { padding: var(--s4); }
.track-prices { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s3); align-items: end; }
.track-diff { font-weight: 800; font-size: 15px; padding: 6px 10px; border-radius: 12px; background: var(--surface-solid-2); white-space: nowrap; }
.track-card .spark { width: 100%; height: 46px; }

/* ================= Gold goal saver (CONTRACT §17) ================= */
.goal-card { padding: var(--s4); }
.goal-card.dim { opacity: .72; }
.goal-meter { position: relative; height: 22px; margin-top: 8px; direction: ltr; }
.goal-track { position: absolute; top: 7px; left: 0; right: 0; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--emerald-2) 0 30%, var(--warn) 30% 50%, var(--danger) 50% 100%); opacity: .8; }
.goal-limit { position: absolute; top: 1px; width: 3px; height: 20px; border-radius: 2px; background: var(--gold); transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface-solid); }
.goal-now { position: absolute; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-solid); border: 4px solid var(--text); transform: translateX(-50%); }
.goal-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); direction: ltr; }
