/* ============================================
   立方阁 - 腾讯会议管理平台 样式表
   ============================================ */

:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --success-color: #34a853;
  --warning-color: #fbbc04;
  --danger-color: #ea4335;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-color: #dadce0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
}

/* ============================================
   登录页面
   ============================================ */

#login-page.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

#app-page.active {
  display: grid !important;
}

.page { display: none; }

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

.logo {
  font-size: 3rem;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

.login-form {
  background: var(--bg-primary);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-hint {
  text-align: center;
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   表单样式
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
}

.required {
  color: var(--danger-color);
}

.text-danger {
  color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-card {
  background: var(--bg-primary);
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 600px;
}

.recording-options {
  display: grid;
  gap: 12px;
  margin: 4px 0 24px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
}

.toggle-row span {
  display: grid;
  gap: 3px;
}

.toggle-row strong {
  font-size: 14px;
  color: var(--text-primary);
}

.toggle-row small {
  font-size: 12px;
  color: var(--text-secondary);
}

.toggle-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--primary-color);
}

/* 快速智能输入卡片 */
.smart-input-card {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border: 1px solid #d2e3fc;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
}

.smart-input-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.smart-input-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.smart-input-card textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  resize: vertical;
  min-height: 80px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.smart-input-card textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.smart-input-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.smart-input-tips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: white;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed #d2e3fc;
}

.smart-input-tips strong {
  color: var(--text-primary);
  font-weight: 500;
}

.smart-input-tips span {
  display: inline-block;
  padding: 4px 10px;
  background: #e8f0fe;
  color: #1967d2;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.architecture-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 600px;
}

.architecture-tile {
  min-height: 58px;
  padding: 8px 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.architecture-tile:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
}

.architecture-tile.active {
  border-color: var(--primary-color);
  background: #e8f0fe;
  color: #174ea6;
  box-shadow: inset 0 0 0 1px var(--primary-color);
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e8eaed;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-secondary);
}

