:root {
  --primary: #0052D9;
  --primary-light: #4080FF;
  --primary-bg: #E6F0FF;
  --primary-hover: #D1E0FF;
  --lake: #82C0C0;
  --success: #00B42A;
  --warning: #FF7D00;
  --error: #F53F3F;
  --title: #1D2129;
  --body: #4E5969;
  --note: #86909C;
  --divider: #E5E6EB;
  --page-bg: #F2F3F5;
  --card-bg: #FFFFFF;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow: 0 1px 4px rgba(29, 33, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(29, 33, 41, 0.1);
  --hover-gradient-bg: #D1E0FF;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-light);
}

.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--divider);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--title);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-section {
  margin: 24px 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-loader-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.hero-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  background: var(--card-bg);
}

.hero-logo {
  height: 76px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.hero-tagline {
  color: var(--title);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: right;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.hero-carousel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-soft), width 0.25s var(--ease-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.hero-indicators button.active {
  background: #fff;
  width: 24px;
}

@media (max-width: 640px) {
  .hero-section {
    margin-top: 16px;
  }

  .hero-brand-bar {
    padding: 4px 8px;
    gap: 8px;
  }

  .hero-logo {
    height: 50px;
  }

  .hero-tagline {
    font-size: 13px;
    letter-spacing: 0.5px;
  }
}

.container {
  padding: 24px 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 8px;
  padding: 0 16px;
}

.page-desc {
  color: var(--note);
  margin: 0 0 20px;
  font-size: 13px;
  padding: 0 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s var(--ease-soft);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s var(--ease-bounce);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  transform: translateY(-1px);
}

.input-wide {
  min-width: 240px;
  flex: 1;
}

.select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s var(--ease-bounce);
}

.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), box-shadow 0.2s var(--ease-soft), transform 0.15s var(--ease-bounce);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

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

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 82, 217, 0.2);
  transform: translateY(-1px);
}

.btn-default {
  background: var(--card-bg);
  border-color: var(--divider);
  color: var(--body);
}

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

.btn-danger {
  background: #fff;
  border-color: var(--error);
  color: var(--error);
}

.btn-danger:hover {
  background: #fff2f0;
  transform: translateY(-1px);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

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

.doc-item {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s var(--ease-soft), border-color 0.2s var(--ease-soft);
  cursor: pointer;
}

.doc-item:hover {
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.doc-item:active {
  transform: translateY(-1px) scale(0.995);
}

.doc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 6px;
}

.doc-meta {
  font-size: 12px;
  color: var(--note);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-category {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--note);
}

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

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--body);
  transition: background-color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), transform 0.15s var(--ease-bounce);
}

.page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:active:not(:disabled):not(.active) {
  transform: scale(0.95);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--title);
  font-weight: 500;
}

.form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s var(--ease-bounce);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  transform: translateY(-1px);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--page-bg);
  border: 1px solid var(--divider);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  align-items: center;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--divider);
  margin: 0 2px;
}

.editor-toolbar button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s var(--ease-soft), border-color 0.15s var(--ease-soft), color 0.15s var(--ease-soft), transform 0.12s var(--ease-bounce);
  flex-shrink: 0;
}

.editor-toolbar button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.editor-toolbar button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.editor-toolbar button.active {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

.editor-toolbar button:active {
  transform: scale(0.95);
}

.toolbar-spacer {
  flex: 1;
  min-width: 8px;
}

.toolbar-import {
  width: auto !important;
  padding: 0 14px !important;
  gap: 6px;
  background: var(--primary-bg) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  font-size: 14px;
}

.toolbar-import:hover {
  background: var(--hover-gradient-bg) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.toolbar-import span {
  font-size: 14px;
  line-height: 1;
}

.editor-content {
  min-height: 360px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  outline: none;
  overflow-y: auto;
  line-height: 1.7;
  transition: border-color 0.15s, box-shadow 0.15s;
  counter-reset: ordered-list;
}

.editor-content:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.editor-block {
  position: relative;
  padding: 6px 8px 6px 28px;
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  min-height: 1.7em;
  outline: none;
  transition: background-color 0.15s ease, transform 0.15s var(--ease-bounce);
}

.editor-block.is-active {
  background-color: var(--primary-bg);
  transform: translateX(2px);
}

.editor-block.is-empty::before {
  content: attr(placeholder);
  color: var(--note);
  pointer-events: none;
}

.editor-block:not(.editor-block-ordered-list) {
  counter-reset: ordered-list;
}

.editor-block-ordered-list {
  counter-increment: ordered-list;
}

.editor-block-unordered-list:not(.is-empty)::before,
.editor-block-ordered-list:not(.is-empty)::before {
  position: absolute;
  left: 10px;
  top: 6px;
  color: var(--body);
  line-height: 1.7;
}

.editor-block-unordered-list:not(.is-empty)::before {
  content: '•';
}

.editor-block-ordered-list:not(.is-empty)::before {
  content: counter(ordered-list) '.';
}

.editor-block-heading-1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--title);
}

.editor-block-heading-2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--title);
}

.editor-block-heading-3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
}

.editor-block-quote {
  padding: 8px 12px 8px 16px;
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--body);
}

.editor-toolbar .color-btn {
  position: relative;
  overflow: hidden;
}

.editor-toolbar .color-btn input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.editor-toolbar .color-btn .color-indicator {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  border-radius: 2px;
  pointer-events: none;
}

