/* ============================================================
   TRAINING.CSS — ai-training.html
   Digital Atelier · tab layout (matching offline-assist tab style)
   ============================================================ */

.training-page {
  background-color: var(--bg-main);
}

/* ---- Shared container ---- */
.at-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ---- Eyebrow ---- */
.at-section-eyebrow {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

/* ====================================================
   TAB BAR (matching offline-assist .assist-tab-bar)
   ==================================================== */
.at-tab-strip {
  background: var(--bg-section);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  position: sticky;
  top: var(--nav-height, 56px);
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
}

.at-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--bg-section);
  border-radius: 12px;
  width: fit-content;
}

.at-tab-bar .at-tab {
  padding: 8px 24px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  box-shadow: none;
}

.at-tab-bar .at-tab:hover {
  color: var(--text);
  background: rgba(122, 88, 59, 0.06);
  box-shadow: none;
}

.at-tab-bar .at-tab.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(122, 88, 59, 0.08);
}

/* Tab panels */
.at-tab-panel { display: none; }
.at-tab-panel.active { display: block; }

/* ====================================================
   SECTIONS (inside tab panels)
   ==================================================== */
.at-section {
  background: var(--bg-main);
  padding: 48px 0 64px;
}

/* ====================================================
   STATS STRIP (section 01)
   ==================================================== */
.at-stats-strip {
  display: flex;
  align-items: center;
  padding: 40px 0;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.at-stat-sep {
  width: 1px;
  height: 48px;
  background: rgba(177, 178, 176, 0.25);
  flex-shrink: 0;
  margin: 0 48px;
}

.stat-value {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.at-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.at-stat-mission .at-stat-label {
  order: -1;
  margin-top: 0;
  margin-bottom: 4px;
}

.at-mission-text {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

/* ---- Suggestions ---- */
.at-suggestions {
  margin-bottom: 48px;
}

.at-sug-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(177, 178, 176, 0.2);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-sug-item {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(177, 178, 176, 0.2);
  padding-right: 40px;
}

.at-sug-item + .at-sug-item {
  padding-left: 40px;
  padding-right: 40px;
}

.at-sug-item:last-child {
  border-right: none;
  padding-right: 0;
}

.at-sug-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.at-sug-value {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

/* ---- Recent ---- */
.at-recent {
  margin-bottom: 8px;
}

.at-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.at-sub-head .at-section-eyebrow { margin-bottom: 0; }

.at-link-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 200ms ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.at-link-more:hover { opacity: 1; }

.at-tip {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}

.recent-list { display: grid; gap: 2px; }

.recent-item {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(177, 178, 176, 0.15);
}

.recent-item:last-child { border-bottom: none; }

.recent-head { margin: 0; font-weight: 600; font-size: 15px; }

.recent-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recent-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex-shrink: 0;
}

.recent-score strong {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
}

/* ====================================================
   QUIZ FILTER TABS (matching roleplay filter style)
   ==================================================== */
.quiz-filter-strip {
  margin-bottom: 28px;
}

.quiz-filter-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: rgba(49, 51, 49, 0.06);
  border-radius: 12px;
  border: 1px solid var(--line-strong, rgba(177,178,176,0.25));
}

.quiz-filter-tabs .tab-btn {
  background: none;
  box-shadow: none;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.quiz-filter-tabs .tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}

.quiz-filter-tabs .tab-btn.active {
  background: var(--bg-ink, #313331);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
}

/* Quiz panels */
.quiz-panel {}

/* Case upload button area */
.at-case-upload {
  margin-bottom: 24px;
}

/* ====================================================
   QUIZ FORM (section 02)
   ==================================================== */
.at-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.at-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.at-form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.at-form select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-main);
  border: 1px solid rgba(177, 178, 176, 0.3);
  border-radius: 10px;
  padding: 11px 36px 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235e5f5d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.at-section-alt .at-form select {
  background-color: var(--bg-main);
}

.at-form select:focus {
  outline: none;
  border-color: rgba(122, 88, 59, 0.4);
  box-shadow: 0 0 0 3px rgba(122, 88, 59, 0.1);
}

.at-config-foot { }

.at-btn-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 28px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-ambient);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.at-btn-start:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(122, 88, 59, 0.18);
}

/* ====================================================
   SCENARIO GRID (section 03 — from roleplay.css)
   ==================================================== */