.btn-success { background-color: var(--success-color); color: white; }
.btn-warning { background-color: var(--warning-color); color: var(--text-primary); }
.btn-danger { background-color: var(--danger-color); color: white; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================================
   导航栏
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.navbar-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-short {
  display: none;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   侧边栏
   ============================================ */

.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 220px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  overflow-y: auto;
}

.nav-list {
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-icon {
  flex: 0 0 auto;
}

.nav-item a:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-item.active a {
  background-color: rgba(26, 115, 232, 0.08);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 500;
}

/* ============================================
   主内容区
   ============================================ */

.main-content {
  margin-left: 220px;
  margin-top: 60px;
  padding: 24px;
  min-height: calc(100vh - 60px);
}

.content-page { display: none; }
.content-page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h2 { font-size: 22px; }

h2 { margin-bottom: 20px; }
h3 { margin-bottom: 15px; color: var(--text-primary); }

/* ============================================
   统计卡片
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-action {
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.stat-action:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-hint {
  margin-top: 8px;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 500;
}

.stat-card.success .stat-value { color: var(--success-color); }
.stat-card.warning .stat-value { color: var(--warning-color); }
.stat-card.danger .stat-value { color: var(--danger-color); }

.dashboard-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 24px;
}

.dashboard-filter-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.dashboard-filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
}

/* ============================================
   表格样式
   ============================================ */

.table-container {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.mobile-card-list {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

thead {
  background-color: var(--bg-secondary);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: top;
}

tbody tr:hover {
  background-color: #f8f9fa;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   筛选器
   ============================================ */

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.filters select,
.filters input[type="search"] {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg-primary);
  min-width: 160px;
}

.filters input[type="search"] {
  flex: 1;
  max-width: 300px;
}

.active-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8f0fe;
  color: #1967d2;
  font-size: 13px;
  font-weight: 500;
}

/* ============================================
   分页
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  cursor: pointer;
  font-size: 14px;
}

.pagination button:hover:not(:disabled) {
  background-color: var(--bg-secondary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination button.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================================
   状态标签
   ============================================ */

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-scheduled { background-color: #e8f0fe; color: #1967d2; }
.status-ongoing { background-color: #fef7e0; color: #b06000; }
.status-ended { background-color: #e6f4ea; color: #137333; }
.status-cancelled { background-color: #fce8e6; color: #c5221f; }

.status-pending { background-color: #f1f3f4; color: #5f6368; }
.status-processing { background-color: #e8f0fe; color: #1967d2; }
.status-success { background-color: #e6f4ea; color: #137333; }
.status-failed { background-color: #fce8e6; color: #c5221f; }
.status-skipped { background-color: #fef7e0; color: #b06000; }

/* ============================================
   信息横幅
   ============================================ */

.info-banner {
  background-color: #e8f0fe;
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.info-banner p {
  margin: 0;
  font-size: 14px;
  color: #1967d2;
}

/* ============================================
   弹窗
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-body {
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.modal-body h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.modal-body li {
  margin-bottom: 6px;
}

.summary-reader {
  max-height: min(68vh, 760px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-primary);
}

.summary-reader h1,
.summary-reader h2,
.summary-reader h3 {
  margin: 18px 0 10px;
  line-height: 1.35;
}

.summary-reader h1:first-child,
.summary-reader h2:first-child,
.summary-reader h3:first-child {
  margin-top: 0;
}

.summary-reader p {
  margin: 0 0 12px;
}

.summary-reader li {
  margin-bottom: 8px;
}

.summary-reader input[type="checkbox"] {
  margin-right: 8px;
}

/* 弹窗内表单样式 */

.modal-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.edit-meeting-form .form-card {
  max-width: none;
}

.danger-zone {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #f4b8b3;
  border-radius: var(--radius-md);
  background: #fff8f7;
}

.architecture-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.architecture-create input,
.architecture-row input {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.architecture-list {
  display: grid;
  gap: 10px;
}

.architecture-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.mini-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.meeting-link-box p {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.link-input-group {
  display: flex;
  gap: 8px;
}

.link-input-group input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: white;
  color: var(--text-primary);
}

.link-input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.meeting-share-actions {
  margin-top: 16px;
}

.meeting-share-actions .btn-block {
  width: 100%;
  justify-content: center;
}

/* 表格操作按钮组 */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-buttons .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* ============================================
   Toast 提示
   ============================================ */

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideIn 0.3s ease-out;
}

.toast.success { background-color: var(--success-color); }
.toast.error { background-color: var(--danger-color); }
.toast.warning { background-color: var(--warning-color); color: var(--text-primary); }

.warning-text {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fbbc04;
  border-radius: var(--radius-sm);
  background: #fef7e0;
  color: #5f4600;
  font-size: 13px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}


/* ============================================
   响应式设计（移动端适配）
   ============================================ */

@media (max-width: 768px) {
  body {
    background: #f6f7f9;
    -webkit-tap-highlight-color: transparent;
  }

  /* 登录页面 */
  .login-container {
    justify-content: flex-start;
    min-height: 100svh;
    padding: calc(48px + env(safe-area-inset-top)) 16px 24px;
    background: #f6f7f9;
  }

  .login-header {
    color: var(--text-primary);
    margin-bottom: 22px;
  }

  .login-form {
    padding: 28px 20px;
    margin: 0;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .logo {
    font-size: 2.25rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  /* 布局调整：侧边栏改为底部导航 */
  #app-page,
  #app-page.active {
    display: block !important;
    min-height: 100svh;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-right: none;
    z-index: 100;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .nav-list {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 0;
  }

  .nav-item {
    flex: 1;
    text-align: center;
  }

  .nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 7px 0 5px;
    font-size: 11px;
    color: var(--text-secondary);
    border-left: none;
  }

  .nav-icon {
    font-size: 18px;
    line-height: 1;
  }

  .nav-label {
    line-height: 1.2;
    white-space: nowrap;
  }

  .nav-item.active a {
    color: var(--primary-color);
  }

  .nav-item.active {
    border-left: none;
    border-bottom: 2px solid var(--primary-color);
  }

  .main-content {
    margin-left: 0;
    margin-top: 56px;
    margin-bottom: calc(64px + env(safe-area-inset-bottom));
    padding: 16px 14px 24px;
    min-height: calc(100dvh - 120px);
  }

  .navbar {
    height: 56px;
    padding: env(safe-area-inset-top) 12px 0;
    min-height: calc(56px + env(safe-area-inset-top));
  }

  .navbar-brand {
    font-size: 15px;
    min-width: 0;
  }

  .brand-full {
    display: none;
  }

  .brand-short {
    display: inline;
  }

  .navbar-menu .user-info {
    display: none;
  }

  .navbar-menu .btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 表单适配 */
  .form-card {
    max-width: 100%;
    padding: 18px 14px;
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 16px; /* 防止 iOS 缩放 */
  }

  .form-group input,
  .form-group select {
    min-height: 48px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    font-size: 16px;
  }

  .recording-options {
    margin-bottom: 20px;
  }

  .toggle-row {
    min-height: 70px;
    padding: 14px;
  }

  .toggle-row strong {
    font-size: 15px;
  }

  .toggle-row small {
    font-size: 12px;
    line-height: 1.4;
  }

  /* 快速智能输入适配 */
  .smart-input-card {
    max-width: 100%;
    padding: 18px 14px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    box-shadow: none;
  }

  .smart-input-card textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .smart-input-actions {
    flex-direction: column;
    gap: 10px;
  }

  .smart-input-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
  }

  .smart-input-tips span {
    padding: 3px 8px;
    font-size: 11px;
  }

  .architecture-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .architecture-tile {
    min-height: 56px;
    font-size: 13px;
    padding: 9px 5px;
  }

  /* 统计卡片 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .stat-card .stat-label {
    font-size: 12px;
  }

  .stat-hint {
    font-size: 11px;
  }

  .dashboard-filter-panel {
    grid-template-columns: 1fr;
    padding: 14px;
    margin-bottom: 16px;
  }

  .dashboard-filter-panel .btn {
    width: 100%;
    min-height: 42px;
  }

  /* 表格在手机端转为卡片 */
  .table-container {
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .desktop-table {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    gap: 12px;
  }

  .mobile-data-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px;
  }

  .mobile-data-card[onclick] {
    cursor: pointer;
  }

  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-card-header h4 {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
  }

  .mobile-card-header .status-badge {
    flex: 0 0 auto;
    margin-top: 1px;
  }

  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #edf0f2;
    font-size: 14px;
  }

  .mobile-card-row span {
    flex: 0 0 auto;
    color: var(--text-secondary);
  }

  .mobile-card-row strong {
    min-width: 0;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .mobile-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
    margin-top: 4px;
  }

  .mobile-card-actions .btn {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
  }

  .mobile-muted {
    color: var(--text-secondary);
    font-size: 13px;
  }

  /* 按钮操作 */
  .action-buttons {
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
  }

  .action-buttons .btn-sm {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  /* 弹窗适配 */
  .modal-overlay {
    padding: 10px 10px 0;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: calc(92svh - env(safe-area-inset-top));
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .modal-header h3 {
    font-size: 18px;
    margin-bottom: 0;
  }

  .modal-close {
    min-width: 44px;
    min-height: 44px;
  }

  .modal-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .architecture-create,
  .architecture-row {
    grid-template-columns: 1fr;
  }

  .architecture-create .btn,
  .architecture-row .btn {
    width: 100%;
  }

  .danger-zone .btn {
    width: 100%;
  }

  /* 分页 */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .pagination button {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Toast 提示 */
  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom)); /* 避开底部导航 */
    text-align: center;
  }

  /* 会议链接复制区域 */
  .link-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .link-input-group input {
    min-height: 44px;
    font-size: 14px;
  }

  .link-input-group .btn {
    width: 100%;
    min-height: 44px;
    padding: 12px;
  }

  /* 页面标题 */
  .page-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .page-header h2 {
    flex: 1 1 180px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .page-header .btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 12px;
    white-space: nowrap;
  }

  h2 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  /* 筛选器 */
  .filters {
    flex-direction: column;
    gap: 10px;
  }

  .filters select,
  .filters input {
    width: 100%;
    max-width: none;
    min-height: 44px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .active-filter-row {
    margin-top: -2px;
  }
}

/* 手机窄屏：让标题、操作按钮和内容保持可读且不横向溢出 */
@media (max-width: 420px) {
  .navbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-menu .btn {
    padding-left: 10px;
    padding-right: 10px;
  }

  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-header {
    align-items: stretch;
  }

  .page-header h2,
  .page-header .btn {
    flex-basis: 100%;
  }

  .page-header .btn {
    width: 100%;
  }

  .architecture-tile-grid {
    gap: 8px;
  }

  .architecture-tile {
    min-height: 54px;
    font-size: 12px;
  }

  .mobile-data-card {
    padding: 13px;
  }

  .mobile-card-row {
    align-items: flex-start;
  }

  .mobile-card-row strong {
    text-align: right;
  }

  .smart-input-tips {
    align-items: flex-start;
  }
}

/* 更小的屏幕（iPhone SE 等） */
@media (max-width: 375px) {
  .nav-item a {
    font-size: 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }

  .form-card {
    padding: 20px 14px;
  }
}

/* iPad 等平板横屏 */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }

  .main-content {
    margin-left: 200px;
  }
}