.editor-block-hr {
  padding-left: 8px;
  cursor: pointer;
}

.editor-block-hr hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 12px 0;
}

.editor-block-table {
  position: relative;
  padding-left: 8px;
  padding-bottom: 16px;
  padding-right: 16px;
}

.editor-block-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  table-layout: fixed;
}

.editor-block-table td,
.editor-block-table th {
  border: 1px solid var(--divider);
  padding: 8px 12px;
  min-width: 60px;
  outline: none;
  background: var(--card-bg);
  vertical-align: top;
}

.editor-block-table td:focus,
.editor-block-table th:focus {
  background: var(--primary-bg);
}

.editor-block-table th {
  background: var(--primary-bg);
  font-weight: 600;
  color: var(--title);
}

.editor-block-table .table-controls {
  position: absolute;
  top: -28px;
  right: 16px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.editor-block-table:focus-within .table-controls,
.editor-block-table .table-controls:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.editor-block-table .table-controls button {
  width: auto;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--divider);
  color: var(--body);
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-block-table .table-controls button[data-table-action="deleteTable"] {
  width: 24px;
  padding: 0;
  color: var(--error);
}

.editor-block-table .table-controls button:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.editor-block-table .table-controls button[data-table-action="deleteTable"]:hover {
  background: #ffece8;
  color: var(--error);
  border-color: var(--error);
}

.editor-block-table .table-add-row,
.editor-block-table .table-add-col {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  color: var(--body);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
  padding: 0;
}

.editor-block-table:focus-within .table-add-row,
.editor-block-table:focus-within .table-add-col,
.editor-block-table .table-add-row:focus,
.editor-block-table .table-add-col:focus {
  opacity: 1;
}

.editor-block-table .table-add-row {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.editor-block-table .table-add-col {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.editor-block-table .table-add-row:hover,
.editor-block-table .table-add-col:hover,
.editor-block-table .table-add-row:focus,
.editor-block-table .table-add-col:focus {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.editor-block-code-block {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  background: #f7f8fa;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--title);
}

.detail-header {
  border-bottom: 1px solid var(--divider);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.detail-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-body {
  color: var(--body);
  line-height: 1.8;
}

.detail-body h1,
.detail-body h2,
.detail-body h3 {
  color: var(--title);
  margin: 16px 0 10px;
}

.detail-body p {
  margin: 0 0 12px;
}

.detail-body ul,
.detail-body ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.detail-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--body);
}

.detail-body img {
  max-width: 100%;
}

.detail-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  overflow: hidden;
  table-layout: fixed;
}

.detail-body th,
.detail-body td {
  border: 1px solid var(--divider);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.detail-body th {
  background: var(--primary-bg);
  font-weight: 600;
  color: var(--title);
}

.detail-body pre {
  background: #f7f8fa;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.detail-body pre code {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.detail-body hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 20px 0;
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 0;
}

.landing-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 12px;
}

.landing-desc {
  color: var(--note);
  margin: 0 0 32px;
  max-width: 420px;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.landing-btn {
  height: 44px;
  padding: 0 32px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container,
.landing {
  animation: fadeInUp 0.35s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.login-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.login-modal.show {
  opacity: 1;
  visibility: visible;
}

.login-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.45);
  z-index: 1;
}

.login-modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 20px;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px rgba(29, 33, 41, 0.12);
  z-index: 2;
  overflow: hidden;
}

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

.login-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
}

.login-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--note);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s var(--ease-bounce);
}

.login-modal-close:hover {
  background: var(--page-bg);
  color: var(--title);
  transform: rotate(90deg);
}

.login-modal-form {
  padding: 20px;
}

.login-modal-error {
  min-height: 20px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--error);
}

.login-modal-submit {
  width: 100%;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 16px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat-item {
  background: var(--page-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s var(--ease-soft), background-color 0.2s var(--ease-soft);
}

.stat-item:hover {
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--note);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}

.data-table th {
  font-weight: 600;
  color: var(--title);
  background: var(--page-bg);
}

.data-table td {
  color: var(--body);
}

.data-table tbody tr:hover {
  background: var(--primary-bg);
}

.data-table .btn + .btn {
  margin-left: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-shrink: 0;
  grid-column: 3;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  transition: background-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}

.header-nav-link:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.header-nav-link.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 100;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--body);
  font-size: 14px;
  text-align: left;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s var(--ease-bounce);
}

.dropdown-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
  transform: translateX(2px);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.username {
  font-size: 13px;
  color: var(--body);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 32px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
}

.header-ai-btn svg {
  width: 16px;
  height: 16px;
}

.header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s var(--ease-soft);
}

.header-user-trigger:hover {
  background: var(--primary-bg);
}

.header-chevron {
  width: 14px;
  height: 14px;
  color: var(--note);
}

.header-nav-more {
  gap: 2px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
}

.header-nav-more svg {
  width: 14px;
  height: 14px;
  color: var(--note);
  transition: transform 0.2s var(--ease-soft);
}

.header-nav-more {
  position: relative;
}

.header-nav-more.active svg,
.header-nav-more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.header-nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 340px;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.header-nav-panel.show {
  display: flex;
  animation: fadeInDropdown 0.18s var(--ease-soft);
}

.header-nav-panel-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 12px;
}

.header-nav-panel-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-nav-panel-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--note);
  padding: 6px 10px;
  margin-bottom: 2px;
}

