/* ==========================================================================
   学术演示文稿智能生成 — Stylesheet
   ========================================================================== */

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #fbfbfa;
  --ink: #2c2a29;
  --muted: #73706c;
  --line: #e6e2db;
  --teal: #2c5e43;
  --teal-deep: #1b3d2b;
  --amber: #c07c1e;
  --red: #b42318;
  --shadow: 0 12px 32px rgba(44, 40, 36, 0.03);
  --border-radius: 8px;
}

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

body {
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
  width: 320px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
  max-height: 100vh;
  overflow-y: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  font-weight: 700;
}

.brand p {
  font-size: 11px;
  color: var(--muted);
}

/* Form panel styling */
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.input-field input[type="text"],
.input-field input[type="number"],
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
  border-color: var(--teal);
  background: #fff;
}

.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface-soft);
}

fieldset legend {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 6px;
  text-transform: uppercase;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkbox-group label {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Material locker files upload styling */
.materials-locker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.upload-item input[type="file"] {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}

/* Session Capsule info */
.session-capsule {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.session-capsule h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.capsule-data {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.capsule-data div {
  display: flex;
  justify-content: space-between;
}

.capsule-data dt {
  color: var(--muted);
}

.capsule-data dd {
  font-weight: 600;
}

/* Main Workspace */
.main-workspace {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
  padding: 2px 8px;
  border-radius: 4px;
}

.topbar h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

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

.btn--secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--surface-soft);
}

.btn--small {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.btn--block {
  width: 100%;
  height: 42px;
}

/* Flow Board Steps */
.flow-board {
  display: flex;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  padding: 12px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  font-size: 13px;
}

.flow-node.active {
  opacity: 1;
  font-weight: 700;
  color: var(--teal);
}

.flow-node .num {
  font-family: monospace;
  font-size: 11px;
  background: var(--bg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.flow-node.active .num {
  background: var(--teal);
  color: #fff;
}

/* Panels */
.workspace-panels-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel--just-advanced {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 100, 73, 0.16), var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.panel-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

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

.status-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.empty-state {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 30px;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

/* Outline list editable cards structure */
.outline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slide-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  position: relative;
}

.slide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.slide-card-header span {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.slide-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.outline-item .slide-card-grid {
  grid-template-columns: 1fr 1fr;
}

.outline-item .slide-card-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.outline-item .slide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.outline-item .slide-card-header > div {
  display: flex;
  gap: 4px;
  align-items: center;
}

.slide-card-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}

.slide-card-grid input,
.slide-card-grid textarea {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.slide-card-grid input:focus,
.slide-card-grid textarea:focus {
  border-color: var(--teal);
}

.btn-remove-slide {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--red);
  cursor: pointer;
}

/* Template Grid Options */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: var(--teal);
}

.template-card.active {
  border-color: var(--teal);
  background: rgba(44, 94, 67, 0.03);
  box-shadow: inset 3px 0 0 var(--teal);
}

.template-card strong {
  font-size: 14px;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.template-card .desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.template-card .tags {
  font-size: 10px;
  color: var(--teal);
  font-weight: 600;
}

/* Image Plans & Review lists */
.image-plan-list,
.review-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-plan-item,
.review-item {
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.image-plan-item strong,
.review-item strong {
  font-size: 13px;
  display: block;
}

.image-plan-item p,
.review-item p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Compile metrics styling */
.build-console {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  font-size: 13px;
}

.build-console p {
  margin-bottom: 12px;
}

.build-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.build-metrics span {
  font-weight: 500;
  color: var(--muted);
}

.build-metrics b {
  color: var(--teal);
  font-weight: 700;
}

/* Preview Montage styling */
.preview-montage-panel {
  align-items: center;
}

.artifact-preview {
  width: 100%;
  max-width: 800px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.artifact-preview img {
  width: 100%;
  display: block;
}

.review-item--warning {
  border-left: 4px solid var(--accent2) !important;
}
.review-item--warning strong {
  color: var(--accent2) !important;
}
.review-item--warning .status-lbl {
  background: var(--accent2);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}

/* App Footer */
.app-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
