:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --ink: #12201e;
  --muted: #68716e;
  --surface: #fffaf0;
  --surface-strong: #ffffff;
  --line: #d9d0c1;
  --brand: #12312f;
  --brand-soft: #d8eee4;
  --accent: #bc5b34;
  --accent-soft: #f6dfd2;
  --yellow: #f3c951;
  --green: #3f7f5f;
  --blue: #416d93;
  --shadow: 0 18px 45px rgba(18, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(18, 49, 47, 0.08), transparent 260px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.ghost-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

button:hover,
.ghost-button:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button,
.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.surface .secondary-button {
  border-color: var(--line);
  background: #f2eadc;
  color: var(--brand);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 44px);
  background: var(--brand);
  color: #fff;
}

.eyebrow {
  margin: 0 0 4px;
  color: #cfe3da;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.header-actions,
.button-row,
.task-actions,
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-label {
  display: inline-flex;
  align-items: center;
}

.file-label input {
  display: none;
}

.app-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 22px auto 44px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.tab-button {
  background: rgba(255, 250, 240, 0.78);
  color: var(--brand);
  border: 1px solid var(--line);
}

.tab-button.active {
  background: var(--brand);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(18, 32, 30, 0.05);
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.form-grid h2,
.wide {
  grid-column: 1 / -1;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.preview-box {
  border: 1px dashed #b8ac99;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  padding: 12px;
}

.preview-box ul,
.file-list {
  margin: 0;
  padding-left: 18px;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.task-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(18, 32, 30, 0.08);
}

.task-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.status-pill,
.task-type,
.batch-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill {
  background: var(--brand-soft);
  color: var(--brand);
}

.task-type {
  background: var(--accent-soft);
  color: #813718;
}

.task-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.helper-text {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.subject-line {
  margin: -2px 0 0;
  color: #3f4b48;
  font-size: 0.9rem;
  font-weight: 750;
}

.task-actions button,
.batch-card button {
  min-height: 36px;
  padding: 0 12px;
  background: #f2eadc;
  color: var(--brand);
  border: 1px solid var(--line);
}

.task-actions button.primary-action,
.batch-card button.primary-action {
  background: var(--brand);
  color: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #b8ac99;
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.batch-candidates,
.batch-list {
  display: grid;
  gap: 10px;
}

.candidate-row,
.batch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px;
}

.candidate-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.candidate-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.batch-card {
  display: grid;
  gap: 10px;
}

.batch-status {
  width: fit-content;
  background: #e3eef7;
  color: #244e71;
}

.folder-preview {
  overflow: auto;
  min-height: 260px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #162321;
  color: #edf7ee;
  padding: 16px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .task-list,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions > * {
    flex: 1;
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar label {
    width: 100%;
  }
}

/* Cleaner task cards */
body .task-heading {
  display: grid;
  gap: 4px;
}

body .task-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.18;
}

body .task-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
}

body .task-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 4px;
}

body .task-facts div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.6);
}

body .task-facts dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

body .task-facts dd {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .subject-line {
  display: none;
}

body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 33, 36, 0.28);
  backdrop-filter: blur(10px);
}

body .modal-backdrop[hidden] {
  display: none;
}

body .modal-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: var(--shadow);
  padding: 24px;
}

body .modal-card h2 {
  margin-bottom: 10px;
  font-size: 1.6rem;
}

body .modal-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

body .rename-panel {
  margin-top: 16px;
}

body .rename-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
}

body .rename-summary strong {
  color: var(--brand);
}

body .rename-summary em {
  color: #9b5d20;
  font-style: normal;
  font-weight: 800;
}

body .rename-panel .toolbar label {
  min-width: min(100%, 230px);
}

body #renameArticleInput:not(:placeholder-shown) {
  border-color: rgba(20, 119, 101, 0.58);
}

body .rename-list {
  display: grid;
  gap: 8px;
}

body .rename-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
}

body .rename-row span,
body .rename-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .rename-row span {
  color: var(--muted);
}

body .rename-row strong::before {
  content: none;
}

body .rename-row b {
  margin-right: 6px;
  color: var(--brand);
}

body .rename-row.missing {
  opacity: 0.62;
}

body .candidate-row.blocked {
  grid-template-columns: 24px 1fr;
  color: var(--muted);
}