.rp-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.rp-scenario-meta {
  font-size: 12px;
  color: var(--subtle);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.rp-filter-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: rgba(49, 51, 49, 0.06);
  border-radius: 12px;
  border: 1px solid var(--line-strong, rgba(177,178,176,0.25));
}

.rp-filter-tabs .tab-btn {
  background: none;
  box-shadow: none;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.rp-filter-tabs .tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}

.rp-filter-tabs .tab-btn.active {
  background: var(--bg-ink, #313331);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.16);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.scenario-card {
  border: 1px solid rgba(122, 88, 59, 0.14);
  border-radius: var(--radius-card, 16px);
  padding: 22px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcfb 100%);
  cursor: pointer;
  transition: all 240ms cubic-bezier(0.22, 1, 0.36, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.scenario-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(122, 88, 59, 0.12);
  border-color: rgba(122, 88, 59, 0.32);
}

.scenario-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scenario-card h3 {
  font-size: 17px;
  margin: 0;
  line-height: 1.3;
}

.scenario-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.scenario-card .rp-last-score {
  font-size: 11px;
  color: var(--subtle);
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid rgba(177, 178, 176, 0.15);
}

.scenario-card .rp-last-score strong {
  color: var(--accent);
  font-weight: 700;
}

.difficulty-badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill, 100px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.difficulty-L1 { background: var(--success-soft, rgba(34,139,34,0.1)); color: var(--success, #228b22); }
.difficulty-L2 { background: var(--warning-soft, rgba(255,165,0,0.1)); color: #8a5c1a; }
.difficulty-L3 { background: var(--danger-soft, rgba(220,53,69,0.1)); color: var(--danger, #dc3545); }

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scenario-tag {
  padding: 2px 8px;
  border-radius: var(--radius-pill, 100px);
  font-size: 11px;
  background: var(--bg-depth, #f5f5f5);
  color: var(--subtle);
  border: 1px solid var(--line, rgba(177,178,176,0.2));
}

.channel-badge {
  font-size: 11px;
  color: var(--accent-2, #4a6fa5);
  font-weight: 600;
}

.channel-badge[data-channel="线下"] {
  color: var(--gold, #a67c52);
}

/* ====================================================
   HISTORY (section 04)
   ==================================================== */
.at-insight-nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 48px;
  border-top: 1px solid rgba(177, 178, 176, 0.2);
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.insight-stat {
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(177, 178, 176, 0.2);
  padding-right: 40px;
}

.insight-stat + .insight-stat { padding-left: 40px; }

.insight-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.insight-stat span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.insight-stat strong {
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Mode filter (全部/题库/对话模拟) */
.at-mode-filter {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: rgba(49, 51, 49, 0.06);
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 32px;
  border: 1px solid var(--line-strong, rgba(177,178,176,0.25));
}

.at-mode-btn {
  background: none;
  border: none;
  border-radius: 7px;
  padding: 6px 18px;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms ease;
}

.at-mode-btn:hover { color: var(--text); }

.at-mode-btn.active {
  background: var(--bg-ink, #313331);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Charts row */
.at-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
}

.at-chart-panel .at-section-eyebrow { margin-bottom: 16px; }

/* Trend bars */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 16px 0 0;
}

.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.trend-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 2px 2px;
  background: var(--accent-2, #4a6fa5);
  transition: height 400ms cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 4px;
}

.trend-col span {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Weakness list */
.weakness-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.weakness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(177, 178, 176, 0.15);
}

.weakness-item:last-child { border-bottom: none; }

.weakness-item p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.weakness-item > div > span {
  font-size: 11px;
  color: var(--subtle);
  margin-top: 2px;
  display: block;
}

.weakness-score {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.weakness-score strong {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.weakness-score small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 6px;
  background: rgba(122, 88, 59, 0.08);
  border-radius: 4px;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: var(--bg-depth, #f5f5f5);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wrap th {
  text-align: left;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(177, 178, 176, 0.2);
  background: var(--bg-section);
  white-space: nowrap;
}

.table-wrap td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(177, 178, 176, 0.12);
  color: var(--text);
  vertical-align: middle;
}

.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: rgba(122, 88, 59, 0.03); }

/* Mode badge in table */
.mode-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill, 100px);
  font-size: 11px;
  font-weight: 600;
}

.mode-badge-quiz {
  background: var(--accent-2-soft, rgba(74,111,165,0.1));
  color: var(--accent-2, #4a6fa5);
}

.mode-badge-roleplay {
  background: var(--accent-soft, rgba(196,137,108,0.1));
  color: var(--accent, #7a583b);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .at-container { padding: 0 32px; }
  .at-form { grid-template-columns: repeat(2, 1fr); }
  .at-insight-nums { grid-template-columns: repeat(2, 1fr); }
  .at-insight-nums .insight-stat:nth-child(2) { border-right: none; padding-right: 0; }
  .at-insight-nums .insight-stat:nth-child(3) { padding-left: 0; border-top: 1px solid rgba(177,178,176,0.2); }
  .at-insight-nums .insight-stat:nth-child(4) { border-top: 1px solid rgba(177,178,176,0.2); }
}

@media (max-width: 768px) {
  .at-container { padding: 0 20px; }
  .at-section { padding: 36px 0 48px; }
  .at-tab-bar .at-tab { padding: 7px 16px; font-size: 12px; }
  .at-form { grid-template-columns: 1fr 1fr; }
  .at-stats-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 32px 0;
  }
  .at-stat-sep { width: 100%; height: 1px; margin: 0; }
  .at-sug-row { grid-template-columns: 1fr; }
  .at-sug-item,
  .at-sug-item + .at-sug-item {
    border-right: none;
    border-bottom: 1px solid rgba(177, 178, 176, 0.2);
    padding-left: 0;
    padding-right: 0;
  }
  .at-sug-item:last-child { border-bottom: none; }
  .at-charts-row { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .at-form { grid-template-columns: 1fr; }
  .at-insight-nums { grid-template-columns: 1fr 1fr; }
  .rp-filter-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .at-tab-strip { padding: 8px 0; }
  .at-tab-bar { flex-wrap: wrap; }
}

/* ====================================================
   CASE TRAINING SECTION (inside quiz tab)
   ==================================================== */
.at-case-section {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid rgba(177, 178, 176, 0.2);
}

.at-case-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.at-case-heading {
  margin: 0 0 6px;
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.at-case-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Buttons */
.at-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  text-decoration: none;
  border: none;
}

.at-btn-outline {
  background: transparent;
  border: 1px solid rgba(122, 88, 59, 0.3);
  color: var(--accent);
}

.at-btn-outline:hover {
  background: var(--accent-soft);
  border-color: rgba(122, 88, 59, 0.5);
}

.at-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-ambient);
}

.at-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 32px rgba(122, 88, 59, 0.16);
}

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

/* Case grid */
.at-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.at-case-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(122, 88, 59, 0.14);
  border-radius: var(--radius-card, 16px);
  padding: 20px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcfb 100%);
  cursor: pointer;
  transition: all 240ms cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  color: inherit;
}

.at-case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(122, 88, 59, 0.12);
  border-color: rgba(122, 88, 59, 0.32);
}

.at-case-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.at-case-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.at-case-meta {
  font-size: 12px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.at-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0;
  grid-column: 1 / -1;
}

/* ====================================================
   UPLOAD MODAL
   ==================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(49, 51, 49, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--card, #ffffff);
  border-radius: var(--radius-card, 16px);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(49, 51, 49, 0.2);
}

.modal-card h3 {
  margin: 0 0 24px;
  font-family: "Noto Serif SC", "Noto Serif", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

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

.form-group-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group-select,
.form-group-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-main);
  border: 1px solid rgba(177, 178, 176, 0.3);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-sizing: border-box;
}

.form-group-select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235e5f5d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.form-group-textarea {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid rgba(177, 178, 176, 0.3);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-sizing: border-box;
}

.form-group-select:focus,
.form-group-input:focus,
.form-group-textarea:focus {
  outline: none;
  border-color: rgba(122, 88, 59, 0.4);
  box-shadow: 0 0 0 3px rgba(122, 88, 59, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.at-upload-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(122, 88, 59, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

@media (max-width: 768px) {
  .at-case-section-head { flex-direction: column; }
  .at-case-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 24px 20px; }
}

/* ---- Misc reused ---- */
.muted-line {
  color: var(--subtle);
  font-size: 14px;
  font-style: italic;
}
