/* direction-a.css — r2 Education admin (Slack-like) */
.dirA {
  --rail-w: 280px;
  display: flex; flex-direction: column;
  width: 100%; min-height: 100vh; background: var(--bg); color: var(--fg);
  overflow: hidden;
  font-family: var(--font-body);
}

/* ---------- Top ---------- */
.dirA-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 2px solid var(--fg);
  background: var(--bg); gap: 16px;
}
.dirA-brand { display: flex; align-items: baseline; gap: 0; flex: 0 1 auto; min-width: 0; }
.brand-wordmark {
  font-family: var(--font-display); font-size: 28px; line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap; flex: 0 0 auto;
  background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer;
  color: inherit; font-weight: inherit;
  transition: opacity 140ms ease;
}
.brand-wordmark:hover { opacity: 0.65; }
.brand-wordmark:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.brand-wordmark .a { font-variation-settings: 'wdth' 100, 'wght' 800; }
.brand-wordmark .b { font-variation-settings: 'wdth' 75,  'wght' 800; letter-spacing: -0.04em; }
.brand-wordmark .d { font-variation-settings: 'wdth' 100, 'wght' 200; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1.5px solid var(--fg); background: var(--bg);
  width: 100%; max-width: 320px; min-width: 0; flex: 1 1 0;
}
.searchbox input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 13px; font-weight: 300;
}
.searchpop {
  position: absolute; top: calc(100% + 6px); right: 0; width: 360px; max-height: 400px; overflow: auto;
  background: var(--bg); border: 2px solid var(--fg); box-shadow: 4px 4px 0 var(--fg); z-index: 30;
}
.searchpop-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; background: transparent; border: 0; border-top: 1px solid var(--border-soft);
  text-align: left; font-size: 13px;
}
.searchpop-row:hover { background: var(--botf-sand); }

/* ---------- Body layout ---------- */
.dirA-body { display: grid; grid-template-columns: var(--rail-w) 1fr; flex: 1; min-height: 0; }

/* ---------- Sidebar ---------- */
.dirA-sidebar {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 2px solid var(--fg); background: var(--bg);
}
.dirA-rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
}
.dirA-clientlist { list-style: none; margin: 0; padding: 8px 0; flex: 1; overflow: auto; }
.dirA-clientrow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 18px; background: transparent; border: 0; text-align: left;
  border-left: 3px solid transparent;
  transition: all 140ms var(--ease-out);
}
.dirA-clientrow:hover { background: var(--botf-sand); }
.dirA-clientrow.active { background: var(--fg); color: var(--bg); border-left-color: var(--accent); }
.dirA-clientrow.active .kicker { color: rgba(248,246,241,0.65); }
.dirA-clientrow.active .mono-avatar { background: var(--bg); }
.dirA-clientrow-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; }
.dirA-flag {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
}
.dirA-rail-foot { padding: 14px 18px; border-top: 1px solid var(--border-soft); }

/* ---------- Main ---------- */
.dirA-main { display: flex; flex-direction: column; min-height: 0; overflow: auto; }

/* ---------- Client header ---------- */
.dirA-clienthead {
  padding: 36px 48px 28px; border-bottom: 2px solid var(--fg);
}
.dirA-clienthead-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px;
}
.dirA-clientname {
  font-family: var(--font-display); font-size: 96px; line-height: 0.88;
  letter-spacing: -0.04em; margin: 0 0 18px;
  font-weight: 800;
  font-variation-settings: 'wdth' 100, 'wght' 800, 'opsz' 96;
}

.dirA-clientmeta {
  display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 18px;
  font-size: 13px; color: var(--fg-muted); font-weight: 300;
}
.dirA-clientmeta span { display: inline-flex; align-items: center; gap: 6px; }
.dirA-clientsummary {
  font-size: 17px; line-height: 1.55; font-weight: 300; color: var(--fg);
  max-width: 68ch; margin: 0 0 24px;
}
.dirA-stat-row {
  display: flex; gap: 0; border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft); padding: 16px 0;
}
.dirA-stat { padding: 0 28px 0 0; margin-right: 28px; border-right: 1px solid var(--border-soft); }
.dirA-stat:last-child { border-right: 0; }
.dirA-stat-val {
  font-family: var(--font-display); font-size: 34px; font-weight: 800;
  line-height: 1; margin-bottom: 4px;
  font-variation-settings: 'wdth' 100, 'wght' 800;
}
.dirA-stat-val.accent { color: var(--accent); }

/* ---------- Stream controls ---------- */
.dirA-stream-controls {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 48px 12px;
}

/* ---------- Pinned-from-scratch section on client stream ---------- */
.dirA-stream .client-pinned-section {
  border-top: 1px solid var(--border-soft);
  padding: 28px 48px 32px;
  background: rgba(234, 229, 218, 0.35);
}
.dirA-stream .client-pinned-section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 16px;
}
.dirA-stream .client-pinned-section-head .eyebrow {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--fg);
}
.dirA-stream .client-pinned-section-head .kicker.dim { color: var(--muted); }
.dirA-stream .client-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}
.dirA-filters { display: flex; gap: 4px; }
.dirA-filter {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 12px; border: 1.5px solid transparent; background: transparent;
  color: var(--fg-muted); cursor: pointer;
}
.dirA-filter:hover { color: var(--fg); }
.dirA-filter.active { border-color: var(--fg); color: var(--fg); }