body .slot-upload {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7efe2;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0 10px;
  white-space: nowrap;
}

body .slot-upload input {
  display: none;
}

@media (max-width: 720px) {
  body .rename-row {
    grid-template-columns: 1fr;
  }
}

/* Tracker-inspired visual pass */
:root {
  --bg: #f3f0e7;
  --ink: #202124;
  --muted: #716d66;
  --surface: #fffdf8;
  --surface-strong: #fffefa;
  --line: #ddd4c6;
  --brand: #147765;
  --brand-dark: #0f5f52;
  --brand-soft: #dff0e8;
  --accent: #147765;
  --accent-soft: #dff0e8;
  --yellow: #f0dca8;
  --shadow: 0 22px 60px rgba(41, 35, 24, 0.11);
}

body {
  background:
    radial-gradient(circle at 92% 12%, rgba(228, 180, 115, 0.24), transparent 30%),
    radial-gradient(circle at 0% 45%, rgba(20, 119, 101, 0.13), transparent 28%),
    linear-gradient(180deg, #f7f4ed 0%, #eeebe2 100%);
}

.splash {
  background: #147765;
  color: #eaf5f1;
}

.splash h1 {
  display: none;
}

.splash-label {
  margin-top: 14px;
  color: #d9eee8;
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
}

.splash-mark {
  grid-template-columns: 1fr;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
}

.splash-mark::before {
  content: "S";
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
}

.splash-mark span {
  display: none;
}

.splash-bar {
  display: none;
}

.app-header {
  position: static;
  width: min(1220px, calc(100% - 28px));
  margin: 34px auto 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
}

.app-header h1 {
  color: var(--ink);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  letter-spacing: 0;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.header-actions .ghost-button,
.header-actions .file-label {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 10px 28px rgba(41, 35, 24, 0.08);
  color: var(--muted);
}

.header-actions [data-tab-shortcut] {
  background: var(--brand);
  color: #fff;
}

.app-shell {
  margin-top: 0;
}

.tabs {
  gap: 0;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 18px 42px rgba(41, 35, 24, 0.08);
}

.tab-button {
  min-height: 58px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 1rem;
}

.tab-button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 32px rgba(20, 119, 101, 0.22);
}

.surface,
.metric,
.task-card,
.candidate-row,
.batch-card,
.empty-state {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 116px;
  padding: 20px;
}

.metric span,
label,
.helper-text {
  color: var(--muted);
}

.metric strong {
  color: var(--ink);
}

.metric::after {
  background: linear-gradient(90deg, rgba(20, 119, 101, 0.5), rgba(224, 188, 113, 0.65));
}

.toolbar {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 12px 28px rgba(41, 35, 24, 0.06);
}

input,
select,
textarea {
  border-color: var(--line);
  background: #fffefa;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(20, 119, 101, 0.75);
  box-shadow: 0 0 0 4px rgba(20, 119, 101, 0.13);
}

button,
.ghost-button {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(20, 119, 101, 0.18);
}

.surface .secondary-button,
.task-actions button,
.batch-card button,
.slug-options button,
.task-actions button.icon-button,
.more-menu summary {
  border-color: var(--line);
  background: #f7efe2;
  color: var(--ink);
  box-shadow: none;
}

.status-pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.task-type {
  background: #f3dda5;
  color: #745516;
}

.workflow-steps li {
  background: rgba(32, 33, 36, 0.045);
}

.workflow-steps li.done span {
  background: var(--brand);
}

.workflow-steps li.current {
  background: rgba(32, 33, 36, 0.08);
}

.workflow-steps li.current span {
  background: var(--ink);
}

.file-details,
.preview-box,
.check-item {
  background: rgba(255, 253, 248, 0.7);
}

.check-dot {
  background: var(--brand);
}

.folder-preview {
  border: 0;
  background: #1d2523;
  color: #eef7f3;
}

@media (max-width: 620px) {
  .app-header {
    width: min(100% - 28px, 1220px);
    margin-top: 22px;
  }

  .tabs {
    top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    min-height: 48px;
  }
}

/* Modern app skin */
:root {
  --bg: #f1f3f1;
  --ink: #111316;
  --muted: #66706d;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(17, 19, 22, 0.11);
  --brand: #101114;
  --brand-soft: #e5f3ec;
  --accent: #2d7d62;
  --accent-soft: #dff3e9;
  --yellow: #efbd47;
  --green: #2d7d62;
  --blue: #446d9b;
  --shadow: 0 22px 70px rgba(17, 19, 22, 0.12);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(45, 125, 98, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f8f5 0%, #eef1ef 100%);
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(45, 125, 98, 0.28), transparent 32%),
    #101114;
  color: #fff;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash h1 {
  font-size: clamp(2rem, 10vw, 4.2rem);
}

.splash-label {
  margin-bottom: 8px;
  color: #afc8be;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.splash-mark {
  display: grid;
  grid-template-columns: repeat(3, 14px);
  gap: 8px;
}

.splash-mark span {
  width: 14px;
  height: 44px;
  border-radius: 999px;
  background: #f2f4ef;
  animation: pulseBar 0.9s ease-in-out infinite alternate;
}

.splash-mark span:nth-child(2) {
  animation-delay: 0.16s;
  background: #2d7d62;
}

.splash-mark span:nth-child(3) {
  animation-delay: 0.32s;
  background: #efbd47;
}

.splash-bar {
  width: min(280px, 72vw);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.splash-bar span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  animation: loadingSlide 1.1s ease-in-out infinite;
}

@keyframes pulseBar {
  from { transform: scaleY(0.58); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes loadingSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(230%); }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 17, 20, 0.94);
  backdrop-filter: blur(18px);
}