.header-nav-panel-highlight {
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  padding: 6px;
}

.header-nav-panel-highlight .header-nav-panel-title {
  color: var(--primary);
}

.header-nav-panel-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--body);
  margin-top: 4px;
}

.header-nav-panel-tip svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.header-nav-panel-footer {
  border-top: 1px solid var(--divider);
  padding: 6px;
}

.header-nav-panel .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
}

.header-nav-panel .dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--body);
  transition: border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), transform 0.15s var(--ease-bounce);
}

.header-menu-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.header-menu-toggle:active {
  transform: scale(0.95);
}

.header-menu-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 100;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.header-dropdown.show {
  display: flex;
  animation: fadeInDropdown 0.18s var(--ease-soft);
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-dropdown .username,
.header-dropdown-username {
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 4px;
  color: var(--title);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.header-dropdown a,
.header-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--body);
  font-size: 14px;
  text-align: left;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s var(--ease-bounce);
}

.header-dropdown a:hover,
.header-dropdown button:hover {
  background: var(--primary-bg);
  color: var(--primary);
  transform: translateX(2px);
}

.header-dropdown-logout {
  color: var(--error) !important;
  border-top: 1px solid var(--divider);
  margin-top: 4px;
  padding-top: 10px !important;
}

.header-dropdown-logout:hover {
  background: #fff2f0 !important;
  color: var(--error) !important;
}

.header-dropdown-divider {
  height: 1px;
  background: var(--divider);
  margin: 4px 0;
}

.header-dropdown .dropdown-item.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.header-dropdown .dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* 诉求模块 */
.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pending {
  background: #fff7e6;
  color: var(--warning);
}

.status-viewed {
  background: var(--primary-bg);
  color: var(--primary);
}

.status-processing {
  background: #e6fffb;
  color: var(--lake);
}

.status-replied {
  background: #f6ffed;
  color: var(--success);
}

.status-closed {
  background: var(--page-bg);
  color: var(--note);
}

.appeal-item {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s var(--ease-soft), border-color 0.2s var(--ease-soft);
}

.appeal-item:hover {
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.appeal-item:active {
  transform: translateY(-1px) scale(0.995);
}

.appeal-item:last-child {
  margin-bottom: 0;
}

.appeal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.appeal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.appeal-no {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.appeal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--note);
  margin-top: 8px;
}

.appeal-preview {
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-card .appeal-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--divider);
  border-radius: 0;
  padding: 12px 0;
  margin-bottom: 0;
}

.dashboard-card .appeal-item:last-child {
  border-bottom: none;
}

.dashboard-card .appeal-item:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--divider);
}

.dashboard-card .appeal-header {
  margin-bottom: 6px;
}

.dashboard-card .appeal-preview {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.timeline {
  position: relative;
  padding-left: 20px;
  margin: 16px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--divider);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 1px var(--divider);
}

.timeline-item.active .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.timeline-item.completed .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.timeline-content {
  font-size: 13px;
  color: var(--body);
}

.timeline-title {
  font-weight: 500;
  color: var(--title);
  margin-bottom: 2px;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.message-item {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.message-admin {
  align-self: flex-start;
}

.message-user {
  align-self: flex-end;
  align-items: flex-end;
}

.message-content {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.message-admin .message-content {
  background: var(--primary-bg);
  color: var(--body);
  border-bottom-left-radius: var(--radius-sm);
}

.message-user .message-content {
  background: var(--page-bg);
  color: var(--body);
  border-bottom-right-radius: var(--radius-sm);
}

.message-meta {
  font-size: 12px;
  color: var(--note);
  margin-top: 4px;
}

.reply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.reply-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s var(--ease-bounce);
}

.reply-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  transform: translateY(-1px);
}

.result-card {
  text-align: center;
  padding: 32px 20px;
}

.result-ticket {
  font-family: monospace;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  margin: 12px 0;
  letter-spacing: 0.5px;
}

.form-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s var(--ease-bounce);
}

.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  transform: translateY(-1px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.status-tab {
  padding: 6px 14px;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--body);
  transition: background-color 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), transform 0.15s var(--ease-bounce);
}

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

.status-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.status-tab:active {
  transform: scale(0.96);
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.section-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 12px;
}

.info-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.info-label {
  color: var(--note);
  font-size: 13px;
}

.info-value {
  color: var(--body);
  font-size: 13px;
}

/* 通知 */
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--body);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.notification-bell:hover {
  background: var(--page-bg);
  color: var(--primary);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--error);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-bg);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.notification-dropdown.show {
  display: flex;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--title);
}

.notification-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.notification-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.notification-item:hover {
  background: var(--page-bg);
}

.notification-item.unread {
  background: var(--primary-bg);
}

.notification-item.unread:hover {
  background: #d1e0ff;
}

.notification-content {
  font-size: 13px;
  color: var(--body);
  line-height: 1.5;
}

.notification-time {
  font-size: 12px;
  color: var(--note);
}

.notification-empty {
  padding: 24px;
  text-align: center;
  color: var(--note);
  font-size: 13px;
}

/* 首页 Dashboard */
.page-tagline {
  position: relative;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--title);
  letter-spacing: 0.5px;
  padding: 12px 16px;
  margin: 0 0 24px;
  background: rgba(0, 82, 217, 0.04);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 20px;
}