/* ---------- Deliverables list ---------- */
.dirA-deliverables { list-style: none; margin: 0; padding: 0 48px 64px; }
.dirA-empty {
  padding: 28px 0; color: var(--fg-subtle); font-size: 14px;
  border-top: 1px solid var(--border-soft);
}
.dirA-deliverable {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 20px;
  padding: 18px 0; border-top: 1px solid var(--border-soft);
  transition: padding 140ms var(--ease-out);
}
.dirA-deliverable:last-child { border-bottom: 1px solid var(--border-soft); }
.dirA-deliverable:hover { padding-left: 8px; }
.dirA-deliverable-status { background: transparent; border: 0; padding: 0; cursor: pointer; }

.dirA-deliverable-main {
  background: transparent; border: 0; padding: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.dirA-deliverable-title {
  font-family: var(--font-body); font-size: 17px; font-weight: 400;
  font-variation-settings: 'wdth' 100, 'wght' 420;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 8px;
}
.dirA-deliverable-meta {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.dirA-deliverable-meta .kicker { display: inline-flex; align-items: center; gap: 4px; }

.dirA-deliverable-side {
  display: flex; align-items: center; gap: 12px;
}

/* ---------- Detail slide-over ---------- */
.dirA-detail {
  background: var(--bg); border-left: 2px solid var(--fg);
  width: min(680px, 92vw); height: 100%;
  margin-left: auto; margin-right: 0;
  display: flex; flex-direction: column;
  animation: slideFromRight 260ms var(--ease-out);
  position: fixed; right: 0; top: 0; bottom: 0;
  box-shadow: -8px 0 0 rgba(26,26,26,0.04);
}
@keyframes slideFromRight { from { transform: translateX(40px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
.dirA-detail header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 28px 32px 20px; border-bottom: 2px solid var(--fg);
}
.dirA-detail-body {
  padding: 24px 32px 64px; overflow: auto; flex: 1;
  display: flex; flex-direction: column; gap: 24px;
}
.dirA-detail-row {
  display: grid; grid-template-columns: 100px 1fr; gap: 20px; align-items: center;
  margin-bottom: 18px;
}
.dirA-detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 32px;
  padding: 16px 0; border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.dirA-detail-grid > div { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dirA-detail-grid .hours-cell-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dirA-detail-grid .hours-cell-row .kicker.dim { font-size: 11px; color: var(--fg-subtle); }

/* ---------- Empty home ---------- */
.dirA-emptyhome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 64px;
}

/* ---------- SW update toast ---------- */
.sw-update-toast {
  position: fixed;
  top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--botf-ink, #1A1A1A);
  color: var(--botf-bone, #F1F1F1);
  padding: 10px 12px 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  animation: sw-toast-in 220ms var(--ease-out, cubic-bezier(0.16,1,0.3,1));
}
@keyframes sw-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sw-update-toast-text {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.sw-update-toast-reload {
  font: inherit; font-size: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  background: var(--botf-toast, #C9B894);
  color: var(--botf-ink, #1A1A1A);
  border: 0; border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: opacity 120ms ease;
}
.sw-update-toast-reload:hover { opacity: 0.85; }
.sw-update-toast-dismiss {
  font: inherit; font-size: 18px; line-height: 1;
  background: transparent; border: 0;
  color: var(--botf-bone, #F1F1F1);
  opacity: 0.6; cursor: pointer; padding: 0 2px;
}
.sw-update-toast-dismiss:hover { opacity: 1; }
@media (max-width: 720px) {
  /* On mobile sit above the bottom tab bar, matching the undo toast position */
  .sw-update-toast { top: auto; bottom: 88px; right: 14px; left: 14px; }
}

/* ---------- Card detail: description ---------- */
.dirA-description {
  width: 100%;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg-soft, #F0EDE6);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.dirA-description:focus {
  outline: none;
  border-color: var(--fg);
}
.dirA-description::placeholder { color: var(--fg-subtle); }

/* ---------- Card detail: checklist ---------- */
.dirA-checklist {
  list-style: none;
  padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.dirA-checklist-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 120ms;
}
.dirA-checklist-item:hover { background: var(--bg-soft, rgba(0,0,0,0.03)); }
.dirA-checklist-item input[type="checkbox"] {
  width: 15px; height: 15px; flex-shrink: 0; cursor: pointer;
  accent-color: var(--fg);
}
.dirA-checklist-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
  outline: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s;
  min-width: 0;
}
.dirA-checklist-text:focus { border-bottom-color: var(--border-soft); }
.dirA-checklist-item.done .dirA-checklist-text {
  text-decoration: line-through;
  color: var(--fg-muted);
}
.dirA-checklist-del {
  font-size: 16px; line-height: 1;
  background: transparent; border: 0;
  color: var(--fg-subtle); cursor: pointer;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}
.dirA-checklist-item:hover .dirA-checklist-del { opacity: 1; }
.dirA-checklist-del:hover { background: var(--bg-soft); color: var(--accent); }

.dirA-checklist-add {
  display: flex; gap: 8px; align-items: center;
}
.dirA-checklist-input {
  flex: 1;
  font: inherit; font-size: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 7px 10px;
  background: transparent;
  color: var(--fg);
  transition: border-color 0.15s;
}
.dirA-checklist-input:focus {
  outline: none;
  border-color: var(--fg);
}
.dirA-checklist-input::placeholder { color: var(--fg-subtle); }

/* ---------- Card detail: client link selector ---------- */
.dirA-client-select {
  font: inherit; font-size: 13px;
  border: 1.5px dashed var(--border-soft);
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.dirA-client-select:focus { outline: none; border-color: var(--fg); }
