/* ─────────────────────────────────────────────────────────────
   Digital Rain — Brand tokens (from style guide)
   ──────────────────────────────────────────────────────────── */
:root {
  /* Primary */
  --rain-magenta:    #F40AAD;
  --signal-orange:   #FB9308;
  --stroke-magenta:  #E80D9C;

  /* Neutrals */
  --ink:        #111111;
  --graphite:   #6B6B6B;
  --stone:      #E6E6E6;
  --bone:       #FAFAFA;
  --white:      #FFFFFF;

  /* Brand gradient */
  --brand-gradient: linear-gradient(90deg, #F40AAD 0%, #FB9308 100%);

  /* Subtle tints used for surfaces */
  --magenta-tint-08:  rgba(244, 10, 173, 0.08);
  --magenta-tint-14:  rgba(244, 10, 173, 0.14);
  --orange-tint-10:   rgba(251, 147, 8, 0.10);
}

/* ─────────────────────────────────────────────────────────────
   Page & typography baseline
   ──────────────────────────────────────────────────────────── */
html, body {
  background: var(--bone);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { letter-spacing: -0.005em; }

/* Override Tailwind slate defaults to brand neutrals where they appear */
.bg-slate-50            { background-color: var(--bone) !important; }
.bg-slate-50\/50,
.bg-slate-50\/40        { background-color: var(--bone) !important; }
.bg-slate-100           { background-color: #F2F2F2 !important; }
.text-slate-800         { color: var(--ink) !important; }
.text-slate-700         { color: #2A2A2A !important; }
.text-slate-600         { color: #444 !important; }
.text-slate-500         { color: var(--graphite) !important; }
.text-slate-400         { color: #9A9A9A !important; }
.border-slate-200       { border-color: var(--stone) !important; }
.border-slate-100       { border-color: #EFEFEF !important; }
.border-slate-300       { border-color: var(--stone) !important; }

/* Brand mark utility */
.brand-gradient-bg { background: var(--brand-gradient); }
.brand-gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   Workflow strip
   ──────────────────────────────────────────────────────────── */
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--stone);
  background: var(--white);
  min-width: 152px;
  position: relative;
  flex-shrink: 0;
}
.flow-step.flow-pending {
  background: var(--bone);
  border-style: dashed;
  border-color: var(--stone);
  color: var(--graphite);
}
/* "live & wired" — the one place the brand gradient still lives, tucked inside the
   "How it works" drawer. Everywhere else: solid colors with a clear hierarchy. */
.flow-step.flow-on {
  background: var(--brand-gradient);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(244, 10, 173, 0.18);
}
.flow-icon  { font-size: 18px; line-height: 1; margin-bottom: 4px; }
.flow-label { font-size: 11px; font-weight: 700; line-height: 1.25; letter-spacing: 0.1px; }
.flow-annot { font-size: 9px; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.72; font-weight: 600; }
.flow-arrow { color: var(--stone); font-size: 16px; flex-shrink: 0; padding: 0 4px; }

/* ─────────────────────────────────────────────────────────────
   Brand CTA button
   ──────────────────────────────────────────────────────────── */
/* Primary action — solid fuchsia. The ONE hot button on screen (Run agent).
   Gradient retired from buttons per 2026-06-09 design review: "a little goes a long way." */
.btn-brand {
  background: var(--rain-magenta);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(244, 10, 173, 0.25);
  transition: filter 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn-brand:hover    { filter: brightness(1.06); box-shadow: 0 6px 18px rgba(244, 10, 173, 0.32); }
.btn-brand:active   { transform: translateY(1px); }
.btn-brand:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Secondary action — papaya (Paste a transcript). Visibly subordinate to the fuchsia primary. */
.btn-papaya {
  background: var(--signal-orange);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(251, 147, 8, 0.22);
  transition: filter 0.15s, transform 0.05s;
}
.btn-papaya:hover  { filter: brightness(1.05); }
.btn-papaya:active { transform: translateY(1px); }

.btn-magenta {
  background: var(--rain-magenta);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-magenta:hover { filter: brightness(1.06); }

.btn-orange-chip {
  background: var(--signal-orange);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s;
}
.btn-orange-chip:hover { filter: brightness(1.04); }

.btn-outline {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--stone);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-outline:hover { border-color: var(--stroke-magenta); background: var(--magenta-tint-08); }

.dest-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--graphite);
}
.dest-select {
  border: 1px solid var(--stone); border-radius: 8px; background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--ink); padding: 7px 8px;
  max-width: 220px;
}
.dest-select:focus { outline: 2px solid var(--stroke-magenta); outline-offset: 1px; }

/* ─────────────────────────────────────────────────────────────
   Status log
   ──────────────────────────────────────────────────────────── */
.status-step.active::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rain-magenta);
  margin-right: 8px;
  animation: blink 1s infinite;
  vertical-align: middle;
  box-shadow: 0 0 0 4px var(--magenta-tint-14);
}
.status-step.done::before {
  content: "✓";
  color: var(--rain-magenta);
  margin-right: 8px;
  font-weight: 800;
  vertical-align: middle;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ─────────────────────────────────────────────────────────────
   Task cards
   ──────────────────────────────────────────────────────────── */
.task-card {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 10px;
  animation: slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.task-card:hover {
  border-color: var(--stroke-magenta);
  box-shadow: 0 6px 18px rgba(244, 10, 173, 0.10);
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Confidence badges — semantic, brand-harmonized */
.conf-high { background: var(--orange-tint-10); color: #8A4A00; border: 1px solid rgba(251, 147, 8, 0.3); }
.conf-med  { background: #FEF3C7; color: #92400E; }
.conf-low  { background: #F2F2F2; color: var(--graphite); }

/* Priority dots */
.prio-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.prio-1 { background: var(--rain-magenta); }
.prio-2 { background: var(--signal-orange); }
.prio-3 { background: #C9A227; }
.prio-4 { background: #B0B0B0; }

/* Task action buttons (per-row) */
.task-action {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--stone);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.task-action.approve { color: var(--ink); }
.task-action.approve:hover { background: var(--orange-tint-10); border-color: var(--signal-orange); }
.task-action.edit:hover    { background: #F2F2F2; }
.task-action.reject:hover  { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.task-action.save   { background: var(--rain-magenta); color: var(--white); border-color: var(--rain-magenta); }
.task-action.save:hover { filter: brightness(1.06); }
.task-action.cancel:hover { background: #F2F2F2; }

/* Approved / rejected card states */
.task-card.is-approved {
  border-color: var(--signal-orange);
  background: linear-gradient(0deg, var(--orange-tint-10), var(--orange-tint-10)), var(--white);
}
.task-card.is-rejected { opacity: 0.5; }
.task-card.is-rejected .font-bold { text-decoration: line-through; }

.status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-pill.approved { background: var(--signal-orange); color: var(--ink); }
.status-pill.rejected { background: #FEE2E2; color: #991B1B; }

/* Inline edit fields */
.edit-field { display: flex; flex-direction: column; gap: 3px; }
.edit-field > span {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--graphite);
}
.edit-field input, .edit-field textarea, .edit-field select {
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--stone);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
  font-family: inherit;
}
.edit-field input:focus, .edit-field textarea:focus, .edit-field select:focus {
  outline: none; border-color: var(--stroke-magenta); box-shadow: 0 0 0 3px var(--magenta-tint-08);
}

/* Paste-transcript modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17, 17, 17, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
  animation: fade-in 0.15s ease both;
}
.modal-overlay.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--white);
  border-radius: 14px;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: slide-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--stone);
}
.modal-x {
  font-size: 22px; line-height: 1; color: var(--graphite);
  background: none; border: 0; cursor: pointer; padding: 0 4px;
}
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 18px 20px; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--stone); background: var(--bone);
  border-radius: 0 0 14px 14px;
}
.modal-body textarea { font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif; line-height: 1.5; }
.upload-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.upload-label { display: inline-flex; align-items: center; cursor: pointer; }
.upload-status { font-size: 11px; color: var(--graphite); }

/* Push results */
.push-results {
  border: 1px solid var(--stone);
  border-radius: 10px;
  background: var(--bone);
  padding: 10px 12px;
  margin-bottom: 8px;
  animation: slide-in 0.3s ease both;
}
.pr-head { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-tag { font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.5px; }
.pr-tag.pr-live { background: var(--rain-magenta); color: var(--white); }
.pr-tag.pr-dry  { background: #F2F2F2; color: var(--graphite); border: 1px solid var(--stone); }
.pr-head.pr-fail { color: #991B1B; }
.pr-list { list-style: none; margin: 0; padding: 0; }
.pr-row { font-size: 11px; padding: 3px 0; border-top: 1px solid #EFEFEF; }
.pr-row.pr-ok { color: #1F6B2E; }
.pr-row.pr-fail { color: #991B1B; }
.pr-row a { color: var(--stroke-magenta); font-weight: 600; }
.pr-note { font-size: 10px; color: var(--graphite); margin-top: 6px; }
.pr-done {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--stone);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.pr-done-msg { font-size: 11px; font-weight: 600; color: #1F6B2E; }
.pr-note code { background: #F2F2F2; padding: 1px 4px; border-radius: 4px; }

/* ─────────────────────────────────────────────────────────────
   Source quote highlight
   ──────────────────────────────────────────────────────────── */
.quote-highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(251, 147, 8, 0.55) 60%);
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
  animation: pulse-quote 1.6s ease-out;
}
@keyframes pulse-quote {
  0%   { background: linear-gradient(180deg, transparent 60%, rgba(251, 147, 8, 0.95) 60%); box-shadow: 0 0 0 4px rgba(251, 147, 8, 0.28); }
  100% { background: linear-gradient(180deg, transparent 60%, rgba(251, 147, 8, 0.55) 60%); box-shadow: 0 0 0 0  rgba(251, 147, 8, 0); }
}

/* ─────────────────────────────────────────────────────────────
   Transcript & summary polish
   ──────────────────────────────────────────────────────────── */
#meeting-summary h2 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#meeting-summary ul { list-style: disc; padding-left: 1.1rem; margin-bottom: 0.5rem; }
#meeting-summary li { margin-bottom: 0.2rem; color: var(--ink); }

.transcript-line { margin-bottom: 0.55rem; line-height: 1.5; }
.transcript-line .speaker {
  font-weight: 700;
  color: var(--rain-magenta);
}

/* ─────────────────────────────────────────────────────────────
   Section header / panel chrome
   ──────────────────────────────────────────────────────────── */
.panel {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 12px;
  overflow: hidden;
}
.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--stone);
  background: var(--bone);
}
.panel-eyebrow {
  font-size: 10px;
  font-weight: 800;
  color: var(--graphite);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Brand mark — Digital Rain droplet + pixel squares, from the client's logo */
.brand-droplet {
  width: 32px; height: 32px;
  fill: var(--rain-magenta);
  flex-shrink: 0;
}
.brand-wordmark {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.1;
}
.wm-digital { color: var(--ink); }
.wm-rain    { color: var(--rain-magenta); }

/* "Load a sample meeting" link in the first-run empty state */
.link-sample {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--stroke-magenta);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-sample:hover { color: var(--rain-magenta); }

/* Usage page */
.usage-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { .usage-cards { grid-template-columns: repeat(2, 1fr); } }
.usage-card {
  background: var(--white); border: 1px solid var(--stone); border-radius: 12px; padding: 16px 18px;
}
.uc-num { font-size: 28px; font-weight: 800; color: var(--rain-magenta); line-height: 1; }
.uc-lbl { font-size: 11px; font-weight: 700; color: var(--ink); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.uc-lbl span { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--graphite); margin-top: 3px; }
.usage-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--stone); border-radius: 10px; overflow: hidden; }
.usage-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--graphite); padding: 9px 14px; background: var(--bone); border-bottom: 1px solid var(--stone); }
.usage-table td { font-size: 13px; padding: 9px 14px; border-bottom: 1px solid #EFEFEF; }
.usage-table tr:last-child td { border-bottom: none; }
.evt { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.evt-login { background: #F2F2F2; color: var(--graphite); }
.evt-run   { background: var(--magenta-tint-08); color: var(--stroke-magenta); }
.evt-push  { background: var(--orange-tint-10); color: #8A4A00; }

/* Login page */
.login-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 14px;
  padding: 28px 26px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
.login-card input[type="password"] {
  font-size: 14px; padding: 10px 12px; border: 1px solid var(--stone);
  border-radius: 8px; background: var(--white); color: var(--ink); width: 100%;
}
.login-card input[type="password"]:focus {
  outline: none; border-color: var(--stroke-magenta); box-shadow: 0 0 0 3px var(--magenta-tint-08);
}
.login-card .btn-brand { width: 100%; margin-top: 4px; }
.show-pw {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--graphite); margin: 0 0 12px 2px; cursor: pointer;
}
.show-pw input { cursor: pointer; }
.login-error {
  font-size: 12px; color: #991B1B; background: #FEE2E2;
  border-radius: 6px; padding: 7px 10px; margin-bottom: 10px;
}
.signout-link {
  font-size: 11px; font-weight: 600; color: var(--graphite);
  text-decoration: none;
}
.signout-link:hover { color: var(--rain-magenta); }

/* Roadmap footnote under the action buttons */
.next-up {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--graphite);
  margin-top: 2px;
}

/* "How it works" drawer — the old demo pipeline strip, out of the way by default */
details.howit > summary {
  list-style: none;
  cursor: pointer;
  max-width: 1536px;
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--graphite);
  user-select: none;
}
details.howit > summary::-webkit-details-marker { display: none; }
details.howit > summary:hover { color: var(--ink); }
.howit-chevron { display: inline-block; transition: transform 0.15s; margin-right: 4px; }
details.howit[open] .howit-chevron { transform: rotate(90deg); }

/* Live indicator dot in top bar */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal-orange);
  margin-right: 6px;
  animation: blink 1.4s infinite;
  vertical-align: middle;
  box-shadow: 0 0 0 3px var(--orange-tint-10);
}
