/* Report workspace: unified typography, layout, and theme support. */
#tab-report .rw-shell {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: var(--text, #263647);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.rw-card {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card, var(--panel, #fff));
  box-shadow: 0 4px 24px rgba(24, 46, 75, .04);
}
.rw-library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.rw-library {
  border: 1.5px dashed var(--border-strong, #bdcad8);
  border-radius: 12px;
  background: var(--soft, rgba(255,255,255,.28));
  overflow: hidden;
  transition: border-color .18s, background .18s;
}
.rw-library:hover, .rw-library:focus-within {
  border-color: var(--accent, #2364cc);
  background: var(--soft2, var(--soft));
}
.rw-library-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 18px 8px; }
.rw-library-head h2 { font-size: 15px; margin: 0; font-weight: 600; color: var(--text); }
.rw-library-head h2 span { font-size: 12px; color: var(--muted, #718191); margin-left: 6px; font-weight: 400; }
.rw-library-head .btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text2, #53677e);
  border: 1px solid var(--border, #d8e3e9);
}
.rw-library-head .btn:hover { border-color: var(--accent); color: var(--accent); }
.rw-file-list { min-height: 156px; max-height: 300px; overflow: auto; }
.rw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 156px;
  padding: 25px 16px;
  border: 0;
  background: transparent;
  color: var(--muted, #718191);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.rw-empty svg { color: var(--faint, #92a3b5); }
.rw-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border2, rgba(100,130,155,.1));
  cursor: pointer;
  transition: background .12s;
}
.rw-file:hover { background: var(--soft); }
.rw-file:last-child { border-bottom: 0; }
.rw-file > input { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--accent, #2364cc); }
.rw-file > span { min-width: 0; flex: 1; }
.rw-file strong { font-size: 14px; font-weight: 500; line-height: 1.5; display: block; overflow-wrap: anywhere; }
.rw-file small { font-size: 12px; line-height: 1.55; color: var(--muted, #718191); display: block; margin-top: 3px; overflow-wrap: anywhere; }
.rw-remove {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--muted, #718191);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.rw-remove:hover { background: var(--red-bg, rgba(184,69,69,.1)); color: var(--red, #b84545); }
.rw-drag { background: var(--soft3, var(--soft)); border-color: var(--accent, #2364cc); }
.rw-shell textarea, .rw-shell select {
  box-sizing: border-box;
  border: 1px solid var(--border, #d8e3e9);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--text);
  font: inherit;
  padding: 10px 14px;
  min-width: 0;
}
.rw-shell textarea { width: 100%; resize: vertical; font-size: 14px; line-height: 1.75; min-height: 92px; }
.rw-shell :is(textarea, select, input):focus-visible { outline: 2px solid var(--accent, #2364cc); outline-offset: 2px; }
.rw-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.rw-actionbar .rw-footnote { margin: 0; flex: 1; min-width: 0; }
.rw-actionbar #rwGenerate { flex-shrink: 0; min-width: 146px; padding: 10px 22px; font-size: 13px; border-radius: 10px; }
.rw-status { font-size: 13px; line-height: 1.75; color: var(--green, #387869); margin-top: 14px; white-space: pre-wrap; }
.rw-status:empty { display: none; }
.rw-error { color: var(--red, #b84545); }
#rwDownload { display: inline-block; text-decoration: none; margin-top: 14px; font-size: 13px; }
#rwDownload[hidden] { display: none; }
.rw-footnote { font-size: 12px; line-height: 1.65; color: var(--faint, #8493a5); margin: 16px 0 0; }
.rw-shell button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 650px) {
  #tab-report .rw-shell { padding: 0; }
  .rw-library-grid { grid-template-columns: 1fr; gap: 14px; }
  .rw-card { padding: 18px 16px; }
  .rw-library-head { padding: 13px 14px 6px; }
  .rw-file { padding: 12px 14px; }
  .rw-actionbar { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .rw-actionbar #rwGenerate { width: 100%; margin: 0; }
  .rw-actionbar .rw-footnote { text-align: center; }
  .rw-file-list, .rw-empty { min-height: 120px; }
}
