/* Halaman adu saham: emiten/versus/{A}/{B} (versus.php) dan emiten/versus/{sektor_id} (versus_sektor.php). Dimuat lewat var_custom_css di Emiten. */

:root {
	--vs-green: #72c02c;
	--vs-green-dark: #4c8a1e;
	--vs-forest: #1f3a2a;
	--vs-ink: #1f2d24;
	--vs-muted: #6b7280;
	--vs-line: #e6e8eb;
	--vs-bg: #f6f8f7;
	--vs-radius: 12px;
	--vs-a: #2f7d4a;	/* warna sisi A */
	--vs-b: #2563eb;	/* warna sisi B */
	--vs-up: #1f9d55;
	--vs-dn: #d64545;
}

/* ---------- Header ---------- */
.vs-top {
	color: #fff; padding: 28px 0 32px;
	background:
		linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
		linear-gradient(135deg, #142319 0%, #1f3a2a 55%, #2d5a3a 100%);
}
.vs-crumb { font-size: 13px; color: #9fb7a5; margin-bottom: 14px; }
.vs-crumb a { color: #cfe3d4; }
.vs-top h1 { color: #fff; font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.vs-lead { color: #c9d9cd; font-size: 16px; max-width: 680px; margin-bottom: 22px; }
.vs-top .up { color: #6fdc8c; } .vs-top .dn { color: #ff8a8a; }
.vs-body .up { color: var(--vs-up); } .vs-body .dn { color: var(--vs-dn); }

.vs-badge {
	flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--vs-green); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 5px rgba(114,192,44,.2);
}

/* kartu duel */
.vs-duel { display: flex; align-items: center; gap: 16px; }
.vs-card {
	flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
	border-top: 4px solid var(--vs-a); border-radius: var(--vs-radius); padding: 16px 18px; color: #fff; text-decoration: none; transition: background .2s;
}
.vs-card.vs-b { border-top-color: var(--vs-b); }
.vs-card:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.vs-card-head { display: flex; align-items: center; gap: 12px; }
.vs-logo { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; }
.vs-logo-text { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--vs-forest); background: #eef5e8; }
.vs-id { min-width: 0; display: flex; flex-direction: column; }
.vs-id b { font-size: 20px; }
.vs-id small { color: #c9d9cd; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-harga b { font-size: 24px; font-variant-numeric: tabular-nums; margin-right: 6px; }
.vs-harga small { font-size: 14px; font-weight: 600; }
.vs-spark { display: block; width: 100%; height: 36px; overflow: visible; }
.vs-spark polyline { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.vs-spark.up polyline { stroke: #6fdc8c; }
.vs-spark.dn polyline { stroke: #ff8a8a; }

.vs-stars { font-size: 14px; letter-spacing: 1px; color: rgba(255,255,255,.25); }
.vs-stars i { font-style: normal; }
.vs-stars .on { color: #f5a623; }
.vs-stars .half { background: linear-gradient(90deg, #f5a623 50%, rgba(255,255,255,.25) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vs-stars em { font-style: normal; color: #c9d9cd; margin-left: 4px; letter-spacing: 0; }

.vs-aksi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.vs-tukar { color: #cfe3d4; font-size: 14px; font-weight: 600; }
.vs-tukar:hover { color: #fff; }

/* form pembanding */
.vs-picker { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 760px; }
.vs-picker .form-control { flex: 1 1 200px; height: 46px; border: 0; border-radius: 10px; font-size: 15px; }
.vs-picker-mini { max-width: 420px; flex: 1 1 300px; }
.vs-picker-mini .form-control { height: 40px; font-size: 14px; }
.vs-picker-err { flex-basis: 100%; margin: 0; color: #ffd27a; font-size: 13px; }
.vs-btn { background: var(--vs-green); color: #fff; border-radius: 10px; font-weight: 600; padding: 9px 18px; }
.vs-btn:hover { background: var(--vs-green-dark); color: #fff; }
.vs-btn i { margin-right: 4px; }
.vs-picker > .vs-btn { height: 46px; }
.vs-picker-mini > .vs-btn { height: 40px; }

/* ---------- Isi ---------- */
.vs-body { background: var(--vs-bg); padding: 32px 0 48px; }
.vs-box { background: #fff; border: 1px solid var(--vs-line); border-radius: var(--vs-radius); padding: 20px; margin-bottom: 18px; }
.vs-box h2, .vs-h2 { font-size: 18px; font-weight: 700; color: var(--vs-ink); margin: 0 0 12px; }
.vs-h2 small { font-size: 13px; font-weight: 400; color: var(--vs-muted); margin-left: 6px; }
.vs-a-teks { color: var(--vs-a); }
.vs-b-teks { color: var(--vs-b); }

.vs-skor { display: flex; align-items: center; gap: 12px; font-size: 16px; white-space: nowrap; }
.vs-skor svg { flex: 1 1 auto; height: 10px; border-radius: 5px; overflow: hidden; }
.vs-fill-a { fill: var(--vs-a); }
.vs-fill-b { fill: var(--vs-b); }
.vs-ringkas { margin: 12px 0 16px; color: #374151; line-height: 1.6; }

.vs-table-wrap { overflow-x: auto; }
.vs-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.vs-table th, .vs-table td { padding: 10px 8px; border-bottom: 1px solid #f1f3f5; text-align: right; vertical-align: top; }
.vs-table thead th { font-size: 13px; font-weight: 700; border-bottom: 2px solid var(--vs-line); }
.vs-table th:first-child { text-align: left; font-weight: 600; color: var(--vs-ink); }
.vs-table tbody th small { display: block; font-weight: 400; font-size: 12px; color: var(--vs-muted); max-width: 340px; }
.vs-table td { white-space: nowrap; font-weight: 600; color: #4b5563; }
.vs-table td.win { color: var(--vs-up); background: #f0f9f2; }
.vs-table td.win i { font-size: 11px; }
.vs-table-thn { font-size: 13px; }
.vs-table-thn th, .vs-table-thn td { white-space: nowrap; font-weight: 400; }
.vs-note { font-size: 12px; color: var(--vs-muted); margin: 10px 0 0; }

.vs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vs-chips button { border: 1px solid var(--vs-line); background: #fff; color: var(--vs-ink); border-radius: 16px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.vs-chips button:hover { border-color: var(--vs-green); }
.vs-chips button[aria-selected="true"] { background: var(--vs-forest); border-color: var(--vs-forest); color: #fff; font-weight: 600; }
.vs-legend { display: flex; gap: 16px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.vs-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: currentColor; }
.vs-chart { width: 100%; min-height: 240px; }
.vs-chart svg { display: block; width: 100%; height: 260px; overflow: visible; }
.vs-chart .bar-a { fill: var(--vs-a); }
.vs-chart .bar-b { fill: var(--vs-b); }
.vs-chart .axis { fill: var(--vs-muted); font-size: 11px; }
.vs-chart .grid { stroke: #eef0f2; stroke-width: 1; }
.vs-chart .nol { stroke: #c7cbd1; stroke-width: 1; }
.vs-angka { margin-top: 12px; font-size: 14px; }
.vs-angka summary { cursor: pointer; color: var(--vs-green-dark); font-weight: 600; }

.vs-profil { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vs-profil h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.vs-profil h3 small { font-weight: 400; color: var(--vs-muted); margin-left: 4px; }
.vs-profil p { color: #4b5563; font-size: 14px; line-height: 1.65; margin-bottom: 8px; }
.vs-profil a { font-weight: 600; color: var(--vs-green-dark); font-size: 14px; }

/* ---------- Sidebar ---------- */
.vs-side { position: sticky; top: 16px; }
.vs-cta { background: #eef6e8; border-color: #d5eac4; }
.vs-cta p { color: #4b5a50; font-size: 14px; }
.vs-links { list-style: none; margin: 0; padding: 0; }
.vs-links a { display: block; padding: 8px 4px; border-bottom: 1px solid #f1f3f5; color: var(--vs-ink); text-decoration: none; font-size: 14px; }
.vs-links li:last-child a { border-bottom: 0; }
.vs-links a:hover, .vs-links a.active { color: var(--vs-green-dark); }
.vs-links a.active { font-weight: 700; }
.vs-links small { display: block; color: var(--vs-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-more { display: block; font-weight: 600; color: var(--vs-green-dark); font-size: 14px; padding: 0 4px; }

/* ---------- Halaman sektor ---------- */
.vs-pop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 32px; }
.vs-pop-item {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--vs-line); border-radius: var(--vs-radius);
	padding: 14px; color: var(--vs-ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.vs-pop-item:hover { color: var(--vs-ink); text-decoration: none; border-color: var(--vs-green); box-shadow: 0 8px 22px rgba(31,58,42,.09); transform: translateY(-2px); }
.vs-pop-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.vs-pop-side .vs-logo { width: 40px; height: 40px; border: 1px solid var(--vs-line); margin-bottom: 4px; }
.vs-pop-side b { font-size: 15px; }
.vs-pop-side small { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--vs-muted); }
.vs-pop-side small.up { color: var(--vs-up); } .vs-pop-side small.dn { color: var(--vs-dn); }
.vs-pop-vs { font-weight: 800; color: var(--vs-green-dark); font-size: 13px; text-transform: uppercase; }

.vs-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vs-list-head .vs-h2 { margin: 0; }
.vs-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--vs-line); border-radius: 10px; padding: 0 12px; margin: 0; flex: 0 1 280px; }
.vs-search i { color: var(--vs-muted); }
.vs-search input { border: 0; outline: 0; height: 38px; width: 100%; font-size: 14px; background: none; }
.vs-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.vs-subs a { background: #fff; border: 1px solid var(--vs-line); color: var(--vs-ink); border-radius: 8px; padding: 4px 10px; font-size: 13px; text-decoration: none; }
.vs-subs a span { color: var(--vs-muted); margin-left: 2px; }
.vs-subs a:hover { border-color: var(--vs-green); }

.vs-grup { margin-bottom: 22px; scroll-margin-top: 16px; }
.vs-grup h3 { font-size: 15px; font-weight: 700; color: var(--vs-forest); margin: 0 0 8px; }
.vs-rows { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--vs-line); border-radius: var(--vs-radius); }
.vs-row { display: flex; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #f1f3f5; }
.vs-row:last-child { border-bottom: 0; }
.vs-row-id { flex: 0 0 200px; min-width: 0; display: flex; flex-direction: column; color: var(--vs-ink); text-decoration: none; }
.vs-row-id:hover { color: var(--vs-green-dark); }
.vs-row-id small { color: var(--vs-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-row-lawan { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.vs-row-lawan a { font-size: 12px; font-weight: 600; color: var(--vs-forest); background: #f3f7f1; border-radius: 6px; padding: 3px 8px; text-decoration: none; }
.vs-row-lawan a:hover { background: var(--vs-green); color: #fff; }
.vs-row-lawan em { font-size: 12px; color: var(--vs-muted); }
.vs-empty { background: #fff; border: 1px dashed var(--vs-line); border-radius: var(--vs-radius); padding: 24px; text-align: center; color: var(--vs-muted); }

/* ---------- Responsif ---------- */
@media (max-width: 991px) {
	.vs-side { position: static; }
}
@media (max-width: 767px) {
	.vs-top h1 { font-size: 24px; }
	.vs-duel { flex-direction: column; align-items: stretch; gap: 10px; }
	.vs-duel .vs-badge { align-self: center; width: 38px; height: 38px; font-size: 13px; }
	.vs-picker .vs-badge { display: none; }
	.vs-picker .form-control, .vs-picker > .vs-btn { flex-basis: 100%; }
	.vs-profil { grid-template-columns: 1fr; }
	.vs-pop { grid-template-columns: 1fr; }
	.vs-row { flex-direction: column; gap: 8px; }
	.vs-row-id { flex-basis: auto; }
	.vs-search { flex-basis: 100%; }
	.vs-table tbody th small { display: none; }
}