.eyebrow {
  color: #b8c7c1;
}

.app-header h1 {
  letter-spacing: 0;
}

button,
.ghost-button,
input,
select,
textarea,
.surface,
.metric,
.task-card,
.candidate-row,
.batch-card,
.empty-state,
.folder-preview {
  border-radius: 8px;
}

button,
.ghost-button {
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(16, 17, 20, 0.12);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.09);
}

.tab-button {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.tab-button.active {
  background: #101114;
}

.surface,
.metric,
.task-card {
  backdrop-filter: blur(18px);
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d7d62, #efbd47);
  opacity: 0.55;
}

.toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(45, 125, 98, 0.8);
  box-shadow: 0 0 0 4px rgba(45, 125, 98, 0.14);
  outline: none;
}

.task-card,
.batch-card,
.candidate-row {
  border-color: rgba(17, 19, 22, 0.09);
}

.status-pill {
  background: var(--accent-soft);
  color: #1d6049;
}

.task-type {
  background: #f8e9c3;
  color: #775014;
}

.file-list li {
  margin: 3px 0;
}

.file-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  padding: 10px 12px;
}

.file-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.file-details[open] summary {
  margin-bottom: 8px;
}

.file-details .file-list {
  max-height: 160px;
  overflow: auto;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 4px 0 2px;
  padding: 0;
  list-style: none;
}

.workflow-steps li {
  min-height: 36px;
  border-radius: 8px;
  background: rgba(17, 19, 22, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.workflow-steps button {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
}

.workflow-steps span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(17, 19, 22, 0.08);
  color: var(--muted);
  font-size: 0.75rem;
}

.workflow-steps li.done span {
  background: var(--accent);
  color: #fff;
}

.workflow-steps li.current {
  background: rgba(17, 19, 22, 0.08);
  color: var(--ink);
}

.workflow-steps li.current button {
  background: transparent;
}

.workflow-steps li.current span {
  background: #101114;
  color: #fff;
}

.slug-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.slug-options button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #f2eadc;
  box-shadow: none;
  color: var(--brand);
  font-size: 0.84rem;
}

.empty-hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.batch-card h3,
.task-card h3 {
  font-size: 1.12rem;
}

.task-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  align-items: center;
  gap: 10px;
}

.task-actions .primary-action {
  width: 100%;
  min-width: 0;
}

.icon-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-left: 0;
}

.task-actions button.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: #f2eadc;
  color: var(--brand);
  box-shadow: none;
}

@media (max-width: 420px) {
  .task-actions {
    grid-template-columns: 1fr;
  }

  .icon-actions {
    justify-content: flex-start;
  }
}

.task-actions button.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.task-actions button.icon-button.danger-action {
  color: #9b2f20;
  background: #f8e4df;
}

.folder-actions {
  margin: 12px 0;
}