.dashboard-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card-more {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.dashboard-card-more:hover {
  text-decoration: underline;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.mini-stat-item {
  background: var(--page-bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.mini-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.mini-stat-label {
  font-size: 12px;
  color: var(--note);
  margin-top: 4px;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--page-bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--body);
  transition: background-color 0.2s ease;
}

.doc-list-item:hover {
  background: var(--primary-bg);
}

.doc-list-title {
  font-size: 14px;
  color: var(--title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.doc-list-meta {
  font-size: 12px;
  color: var(--note);
  flex-shrink: 0;
}

.action-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  flex: 1 1 calc(25% - 12px);
  min-width: 140px;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  padding: 16px;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--body);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.1) 100%);
  z-index: 0;
}

.action-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.action-card-label {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.badge-wrapper {
  position: relative;
  display: inline-flex;
}

.badge-wrapper .notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
}

@media (max-width: 860px) {
  .header-inner {
    gap: 10px;
  }

  .header-nav-link {
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 16px 12px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .page-title,
  .page-desc {
    padding: 0;
  }

  .toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .toolbar .input-wide {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .toolbar .btn {
    display: none;
  }

  .toolbar .select {
    width: auto;
    min-width: 96px;
    max-width: 120px;
    flex-shrink: 0;
  }

  .header-inner {
    height: 48px;
    gap: 10px;
  }

  .header-nav {
    display: none;
  }

  .header-actions,
  .user-menu {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-ai-btn {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .header-menu-toggle {
    display: inline-flex;
  }

  .username {
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .detail-actions .btn {
    width: auto;
    flex: 0 0 auto;
  }

  .login-modal-content {
    margin: 0 16px;
  }

  .message-item {
    max-width: 92%;
  }

  .appeal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .status-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .data-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table td {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--divider);
    align-items: center;
    font-size: 13px;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--title);
    font-size: 12px;
  }

  .data-table td:last-child {
    display: block;
    border-bottom: none;
    padding-top: 8px;
  }

  .data-table td:last-child::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
  }

  .data-table td:last-child .btn {
    display: inline-flex;
    margin-right: 6px;
  }

  .data-table .btn + .btn {
    margin-left: 0;
  }

  .notification-dropdown {
    position: fixed;
    top: 48px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 80px);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-card {
    padding: 16px;
    min-width: 0;
  }

  .dashboard-card-title {
    flex-wrap: wrap;
    gap: 8px;
  }

  .dashboard-card .appeal-header {
    flex-wrap: wrap;
    min-width: 0;
  }

  .action-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    max-width: none;
    aspect-ratio: 1 / 1;
  }

  .mini-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .mini-stat-item {
    padding: 10px 8px;
  }

  .mini-stat-value {
    font-size: 18px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== AI 助手 ========== */

.ai-chat-root {
  position: relative;
  z-index: 1000;
}

.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 82, 217, 0.32);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease;
  z-index: 1001;
}

.ai-fab:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 217, 0.38);
}

.ai-fab:active {
  transform: scale(0.96);
}

.ai-fab svg {
  width: 26px;
  height: 26px;
}

.ai-fab-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.ai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ai-header-title .ai-avatar-img,
.ai-page-header-title .ai-avatar-img {
  width: 22px;
  height: 22px;
}

.ai-welcome-icon .ai-avatar-img,
.ai-page-welcome-icon .ai-avatar-img {
  width: 70%;
  height: 70%;
}

.ai-fab-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  z-index: 1;
  transition: border-color 0.3s ease;
}

.ai-fab-planning .ai-fab-ring,
.ai-fab-executing .ai-fab-ring,
.ai-fab-responding .ai-fab-ring {
  border-color: var(--primary-light);
  animation: ai-ring-pulse 1.4s ease-in-out infinite;
}

.ai-fab-error .ai-fab-ring {
  border-color: var(--error);
}

@keyframes ai-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.4; }
}

.ai-spinner {
  animation: ai-spin 1s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-panel {
  position: fixed;
  inset: 0;
  z-index: 1002;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ai-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.ai-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.35);
  backdrop-filter: blur(2px);
}

.ai-panel-container {
  position: absolute;
  right: 24px;
  bottom: 92px;
  width: 840px;
  height: 640px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 120px);
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(29, 33, 41, 0.18);
  display: flex;
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: transform 0.25s var(--ease-bounce), opacity 0.2s ease;
  opacity: 0;
}

.ai-panel.open .ai-panel-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ai-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 220px;
  background: var(--page-bg);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s var(--ease-soft);
}

.ai-sidebar.show {
  transform: translateX(0);
}

.ai-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--divider);
}

.ai-btn-new {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--primary);
  background: var(--card-bg);
  color: var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ai-btn-new:hover {
  background: var(--primary);
  color: #fff;
}

.ai-btn-new svg {
  width: 16px;
  height: 16px;
}

.ai-conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.ai-empty-conversations {
  padding: 20px;
  text-align: center;
  color: var(--note);
  font-size: 13px;
}

.ai-conversation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 4px;
}

.ai-conversation-item:hover {
  background: var(--primary-bg);
}

.ai-conversation-item.active {
  background: var(--primary-bg);
}

.ai-conversation-info {
  flex: 1;
  min-width: 0;
}

.ai-conversation-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-conversation-meta {
  font-size: 11px;
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.ai-conversation-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ai-conversation-item:hover .ai-conversation-actions {
  opacity: 1;
}

.ai-btn-icon {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--note);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ai-btn-icon:hover {
  background: var(--page-bg);
  color: var(--primary);
}

.ai-btn-icon svg {
  width: 14px;
  height: 14px;
}

.ai-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
  cursor: move;
  user-select: none;
}

.ai-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  flex: 1;
  justify-content: center;
}

.ai-header-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.ai-btn {
  border: none;
  background: transparent;
  color: var(--note);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.ai-btn svg {
  width: 20px;
  height: 20px;
}

.ai-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--body);
}

.ai-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ai-welcome-icon svg {
  width: 32px;
  height: 32px;
}

.ai-welcome-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 8px;
}

.ai-welcome-desc {
  font-size: 13px;
  color: var(--note);
  margin: 0 0 24px;
}

.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ai-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  color: var(--body);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.ai-quick-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.ai-quick-icon {
  color: var(--primary);
}

.ai-quick-icon svg {
  width: 14px;
  height: 14px;
}

.ai-message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-message {
  display: flex;
  gap: 10px;
  max-width: 90%;
}

.ai-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message-assistant {
  align-self: flex-start;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-message-avatar svg {
  width: 18px;
  height: 18px;
}

.ai-message-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-message-user .ai-message-content {
  align-items: flex-end;
}

.ai-message-text {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.ai-message-user .ai-message-text {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: var(--radius-sm);
}

.ai-message-assistant .ai-message-text {
  background: var(--page-bg);
  color: var(--body);
  border-bottom-left-radius: var(--radius-sm);
}

.ai-message-text a {
  text-decoration: underline;
}

.ai-message-time {
  font-size: 11px;
  color: var(--note);
}

.ai-message-usage {
  font-size: 11px;
  color: var(--note);
  margin-top: 4px;
  text-align: right;
}

.ai-message-typing .ai-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--page-bg);
  border-radius: var(--radius-md);
}

.ai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--note);
  animation: ai-typing 1.4s infinite ease-in-out both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-tool-history {
  margin-top: 4px;
}

.ai-tool-toggle {
  font-size: 12px;
  color: var(--note);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.ai-tool-toggle:hover {
  color: var(--primary);
}

.ai-tool-toggle::-webkit-details-marker {
  display: none;
}

.ai-tool-history > .ai-tool-toggle {
  list-style: none;
}

.ai-tool-chevron {
  display: inline-flex;
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.ai-tool-chevron svg {
  width: 12px;
  height: 12px;
}

.ai-tool-history[open] .ai-tool-chevron {
  transform: rotate(180deg);
}

.ai-tool-count {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-tool-list {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.ai-tool-history[open] .ai-tool-list {
  display: flex;
}

.ai-tool-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
}

.ai-tool-status {
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.ai-tool-status svg {
  width: 13px;
  height: 13px;
}

.ai-tool-status-running {
  color: var(--primary);
}

.ai-tool-status-success {
  color: var(--success);
}

.ai-tool-status-error {
  color: var(--error);
}

.ai-tool-name {
  flex-shrink: 0;
}

.ai-tool-detail {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.ai-tool-summary {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  margin-left: auto;
  font-size: 11px;
}

.ai-thinking-text {
  color: var(--note);
  font-style: italic;
}

.ai-status-bar {
  padding: 0 16px;
  flex-shrink: 0;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-bg);
  margin-bottom: 8px;
}

.ai-status-error {
  color: var(--error);
  background: #fff2f0;
  width: 100%;
  justify-content: space-between;
}

.ai-status-spinner {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.ai-status-spinner svg {
  width: 14px;
  height: 14px;
}

.ai-input-area {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
}

.ai-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.ai-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--title);
  resize: none;
  outline: none;
  font-size: 14px;
  line-height: 1.5;
  max-height: 120px;
  min-height: 30px;
  padding: 0 2px;
}

.ai-input::placeholder {
  color: var(--note);
  font-size: 14px;
  line-height: 1.5;
  opacity: 1;
}

.ai-send-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.ai-send-btn:hover {
  background: var(--primary-light);
}

.ai-send-btn:active {
  transform: scale(0.92);
}

.ai-send-btn svg {
  width: 15px;
  height: 15px;
}

.ai-input-tip {
  font-size: 12px;
  color: var(--note);
  text-align: center;
  margin-top: 4px;
  line-height: 1.4;
}

.ai-help-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--body);
}

.ai-global-status {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  box-shadow: 0 4px 16px rgba(29, 33, 41, 0.12);
  font-size: 13px;
  color: var(--primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-bounce);
}

.ai-global-status.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ai-global-status:hover {
  background: var(--primary-bg);
  cursor: pointer;
}

.ai-global-status-spinner {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.ai-global-status-spinner svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .ai-fab {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .ai-fab svg {
    width: 22px;
    height: 22px;
  }

  .ai-panel-container {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(20px);
    transform-origin: bottom center;
  }

  .ai-header {
    cursor: default;
  }

  .ai-main {
    width: 100%;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .ai-message {
    max-width: 94%;
  }

  .ai-tool-list {
    display: flex;
  }

  .ai-tool-toggle {
    display: none;
  }

  .ai-help-banner {
    flex-direction: row;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .action-card {
    flex: 1 1 calc(50% - 8px);
  }
}

/* ========== AI 聊天独立页面 ========== */

.ai-page-body {
  overflow: hidden;
  height: 100%;
}

.ai-page-main {
  display: flex;
  height: 100vh;
  min-height: 100vh;
  background: var(--card-bg);
  position: relative;
}

.ai-page-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--page-bg);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
}

.ai-page-sidebar-overlay {
  display: none;
}

.ai-page-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--divider);
}

