/* =========================================================
   Module · Projects workspace
   ========================================================= */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(344px, .86fr);
  gap: 15px;
  align-items: start;
}
.workspace-grid > .card { min-width: 0; }

.recent-panel .section-head { padding-bottom: 13px; }
.recent-panel .section-title-icon { color: var(--primary-ink); background: var(--primary-soft); border-color: transparent; }
.recent-panel .project-list { border-top: 1px solid var(--line); }
.recent-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 17px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--text-3);
  font-size: 9.5px;
}
.recent-foot strong { color: var(--text-2); font-weight: 600; }
.recent-foot .text-btn { font-size: 9.5px; }

.create-card {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--primary) 20%, var(--line));
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, var(--shadow-sm);
}
html[data-theme="night"] .create-card { box-shadow: var(--shadow-sm); }
.create-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 9px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(140% 100% at 100% 0%, var(--primary-soft), transparent 68%),
    var(--surface);
}
.create-head-ico {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  color: var(--primary-ink);
}
.create-head-ico .icon { width: 15px; height: 15px; }
.create-head > div:last-child { min-width: 0; }
.create-head h2 { font-size: 14.5px; font-weight: 680; letter-spacing: -.03em; }
.create-head p { margin-top: 3px; color: var(--text-3); font-size: 10.5px; line-height: 1.55; }
.create-body { padding: 11px 16px 12px; }
[data-project-drop] em { display: none; }
[data-project-drop] { min-height: 86px; padding: 8px; gap: 3px; }
[data-project-drop] .dropzone-ico { width: 28px; height: 28px; border-radius: 8px; }
[data-project-drop] .dropzone-ico .icon { width: 14px; height: 14px; }
[data-project-drop] strong { font-size: 11px; }
[data-project-drop] > span { font-size: 9.5px; }
.create-body .btn-primary.w-full { height: 39px; font-size: 12px; }

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .015em;
  color: var(--text-2);
}
.field-label em { font-style: normal; font-size: 9px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.field-label .req { color: var(--danger); }

.name-input-wrap { position: relative; display: flex; align-items: center; }
.name-input-wrap .icon { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.name-input-wrap .input { height: 40px; padding-left: 33px; font-size: 11.5px; }
.name-input-wrap .input:focus + .input-suffix, .name-input-wrap:focus-within .icon { color: var(--primary); }
.input-suffix { position: absolute; right: 10px; color: var(--text-3); font-size: 9px; pointer-events: none; }

.check-block { display: flex; flex-direction: column; gap: 6px; }
.check-block-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; font-weight: 650; color: var(--text-2); }
.check-block-title em { font-style: normal; font-size: 9px; font-weight: 500; color: var(--text-3); }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.check-grid.cols-2 { grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.check-grid .check { padding: 3px 6px; margin: -1px -2px; border-radius: 7px; }
.check-grid .check:last-child { grid-column: 1 / -1; }
.check-grid .check:hover { background: var(--surface-2); }
.check-grid .check-text strong { font-size: 10.5px; font-weight: 550; }
.check-grid .check-text em { display: block; font-style: normal; font-size: 9px; color: var(--text-3); margin-top: 1px; }

.create-divider { height: 1px; background: var(--line); margin: 2px 0; }
.create-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 3px; }
.create-hint { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--text-3); font-size: 9px; }
.create-hint .icon { width: 11px; height: 11px; }

/* Week / activity */
.chart-card .section-head { padding-bottom: 4px; }
.chart-card .section-body { padding-top: 8px; }
.chart-legend { display: flex; align-items: center; gap: 10px; font-size: 9px; color: var(--text-3); }
.chart-legend i { width: 6px; height: 6px; border-radius: 2px; background: var(--primary); display: inline-block; margin-right: 3px; }
.activity-card .section-head { padding-bottom: 2px; }
.activity-card .section-body { padding-top: 2px; }

/* Global empty */
.empty-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 38px 20px; text-align: center; }
.empty-panel .empty-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-3);
  margin-bottom: 12px;
}
.empty-panel .empty-ico .icon { width: 22px; height: 22px; }
.empty-panel strong { font-size: 12.5px; font-weight: 600; }
.empty-panel p { margin-top: 3px; max-width: 280px; color: var(--text-3); font-size: 10.5px; line-height: 1.65; }
.empty-panel .btn { margin-top: 13px; }
.project-list .empty-panel { border-top: 0; }

/* =========================================================
   Module · Duration
   ========================================================= */
.tool-page .page-actions .btn { height: 34px; }
.source-card { margin-bottom: 15px; }
.source-card .section-head { align-items: center; padding-bottom: 11px; }
.source-card .section-body { padding-top: 0; }
.source-card .dropzone.is-wide { min-height: 128px; }
.source-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.folder-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.folder-bar-label { display: flex; align-items: center; gap: 5px; margin-right: 2px; color: var(--text-3); font-size: 9.5px; }
.folder-bar-label .icon { width: 12px; height: 12px; }
.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 9.5px;
  color: var(--text-2);
}
.folder-chip .icon { width: 11px; height: 11px; color: var(--primary); flex: 0 0 auto; }
.folder-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.folder-chip em { font-style: normal; font-family: var(--font-mono); font-size: 8.5px; color: var(--text-3); }
.folder-chip.is-all { background: var(--primary-soft); border-color: transparent; color: var(--primary-ink); }
.folder-chip.is-all .icon { color: currentColor; }

