/* 源码说明：项目本地 CSS 样式表。
 * 定义基础布局、通用组件及响应式断点样式。
 */
/* local.css - 全响应式自适应样式库 (完全离线本地化) */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; scroll-behavior: smooth; }
body { background-color: #f3f4f6; color: #1f2937; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 100%; }

.container { width: 100%; max-width: 1220px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.grid { display: grid; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.bg-white { background-color: #ffffff; }
.bg-slate-900 { background-color: #1e293b; }
.bg-blue-600 { background-color: #2563eb; }
.bg-emerald-600 { background-color: #059669; }
.text-white { color: #ffffff; }
.text-blue-600 { color: #2563eb; }
.text-red-500 { color: #ef4444; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.shadow-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05); }
.border { border-width: 1px; border-color: #f3f4f6; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }

.desktop-nav { display: flex; align-items: center; }
.mobile-nav-toggle { display: none; }
.grid-desktop { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-12 { grid-column: span 12 / span 12; }
.shortcut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }

.drawer-overlay {
  position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 100;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 320px;
  background-color: #ffffff; z-index: 101; transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto; padding: 16px; display: flex; flex-direction: column;
}
.drawer-overlay.active .drawer-panel { transform: translateX(0); }
.drawer-close { align-self: flex-end; font-size: 20px; color: #64748b; cursor: pointer; padding: 4px; }
.drawer-user-card {
  background-color: #ffffff; border: 1px solid #f1f5f9; border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; margin-top: 8px; margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02); cursor: pointer;
}
.drawer-user-avatar {
  width: 44px; height: 44px; border-radius: 50%; background-color: #f1f5f9;
  display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 22px; margin-right: 12px; flex-shrink: 0;
}
.drawer-section-title { font-size: 11px; color: #94a3b8; font-weight: bold; margin-bottom: 8px; padding-left: 4px; }
.drawer-nav-group { background-color: #ffffff; border: 1px solid #f1f5f9; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.drawer-nav-item {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  font-size: 13px; color: #334155; border-bottom: 1px solid #f8fafc; cursor: pointer;
}
.drawer-nav-item:last-child { border-bottom: none; }
.drawer-icon-box { display: flex; align-items: center; gap: 10px; }

.switch-container {
  display: flex; align-items: center; justify-content: space-between;
  background-color: #ffffff; border: 1px solid #f1f5f9; border-radius: 12px; padding: 12px 14px; font-size: 13px;
}
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0; background-color: #e2e8f0; border-radius: 34px; transition: .3s;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: .3s;
}
input:checked + .toggle-slider { background-color: #2563eb; }
input:checked + .toggle-slider:before { transform: translateX(18px); }

.back-to-top-btn {
  position: fixed; bottom: 24px; right: 16px; width: 42px; height: 42px;
  background-color: #ffffff; color: #334155; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer; z-index: 40; transition: transform 0.2s;
}
.back-to-top-btn:active { transform: scale(0.95); }

@media (max-width: 991px) {
  .desktop-nav { display: none !important; }
  .mobile-nav-toggle { display: flex !important; align-items: center; gap: 14px; }
  .grid-desktop { display: flex; flex-direction: column; gap: 1rem; }
  .col-span-8, .col-span-4, .col-span-5, .col-span-6, .col-span-7 { width: 100% !important; }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem !important; }
  .col-side { order: 2; margin-top: 1rem; }
  .col-main { order: 1; }
  .mobile-art-item { display: flex; gap: 12px; align-items: center; }
  .mobile-art-thumb { width: 108px !important; height: 72px !important; border-radius: 6px !important; flex-shrink: 0; }
}
