/* ═══ GEOStudio Design System v3 — Clean Modern SaaS ═══ */

/* ── 卡片 ── */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ── 输入框（只增强焦点，不覆盖 DaisyUI 原样式）── */
.input:focus, .textarea:focus, .select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important;
  outline: none;
}

/* ── 按钮（只覆色，不动结构）── */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.35); transform: translateY(-1px); }
.btn-outline { border-color: #d1d5db; }
.btn-outline:hover { border-color: #6366f1; color: #4f46e5; background: #f5f3ff; }
.btn-success { background: #10b981 !important; border-color: transparent !important; color: #fff !important; }
.btn-warning { background: #f59e0b !important; border-color: transparent !important; color: #fff !important; }

/* ── Badge ── */
.badge { display: inline-flex; align-items: center; padding: 0.15rem 0.55rem; border-radius: 6px; font-size: 0.72rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-ghost { background: #f3f4f6; color: #6b7280; }

/* ── 表格 ── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.6rem 0.8rem; font-size: 0.8rem; color: #6b7280; border-bottom: 2px solid #e5e7eb; }
.table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; }
.table tr:hover td { background: #fafbff; }

/* ── 进度条 ── */
.progress { background: #e5e7eb; border-radius: 4px; height: 8px; overflow: hidden; }
.progress-primary { background: linear-gradient(90deg, #6366f1, #8b5cf6); }

/* ── 其他 ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.4s ease-out; }

@media print {
  nav, .btn, footer { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #e5e7eb !important; }
}

/* ── 移动端适配 ── */
@media (max-width: 640px) {
  /* 表格横向滚动 */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  /* 按钮间距 */
  .btn { white-space: nowrap; }
  
  /* 卡片内边距缩小 */
  .card.p-5, .card.p-6 { padding: 1rem !important; }
  .card-body.p-5, .card-body.p-6, .card-body.p-8 { padding: 1rem !important; }
  
  /* 面包屑缩小 */
  .text-sm { font-size: 0.8rem; }
  
  /* 分析结果中的代码块/Pre块防止溢出 */
  pre, code, .font-mono { max-width: 100%; overflow-x: auto; word-break: break-all; }
  
  /* prose 内容宽度约束 */
  .prose { max-width: 100%; word-break: break-word; }
  .prose img, .prose table { max-width: 100%; }
  
  /* 弹窗全宽 */
  .modal-box { max-width: 95vw !important; margin: 0 auto; }
  dialog.modal .modal-box { width: 95vw; }
  
  /* 所有表格在移动端可滚动 */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  thead, tbody, tr, th, td { white-space: nowrap; }
}

@media (max-width: 360px) {
  /* 极小屏：单列布局 */
  .grid-cols-2 { grid-template-columns: 1fr !important; }
  /* 保留 grid-cols-1 不变 */
  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.1rem; }
}