.folder-note {
  min-height: 22px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.folder-preview {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    #11181a;
  color: #eff7ef;
  font-size: 0.92rem;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.check-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.check-item.warning .check-dot {
  background: var(--yellow);
  color: #2d2512;
}

.check-item strong {
  display: block;
  margin-bottom: 3px;
}

.check-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1220px);
    margin-top: 14px;
  }

  .tabs {
    position: sticky;
    top: 122px;
    z-index: 4;
    padding: 8px 0;
    background: rgba(241, 243, 241, 0.92);
    backdrop-filter: blur(14px);
  }

  .tab-button {
    min-height: 44px;
    padding: 0 10px;
  }
}

/* Final Tracker theme overrides */
:root {
  --bg: #f3f0e7;
  --ink: #202124;
  --muted: #716d66;
  --surface: #fffdf8;
  --surface-strong: #fffefa;
  --line: #ddd4c6;
  --brand: #147765;
  --brand-dark: #0f5f52;
  --brand-soft: #dff0e8;
  --accent: #147765;
  --accent-soft: #dff0e8;
  --yellow: #f0dca8;
  --shadow: 0 22px 60px rgba(41, 35, 24, 0.11);
}

html body {
  background:
    radial-gradient(circle at 92% 12%, rgba(228, 180, 115, 0.24), transparent 30%),
    radial-gradient(circle at 0% 45%, rgba(20, 119, 101, 0.13), transparent 28%),
    linear-gradient(180deg, #f7f4ed 0%, #eeebe2 100%);
}

body .splash {
  background: #147765;
  color: #eaf5f1;
}

body .splash h1,
body .splash-mark span,
body .splash-bar {
  display: none;
}

body .splash-label {
  margin: 14px 0 0;
  color: #d9eee8;
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
}

body .splash-mark {
  display: grid;
  grid-template-columns: 1fr;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
}

body .splash-mark::before {
  content: "S";
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
}

body .app-header {
  position: static;
  top: auto;
  z-index: auto;
  width: min(1220px, calc(100% - 28px));
  margin: 34px auto 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
}

body .app-header h1 {
  color: var(--ink);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

body .eyebrow {
  color: var(--brand);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

body .header-actions .ghost-button,
body .header-actions .file-label {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 10px 28px rgba(41, 35, 24, 0.08);
  color: var(--muted);
}

body .header-actions [data-tab-shortcut] {
  background: var(--brand);
  color: #fff;
}

body .tabs {
  gap: 0;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 18px 42px rgba(41, 35, 24, 0.08);
}

body .tab-button {
  min-height: 58px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 1rem;
}

body .tab-button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 32px rgba(20, 119, 101, 0.22);
}

body button,
body .ghost-button {
  background: var(--brand);
  color: #fff;
}

body .surface,
body .metric,
body .task-card,
body .candidate-row,
body .batch-card,
body .empty-state {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

body .metric::after {
  background: linear-gradient(90deg, rgba(20, 119, 101, 0.5), rgba(224, 188, 113, 0.65));
}

body .status-pill,
body .workflow-steps li.done span,
body .check-dot {
  background: var(--brand);
  color: #fff;
}

body .status-pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

body .workflow-steps li.current span {
  background: var(--ink);
}

body .task-type {
  background: #f3dda5;
  color: #745516;
}

body .folder-preview {
  border: 0;
  background: #1d2523;
  color: #eef7f3;
}

@media (max-width: 620px) {
  body .app-header {
    width: min(100% - 28px, 1220px);
    margin-top: 22px;
  }

  body .tabs {
    top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Workflow dashboard */
body .today-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 119, 101, 0.12), rgba(240, 220, 168, 0.32)),
    rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

body .today-hero h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.05;
}

body .today-hero .eyebrow {
  margin-bottom: 6px;
}

body .workflow-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body .workflow-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 112px;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

body .view-toggle {
  display: inline-flex;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  padding: 3px;
}

body .view-toggle button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0 10px;
}

body .view-toggle button.active {
  background: var(--brand);
  color: #fff;
}

body .search-trigger {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--muted);
  box-shadow: none;
  padding: 0 16px;
}

body .focus-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

body .focus-bar button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 10px 26px rgba(41, 35, 24, 0.06);
  color: var(--muted);
  padding: 0 12px;
}

