/* ============================================
   AI for Lawyers 统一品牌样式
   基准：案例传播包生成器设计语言
   ============================================ */

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f7f8fa;
  color: #1f2937;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* --- Header --- */
.brand-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.brand-bar {
  max-width: 1080px; margin: 0 auto; padding: 0 18px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px;
  color: #1f2937;
}
.brand-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: #1a5276; color: #fff;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
}
.brand-header .brand-back {
  font-size: 14px; color: #667085;
  display: flex; align-items: center; gap: 4px;
}
.brand-header .brand-back:hover { color: #1a5276; }

/* --- Footer --- */
.brand-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 22px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
}

/* --- Container --- */
.brand-wrap {
  max-width: 1080px; margin: 0 auto; padding: 0 18px;
}

/* --- Buttons --- */
.brand-btn {
  border: 0; border-radius: 8px; padding: 11px 18px;
  font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all .2s;
}
.brand-btn.primary {
  background: #1a5276; color: #fff;
}
.brand-btn.primary:hover {
  background: #154467;
}
.brand-btn.secondary {
  background: #fff; color: #1a5276;
  border: 1px solid #1a5276;
}
.brand-btn.secondary:hover {
  background: #f0f5fa;
}
.brand-btn.ghost {
  background: #eef2f6; color: #334155;
}
.brand-btn.ghost:hover {
  background: #e2e8f0;
}
.brand-btn:disabled {
  opacity: .5; cursor: not-allowed;
}
.brand-btn.lg {
  padding: 16px 36px; font-size: 18px; border-radius: 10px;
}
.brand-btn.sm {
  padding: 8px 14px; font-size: 13px;
}

/* --- Hero Section --- */
.brand-hero {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.brand-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center;
  padding: 42px 18px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .brand-hero-inner { grid-template-columns: 1fr; }
}

/* --- Typography --- */
.brand-eyebrow {
  color: #1a5276; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-h1 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.2; margin: 8px 0 14px; color: #111827;
}
.brand-h2 {
  margin: 0 0 8px; color: #111827; font-size: 22px;
}
.brand-h3 {
  margin: 0 0 8px; color: #111827; font-size: 17px;
}
.brand-p {
  line-height: 1.75;
}
.brand-muted {
  color: #667085;
}

/* --- Card --- */
.brand-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

/* --- Panel (for form sections) --- */
.brand-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

/* --- Grid --- */
.brand-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.brand-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.brand-grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 820px) {
  .brand-grid-2, .brand-grid-3, .brand-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* --- Form Elements --- */
.brand-label {
  font-size: 14px; font-weight: 700; color: #374151;
  display: block; margin-bottom: 8px;
}
.brand-input, .brand-textarea, .brand-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: #1f2937;
}
.brand-input:focus, .brand-textarea:focus, .brand-select:focus {
  outline: none;
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}
.brand-textarea {
  min-height: 120px; resize: vertical;
}
.brand-hint {
  font-size: 13px; color: #9ca3af; margin-top: 6px;
}

/* --- Error --- */
.brand-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
}

/* --- Step Indicator --- */
.brand-step {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.brand-step-num {
  width: 28px; height: 28px; border-radius: 999px;
  background: #1a5276; color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.brand-step-label {
  font-size: 14px; color: #667085;
}

/* --- Radio & Checkbox --- */
.brand-radio-group, .brand-checkbox-group {
  display: flex; flex-direction: column; gap: 10px;
}
.brand-radio-item, .brand-checkbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
  font-size: 15px;
}
.brand-radio-item:hover, .brand-checkbox-item:hover {
  border-color: #1a5276;
}
.brand-radio-item.active, .brand-checkbox-item.active {
  border-color: #1a5276;
  background: #eff6ff;
}
.brand-radio-item input[type="radio"],
.brand-checkbox-item input[type="checkbox"] {
  accent-color: #1a5276;
  width: 18px; height: 18px;
}

/* --- Choice Grid (2-col selectable cards) --- */
.brand-choices {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (max-width: 820px) {
  .brand-choices { grid-template-columns: 1fr; }
}
.brand-choice {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
}
.brand-choice:hover {
  border-color: #1a5276;
}
.brand-choice.active {
  border-color: #1a5276;
  background: #eff6ff;
}

/* --- Upload Zone --- */
.brand-upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fafbfc;
}
.brand-upload-zone:hover, .brand-upload-zone.dragover {
  border-color: #1a5276;
  background: #eff6ff;
}
.brand-upload-zone.has-files {
  border-color: #22c55e;
  border-style: solid;
  background: #f0fdf4;
}
.brand-upload-zone.uploading {
  border-color: #f59e0b;
  border-style: dashed;
  background: #fffbeb;
  pointer-events: none;
}
.brand-upload-icon {
  font-size: 40px; margin-bottom: 8px;
}
.brand-upload-title {
  font-size: 16px; font-weight: 700; color: #111827;
}
.brand-upload-sub {
  font-size: 14px; color: #667085; margin-top: 4px;
}

/* --- File Tags --- */
.brand-file-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center;
}
.brand-file-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 6px; padding: 4px 10px;
  font-size: 13px; color: #166534;
}
.brand-file-tag .remove {
  cursor: pointer; color: #ef4444; font-weight: 700;
}

/* --- Spinner --- */
.brand-spinner {
  width: 40px; height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #1a5276;
  border-radius: 50%;
  animation: brand-spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes brand-spin {
  to { transform: rotate(360deg); }
}

/* --- Progress Bar --- */
.brand-progress {
  width: 100%; height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 16px;
}
.brand-progress-fill {
  height: 100%;
  background: #1a5276;
  border-radius: 3px;
  transition: width .5s ease;
}

/* --- Workflow Steps --- */
.brand-workflow {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}
.brand-step-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}
.brand-step-row:last-child { border-bottom: 0; }

/* --- Result Card --- */
.brand-result-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

/* --- Actions Bar --- */
.brand-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; margin-top: 22px;
}

/* --- Page Section --- */
.brand-page {
  padding: 30px 18px 42px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand-page-narrow {
  max-width: 780px;
}

/* --- Toggle Link --- */
.brand-toggle {
  color: #1a5276; cursor: pointer; font-size: 14px;
  display: inline-block; margin-top: 8px;
}
.brand-toggle:hover { text-decoration: underline; }

/* --- Hidden --- */
.brand-hidden { display: none !important; }

/* --- Feature Grid (home page) --- */
.brand-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 40px 0;
}
@media (max-width: 820px) {
  .brand-features { grid-template-columns: 1fr; }
}
.brand-feature-card {
  text-align: center;
  padding: 32px 20px;
}
.brand-feature-icon {
  font-size: 36px; margin-bottom: 12px;
}
.brand-feature-title {
  font-size: 17px; font-weight: 700; color: #111827; margin-bottom: 8px;
}
.brand-feature-desc {
  font-size: 14px; color: #667085; line-height: 1.6;
}
