/* ============================================================
 * 信息中心 infocenter · 前台样式（作用域限定在 .ic 内，不影响主题）
 * ============================================================ */

.ic {
	/* 与魔方模板共用配色变量：有主题变量时跟随主题（含深色模式），否则回退到自身取值 */
	--ic-pri: var(--mf-primary, #2f6bff);
	--ic-pri-soft: var(--mf-primary-soft, #eef3ff);
	--ic-ink: var(--mf-text, #1f2937);
	--ic-sub: var(--mf-muted, #6b7280);
	--ic-line: var(--mf-border, #e8ebf1);
	--ic-bg: var(--mf-card-2, #f7f8fb);
	--ic-card: var(--mf-card, #fff);
	--ic-open: #e5484d;
	--ic-plan: #f59e0b;
	--ic-solved: #30a46c;
	--ic-radius: 12px;
	color: var(--ic-ink);
	font-size: 14px;
	line-height: 1.7;
	padding-bottom: 26px;
}
.ic *,
.ic *::before,
.ic *::after { box-sizing: border-box; }
.ic a { text-decoration: none; color: inherit; }
.ic h2, .ic h3, .ic p { margin: 0; }
.ic .fa { margin-right: 2px; }

/* ---------- 页头 ---------- */
.ic-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.ic-head-l { display: flex; align-items: center; gap: 12px; }
.ic-ico {
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--ic-pri), #6c8dff);
	color: #fff; font-size: 19px;
	border-radius: var(--ic-radius);
	box-shadow: 0 6px 14px rgba(47, 107, 255, .28);
	flex: none;
}
.ic-ico .fa { margin: 0; }
.ic-head h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.ic-head p { font-size: 12.5px; color: var(--ic-sub); margin-top: 1px; }
.ic-head p .fa { margin-right: 4px; }

/* ---------- 按钮 ---------- */
.ic-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 14px;
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: 9px;
	font-size: 13px; color: var(--ic-ink);
	cursor: pointer;
	transition: all .18s ease;
	line-height: 1.4;
}
.ic-btn:hover { border-color: var(--ic-pri); color: var(--ic-pri); }
.ic-btn.is-dis { opacity: .45; pointer-events: none; }
.ic-btn-ghost { background: transparent; }
.ic-btn-primary {
	background: var(--ic-pri); border-color: var(--ic-pri); color: #fff;
}
.ic-btn-primary:hover { background: #245be0; color: #fff; }
.ic .ic-btn i.fa { margin: 0; }

/* 展开/收起全部按钮的双状态文案 */
.ic [data-ic="toggle-all"] { min-width: 96px; justify-content: center; }
.ic [data-ic="toggle-all"] .fa { transition: none; }
.ic [data-ic="toggle-all"] .t-open { display: none; }
.ic [data-ic="toggle-all"][data-open="0"] .fa-compress::before { content: "\f065"; } /* fa-expand */
.ic [data-ic="toggle-all"][data-open="0"] .t-open { display: inline; }
.ic [data-ic="toggle-all"][data-open="0"] .t-close { display: none; }

/* ---------- 公告列表卡片 ---------- */
.ic-list { display: flex; flex-direction: column; gap: 10px; }
.ic-card {
	display: flex; align-items: center; gap: 16px;
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 14px 16px;
	transition: all .18s ease;
}
.ic-card:hover {
	border-color: rgba(47, 107, 255, .55);
	box-shadow: 0 8px 20px rgba(31, 41, 55, .07);
	transform: translateY(-1px);
}
.ic-card-date {
	flex: none; width: 74px;
	text-align: center;
	background: var(--ic-pri-soft);
	border-radius: 10px;
	padding: 8px 4px;
	color: var(--ic-pri);
	line-height: 1.25;
}
.ic-card-date .d { display: block; font-size: 13px; font-weight: 700; }
.ic-card-date .t { display: block; font-size: 11px; opacity: .8; }
.ic-card-main { flex: 1; min-width: 0; }
.ic-card-main h3 {
	font-size: 15px; font-weight: 600; line-height: 1.45;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ic-card-main p {
	font-size: 12.5px; color: var(--ic-sub); margin-top: 3px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ic-arrow { flex: none; color: #c2c8d4; font-size: 18px; }
.ic-card:hover .ic-arrow { color: var(--ic-pri); }

/* ---------- 公告详情 ---------- */
.ic-article {
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 26px 26px 30px;
}
.ic-article h1 { font-size: 21px; font-weight: 700; margin: 0 0 8px; line-height: 1.5; }
.ic-article .thedate { font-size: 12.5px; color: var(--ic-sub); margin-bottom: 14px; }
.ic-article-body { font-size: 14.5px; word-wrap: break-word; overflow-wrap: break-word; }
.ic-article-body img { max-width: 100%; height: auto; }
.ic-article-body p { margin: 0 0 12px; }
.ic-article-body pre {
	background: var(--ic-bg); border: 1px solid var(--ic-line);
	border-radius: 8px; padding: 12px; overflow: auto;
}
.ic-article-body table { max-width: 100%; display: block; overflow: auto; }

.ic-neighbor {
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
	margin-top: 14px;
}
.ic-neighbor-item {
	background: var(--ic-card); border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 12px 14px;
	transition: all .18s ease;
	min-width: 0;
}
.ic-neighbor-item:hover { border-color: var(--ic-pri); }
.ic-neighbor-item.is-none { opacity: .5; }
.ic-neighbor-item span { display: block; font-size: 12px; color: var(--ic-sub); margin-bottom: 2px; }
.ic-neighbor-item b {
	display: block; font-size: 13.5px; font-weight: 600;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 帮助中心 ---------- */
.ic-search {
	position: relative;
	margin-bottom: 14px;
}
.ic-search > .fa {
	position: absolute; left: 14px; top: 50%;
	transform: translateY(-50%);
	color: #9aa3b2; font-size: 14px;
}
.ic-search input {
	width: 100%;
	padding: 11px 14px 11px 38px;
	border: 1px solid var(--ic-line);
	border-radius: 10px;
	font-size: 14px;
	background: var(--ic-card);
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.ic-search input:focus {
	border-color: var(--ic-pri);
	box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}

.ic-faqs { display: flex; flex-direction: column; gap: 9px; }
.ic-faq {
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	overflow: hidden;
	transition: border-color .18s ease;
}
.ic-faq[open] { border-color: rgba(47, 107, 255, .45); }
.ic-faq summary {
	list-style: none;
	cursor: pointer;
	padding: 13px 16px;
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	font-weight: 600; font-size: 14.5px;
	user-select: none;
}
.ic-faq summary::-webkit-details-marker { display: none; }
.ic-faq summary:hover { color: var(--ic-pri); }
.ic-q { flex: 1; min-width: 0; }
.ic-q .fa { color: var(--ic-pri); margin-right: 6px; }
.ic-chev { color: #b6bdc9; transition: transform .2s ease; flex: none; }
.ic-faq[open] .ic-chev { transform: rotate(180deg); }
.ic-faq-body {
	padding: 0 16px 15px 16px;
	color: #3f4756;
	font-size: 13.8px;
	word-wrap: break-word;
}
.ic-faq-body img { max-width: 100%; height: auto; }
.ic-faq-body p { margin: 0 0 10px; }
.ic-faq-body pre {
	background: var(--ic-bg); border: 1px solid var(--ic-line);
	border-radius: 8px; padding: 12px; overflow: auto;
}
.ic-faq.is-hide { display: none; }

.ic-nomatch {
	text-align: center;
	background: var(--ic-card);
	border: 1px dashed var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 34px 16px;
	color: var(--ic-sub);
}
.ic-nomatch .fa { font-size: 26px; color: #c2c8d4; margin-bottom: 8px; }
.ic-nomatch p { margin-bottom: 14px; }
.ic-nomatch .fa { display: block; }

/* ---------- 网络故障 ---------- */
.ic-tabs {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin-bottom: 16px;
}
.ic-tab {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 8px 15px;
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: 999px;
	font-size: 13.5px;
	transition: all .18s ease;
}
.ic-tab b {
	font-size: 12px;
	background: var(--ic-bg);
	border-radius: 999px;
	padding: 1px 8px;
	color: var(--ic-sub);
	font-weight: 600;
}
.ic-tab:hover { border-color: var(--ic-pri); color: var(--ic-pri); }
.ic-tab.is-on {
	background: var(--ic-pri);
	border-color: var(--ic-pri);
	color: #fff;
	box-shadow: 0 5px 12px rgba(47, 107, 255, .3);
}
.ic-tab.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-all { background: #6b7280; }
.dot-open { background: var(--ic-open); }
.dot-plan { background: var(--ic-plan); }
.dot-solved { background: var(--ic-solved); }
.ic-tab.is-on .dot-all { background: #fff; }
.ic-tab.is-on .dot-open { background: #ffb4b7; }
.ic-tab.is-on .dot-plan { background: #ffd28a; }
.ic-tab.is-on .dot-solved { background: #9fe8c4; }

.ic-timeline { display: flex; flex-direction: column; gap: 12px; }
.ic-incident {
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-left: 4px solid #c2c8d4;
	border-radius: var(--ic-radius);
	padding: 15px 18px;
}
.ic-incident.st-开放 { border-left-color: var(--ic-open); }
.ic-incident.st-计划中 { border-left-color: var(--ic-plan); }
.ic-incident.st-已解决 { border-left-color: var(--ic-solved); }
.ic-incident-head {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	margin-bottom: 8px;
}
.ic-incident-head h3 { font-size: 15.5px; font-weight: 700; }
.ic-chip {
	flex: none;
	font-size: 11.5px; font-weight: 700;
	color: #fff;
	border-radius: 999px;
	padding: 2px 10px;
	letter-spacing: .5px;
}
.chip-开放 { background: var(--ic-open); }
.chip-计划中 { background: var(--ic-plan); }
.chip-已解决 { background: var(--ic-solved); }
.ic-meta {
	display: flex; flex-wrap: wrap; gap: 6px 18px;
	font-size: 12.5px; color: var(--ic-sub);
	margin-bottom: 10px;
}
.ic-meta .fa { margin-right: 4px; color: #a6adbb; }
.ic-incident-body {
	border-top: 1px dashed var(--ic-line);
	padding-top: 10px;
	font-size: 13.8px;
	color: #3f4756;
	word-wrap: break-word;
}
.ic-incident-body img { max-width: 100%; height: auto; }
.ic-incident-body p { margin: 0 0 10px; }

/* ---------- 服务器状态 ---------- */
.ic-servers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
}
.ic-server {
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 16px 18px;
}
.ic-server-head {
	display: flex; align-items: center; gap: 9px;
	margin-bottom: 12px;
}
.ic-server-head h3 {
	font-size: 15px; font-weight: 700;
	flex: 1; min-width: 0;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ic-live { font-size: 11px; color: #c2c8d4; }
.ic-live .fa { margin: 0; font-size: 9px; }
.ic-live.is-ok { color: var(--ic-solved); }
.ic-live.is-bad { color: var(--ic-open); }
.ic-mini {
	flex: none;
	font-size: 11.5px;
	color: var(--ic-pri);
	background: var(--ic-pri-soft);
	border-radius: 6px;
	padding: 2px 8px;
}
.ic-mini:hover { background: var(--ic-pri); color: #fff; }
.ic-server-ports {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
	margin-bottom: 12px;
}
.ic-port {
	background: var(--ic-bg);
	border-radius: 9px;
	padding: 9px 12px;
	display: flex; align-items: center; justify-content: space-between;
}
.ic-port span { font-size: 12px; color: var(--ic-sub); font-weight: 600; }
.ic-port b { font-size: 12.5px; font-weight: 700; }
.ic-port b .fa { margin: 0; color: #b6bdc9; }
.ic-port b.is-ok { color: var(--ic-solved); }
.ic-port b.is-bad { color: var(--ic-open); }
.ic-server-rows { display: flex; flex-direction: column; }
.ic-row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 7px 2px;
	border-bottom: 1px dashed #eef0f4;
	font-size: 12.8px;
}
.ic-row:last-child { border-bottom: 0; }
.ic-row span { color: var(--ic-sub); }
.ic-row span .fa { width: 16px; color: #a6adbb; }
.ic-row b {
	font-weight: 600; text-align: right;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	max-width: 60%;
}
.ic-row b .fa { margin: 0; color: #b6bdc9; }

/* ---------- 信息中心首页 ---------- */
.ic-home-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}
.ic-home-card {
	background: var(--ic-card);
	border: 1px solid var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 20px 18px;
	transition: all .18s ease;
}
.ic-home-card:hover {
	border-color: rgba(47, 107, 255, .55);
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(31, 41, 55, .08);
}
.ic-home-card .fa {
	display: inline-flex;
	width: 42px; height: 42px;
	align-items: center; justify-content: center;
	font-size: 18px; margin: 0 0 10px;
	border-radius: 10px;
	background: var(--ic-pri-soft);
	color: var(--ic-pri);
}
.ic-home-card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 3px; }
.ic-home-card p { font-size: 12.5px; color: var(--ic-sub); }

/* ---------- 空状态 / 分页 ---------- */
.ic-empty {
	text-align: center;
	background: var(--ic-card);
	border: 1px dashed var(--ic-line);
	border-radius: var(--ic-radius);
	padding: 36px 16px;
	color: var(--ic-sub);
}
.ic-empty .fa { font-size: 30px; color: #c2c8d4; display: block; margin: 0 auto 10px; }
.ic-empty p { font-size: 13.5px; }

.ic-pager {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	margin-top: 18px;
	flex-wrap: wrap;
}
.ic-pginfo { font-size: 12.5px; color: var(--ic-sub); }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
	.ic-article { padding: 18px 16px 22px; }
	.ic-neighbor { grid-template-columns: 1fr; }
	.ic-card { gap: 12px; padding: 12px 13px; }
	.ic-card-date { width: 62px; }
	.ic-card-main h3 { white-space: normal; }
	.ic-card-main p { display: none; }
	.ic-ico { width: 38px; height: 38px; font-size: 16px; }
	.ic-head h2 { font-size: 18px; }
}