body .focus-bar button.active {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
}

body .focus-bar span {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .focus-bar strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(20, 119, 101, 0.12);
  color: var(--brand-dark);
  font-size: 0.82rem;
}

body .focus-bar button.active strong {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body .workflow-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.52);
  padding: 12px;
}

body .lane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body .lane-heading h2 {
  margin: 0;
  font-size: 1rem;
}

body .lane-heading span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

body .lane-list {
  display: grid;
  gap: 10px;
}

body .lane-more {
  width: 100%;
  min-height: 40px;
  border: 1px dashed var(--line);
  background: rgba(255, 253, 248, 0.74);
  box-shadow: none;
  color: var(--brand);
}

body .lane-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 14px;
}

body .workflow-board .task-card {
  cursor: pointer;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(41, 35, 24, 0.08);
}

body .workflow-board .task-card:hover {
  border-color: rgba(20, 119, 101, 0.28);
  transform: translateY(-1px);
}

body .workflow-board .task-card .task-facts,
body .workflow-board .task-card .workflow-steps,
body .workflow-board .task-card .file-details,
body .workflow-board .task-card .task-actions {
  display: none;
}

body .workflow-board .task-heading h3 {
  font-size: 1rem;
}

body .workflow-board .task-heading p {
  font-size: 0.86rem;
}

body .focused-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body .task-card.is-highlighted {
  border-color: rgba(20, 119, 101, 0.58);
  box-shadow: 0 20px 52px rgba(20, 119, 101, 0.16);
}

body .task-card.is-highlighted::before {
  content: "Geselecteerd";
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 9px;
}

body .list-mode.workflow-board,
body .list-mode.focused-list {
  display: grid;
  grid-template-columns: 1fr;
}

body .task-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 34px rgba(41, 35, 24, 0.08);
}

body .task-table-head,
body .task-row {
  display: grid;
  grid-template-columns: 140px minmax(240px, 1.4fr) 110px 140px 160px minmax(250px, auto);
  gap: 16px;
  align-items: center;
}

body .task-table-head {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 237, 0.82);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 16px;
  text-transform: uppercase;
}

body .task-table-body {
  display: grid;
}

body .task-row {
  min-height: 58px;
  border-bottom: 1px solid rgba(17, 19, 22, 0.08);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 16px;
}

body .task-row:last-child {
  border-bottom: 0;
}

body .task-row:hover {
  background: rgba(223, 240, 232, 0.28);
}

body .task-row > strong {
  overflow: hidden;
  color: var(--brand);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .task-row span:not(.row-actions) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body .task-row b,
body .task-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .task-row b {
  font-size: 0.94rem;
}

body .task-row small,
body .task-row time,
body .task-row em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 750;
}

body .task-row mark {
  width: fit-content;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 5px 9px;
}

body .task-row.needs-article > strong {
  color: #9b2f20;
}

body .task-row.is-highlighted {
  background: rgba(223, 240, 232, 0.48);
  box-shadow: inset 3px 0 0 var(--brand);
}

body .row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

body .row-actions .primary-action {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

body .row-actions .icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: #f2eadc;
  color: var(--brand);
  box-shadow: none;
}

body .row-actions .icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body .row-actions .danger-action {
  color: #9b2f20;
  background: #f8e4df;
}

body .list-mode .workflow-lane {
  padding: 10px;
}

body .list-mode .lane-list {
  gap: 4px;
}

body .list-mode .task-card {
  grid-template-columns: minmax(240px, 1.7fr) minmax(96px, 0.55fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 10px;
  box-shadow: none;
}

body .list-mode .task-card .task-topline {
  justify-content: start;
}

body .list-mode .task-card .status-pill,
body .list-mode .task-card .task-type {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.72rem;
}

body .list-mode .task-card .task-heading h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .list-mode .task-card .task-heading p {
  font-size: 0.8rem;
}

body .list-mode .task-card .task-facts {
  display: block;
}

body .list-mode .task-card .task-facts div {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
}

body .list-mode .task-card .task-facts div:first-child {
  display: block;
}

body .list-mode .task-card .task-facts dt {
  display: none;
}

body .list-mode .task-card .task-facts dd {
  font-size: 0.88rem;
  font-weight: 850;
}

body .list-mode .task-card .workflow-steps,
body .list-mode .task-card .file-details {
  display: none;
}

body .list-mode .task-card .task-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

body .list-mode .task-card .primary-action {
  min-height: 34px;
  padding: 0 12px;
  width: auto;
  font-size: 0.86rem;
  white-space: nowrap;
}

body .list-mode .task-card .icon-actions {
  gap: 4px;
}

body .list-mode .task-card .icon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}

