/* ── Dispatch — Global Polish ── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --surface: #f7f7f5;
  --ink: #111;
  --ink-muted: #888;
  --ink-faint: #bbb;
  --card: #fff;
  --border: #e8e8e5;
  --accent: #111;
  --accent-hover: #333;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── Page entrance ── */
@keyframes enterUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

main { animation: enterUp 0.4s ease both; }

/* ── Nav refinement ── */
nav a, nav button, nav strong {
  transition: color 0.2s, opacity 0.2s;
}
nav img {
  transition: opacity 0.2s;
}
nav img:hover {
  opacity: 0.8;
}

/* ── Cards ── */
.dispatch-block,
a[class*="block bg-white"],
div[class*="bg-white border border-gray-200 rounded-lg"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a[class*="block bg-white"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ── Buttons ── */
button, a[class*="bg-blue-600"], a[class*="bg-black"],
input[type="submit"], .login-btn {
  transition: all 0.2s ease;
}

a[class*="bg-blue-600"]:hover, button[class*="bg-blue-600"]:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ── Inputs ── */
input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
select, textarea {
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Status badges ── */
span[class*="rounded-full"] {
  letter-spacing: 0.02em;
}

/* ── Tech header bars ── */
div[class*="bg-gray-900 text-white"] {
  letter-spacing: 0.01em;
}

/* ── Task items ── */
.task-item {
  transition: border-color 0.15s, background 0.15s;
}
.task-item:hover {
  border-color: #d0d0cd;
}

/* ── Sticky action bar ── */
.action-bar {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.06), 0 -8px 24px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease both;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.action-btn-primary {
  background: #fff;
  color: #000;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.action-btn-primary:hover { opacity: 0.88; transform: translateY(-0.5px); }

.action-btn-outline {
  background: transparent;
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.action-btn-outline:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }

.action-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.5);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.action-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.15); }

/* ── 44 Audio components ── */
fortyfour-recorder {
  --fortyfour-recorder-font-family: 'DM Sans', sans-serif;
  --fortyfour-recorder-font-size: 13px;
  --fortyfour-recorder-accent: #111;
  --fortyfour-recorder-background: #fff;
  --fortyfour-recorder-text: #111;
  --fortyfour-recorder-muted: #888;
  --fortyfour-recorder-border: #e0e0e0;
  --fortyfour-recorder-waveform-progress: #111;
}
fortyfour-recorder::part(button) {
  border-radius: 6px;
}
fortyfour-recorder::part(select) {
  border-radius: 6px;
}

fortyfour-player {
  --fortyfour-player-font-family: 'DM Sans', sans-serif;
  --fortyfour-player-font-size: 13px;
  --fortyfour-player-accent: #111;
  --fortyfour-player-background: #fff;
  --fortyfour-player-surface: #f4f4f2;
  --fortyfour-player-text: #111;
  --fortyfour-player-muted: #888;
  --fortyfour-player-border: #e0e0e0;
}

fortyfour-mini-player {
  --fortyfour-mini-player-accent: #111;
  --fortyfour-mini-player-background: #fff;
}

/* ── Collapse chevron ── */
.rotate-chevron-collapsed { transform: rotate(-90deg); }

/* ── Drag ghost ── */
.sortable-ghost {
  opacity: 0.3;
}
.drag-handle {
  transition: color 0.15s;
}

/* ── Stagger children in dispatch index ── */
.space-y-2 > a, .space-y-6 > div {
  animation: enterUp 0.35s ease both;
}
.space-y-2 > a:nth-child(1), .space-y-6 > div:nth-child(1) { animation-delay: 0s; }
.space-y-2 > a:nth-child(2), .space-y-6 > div:nth-child(2) { animation-delay: 0.04s; }
.space-y-2 > a:nth-child(3), .space-y-6 > div:nth-child(3) { animation-delay: 0.08s; }
.space-y-2 > a:nth-child(4), .space-y-6 > div:nth-child(4) { animation-delay: 0.12s; }
.space-y-2 > a:nth-child(5), .space-y-6 > div:nth-child(5) { animation-delay: 0.16s; }
.space-y-2 > a:nth-child(6), .space-y-6 > div:nth-child(6) { animation-delay: 0.2s; }
.space-y-2 > a:nth-child(n+7), .space-y-6 > div:nth-child(n+7) { animation-delay: 0.24s; }

/* ── Dividers ── */
.divide-y > div {
  transition: background 0.15s;
}
.divide-y > div:hover {
  background: rgba(0,0,0,0.01);
}

/* ── Flash messages ── */
.flash-auto-hide {
  animation: enterUp 0.3s ease both;
}

/* ── Tables ── */
table { border-spacing: 0; }
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(0,0,0,0.015);
}

/* ── Scrollbar (subtle) ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0cd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }
