/* =====================================================================
   NEXUS · §4.6 Action & Escalation Workflow
   Shares list/detail idiom with §4.2 Verification but each item is an
   instruction being tracked to closure.
   ===================================================================== */

body.nx-actions { background: linear-gradient(180deg, var(--nx-ink-950), var(--nx-ink-900)); color: #FFF; min-height: 100vh; margin: 0; }
.act-shell { max-width: 1440px; margin: 0 auto; padding: 20px; }

/* Hero */
.act-hero {
  padding: 22px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--nx-teal-950), var(--nx-ink-900));
  border: 1px solid rgba(6, 182, 212, 0.25);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.act-hero .kicker { font-family: var(--font-mono); font-size: 11px; color: var(--nx-teal-300); letter-spacing: 0.14em; font-weight: var(--fw-black); }
.act-hero h1 { font-size: 28px; font-weight: var(--fw-black); letter-spacing: -0.02em; margin: 4px 0 4px; }
.act-hero .lead { color: rgba(255,255,255,0.75); font-size: 14px; max-width: 780px; }

.act-hero .new-btn {
  padding: 14px 20px;
  background: var(--nx-teal-500);
  color: #032530;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-weight: var(--fw-black);
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 200ms var(--ease-out);
}
.act-hero .new-btn:hover { background: var(--nx-teal-400); }