body .list-mode .task-card .icon-button svg {
  width: 16px;
  height: 16px;
}

body .list-mode .task-card.is-preview .task-facts,
body .list-mode .task-card.is-preview .task-actions {
  display: none;
}

body .warning-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  border-radius: 999px;
  background: #f8e4df;
  color: #9b2f20;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0 8px;
  vertical-align: middle;
}

body .task-card.needs-article {
  border-color: rgba(155, 47, 32, 0.22);
}

body .secondary-button,
body .modal-card .secondary-button,
body .surface .secondary-button {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--brand);
  box-shadow: none;
}

@media (max-width: 1100px) {
  body .workflow-board,
  body .focused-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .focus-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body .today-hero {
    align-items: stretch;
    flex-direction: column;
  }

  body .workflow-board,
  body .focused-list {
    grid-template-columns: 1fr;
  }

  body .workflow-toolbar {
    grid-template-columns: 1fr;
  }

  body .focus-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Quieter dashboard pass */
body .app-header {
  margin-top: 22px;
  margin-bottom: 16px;
}

body .app-header h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.7rem);
}

body .tabs {
  margin-bottom: 16px;
}

body .tab-button {
  min-height: 48px;
}

body #dashboardPanel .metric-grid {
  display: none;
}

body .today-hero {
  min-height: 0;
  margin-bottom: 12px;
  padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(41, 35, 24, 0.07);
}

body .today-hero h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

body .today-hero button {
  min-height: 42px;
  padding-inline: 16px;
}

body .focus-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 0;
  padding-bottom: 2px;
}

body .focus-bar button {
  flex: 0 0 auto;
  justify-content: center;
  min-height: 38px;
  min-width: 0;
  border-radius: 999px;
  box-shadow: none;
  padding: 0 10px 0 14px;
}

body .focus-bar span {
  max-width: 118px;
  font-size: 0.82rem;
}

body .focus-bar strong {
  min-width: 24px;
  height: 24px;
  font-size: 0.76rem;
}

body .workflow-lane {
  box-shadow: none;
  background: rgba(255, 253, 248, 0.36);
}

body .search-backdrop {
  align-items: start;
  padding-top: min(12vh, 90px);
  background: rgba(36, 34, 29, 0.28);
}

body .search-card {
  display: grid;
  gap: 16px;
  width: min(760px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 28px 90px rgba(32, 25, 16, 0.2);
  padding: 22px;
}

body .search-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

body .search-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

body .search-card .icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 0 3px;
}

body #modalSearchInput {
  min-height: 58px;
  border-radius: 999px;
  font-size: 1.1rem;
  padding-inline: 22px;
}

body .search-results {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 460px);
  overflow: auto;
}

body .search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  color: var(--ink);
  padding: 10px 14px;
  text-align: left;
}

body .search-result:hover {
  border-color: rgba(20, 119, 101, 0.36);
  background: #fffefa;
}

body .search-result span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body .search-result strong,
body .search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .search-result small,
body .search-result em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 750;
}

body .search-result em {
  flex: 0 0 auto;
}

body .auth-backdrop {
  background: rgba(36, 34, 29, 0.34);
}

body .auth-card {
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 28px 90px rgba(32, 25, 16, 0.2);
  padding: 24px;
}

body .auth-card h2 {
  margin: 0;
  font-size: 2rem;
}

body .auth-card p:not(.eyebrow) {
  margin-bottom: 4px;
  color: var(--muted);
}

body .auth-card button {
  margin-top: 4px;
}

@media (max-width: 720px) {
  body .workflow-toolbar {
    grid-template-columns: 1fr;
  }

  body .view-toggle {
    width: fit-content;
  }

  body .list-mode .task-card {
    grid-template-columns: 1fr;
  }

  body .task-table {
    overflow-x: auto;
  }

  body .task-table-head,
  body .task-row {
    min-width: 940px;
  }
}
