.md-page {
  padding: var(--space-3) var(--space-4) calc(var(--space-6) + 20px);
}

.md-card {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.md-title-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.md-status {
  flex: none;
  padding: 2px 10px;
  margin-top: 2px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.md-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  word-break: break-all;
}

/* ===== 顶部折叠概况（基本信息 + 议程）：1:1 还原 PC 端展开/收起 ===== */
.md-overview-wrapper {
  position: relative;
}

.md-overview {
  overflow: hidden;
  position: relative;
  transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
}

/* 收起：限制高度 + 底部渐变遮罩，保留少量内容预览 */
.md-overview.is-collapsed {
  max-height: 180px;
}

.md-overview.is-collapsed::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 82%, #fff 100%);
}

.md-overview.is-expanded {
  max-height: 1400px;
}

/* 折叠按钮：居中，chevron 向下(展开)/向上(收起) */
.md-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: max-content;
  min-height: 34px;
  margin: -8px auto 0;
  padding: 4px 12px;
  color: var(--color-success);
  background: var(--color-surface);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.md-toggle__icon {
  display: inline-flex;
  transition: transform 0.3s ease;
}

.md-overview.is-expanded + .md-toggle .md-toggle__icon {
  transform: rotate(180deg);
}

.md-overview-section + .md-overview-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-page);
}

.md-overview-section-title {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
}

.md-row {
  display: flex;
  margin-bottom: var(--space-3);
  font-size: 14px;
  line-height: 1.5;
}

.md-row:last-child {
  margin-bottom: 0;
}

.md-label {
  flex: none;
  width: 96px;
  color: var(--color-text-secondary);
}

.md-value {
  flex: 1;
  min-width: 0;
  color: var(--color-text);
}

/* 附件 */
.md-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.md-attach {
  width: 56px;
}

.md-attach__img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-radius: 6px;
}

.md-attach__icon {
  font-size: 22px;
}

.md-attach__name {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 会议议程 */
.md-agenda {
  padding: var(--space-3);
  background: var(--color-page);
  border-radius: var(--radius-md);
}

.md-agenda-item {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.8;
}

/* ===== 四阶段 Tab（两行短名，避免超界） =====
   注意：.md-tab 类名与办件详情页(matter-detail.css)撞车，全局加载下其
   height:34px 会级联压扁本页两行文字。本页所有 Tab 样式一律用
   .md-tabs--stages / .md-tab--stage 修饰类收口，不写裸 .md-tab。 */
.md-tabs.md-tabs--stages {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.md-tab.md-tab--stage {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  height: auto; /* 覆盖 matter-detail.css 裸 .md-tab 的 height:34px 级联 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 2px;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
}

/* 两行独立行：不参与 flex 压缩（flex:none + 显式 line-height），
   单行超长时省略号兜底，杜绝文字被压扁重叠或突破 Tab 边界 */
.md-tabs--stages .md-tab__line {
  display: block;
  flex: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 16px;
}

.md-tab.md-tab--stage.md-tab--active {
  color: #fff;
  background: var(--color-primary);
}

/* ===== 表决事项 ===== */
.md-vote-title {
  margin-bottom: var(--space-3);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.md-vote-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.md-vote-item {
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.md-vote-name {
  margin-bottom: var(--space-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.md-vote-desc {
  margin: 0 0 var(--space-3);
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.md-vote-btn {
  width: 100%;
  height: 42px;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
}

.md-vote-btn--disabled {
  background: #d1d5db;
  color: #fff;
  cursor: not-allowed;
}

.md-vote-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
}

.md-vote-result__icon {
  font-size: 18px;
}

.md-vote-result--agree {
  color: var(--color-success);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.md-vote-result--disagree {
  color: var(--color-danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
}

/* ===== 表决弹层 ===== */
.md-vote-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.5);
}

.md-vote-panel {
  width: 100%;
  padding: var(--space-4);
  background: #fff;
  border-radius: 16px 16px 0 0;
  animation: md-slide-up 0.28s ease;
}

@keyframes md-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.md-vote-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.md-vote-panel__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
}

.md-vote-panel__close {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--color-text-tertiary);
  background: transparent;
  border: none;
  place-items: center;
}

.md-vote-panel__name {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.md-vote-options {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.md-vote-option {
  flex: 1;
  height: 44px;
  color: var(--color-text-secondary);
  background: var(--color-page);
  border: 2px solid var(--color-page);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
}

.md-vote-option--agree {
  color: var(--color-success);
  background: #fff;
  border-color: var(--color-success);
}

.md-vote-option--disagree {
  color: var(--color-danger);
  background: #fff;
  border-color: var(--color-danger);
}

.md-vote-panel__actions {
  display: flex;
  gap: var(--space-3);
}

.md-vote-panel__cancel {
  flex: 1;
  height: 44px;
  color: var(--color-text-secondary);
  background: var(--color-page);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
}

.md-vote-panel__submit {
  flex: 1;
  height: 44px;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
}

/* 视频会议入会按钮：固定悬浮于手机屏幕底部（挂载在 .device__screen 内，
   position:absolute 相对屏幕容器定位，不随页面内容滚动） */
.md-join {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 64px);
  max-width: calc(var(--screen-width) - 64px);
  height: 48px;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgb(5 150 105 / 32%);
  transform: translateX(-50%);
}

/* 手机屏幕内容预留底部空间，避免被悬浮按钮遮挡最后一项内容 */
.md-page.is-video {
  padding-bottom: calc(var(--space-6) + 20px + 64px);
}

.md-empty {
  padding: var(--space-6) 0;
  color: var(--color-text-tertiary);
  font-size: 14px;
  text-align: center;
}

/* ===== 会议概况折叠交互优化（2026-08-26）：收起仅露到会议开始时间，
   表决开始/子会议类型被半透明渐变自然覆盖；按钮文字改蓝、去白底矩形 ===== */
.md-overview.is-collapsed {
  max-height: 158px;
}

.md-overview.is-collapsed::after {
  height: 68px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 26%,
    rgba(255, 255, 255, 0.58) 56%,
    rgba(255, 255, 255, 0.92) 84%,
    #ffffff 100%
  );
}

.md-toggle {
  color: var(--color-primary);
  background: transparent;
}