.ai-page-conversation-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px;
}

.ai-page-empty-conversations {
  padding: 24px;
  text-align: center;
  color: var(--note);
  font-size: 13px;
}

.ai-page-conversation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 6px;
}

.ai-page-conversation-item:hover {
  background: var(--primary-bg);
}

.ai-page-conversation-item.active {
  background: var(--primary-bg);
}

.ai-page-conversation-info {
  flex: 1;
  min-width: 0;
}

.ai-page-conversation-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-page-conversation-meta {
  font-size: 12px;
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.ai-page-conversation-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ai-page-conversation-item:hover .ai-page-conversation-actions {
  opacity: 1;
}

.ai-page-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.ai-page-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}

.ai-page-header-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
}

.ai-page-header-title svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.ai-page-header .ai-btn-menu {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--note);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ai-page-header .ai-btn-menu:hover {
  background: var(--page-bg);
  color: var(--primary);
}

.ai-page-header .ai-btn-menu svg {
  width: 18px;
  height: 18px;
}

.ai-page-header-desc {
  font-size: 12px;
  color: var(--note);
  margin-top: 4px;
}

.ai-page-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--body);
}

.ai-page-welcome-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.ai-page-welcome-icon svg {
  width: 36px;
  height: 36px;
}

.ai-page-welcome-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 8px;
}

.ai-page-welcome-desc {
  font-size: 14px;
  color: var(--note);
  margin: 0 0 32px;
}

.ai-page-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 560px;
  width: 100%;
}

.ai-page-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border: 1px solid var(--divider);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.ai-page-quick-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 82, 217, 0.1);
}

.ai-page-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-page-quick-icon svg {
  width: 22px;
  height: 22px;
}

.ai-page-quick-icon-doc {
  background: var(--primary-bg);
  color: var(--primary);
}

.ai-page-quick-icon-appeal {
  background: rgba(130, 192, 192, 0.12);
  color: var(--secondary);
}

.ai-page-quick-icon-chat {
  background: rgba(255, 125, 0, 0.1);
  color: var(--warning);
}

.ai-page-quick-label {
  font-size: 13px;
  color: var(--body);
}

.ai-page-message-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ai-page-login-hint {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--body);
}

.ai-page-login-hint h3 {
  font-size: 18px;
  color: var(--title);
  margin: 0 0 8px;
}

.ai-page-login-hint p {
  font-size: 13px;
  color: var(--note);
  margin: 0 0 20px;
}

.ai-page-message {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

.ai-page-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-page-message-assistant {
  align-self: flex-start;
}

.ai-page-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-page-message-avatar svg {
  width: 20px;
  height: 20px;
}

.ai-page-message-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-page-message-user .ai-page-message-content {
  align-items: flex-end;
}

.ai-page-message-text {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.ai-page-message-user .ai-page-message-text {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: var(--radius-sm);
}

.ai-page-message-assistant .ai-page-message-text {
  background: var(--page-bg);
  color: var(--body);
  border-bottom-left-radius: var(--radius-sm);
}

.ai-page-message-text a {
  text-decoration: underline;
}

.ai-page-message-time {
  font-size: 11px;
  color: var(--note);
}

.ai-page-message-usage {
  font-size: 11px;
  color: var(--note);
  margin-top: 4px;
  text-align: right;
}

.ai-page-message-typing .ai-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--page-bg);
  border-radius: var(--radius-md);
}

.ai-page-tool-history {
  margin-top: 4px;
}

