/* Sim Số Manager — giao diện ngoài website. Màu chủ đạo đổi trong Cài đặt (--ssm-c). */
.ssm-app, .ssm-wrap, .ssm-quick, .ssm-types {
	--ssm-c: var(--ssm-color, #d0021b);
	--ssm-ink: #1b1e23;
	--ssm-muted: #6b7280;
	--ssm-line: #e5e7eb;
	--ssm-soft: #f5f6f8;
	--ssm-r: 10px;
	color: var(--ssm-ink);
	font-variant-numeric: tabular-nums;
}
.ssm-app *, .ssm-wrap *, .ssm-quick * { box-sizing: border-box; }
.ssm-app .screen-reader-text, .ssm-wrap .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Nút ---------- */
.ssm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: var(--ssm-c); color: #fff !important; border: 0; border-radius: 8px;
	padding: 10px 18px; font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none !important; cursor: pointer;
	transition: filter .15s, transform .15s; white-space: nowrap;
}
.ssm-btn:hover { filter: brightness(1.08); }
.ssm-btn:active { transform: translateY(1px); }
.ssm-btn--sm { padding: 7px 12px; font-size: 13px; }
.ssm-btn--lg { width: 100%; padding: 14px 18px; font-size: 16px; }
.ssm-btn--ghost { background: transparent; color: var(--ssm-c) !important; box-shadow: inset 0 0 0 1.5px var(--ssm-c); }
.ssm-btn--call { background: var(--ssm-c); }
.ssm-btn--zalo { background: #0068ff; }
.ssm-btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Bộ lọc ---------- */
.ssm-title { margin: 0 0 14px; }
.ssm-app { margin-bottom: 24px; }
.ssm-filter { background: var(--ssm-soft); border: 1px solid var(--ssm-line); border-radius: var(--ssm-r); padding: 16px; margin-bottom: 18px; }
.ssm-filter__search, .ssm-quick { display: flex; gap: 8px; }
.ssm-filter__search input, .ssm-quick input {
	flex: 1; min-width: 0; height: 48px; padding: 0 14px; font-size: 18px; letter-spacing: .04em;
	border: 1.5px solid var(--ssm-line); border-radius: 8px; background: #fff; color: var(--ssm-ink);
}
.ssm-filter__search input:focus, .ssm-quick input:focus { outline: none; border-color: var(--ssm-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ssm-c) 18%, transparent); }
.ssm-filter__search .ssm-btn, .ssm-quick .ssm-btn { height: 48px; padding: 0 22px; font-size: 16px; }
.ssm-hint { margin: 8px 0 12px; font-size: 13px; color: var(--ssm-muted); line-height: 1.5; }
.ssm-hint code { background: #fff; border: 1px solid var(--ssm-line); border-radius: 4px; padding: 0 4px; font-size: 12px; color: var(--ssm-ink); }

.ssm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ssm-chip { --net: var(--ssm-ink); margin: 0; cursor: pointer; }
.ssm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ssm-chip span {
	display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff;
	border: 1.5px solid var(--ssm-line); font-size: 14px; font-weight: 600; color: var(--net); transition: .15s;
}
.ssm-chip:hover span { border-color: var(--net); }
.ssm-chip input:checked + span { background: var(--net); border-color: var(--net); color: #fff; }
.ssm-chip input:focus-visible + span { outline: 2px solid var(--ssm-c); outline-offset: 2px; }

.ssm-filter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ssm-select { margin: 0; }
.ssm-select select {
	height: 38px; padding: 0 30px 0 10px; border: 1.5px solid var(--ssm-line); border-radius: 8px; background-color: #fff;
	font-size: 14px; color: var(--ssm-ink); max-width: 100%;
}
.ssm-avoid { display: inline-flex; gap: 12px; font-size: 14px; padding: 0 4px; }
.ssm-avoid label { margin: 0; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ssm-reset { font-size: 13px; color: var(--ssm-muted); margin-left: auto; }

/* ---------- Kết quả ---------- */
.ssm-results { position: relative; transition: opacity .15s; }
.ssm-results.is-loading { opacity: .45; pointer-events: none; }
.ssm-count { font-size: 14px; color: var(--ssm-muted); margin-bottom: 8px; }
.ssm-count b { color: var(--ssm-ink); }
.ssm-empty { padding: 28px 16px; text-align: center; background: var(--ssm-soft); border-radius: var(--ssm-r); color: var(--ssm-muted); }

.ssm-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ssm-line); border-radius: var(--ssm-r); overflow: hidden; margin: 0; }
.ssm-table th, .ssm-table td { padding: 11px 12px; border: 0; border-bottom: 1px solid var(--ssm-line); text-align: left; vertical-align: middle; }
.ssm-table thead th { background: var(--ssm-soft); font-size: 13px; font-weight: 600; color: var(--ssm-muted); text-transform: none; }
.ssm-table tbody tr:last-child td { border-bottom: 0; }
.ssm-table tbody tr:hover { background: #fafafa; }
.ssm-table tr.is-vip td:first-child { box-shadow: inset 3px 0 0 #e9a800; }
.ssm-col-stt { width: 54px; color: var(--ssm-muted); font-size: 13px; }
.ssm-col-so a { font-size: 19px; font-weight: 700; letter-spacing: .03em; color: var(--ssm-ink) !important; text-decoration: none !important; }
.ssm-col-so a:hover { color: var(--ssm-c) !important; }
.ssm-col-so mark { background: none; color: var(--ssm-c); padding: 0; }
.ssm-col-gia { font-weight: 700; color: var(--ssm-c); white-space: nowrap; }
.ssm-col-gia del, .ssm-single__price del { display: block; font-size: 12px; font-weight: 400; color: var(--ssm-muted); }
.ssm-col-loai { font-size: 14px; color: var(--ssm-muted); white-space: nowrap; }
.ssm-m-loai { display: none; }
.ssm-col-buy { width: 1%; text-align: right; }

.ssm-net {
	--net: #666; display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
	color: var(--net); background: color-mix(in srgb, var(--net) 10%, #fff); border: 1px solid color-mix(in srgb, var(--net) 30%, #fff);
	white-space: nowrap;
}

.ssm-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px 0 4px; }
.ssm-pagination a, .ssm-pagination span {
	min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 8px; border: 1px solid var(--ssm-line); background: #fff; text-decoration: none !important; color: var(--ssm-ink); font-weight: 600;
}
.ssm-pagination a:hover { border-color: var(--ssm-c); color: var(--ssm-c); }
.ssm-pagination .is-current { background: var(--ssm-c); border-color: var(--ssm-c); color: #fff; }
.ssm-pagination .ssm-dots { border: 0; background: none; min-width: 20px; }
.ssm-more { text-align: center; margin: 16px 0 0; }

/* ---------- Lưới loại sim ---------- */
.ssm-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ssm-types__item {
	display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--ssm-line); border-radius: var(--ssm-r);
	background: #fff; text-decoration: none !important; color: var(--ssm-ink) !important; font-weight: 600; transition: .15s;
}
.ssm-types__item small { color: var(--ssm-muted); font-weight: 400; }
.ssm-types__item:hover { border-color: var(--ssm-c); color: var(--ssm-c) !important; transform: translateY(-1px); }

/* ---------- Trang chi tiết ---------- */
.ssm-main { display: block; }
.ssm-wrap { max-width: 1160px; margin: 0 auto; padding: 24px 16px 40px; }
.ssm-crumbs { font-size: 14px; color: var(--ssm-muted); margin-bottom: 16px; }
.ssm-crumbs a { color: var(--ssm-muted); text-decoration: none; }
.ssm-crumbs a:hover { color: var(--ssm-c); }
.ssm-single { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ssm-card { background: #fff; border: 1px solid var(--ssm-line); border-radius: 14px; padding: 24px; }
.ssm-single__top { display: flex; gap: 8px; align-items: center; }
.ssm-single__so { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: .03em; margin: 12px 0 6px; font-weight: 800; color: var(--ssm-ink); }
.ssm-single__price { font-size: 26px; font-weight: 800; color: var(--ssm-c); margin-bottom: 18px; }
.ssm-status { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fee2e2; color: #b91c1c; }
.ssm-status--giu { background: #fef3c7; color: #92400e; }
.ssm-spec { width: 100%; border-collapse: collapse; margin: 0 0 16px; border: 0; }
.ssm-spec th, .ssm-spec td { padding: 9px 0; border: 0; border-top: 1px dashed var(--ssm-line); text-align: left; font-size: 15px; }
.ssm-spec th { width: 38%; color: var(--ssm-muted); font-weight: 500; }
.ssm-spec a { color: var(--ssm-c); }
.ssm-commit { list-style: none; margin: 0 0 18px; padding: 14px 16px; background: var(--ssm-soft); border-radius: var(--ssm-r); }
.ssm-commit li { position: relative; padding-left: 24px; margin: 4px 0; font-size: 14px; }
.ssm-commit li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #16a34a; font-weight: 800; }
.ssm-contact { display: flex; flex-wrap: wrap; gap: 10px; }
.ssm-contact .ssm-btn { flex: 1; min-width: 150px; padding: 12px; }

.ssm-order h2, .ssm-sold h2, .ssm-similar h2 { font-size: 20px; margin: 0 0 14px; }
.ssm-field { margin: 0 0 12px; border: 0; padding: 0; }
.ssm-field label, .ssm-field legend { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; padding: 0; }
.ssm-field label span { color: var(--ssm-c); }
.ssm-field input:not([type=radio]), .ssm-field textarea {
	width: 100%; padding: 11px 12px; font-size: 16px; border: 1.5px solid var(--ssm-line); border-radius: 8px; background: #fff; color: var(--ssm-ink);
}
.ssm-field input:focus, .ssm-field textarea:focus { outline: none; border-color: var(--ssm-c); }
.ssm-field.is-error input { border-color: #dc2626; }
.ssm-pay label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 4px 0; cursor: pointer; }
.ssm-hp { position: absolute !important; left: -9999px; height: 1px; overflow: hidden; }
.ssm-order__msg { margin-top: 12px; font-size: 15px; white-space: pre-line; }
.ssm-order__msg.is-ok { padding: 14px; border-radius: var(--ssm-r); background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ssm-order__msg.is-err { color: #b91c1c; }
.ssm-sold p { color: var(--ssm-muted); }
.ssm-similar { margin-top: 32px; }

/* ---------- Điện thoại ---------- */
@media (max-width: 760px) {
	.ssm-single { grid-template-columns: 1fr; }
	.ssm-card { padding: 18px; }
	.ssm-reset { margin-left: 0; }
	.ssm-select { flex: 1 1 calc(50% - 8px); }
	.ssm-select select { width: 100%; }
}
@media (max-width: 640px) {
	.ssm-table, .ssm-table tbody { display: block; border: 0; background: none; }
	.ssm-table thead { display: none; }
	.ssm-table tr {
		display: grid; grid-template-columns: 1fr auto; grid-template-areas: "so gia" "meta buy";
		gap: 6px 10px; padding: 12px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--ssm-line); border-radius: var(--ssm-r);
	}
	.ssm-table td { padding: 0; border: 0; }
	.ssm-table .ssm-col-stt { display: none; }
	.ssm-col-so { grid-area: so; }
	.ssm-col-gia { grid-area: gia; text-align: right; }
	.ssm-col-mang { grid-area: meta; display: flex; gap: 8px; align-items: center; min-width: 0; }
	.ssm-table .ssm-col-loai { display: none; }
	.ssm-m-loai { display: inline; font-size: 13px; color: var(--ssm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.ssm-col-buy { grid-area: buy; width: auto; }
	.ssm-col-so a { font-size: 20px; }
	.ssm-filter { padding: 12px; }
	.ssm-filter__search .ssm-btn { padding: 0 14px; }
}
