/* Shared full-screen shell for the retained Destoon member pages. */
html, body.mc-body { min-width: 0; min-height: 100%; }
body.mc-body {
	margin: 0;
	background: #f2f3f5;
	color: #20242a;
	font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.mc-shell { height: 100vh; overflow: hidden; width: 100%; box-sizing: border-box; }
.mc-topbar {
	height: 56px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 22px;
	background: #ffffff;
	border-bottom: 1px solid #e6e8eb;
}
.mc-brand, .mc-topbar-actions, .mc-topbar-link, .mc-message-link { display: flex; align-items: center; }
.mc-brand-group { display: flex; align-items: center; min-width: 0; }
.mc-brand { gap: 8px; color: #17212b; text-decoration: none; font-size: 16px; font-weight: 700; }
.mc-brand img { width: 28px; height: 28px; border-radius: 5px; object-fit: contain; }
.mc-brand-sub { margin-left: 8px; padding-left: 8px; border-left: 1px solid #d9dde2; color: #6b7280; font-size: 13px; font-weight: 400; text-decoration: none; white-space: nowrap; }
.mc-brand-sub:hover { color: #0f766e; }
.mc-topbar-actions { gap: 16px; min-width: 0; font-size: 13px; }
.mc-topbar-link, .mc-message-link { color: #4b5563; text-decoration: none; white-space: nowrap; }
.mc-topbar-link:hover, .mc-message-link:hover { color: #0f766e; }
.mc-message-link { position: relative; }
.mc-message-link em, .mc-nav-item em, .mc-account-menu em { margin-left: 5px; min-width: 16px; box-sizing: border-box; padding: 1px 5px; border-radius: 10px; background: #d92d20; color: #fff; font-size: 11px; font-style: normal; text-align: center; }
.mc-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #20242a; }
.mc-admin-notice { padding: 4px 8px; border: 1px solid #f6c453; background: #fff8e6; color: #8a5700; border-radius: 4px; white-space: nowrap; }
.mc-layout { display: flex; height: calc(100vh - 56px); min-height: 0; width: 100%; }
.mc-app-sidebar { flex: 0 0 208px; width: 208px; box-sizing: border-box; background: #fff; border-right: 1px solid #e6e8eb; overflow: hidden; display: flex; flex-direction: column; }
.mc-sidebar { width: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: transparent; border: 0; overflow: hidden; }
.mc-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 0; }
.mc-nav-group { margin: 0 0 16px; }
.mc-nav-overview { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid #eef0f2; }
.mc-nav-overview-link, .mc-nav-static { display:flex; align-items:center; min-height:40px; padding:0 18px; color:#4b5563; font-size:14px; font-weight:500; line-height:40px; text-decoration:none; }
.mc-nav-overview-link > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-nav-overview-link:hover, .mc-nav-overview-link.mc-on { background:#e3f1ed; color:#0f766e; }
.mc-nav-head { padding: 8px 18px; color: #8b949e; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.mc-nav-body ul { margin: 0; padding: 0; list-style: none; }
.mc-nav-item { position: relative; min-height: 40px; box-sizing: border-box; padding: 0; color: #4b5563; font-size: 14px; font-weight: 500; line-height: 40px; }
.mc-sidebar .mc-nav-item { background-image:none!important; }
.mc-nav-item a { display:flex!important; align-items:center; min-height:40px; padding:0 18px; color:inherit; line-height:40px; text-decoration:none; }
/* 老 member/style.css 的 a.n{width:120px} 按 content-box 设计；会展页引入 meeting.css 的全局 *{box-sizing:border-box} 后链接会缩水成 120px，文字被 ellipsis 截断。此处强制自适应宽度。 */
.mc-nav-item a.n { width: auto !important; }
.mc-nav-item a > span:not(.mc-nav-icon-slot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-nav-icon-slot { display:inline-flex; flex:0 0 28px; align-items:center; justify-content:center; width:28px; height:28px; color:#6c7780; }
.mc-nav-icon { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.mc-nav-item:hover .mc-nav-icon-slot, .mc-nav-item.mc-on .mc-nav-icon-slot { color:#0f766e; }
.mc-nav-item.mc-on::before { position:absolute; z-index:1; top:10px; left:0; width:3px; height:20px; border-radius:0 2px 2px 0; background:#0f766e; content:""; }
.mc-nav-item:hover { background: #f2f7f6; color: #0f766e; }
.mc-nav-item.mc-on { background: #e3f1ed; color: #0f766e; }
.mc-nav-item em { position: absolute; right: 14px; top: 50%; margin: 0; transform: translateY(-50%); display: inline-block; line-height: normal; }
.mc-nav-coming { color:#8b949e; }
.mc-nav-coming .mc-nav-static { cursor:default; }
.mc-nav-coming small { margin-left:auto; padding:1px 6px; border:1px solid #d9dde2; border-radius:3px; color:#8b949e; font-size:11px; line-height:18px; }
.mc-main { min-width: 0; flex: 1 1 auto; box-sizing: border-box; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.mc-main > .m, .mc-main > .content, .mc-main > .main { max-width: none; }
.back2top { position: fixed; right: 20px; bottom: 20px; }

/* ===== Three-column context panel (mode = knowledge / agents) ===== */
.mc-context-panel { flex: 0 0 224px; width: 224px; box-sizing: border-box; background: #fff; border-right: 1px solid #e6e8eb; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.mc-ctx-head { padding: 16px 16px 8px; font-size: 13px; font-weight: 600; color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-ctx-list { margin: 0; padding: 0 8px 16px; list-style: none; }
.mc-ctx-item { position: relative; border-radius: 8px; }
.mc-ctx-item a { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; color: #4b5563; font-size: 13px; text-decoration: none; border-radius: 8px; }
.mc-ctx-item a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-ctx-item a:hover { background: #f2f7f6; color: #0f766e; }
.mc-ctx-item.mc-on a { background: #e3f1ed; color: #0f766e; font-weight: 600; }
.mc-ctx-icon { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #6c7780; }
.mc-ctx-item.mc-on .mc-ctx-icon { color: #0f766e; }
.mc-ctx-badge { margin-left: auto; flex: 0 0 auto; padding: 1px 6px; border-radius: 8px; background: #eef2f1; color: #6b7280; font-size: 11px; font-style: normal; }
.mc-ctx-empty { padding: 12px 16px; color: #8b949e; font-size: 12px; line-height: 1.7; }

/* ===== Agent center page ===== */
.mc-section-more { color: #0f766e; font-size: 13px; text-decoration: none; white-space: nowrap; }
.mc-section-more:hover { text-decoration: underline; }
.mc-agents-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
body.mc-mode-agents .mc-main { overflow: hidden; }
.mc-agents-head { flex: 0 0 auto; display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; }
.mc-agents-head h1 { margin: 0; font-size: 18px; font-weight: 700; color: #17212b; }
.mc-agents-head small { color: #8b949e; font-size: 12px; }
.mc-agent-panel-frame { flex: 1 1 auto; min-height: 0; width: 100%; border: 1px solid #e6e8eb; border-radius: 10px; background: #fff; }
.mc-agent-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 320px; border: 1px dashed #d9dde2; border-radius: 10px; background: #fff; color: #6b7280; font-size: 14px; text-align: center; padding: 24px; }
.mc-agent-empty p { margin: 0; }

/* ===== Sidebar footer account toolbar ===== */
.mc-sidebar-footer { position: relative; flex: 0 0 auto; border-top: 1px solid #e6e8eb; background: #fff; }
.mc-account-trigger { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 12px 14px; border: 0; background: none; cursor: pointer; font: inherit; color: #20242a; text-align: left; }
.mc-account-trigger:hover { background: #f5f6f7; }
.mc-account-avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #eef0f2; }
.mc-account-name { flex: 1 1 auto; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-account-caret { flex: 0 0 auto; width: 14px; height: 14px; fill: none; stroke: #8b949e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.mc-account.open .mc-account-caret { transform: rotate(180deg); }
.mc-account-flyout { display: none; position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); z-index: 60; padding: 6px; margin: 0; list-style: none; background: #fff; border: 1px solid #e6e8eb; border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .12); }
.mc-account.open .mc-account-flyout { display: block; }
.mc-account-menu { display: flex; align-items: center; gap: 8px; position: relative; padding: 9px 10px; border-radius: 8px; color: #374151; font-size: 13px; text-decoration: none; white-space: nowrap; }
.mc-account-menu:hover { background: #f2f7f6; color: #0f766e; }
.mc-account-menu.mc-on { background: #e3f1ed; color: #0f766e; font-weight: 600; }
.mc-account-menu em { position: static; margin-left: auto; transform: none; }
.mc-account-sep { height: 1px; margin: 6px 4px; background: #eef0f2; }

/* ===== Fragment mode (agent panel iframe) ===== */
body.mc-fragment { background: #fff; }
body.mc-fragment .mc-topbar, body.mc-fragment .mc-app-sidebar, body.mc-fragment .back2top { display: none; }
.mc-fragment-main { display: block; box-sizing: border-box; min-height: 100vh; padding: 16px; overflow-x: hidden; }

@media screen and (max-width: 900px) {
	.mc-topbar { padding: 0 14px; }
	.mc-topbar-actions { gap: 10px; }
	.mc-topbar-link { display: none; }
	.mc-app-sidebar { flex-basis: 184px; width: 184px; }
	.mc-context-panel { display: none; }
	.mc-main { padding: 16px; }
}
@media screen and (max-width: 640px) {
	.mc-shell { height: auto; overflow: visible; }
	.mc-topbar { height: auto; min-height: 54px; align-items: flex-start; gap: 10px; padding: 10px 12px; }
	.mc-brand small, .mc-brand-sub, .mc-user-name, .mc-admin-notice { display: none; }
	.mc-layout { display: block; min-height: 0; height: auto; }
	.mc-app-sidebar { width: 100%; border-right: 0; border-bottom: 1px solid #e6e8eb; overflow: visible; display: block; }
	.mc-sidebar { display: block; overflow: visible; }
	.mc-main { padding: 12px; overflow: visible; }
	.mc-nav { display: flex; overflow-x: auto; padding: 0; }
	.mc-nav-group { flex: 0 0 auto; margin: 0; }
	.mc-nav-head { display: none; }
	.mc-nav-body ul { display: flex; }
	.mc-nav-overview { flex:0 0 auto; margin:0; padding-bottom:0; border-bottom:0; }
	.mc-nav-item { padding: 0 12px; white-space: nowrap; }
	.mc-main { padding: 12px; }
	.mc-context-panel { display: none; }
	.mc-sidebar-footer { border-top: 0; }
	.mc-account-flyout { bottom: auto; top: calc(100% + 4px); }
	.mc-agent-panel-frame { height: 75vh; }
}