.ai-page-tool-toggle {
  font-size: 12px;
  color: var(--note);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.ai-page-tool-toggle:hover {
  color: var(--primary);
}

.ai-page-tool-chevron {
  display: inline-flex;
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.ai-page-tool-chevron svg {
  width: 12px;
  height: 12px;
}

.ai-page-tool-history.expanded .ai-page-tool-chevron {
  transform: rotate(180deg);
}

.ai-page-tool-count {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-page-tool-list {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.ai-page-tool-history.expanded .ai-page-tool-list {
  display: flex;
}

.ai-page-tool-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
}

.ai-page-tool-status {
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.ai-page-tool-status svg {
  width: 13px;
  height: 13px;
}

.ai-page-tool-status-running {
  color: var(--primary);
}

.ai-page-tool-status-success {
  color: var(--success);
}

.ai-page-tool-status-error {
  color: var(--error);
}

.ai-page-tool-name {
  flex-shrink: 0;
}

.ai-page-tool-detail {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.ai-page-tool-summary {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  margin-left: auto;
  font-size: 11px;
}

.ai-thinking-text {
  color: var(--note);
  font-style: italic;
}

.ai-page-status {
  padding: 0 20px;
  flex-shrink: 0;
}

.ai-page-input-area {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
}

.ai-page-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-page-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.ai-page-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--title);
  resize: none;
  outline: none;
  font-size: 14px;
  line-height: 1.5;
  max-height: 120px;
  min-height: 32px;
  padding: 0 2px;
}

.ai-page-input::placeholder {
  color: var(--note);
  font-size: 14px;
  line-height: 1.5;
  opacity: 1;
}

.ai-page-send-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.ai-page-send-btn:hover {
  background: var(--primary-light);
}

.ai-page-send-btn:active {
  transform: scale(0.92);
}

.ai-page-send-btn svg {
  width: 15px;
  height: 15px;
}

.ai-page-input-tip {
  font-size: 12px;
  color: var(--note);
  text-align: center;
  margin-top: 4px;
  line-height: 1.4;
}

.dropdown-item-ai-page {
  color: var(--primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .ai-page-main {
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
  }

  .ai-page-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 260px;
    height: 100%;
    max-height: none;
    border-right: 1px solid var(--divider);
    border-bottom: none;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease-soft);
  }

  .ai-page-sidebar.show {
    transform: translateX(0);
  }

  .ai-page-sidebar-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(29, 33, 41, 0.35);
    backdrop-filter: blur(2px);
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .ai-page-sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .ai-page-quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-page-message {
    max-width: 92%;
  }

  .ai-page-tool-list {
    display: flex;
  }

  .ai-page-tool-toggle {
    display: none;
  }
}

/* ========== AI 思考过程（展开参数/结果） ========== */

.ai-thought-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-thought-node {
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 12px;
  background: var(--card-bg);
}

.ai-thought-node[open] > .ai-thought-summary {
  background: var(--page-bg);
}

.ai-thought-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  background: var(--card-bg);
  transition: background-color 0.2s ease;
}

.ai-thought-summary::-webkit-details-marker {
  display: none;
}

.ai-thought-status {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ai-thought-status svg,
.ai-thought-status .ai-spinner {
  width: 14px;
  height: 14px;
}

.ai-thought-status-running {
  color: var(--primary);
}

.ai-thought-status-success {
  color: var(--success);
}

.ai-thought-status-error {
  color: var(--error);
}

.ai-thought-name {
  font-weight: 500;
  color: var(--title);
  flex-shrink: 0;
}

.ai-thought-detail {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.ai-thought-preview {
  color: var(--note);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  margin-left: auto;
  font-size: 11px;
}

.ai-thought-status-label {
  font-size: 11px;
  color: var(--note);
  flex-shrink: 0;
}

.ai-thought-body {
  padding: 10px;
  background: var(--page-bg);
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-thought-section-title {
  font-size: 11px;
  color: var(--note);
  margin-bottom: 4px;
}

.ai-thought-code {
  margin: 0;
  padding: 8px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.ai-message-content .ai-thought-detail,
.ai-message-content .ai-thought-preview {
  max-width: 120px;
}

.ai-page-message-content .ai-thought-detail,
.ai-page-message-content .ai-thought-preview {
  max-width: 220px;
}

/* ========== AI Markdown 渲染 ========== */

.ai-markdown {
  color: var(--body);
  line-height: 1.7;
}

.ai-markdown > *:first-child {
  margin-top: 0;
}

.ai-markdown > *:last-child {
  margin-bottom: 0;
}

.ai-markdown p {
  margin: 0 0 12px;
}

.ai-markdown h1,
.ai-markdown h2,
.ai-markdown h3,
.ai-markdown h4 {
  color: var(--title);
  margin: 16px 0 8px;
  font-weight: 600;
  line-height: 1.4;
}

.ai-markdown h1 {
  font-size: 18px;
}

.ai-markdown h2 {
  font-size: 16px;
}

.ai-markdown h3 {
  font-size: 15px;
}

.ai-markdown h4 {
  font-size: 14px;
}

.ai-markdown ul,
.ai-markdown ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.ai-markdown li {
  margin-bottom: 4px;
}

.ai-markdown blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--body);
}

.ai-markdown hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 16px 0;
}

.ai-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--page-bg);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--title);
}

.ai-markdown pre {
  background: var(--page-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-x: auto;
  margin: 8px 0;
}

.ai-markdown pre code {
  background: transparent;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

.ai-markdown-table-wrapper {
  overflow-x: auto;
  margin: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.ai-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card-bg);
}

.ai-markdown th,
.ai-markdown td {
  border: 1px solid var(--divider);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.ai-markdown th {
  background: var(--page-bg);
  font-weight: 600;
  color: var(--title);
}

.ai-markdown tr:nth-child(even) td {
  background: rgba(242, 243, 245, 0.5);
}

.ai-markdown a {
  color: var(--primary);
  text-decoration: underline;
}

.ai-markdown a:hover {
  color: var(--primary-light);
}

/* ========== AI 回到底部按钮 ========== */

.ai-scroll-bottom,
.ai-page-scroll-bottom {
  position: absolute;
  right: 16px;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  animation: ai-fade-in-up 0.2s var(--ease-soft);
}

.ai-scroll-bottom {
  bottom: 90px;
}

.ai-page-scroll-bottom {
  bottom: 110px;
}

.ai-scroll-bottom.show,
.ai-page-scroll-bottom.show {
  display: flex;
}

.ai-scroll-bottom-btn,
.ai-page-scroll-bottom-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--body);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s var(--ease-bounce);
}

.ai-scroll-bottom-btn:hover,
.ai-page-scroll-bottom-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.ai-scroll-bottom-btn:active,
.ai-page-scroll-bottom-btn:active {
  transform: scale(0.96);
}

.ai-scroll-bottom-btn svg,
.ai-page-scroll-bottom-btn svg {
  width: 14px;
  height: 14px;
}

@keyframes ai-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 三重一大会议助手 ========== */