/* KPIs */
.act-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
@media (max-width: 900px) { .act-kpis { grid-template-columns: repeat(2, 1fr); } }
.act-kpi {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  border-top: 3px solid var(--nx-teal-500);
  cursor: pointer;
}
.act-kpi.warn  { border-top-color: var(--nx-amber-500); }
.act-kpi.alert { border-top-color: #EF4444; }
.act-kpi.ok    { border-top-color: #10B981; }
.act-kpi .lbl { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 0.12em; font-weight: var(--fw-black); text-transform: uppercase; }
.act-kpi .val { font-family: var(--font-mono); font-size: 22px; font-weight: var(--fw-black); margin-top: 4px; }

/* Grid */
.act-grid { display: grid; grid-template-columns: 460px 1fr; gap: 16px; min-height: calc(100vh - 260px); }
@media (max-width: 1100px) { .act-grid { grid-template-columns: 1fr; } }

.act-list { background: rgba(15, 23, 42, 0.75); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: hidden; }
.act-list-head { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); font-weight: var(--fw-black); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.act-list-head .tabs { display: flex; gap: 4px; }
.act-list-head .tab { padding: 4px 8px; border-radius: 4px; cursor: pointer; color: rgba(255,255,255,0.55); }
.act-list-head .tab:hover { color: #FFF; background: rgba(255,255,255,0.05); }
.act-list-head .tab.on { background: var(--nx-teal-500); color: #032530; }
.act-list-body { overflow-y: auto; max-height: calc(100vh - 320px); }

.act-list-row {
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 150ms var(--ease-out);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.act-list-row:hover { background: rgba(6, 182, 212, 0.06); }
.act-list-row.on { background: rgba(6, 182, 212, 0.12); border-left: 3px solid var(--nx-teal-500); padding-left: 11px; }
.act-list-row .code { font-family: var(--font-mono); font-size: 10px; color: var(--nx-teal-300); font-weight: var(--fw-black); letter-spacing: 0.08em; }
.act-list-row .t { font-size: 13px; color: #FFF; font-weight: var(--fw-bold); line-height: 1.3; margin-top: 3px; }
.act-list-row .m { font-size: 10px; color: rgba(255,255,255,0.55); font-family: var(--font-mono); margin-top: 3px; }
.act-list-row .meta { text-align: right; }
.act-list-row .meta .prio {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--fw-black);
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.act-list-row .meta .prio.critical { background: rgba(239, 68, 68, 0.18); color: #FCA5A5; }
.act-list-row .meta .prio.high     { background: rgba(249, 115, 22, 0.18); color: #FDBA74; }
.act-list-row .meta .prio.normal   { background: rgba(6, 182, 212, 0.16); color: var(--nx-teal-300); }
.act-list-row .meta .stat { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,0.5); margin-top: 4px; display: block; }
.act-list-row .meta .stat.overdue { color: #FCA5A5; font-weight: var(--fw-black); }

/* Progress mini-bar */
.mini-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.mini-bar .fill { height: 100%; background: linear-gradient(90deg, var(--nx-teal-500), var(--nx-teal-300)); border-radius: 2px; }
.mini-bar.overdue .fill { background: #FCA5A5; }

/* Detail */
.act-detail { background: rgba(15, 23, 42, 0.75); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 20px 24px; overflow-y: auto; max-height: calc(100vh - 260px); }
.act-detail .empty { text-align: center; padding: 80px 20px; color: rgba(255,255,255,0.4); font-family: var(--font-mono); font-size: 12px; }
.act-d-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.act-d-head .kicker { font-family: var(--font-mono); font-size: 10px; color: var(--nx-teal-300); letter-spacing: 0.14em; font-weight: var(--fw-black); }
.act-d-head h2 { font-size: 20px; font-weight: var(--fw-black); margin: 4px 0 4px; letter-spacing: -0.01em; }
.act-d-head .m { color: rgba(255,255,255,0.6); font-family: var(--font-mono); font-size: 11px; }

.act-instr {
  padding: 14px 16px;
  background: rgba(6, 182, 212, 0.06);
  border-left: 3px solid var(--nx-teal-500);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}

.act-progress {
  padding: 14px 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin-bottom: 16px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.act-progress .bar-wrap { flex: 1; }
.act-progress .bar-lbl { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 0.1em; text-transform: uppercase; font-weight: var(--fw-black); margin-bottom: 6px; }
.act-progress .bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.act-progress .bar .fill { height: 100%; background: linear-gradient(90deg, var(--nx-teal-500), var(--nx-teal-300)); border-radius: 4px; }
.act-progress.overdue .bar .fill { background: linear-gradient(90deg, #EF4444, #FCA5A5); }
.act-progress .pct { font-family: var(--font-mono); font-size: 22px; font-weight: var(--fw-black); color: var(--nx-teal-300); }
.act-progress.overdue .pct { color: #FCA5A5; }

.act-section h3 { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: rgba(255,255,255,0.55); font-weight: var(--fw-black); text-transform: uppercase; margin: 16px 0 8px; }

.act-log { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; border-left: 2px dashed rgba(6, 182, 212, 0.35); }
.act-log-item {
  position: relative;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.act-log-item::before {
  content: '';
  position: absolute; left: -29px; top: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--nx-teal-500);
  border: 2px solid var(--nx-ink-800);
}
.act-log-item.issue::before   { background: var(--nx-amber-500); }
.act-log-item.ack::before     { background: #6EE7B7; }
.act-log-item.delay::before   { background: #FCA5A5; }
.act-log-item .who { font-family: var(--font-mono); font-size: 10px; color: var(--nx-teal-300); letter-spacing: 0.08em; font-weight: var(--fw-black); }
.act-log-item .what { font-size: 13px; color: rgba(255,255,255,0.9); margin-top: 3px; }
.act-log-item .at { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,0.4); margin-top: 4px; }

.act-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.act-actions .btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: all 150ms var(--ease-out);
}
.act-actions .btn.primary { background: var(--nx-teal-500); color: #032530; }
.act-actions .btn.primary:hover { background: var(--nx-teal-400); }
.act-actions .btn.warn { background: var(--nx-amber-500); color: #1a1104; }
.act-actions .btn.warn:hover { background: var(--nx-amber-400); }
.act-actions .btn.ghost { background: transparent; color: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.14); }
.act-actions .btn.ghost:hover { color: #FFF; border-color: rgba(255,255,255,0.3); }
