/* Watchlist / Portfolio / Virtual Trading guest pages (module/mystocks/guest.php), on top of market.css. */

.ms-hero h1 { font-size: 32px; line-height: 1.25; }
.ms-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border-radius: 18px; padding: 4px 12px; margin-bottom: 14px; }
.ms-free { color: #9cc7c6; font-size: 13px; margin: 12px 0 0; }

/* Illustration card */
.ms-demo { position: relative; background: #fff; border-radius: 14px; padding: 18px 20px 28px; color: var(--mk-ink); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.ms-demo-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--mk-line); }
.ms-demo-head i { color: var(--mk-brand); }
.ms-demo-head small { color: var(--mk-muted); font-weight: 600; }
.ms-demo-note { position: absolute; right: 16px; bottom: 8px; font-size: 11px; color: var(--mk-muted); }
.ms-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f4; }
.ms-row:last-of-type { border-bottom: 0; }
.ms-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ms-name small { color: var(--mk-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-num { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-variant-numeric: tabular-nums; }

.ms-alloc { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 12px 0 8px; }
.ms-alloc i, .ms-legend i { background: var(--mk-brand); }
.ms-alloc i:nth-child(2), .ms-legend li:nth-child(2) i { background: #0b8a85; }
.ms-alloc i:nth-child(3), .ms-legend li:nth-child(3) i { background: #5fb8b2; }
.ms-alloc i:nth-child(4), .ms-legend li:nth-child(4) i { background: #b9dedb; }
.ms-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 0 0 14px; font-size: 12px; color: var(--mk-muted); }
.ms-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.ms-ai { display: flex; gap: 10px; background: var(--mk-brand-soft); border-radius: 10px; padding: 12px; }
.ms-ai p { margin: 0; font-size: 13px; color: #34474a; }
.ms-ai b { display: block; color: var(--mk-brand); margin-bottom: 2px; }
.ms-ai-icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--mk-brand); color: #fff; display: flex; align-items: center; justify-content: center; }

.ms-balance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.ms-balance > span { background: #f6f8f9; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.ms-balance small { color: var(--mk-muted); font-size: 12px; }
.ms-balance b { font-size: 18px; }
.ms-side { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; }
.ms-buy { color: #12805c; background: #e3f5ee; }
.ms-sell { color: #c8372d; background: #fdecea; }
.ms-status { font-size: 12px; font-weight: 600; color: #12805c; }

.ms-chat { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.ms-chat p { margin: 0; max-width: 88%; font-size: 13px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; }
.ms-chat-ai { background: #f2f5f6; border-top-left-radius: 4px; }
.ms-chat-me { align-self: flex-end; background: var(--mk-brand); color: #fff; border-top-right-radius: 4px; }

/* Sections */
.ms-step { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mk-brand-soft); color: var(--mk-brand); font-weight: 700; margin-bottom: 10px; }
.ms-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--mk-brand-soft); color: var(--mk-brand); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 14px; }
.ms-other { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid #f0f2f4; text-decoration: none; }
.ms-other b { color: var(--mk-ink); }
.ms-other:hover b { color: var(--mk-brand); }

/* Watchlist: star to remove a stock */
.ms-unwatch { width: 44px; text-align: right; }
.ms-unwatch button { border: 0; background: none; padding: 4px; font-size: 18px; line-height: 1; color: #f0a500; cursor: pointer; }
.ms-unwatch button:hover { color: var(--mk-muted); }

/* Portfolio */
.ms-figure { display: flex; flex-direction: column; padding: 16px 18px; }
.ms-figure small { color: var(--mk-muted); font-size: 12px; }
.ms-figure b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--mk-ink); margin: 2px 0; }
.ms-figure b.up { color: #12805c; }
.ms-figure b.dn { color: #c8372d; }
.ms-figure span { font-size: 13px; }
.ms-pf-table input { width: 110px; font-variant-numeric: tabular-nums; }
.ms-pf-table td small { font-size: 12px; }
.ms-delete { border: 0; background: none; padding: 4px; font-size: 17px; line-height: 1; color: var(--mk-muted); cursor: pointer; }
.ms-delete:hover { color: #c8372d; }
.ms-bar { display: block; height: 6px; border-radius: 3px; background: #eef1f3; margin-top: 4px; overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: var(--mk-brand); }

/* Portfolio AI analysis (markdown from SafeMarkdown) */
.ms-insight { border-color: #cfe5e5; background: linear-gradient(180deg, var(--mk-brand-soft), #fff 140px); }
.ms-insight .ms-ai-icon { width: 32px; height: 32px; }
.ms-ai-text { font-size: 14px; line-height: 1.65; color: var(--mk-ink); }
.ms-ai-text p, .ms-ai-text ul, .ms-ai-text ol { margin: 0 0 8px; }
.ms-ai-text ul, .ms-ai-text ol { padding-left: 20px; }
.ms-ai-text h5, .ms-ai-text h6 { font-size: 15px; font-weight: 700; margin: 12px 0 4px; color: var(--mk-ink); }
.ms-ai-text a.sym { font-weight: 600; text-decoration: none; border-bottom: 1px dotted currentColor; }
.ms-ai-text .md-table { overflow-x: auto; margin: 6px 0 10px; }
.ms-ai-text table { border-collapse: collapse; font-size: 13px; }
.ms-ai-text th, .ms-ai-text td { padding: 5px 10px; border-bottom: 1px solid #eef1f3; }
.ms-ai-text .num { text-align: right; }
.ms-ai-wait span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--mk-brand); opacity: .3; animation: ms-dot 1.2s infinite; }
.ms-ai-wait span:nth-child(2) { animation-delay: .2s; }
.ms-ai-wait span:nth-child(3) { animation-delay: .4s; margin-right: 8px; }
@keyframes ms-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Virtual trading */
.ms-vt-qty { width: 90px; }
.ms-vt-quote { display: flex; justify-content: space-between; gap: 10px; background: var(--mk-brand-soft); border-radius: 10px; padding: 10px 12px; }
.ms-vt-quote > span { display: flex; flex-direction: column; min-width: 0; }
.ms-vt-quote small { color: var(--mk-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-vt-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; margin-bottom: 14px; }
.ms-vt-sum dt { font-weight: 400; color: var(--mk-muted); }
.ms-vt-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ms-vt-sum dt:nth-of-type(3), .ms-vt-sum dd:nth-of-type(3) { font-weight: 700; color: var(--mk-ink); }
.ms-vt-rank { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.ms-vt-rank .ms-step { width: 24px; height: 24px; font-size: 12px; }
.ms-vt-rank.me { background: var(--mk-brand-soft); font-weight: 600; }

@media (max-width: 767px) {
	.ms-hero h1 { font-size: 24px; }
	.ms-figure b { font-size: 17px; }
	.ms-demo { padding: 14px 14px 26px; }
}