.meeting-container {
  max-width: 1400px;
  margin: 0 auto;
}

.meeting-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 16px;
}

.meeting-header .btn {
  display: none;
}

.meeting-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.meeting-sidebar {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
}

.meeting-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meeting-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--title);
  margin: 0;
}

.meeting-sidebar-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meeting-sidebar-list .empty {
  padding: 24px 0;
  font-size: 13px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s var(--ease-bounce);
}

.session-item:hover {
  background: var(--page-bg);
  transform: translateX(2px);
}

.session-item.active {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.session-info {
  min-width: 0;
  flex: 1;
}

.session-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.session-meta {
  font-size: 12px;
  color: var(--note);
  display: flex;
  gap: 8px;
  align-items: center;
}

.session-skill {
  background: var(--primary-bg);
  color: var(--primary);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.session-delete {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--note);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.session-item:hover .session-delete {
  opacity: 1;
}

.session-delete:hover {
  background: #fff2f0;
  color: var(--error);
}

.meeting-workspace {
  margin-bottom: 0;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.skill-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--divider);
  margin: -4px -4px 16px -4px;
  padding: 4px 4px 0;
  overflow-x: auto;
}

.skill-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.skill-tab:hover {
  color: var(--primary);
  background: var(--page-bg);
}

.skill-tab.active {
  color: var(--primary);
  background: var(--primary-bg);
}

.skill-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

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

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

.meeting-form-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--title);
  margin: 0 0 4px;
}

.meeting-form-desc {
  font-size: 13px;
  color: var(--note);
  margin: 0;
}

.meeting-form-body {
  display: grid;
  gap: 4px;
}

.form-textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}

.required-mark {
  color: var(--error);
  margin-left: 2px;
}

.is-invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(245, 63, 63, 0.1) !important;
}

.editor-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.editor-toolbar-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.editor-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.editor-mode-tabs {
  display: flex;
  gap: 4px;
}

.editor-mode-tab {
  padding: 4px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--body);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.editor-mode-tab:hover {
  background: var(--page-bg);
  color: var(--primary);
}

.editor-mode-tab.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.editor-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--title);
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meeting-editor {
  flex: 1;
  min-height: 320px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.8;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.meeting-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.meeting-editor:disabled {
  background: var(--page-bg);
  color: var(--note);
  cursor: not-allowed;
}

.meeting-preview {
  flex: 1;
  min-height: 320px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--page-bg);
  color: var(--title);
  overflow: auto;
  line-height: 1.8;
  display: flex;
  justify-content: center;
}

.meeting-preview .minutes-document {
  width: 21cm;
  max-width: none;
  min-height: 29.7cm;
  padding: 2.54cm 3.17cm;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
}

/* 会议纪要红头公文预览样式 */
.minutes-document {
  max-width: 700px;
  margin: 0 auto;
  font-family: "仿宋", FangSong, "宋体", SimSun, serif;
  font-size: 16pt;
}

.minutes-header {
  text-align: center;
  margin-bottom: 8px;
}

.minutes-red-top {
  font-family: "方正小标宋简体", "宋体", SimSun, serif;
  font-size: 32pt;
  color: #e60000;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.2;
}

.minutes-red-title {
  font-family: "方正小标宋简体", "宋体", SimSun, serif;
  font-size: 40pt;
  color: #e60000;
  font-weight: bold;
  margin-top: 6px;
  line-height: 1.2;
}

.minutes-issue {
  font-size: 14pt;
  color: #e60000;
  margin-top: 10px;
  letter-spacing: 1px;
}

.minutes-red-line {
  border-bottom: 3px solid #e60000;
  margin: 14px 0 28px;
}

.minutes-body {
  text-align: justify;
}

.minutes-paragraph {
  text-indent: 2em;
  margin: 0 0 8pt 0;
}

.minutes-heading {
  font-weight: bold;
  font-family: "黑体", SimHei, sans-serif;
  margin: 14pt 0 6pt;
  text-indent: 0;
}

.minutes-signature {
  text-align: right;
  margin: 6pt 0;
}

.minutes-print {
  margin-top: 28pt;
  padding-top: 8pt;
  border-top: 1px solid var(--title);
  font-size: 14pt;
}

.minutes-print-left {
  float: left;
}

.minutes-print-right {
  float: right;
}

.minutes-print::after {
  content: '';
  display: table;
  clear: both;
}

.minutes-empty {
  text-align: center;
  color: var(--note);
  padding: 40px 0;
  font-size: 14px;
}

.editor-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--note);
  margin-top: 8px;
}

.generation-status {
  color: var(--primary);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.generation-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.edit-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.meeting-action-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.version-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.version-selector-label {
  font-size: 13px;
  color: var(--body);
  white-space: nowrap;
}

.version-select {
  min-width: 160px;
  padding: 6px 10px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--title);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.version-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
  outline: none;
}

.version-select:disabled {
  background: var(--page-bg);
  color: var(--note);
  cursor: not-allowed;
}

.btn-generate-large {
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .meeting-layout {
    grid-template-columns: 1fr;
  }

  .meeting-header .btn {
    display: inline-flex;
  }

  .meeting-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: none;
    z-index: 20;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease-soft);
  }

  .meeting-sidebar.show {
    transform: translateX(0);
  }

  .meeting-workspace {
    min-height: calc(100vh - 104px);
  }
}
