/* DocHuntr UI action system v1 (2026-10-19). Owner-supplied; copy unchanged to chasekit/static/actions.css and load LAST.
   Spec: docs/design-system/ACTIONS.md. Own class names (dc-act*) so the older stylesheets cannot override it. */
:root{
  --act-h:2.5rem;--act-h-sm:2rem;--act-h-touch:2.75rem;--act-radius:.5rem;--act-gap:.5rem;--act-fs:.9375rem;
  --act-blue:var(--dc-blue,#2563EB);--act-blue-hover:#0042d6;
  --act-green:var(--c-success,#14B8A6);--act-green-hover:#11998f;
  --act-red:var(--c-error,#a4141b);--act-red-border:#d0767c;--act-red-tint:#fdf2f2;
  --act-ink:var(--dc-navy,#0B1F44);--act-muted:var(--c-muted,#44506a);--act-border:#7f8ea6;--act-border-soft:var(--c-border,#c5cfdf);
  --act-border-hover:#5f6f8a;--act-tint:var(--c-surface-alt,#f4f7fb);
  --act-disabled-bg:#eef2f7;--act-disabled-ink:#4f5b72;
  --act-focus:var(--c-focus,#2563EB);--act-focus-dark:var(--c-focus-on-dark,#14B8A6)}

/* base: every tier */
.dc-act{display:inline-flex;align-items:center;justify-content:center;gap:var(--act-gap);box-sizing:border-box;
  min-height:var(--act-h);padding:0 1rem;margin:0;border:1px solid transparent;border-radius:var(--act-radius);
  font:inherit;font-size:var(--act-fs);line-height:1;font-weight:500;letter-spacing:0;text-decoration:none;
  white-space:nowrap;cursor:pointer;background:none;color:var(--act-ink);box-shadow:none;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease}
.dc-act:focus-visible{outline:2px solid var(--act-focus);outline-offset:2px}
.dc-act:active:not(:disabled):not([aria-disabled="true"]){transform:translateY(1px);box-shadow:none}
.dc-act svg{width:1rem;height:1rem;flex:none}

/* primary: the ONE action per screen */
.dc-act--primary{background:var(--act-blue);border-color:var(--act-blue);color:#fff;font-weight:600;
  box-shadow:0 1px 2px rgba(11,31,68,.12),0 2px 6px rgba(37,99,235,.18)}
.dc-act--primary:hover{background:var(--act-blue-hover);border-color:var(--act-blue-hover);color:#fff}

/* secondary */
.dc-act--secondary{background:#fff;border-color:var(--act-border);color:var(--act-ink)}
.dc-act--secondary:hover{background:var(--act-tint);border-color:var(--act-border-hover)}

/* text (navigation + row actions) */
.dc-act--text{min-height:0;padding:0;border:0;color:var(--act-blue);font-weight:600;background:none}
.dc-act--text::after{content:"\2192";font-weight:600}
.dc-act--text.dc-act--no-arrow::after{content:none}
.dc-act--text:hover{text-decoration:underline;text-underline-offset:.2em}

/* quiet (help, back, skip) */
.dc-act--quiet{min-height:0;padding:0;border:0;color:var(--act-muted);font-weight:500;background:none}
.dc-act--quiet:hover{color:var(--act-ink);text-decoration:underline;text-underline-offset:.2em}
.dc-act--quiet.dc-act--back::before{content:"\2190"}

/* destructive (never filled outside a confirm dialog) */
.dc-act--danger{background:#fff;border-color:var(--act-red-border);color:var(--act-red)}
.dc-act--danger:hover{background:var(--act-red-tint);border-color:var(--act-red)}
.dc-act--danger.dc-act--text,.dc-act--danger.dc-act--menu{border:0;background:none}

/* approve: the review screen's primary once allowed — DocHuntr brand blue (owner decision 2026-10-20). Green is reserved
   for success/approved/completed STATES (pills, confirmations), never for the primary action. */
.dc-act--approve{background:var(--act-blue);border-color:var(--act-blue);color:#fff;font-weight:600;
  box-shadow:0 1px 2px rgba(11,31,68,.12),0 2px 6px rgba(37,99,235,.18)}
.dc-act--approve:hover{background:var(--act-blue-hover);border-color:var(--act-blue-hover)}
/* semantic success state (status pills, confirmations, "Approved"/"Completed") */
.dc-state--success{color:var(--act-green);background:#e8f4ec;border-radius:999px;padding:.125rem .5rem;font-weight:600}

/* small (toolbars beside inputs of the same height) */
.dc-act--sm{min-height:var(--act-h-sm);padding:0 .75rem}

/* disabled: readable and obviously unavailable, never opacity alone */
.dc-act:disabled,.dc-act[aria-disabled="true"]{background:var(--act-disabled-bg);border:1px dashed var(--act-border);
  color:var(--act-disabled-ink);box-shadow:none;cursor:not-allowed;text-decoration:none}
.dc-act--text:disabled,.dc-act--text[aria-disabled="true"],.dc-act--quiet[aria-disabled="true"]{background:none;border:0}

/* groups */
.dc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--act-gap)}
.dc-decision{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--act-gap);margin:0}
.dc-decision .dc-act{width:100%;min-width:0}
.dc-decision-why{margin:.375rem 0 0;font-size:.8125rem;color:var(--act-muted)}

/* row actions: one visible text action + overflow */
.dc-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:.75rem;white-space:nowrap}
.dc-more{position:relative;display:inline-block}
.dc-more>summary{list-style:none}
.dc-more>summary::-webkit-details-marker{display:none}
.dc-more__btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:var(--act-radius);
  color:var(--act-muted);font-size:1.125rem;line-height:1;cursor:pointer}
.dc-more__btn:hover{background:var(--act-tint);color:var(--act-ink)}
.dc-more__btn:focus-visible{outline:2px solid var(--act-focus);outline-offset:2px}
.dc-more__menu{position:absolute;right:0;top:calc(100% + .25rem);z-index:20;min-width:11rem;max-width:calc(100vw - 2rem);
  padding:.25rem;background:#fff;border:1px solid var(--act-border-soft);border-radius:var(--act-radius);
  box-shadow:var(--shadow-2,0 4px 12px rgba(11,31,68,.16));display:flex;flex-direction:column}
.dc-act--menu{justify-content:flex-start;width:100%;min-height:2.25rem;padding:0 .75rem;border:0;background:none;
  color:var(--act-ink);font-weight:500}
.dc-act--menu:hover{background:var(--act-tint)}
.dc-act--menu.dc-act--danger{color:var(--act-red)}
.dc-act--menu.dc-act--danger:hover{background:var(--act-red-tint)}
.dc-act--menu::after{content:none}

/* dark surfaces (sidebar, email header) */
.dc-on-dark .dc-act:focus-visible,.dc-on-dark .dc-more__btn:focus-visible{outline-color:var(--act-focus-dark)}

/* mobile */
@media (max-width:48rem){
  .dc-act{min-height:var(--act-h-touch)}
  .dc-act--sm{min-height:var(--act-h-touch)}
  .dc-act--text,.dc-act--quiet{min-height:0;padding:.5rem 0}
  .dc-page-head .dc-actions{width:100%}
  .dc-page-head .dc-actions>.dc-act--primary{order:-1;flex-basis:100%}   /* primary first, full width */
  .dc-page-head .dc-actions>.dc-more{margin-left:auto}                    /* More stays on the secondary row */
  .dc-act--block-mobile{width:100%}
  .dc-actions--stack{flex-direction:column;align-items:stretch}
  .dc-actions--stack>.dc-act{width:100%}
  .dc-decision .dc-act{min-height:var(--act-h-touch)}
  .dc-more__btn{width:var(--act-h-touch);height:var(--act-h-touch)}
}
@media (prefers-reduced-motion:reduce){.dc-act,.dc-more__btn{transition:none}.dc-act:active{transform:none}}