.results-card { overflow: hidden; }
.results-card .section-head { align-items: center; padding-bottom: 11px; }
.tabs { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.tab { height: 26px; padding: 0 9px; border-radius: 6px; font-size: 10px; color: var(--text-3); transition: background .16s, color .16s, box-shadow .16s; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.results-card .table-scroll { max-height: 420px; }
.results-card .table-toolbar { padding-top: 1px; }
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 17px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 9.5px;
}
.table-foot strong { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.table-foot .icon { width: 11px; height: 11px; }
.table-foot span { display: flex; align-items: center; gap: 4px; }
.tool-footnote { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--text-3); font-size: 9.5px; }
.tool-footnote .icon { width: 11px; height: 11px; }

.group-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.group-name .group-dot { width: 4px; height: 16px; border-radius: 3px; background: var(--primary); flex: 0 0 auto; opacity: .8; }
.group-name strong { font-size: 11px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.group-name em { font-style: normal; font-size: 9px; color: var(--text-3); font-family: var(--font-mono); }
.duration-cell { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }

/* =========================================================
   Module · WAV
   ========================================================= */
.wav-layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(310px, .78fr); gap: 15px; align-items: start; }
.wav-main { overflow: hidden; }
.wav-main .section-head { align-items: center; padding-bottom: 11px; }
.wav-main .dropzone.is-wav { min-height: 126px; margin: 0 18px 14px; }
.wav-main .file-queue { margin-top: 2px; }
.wav-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 18px; }
.convert-card { padding: 17px 18px 18px; }
.convert-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.convert-card-title strong { font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.convert-card-title .badge { font-size: 8.5px; }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.format-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.format-opt:hover { border-color: var(--line-strong); }
.format-opt.is-on { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 1px var(--violet) inset; }
.format-opt strong { font-size: 10.5px; font-weight: 650; }
.format-opt span { font-size: 8.5px; color: var(--text-3); }
.format-opt.is-on span { color: var(--violet-ink); }
.convert-card .btn-violet { width: 100%; height: 40px; font-size: 12px; margin-top: 2px; }
.convert-card .btn-violet:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.convert-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--text-3); font-size: 9px; }
.tip-card { padding: 13px 14px; }
.tip-card strong { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 650; margin-bottom: 6px; }
.tip-card strong .icon { width: 13px; height: 13px; color: var(--violet-ink); }
.tip-card ul { display: flex; flex-direction: column; gap: 4px; }
.tip-card li { position: relative; padding-left: 10px; color: var(--text-3); font-size: 9.5px; line-height: 1.6; }
.tip-card li::before { content: ""; position: absolute; left: 0; top: 6px; width: 3px; height: 3px; border-radius: 50%; background: var(--violet); opacity: .65; }
.wav-empty { padding: 26px 18px 28px; text-align: center; border-top: 1px solid var(--line); }
.wav-empty .empty-ico { width: 38px; height: 38px; margin: 0 auto 9px; }
.wav-empty strong { font-size: 11.5px; }
.wav-empty p { margin-top: 2px; color: var(--text-3); font-size: 10px; }

/* Progress over the convert card */
.convert-progress { margin-top: 11px; }
.convert-progress .progress-meta { margin-top: 6px; }
.convert-progress .progress-track i { background: linear-gradient(90deg, var(--violet), #b58cff); }

/* WAV fields */
.wav-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 11px; }
.wav-field { display: flex; flex-direction: column; gap: 5px; }
.wav-field > span { font-size: 9px; font-weight: 600; color: var(--text-3); letter-spacing: .03em; }
.wav-field .select { height: 32px; padding: 0 26px 0 9px; font-size: 10.5px; border-radius: 7px; background-position: right 8px center; }
.convert-card .badge .icon { width: 10px; height: 10px; }
.convert-card .btn-violet .icon { width: 14px; height: 14px; }

/* Queue list */
.wav-queue .queue-file { padding: 10px 17px; }
.wav-queue .queue-file-main p .is-err { color: var(--danger); }
.wav-queue .queue-file-side .mini-progress { width: 52px; }
.wav-queue .queue-file-side .badge { font-size: 8.5px; padding: 2px 6px; }
.wav-queue .queue-file-side .dl-btn { height: 26px; padding: 0 8px; font-size: 9.5px; }
.wav-queue .queue-file-side .dl-btn .icon { width: 12px; height: 12px; }
.wav-queue .queue-file-side .icon-btn.is-danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

.summary-card .btn.w-full { height: 36px; font-size: 11px; margin-top: 0; }
.summary-card .summary-ring { margin-bottom: 2px; }

@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); }
  .project-tags { max-width: 130px; }
  .project-tags .tag:nth-child(n+3) { display: none; }
}
