/* ═══════════════════════════════════════════════════════════════════
   RNI Executive Console — client-executive-console.css
   Surface: executive-console | client-executive-console-rev21
═══════════════════════════════════════════════════════════════════ */

/* FULL ISOLATION WRAPPER */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   RNI EXECUTIVE CONSOLE
   Design Philosophy: Apple Restraint + Japanese Aesthetics
   Healthcare Leadership Roles (ACHE, HFMA, ANA, ASAM benchmarks)
   
   間 (Ma) - Negative space creates meaning
   簡素 (Kanso) - Simplicity, elimination of clutter  
   静寂 (Seijaku) - Tranquility in the midst of activity
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Core palette - refined for softer perception */
  --rni-green: #43DBA3;
  --rni-blue: #3B82F6;  /* Blue for Executive */
  --rni-yellow: #F59E0B;
  --rni-red: #EF4444;
  --rni-purple: #8B5CF6;
  --rni-gold: #3B82F6;
  --rni-cyan: #00B8D4;
  --rni-charcoal: #1F2937;
  
  /* Doctor Colors (CANONICAL - Standardized) */
  --dr-williams: #3B82F6;  /* Blue - Executive Intelligence */
  --dr-olivia: #43DBA3;    /* Emerald - Behavioral Health */
  --dr-rivera: #3B82F6;    /* Blue - Clinical Pathways */
  --dr-chen: #DC2626;      /* Red - Safety & Compliance */
  --dr-peterson: #00B8D4;  /* Cyan - Patient Stability */
  --dr-taylor: #9B59B6;    /* Purple - Predictive Analytics */
  
  /* Surfaces - Japanese paper-like warmth */
  --rni-bg: #F9FAFB;
  --rni-white: #FFFFFF;
  --rni-border: #E5E7EB;
  --rni-border-subtle: #F3F4F6;
  
  /* Typography - hierarchy through weight, not color */
  --rni-text: #111827;
  --rni-muted: #6B7280;
  --rni-subtle: #9CA3AF;
  
  /* Shadows - barely there, like morning mist */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  
  /* Transitions - unhurried, deliberate */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

body, html {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--rni-bg);
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--rni-text);
  margin: 0 !important;
  padding: 0 !important;
}

/* Kill all headers and navigation */
.site-header, #site-header, .kallium-header, .kallium-footer,
.footer-wrapper, #colophon, .site-info, body > footer, #footer, .site-footer,
header, nav, .navigation, #navigation, .page-header,
.user-menu, .admin-menu, #wpadminbar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* LAYOUT */
.rni-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* LEFT SIDEBAR */
.rni-sidebar {
  width: 300px;
  border-right: none;
  background: var(--rni-white);
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.rni-sidebar::-webkit-scrollbar {
  display: none;
}

/* Portal Link in Sidebar Footer - clean text link */
.portal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  color: #9CA3AF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.portal-link:hover {
  color: var(--dr-williams);
  transform: translateY(-2px);
}

.portal-link i {
  font-size: 10px;
  color: inherit;
}

/* Heartbeat logo */
.sidebar-logo {
  padding: 16px 20px 0;
  text-align: center;
  flex-shrink: 0;
  background: var(--rni-white);
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 90px;
}

.sidebar-logo img {
  height: 80px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(207deg) brightness(101%) contrast(96%);
  animation: heartbeat 3s ease-in-out infinite;
  display: block;
  margin: 0 auto;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* Role Selector */
.role-selector {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rni-border);
  background: var(--rni-white);
  position: relative;
  z-index: 1;
}

.role-selector label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--rni-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.role-selector select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rni-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--rni-text);
  background: var(--rni-white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.role-selector select:focus {
  outline: none;
  border-color: var(--rni-blue);
  box-shadow: 0 0 0 3px rgba(77,124,255,0.1);
}

/* Scrollable sidebar content */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 12px 16px;
}

.sidebar-content::-webkit-scrollbar {
  display: none;
}

.sidebar-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  color: #9CA3AF;
  margin: 14px 0 6px 0;
}

.sidebar-title:first-child {
  margin-top: 0;
}

.sidebar-title.awaiting-section {
  color: #92400e;
  background: #fef3c7;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-item {
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  position: relative;
}

.sidebar-item:hover {
  background: #f3f4f6;
}

.sidebar-item:hover .bar {
  transform: scaleY(1.1);
  filter: brightness(1.1);
}

.sidebar-item.active {
  background: #F3F4F6;
}

.sidebar-item.done {
  opacity: 0.5;
}

.sidebar-item.awaiting-item {
  background: #fffbeb;
}

.sidebar-item.awaiting-item:hover {
  background: #fef3c7;
}

.sidebar-patient {
  font-weight: 500;
  color: #374151;
  font-size: 12px;
}

.sidebar-badge {
  display: inline-block;
  font-size: 7px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 2px;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sidebar-badge.intervene { background: #FEF2F2; color: #DC2626; }
.sidebar-badge.review { background: #FFFBEB; color: #D97706; }
.sidebar-badge.approve { background: #DBEAFE; color: #2563EB; }
.sidebar-badge.handoff { background: #E9D5FF; color: #7C3AED; }

/* Shift Clock */
.shift-clock {
  background: #F9FAFB;
  padding: 6px 8px;
  text-align: center;
  border-radius: 4px;
  margin-top: 4px;
}

.shift-clock-label {
  font-size: 8px;
  font-weight: 500;
  color: #9CA3AF;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.shift-clock-value {
  font-size: 14px;
  font-weight: 600;
  color: #10B981;
  font-variant-numeric: tabular-nums;
}

.sidebar-stats-row {
  display: flex;
  justify-content: space-around;
  padding: 4px 8px;
}

.sidebar-stat-mini {
  text-align: center;
}

.sidebar-stat-label {
  display: block;
  font-size: 8px;
  color: #9CA3AF;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.sidebar-stat-value {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.sidebar-stat-value.red {
  color: var(--rni-red);
}

.bar {
  width: 2px;
  min-height: 100%;
  align-self: stretch;
  border-radius: 1px;
  flex-shrink: 0;
  transition: all 0.15s;
}

/* Status bar colors - semantic colors */
.bar-red { background: #EF4444; }
.bar-yellow { background: #F59E0B; }
.bar-blue { background: #3B82F6; }
.bar-green { background: #10B981; }
.bar-purple { background: #8B5CF6; }

.sidebar-meta {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 1px;
  font-weight: 400;
}

.sidebar-footer {
  margin-top: auto;
  padding: 8px;
  border-top: 1px solid #F3F4F6;
  flex-shrink: 0;
  background: var(--rni-white);
}

.sidebar-pdf-btn {
  padding: 9px 20px;
  background: var(--rni-white);
  color: var(--rni-muted);
  border: 1px solid var(--rni-border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin: 0 auto;
}

.sidebar-pdf-btn:hover {
  border-color: var(--rni-blue);
  color: var(--rni-blue);
  background: #f0fdf9;
}

.sidebar-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
}

.sidebar-stat-label {
  color: var(--rni-muted);
  font-size: 11px;
}

.sidebar-stat-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--rni-text);
}

/* MAIN CONTENT */
.rni-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--rni-bg);
}

.main-scroll {
  flex: 1;
  padding: 20px 40px 40px 40px;
  overflow-y: auto;
  scrollbar-width: none;
}

.main-scroll::-webkit-scrollbar {
  display: none;
}

/* HEADER */
/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.breadcrumb-link {
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb-link:hover {
  color: var(--dr-williams);
}

.breadcrumb-sep {
  color: #D1D5DB;
}

.breadcrumb-current {
  color: #374151;
  font-weight: 500;
}

.main-header {
  margin-bottom: 20px;
}

/* Status Strip - Minimal System Info */
.status-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  font-size: 10px;
  border-top: 1px solid #F3F4F6;
  margin-top: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #B0B7C3;
  font-weight: 400;
}

.status-item i {
  font-size: 8px;
  color: #B0B7C3;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.status-dot.green {
  background: #10B981;
}

.status-dot.blue {
  background: #6B7280;
}

.ehr-status {
  font-weight: 400;
  color: #9CA3AF;
}

.ehr-status span:last-child {
  color: #10B981;
}

.status-spacer {
  flex: 1;
}

/* Next Action Pill - Match Doctor Button Style */
.next-action-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--rni-white);
  border: 1px solid var(--rni-border);
  border-radius: 8px;
  font-size: 12px;
  color: #DC2626;
}

.next-action-pill i {
  font-size: 10px;
}

.next-action-pill span:nth-child(2) {
  color: #9CA3AF;
  font-weight: 400;
}

.next-action-pill .pill-time {
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #DC2626;
}

.dark-mode-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--rni-border);
  background: var(--rni-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dark-mode-toggle:hover {
  background: #f3f4f6;
  border-color: var(--rni-blue);
}

.dark-mode-toggle i {
  color: var(--rni-muted);
  font-size: 14px;
}

/* Dark Mode Variables */
body.dark-mode {
  --rni-bg: #0F1115;
  --rni-white: #1A1D24;
  --rni-border: #2D3139;
  --rni-text: #E5E7EB;
  --rni-muted: #9CA3AF;
}

body.dark-mode .rni-main {
  background: #0F1115;
}

body.dark-mode .main-scroll {
  background: #0F1115;
}

body.dark-mode .rni-sidebar {
  background: #1A1D24;
  border-right: 1px solid #2D3139;
}

body.dark-mode .task-card {
  background: #1A1D24;
  border-color: #2D3139;
}

body.dark-mode .main-title {
  color: #E5E7EB;
}

body.dark-mode .status-strip {
  background: #1A1D24;
}

body.dark-mode .request-box {
  background: #1A1D24;
  border-color: var(--rni-blue);
}

body.dark-mode .doc-btn {
  background: #1A1D24;
  border-color: #2D3139;
  color: #E5E7EB;
}

body.dark-mode .dark-mode-toggle i {
  color: var(--rni-yellow);
}

/* Dark mode - Role views & buttons */
body.dark-mode .section-header {
  color: #9CA3AF;
}

body.dark-mode .task-btn {
  border-color: #374151;
  color: #9CA3AF;
}

body.dark-mode .task-btn:hover {
  background: #1F2937;
  border-color: var(--rni-blue);
}

body.dark-mode .sidebar-role-view .sidebar-title {
  color: #9CA3AF;
}

body.dark-mode .sidebar-item {
  border-color: #374151;
}

body.dark-mode .empty-state {
  color: #6B7280;
}

body.dark-mode .empty-state .empty-title {
  color: #9CA3AF;
}

.main-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--rni-charcoal);
  line-height: 1.2;
}

.main-subtitle {
  font-size: 14px;
  color: var(--rni-muted);
  margin-bottom: 12px;
}

.ops-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  padding: 8px 0;
  margin-bottom: 12px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-label {
  color: var(--rni-muted);
  font-weight: 500;
}

.metric-value {
  font-weight: 600;
  color: var(--rni-text);
}

.metric-trend {
  font-size: 12px;
  color: var(--rni-blue);
}

/* DOCTOR BUTTONS */
.doctor-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.doc-btn {
  padding: 6px 8px;
  background: transparent;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6B7280;
}

.doc-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.doc-btn.active {
  background: #F3F4F6;
  color: #374151;
}

/* Doctor Dots - small colored circles */
.doc-dot {
  width: 8px; 
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.doc-dot.williams { background: #3B82F6; }  /* Gold */
.doc-dot.olivia { background: #43DBA3; }    /* Emerald */
.doc-dot.peterson { background: #00B8D4; }  /* Cyan */
.doc-dot.rivera { background: #3B82F6; }    /* Blue */
.doc-dot.chen { background: #DC2626; }      /* Red */
.doc-dot.taylor { background: #9B59B6; }    /* Purple */

.doc-dot.thinking { animation: dot-pulse 0.6s ease-in-out infinite; }

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.doc-badge {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #F3F4F6;
  color: #9CA3AF;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

.doc-btn:hover .doc-badge {
  background: #E5E7EB;
  color: #6B7280;
}

.doc-btn.active .doc-badge {
  background: #DBEAFE;
  color: #3B82F6;
}

/* Doctor Button Tooltips - Original a-tip Style */
.doc-btn {
  position: relative;
}

.doc-btn .a-tip {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.95) translateY(-4px);
  background: rgba(30, 32, 38, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 240px;
  max-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  transition-delay: 0.15s;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  text-align: left;
}

.doc-btn:hover .a-tip {
  opacity: 1;
  transform: translateX(-50%) scale(1) translateY(0);
}

.doc-btn .a-tip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: rgba(30, 32, 38, 0.98);
}

.a-tip-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.a-tip-stat {
  font-size: 12px;
  color: #d1d5db;
  line-height: 1.5;
}

.a-tip-status {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.a-tip-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.a-tip-status span {
  color: #10b981;
  font-weight: 600;
}

.a-tip-badge {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 6px;
  font-size: 11px;
  color: #3B82F6;
  font-weight: 600;
}

/* Dr. Williams (first doctor) - tooltip appears ABOVE to clear sidebar */
.doc-btn-first .a-tip {
  top: auto;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(0.95) translateY(4px);
  z-index: 99999;
}

.doc-btn-first:hover .a-tip {
  transform: translateX(-50%) scale(1) translateY(0);
}

.doc-btn-first .a-tip::after {
  top: 100%;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(30, 32, 38, 0.98);
  border-bottom-color: transparent;
}

/* REQUEST BOX - Collapsible */
.request-box {
  background: var(--rni-white);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: all 0.2s ease;
}

.request-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.request-box-header:hover {
  background: #F9FAFB;
}

.request-box-title {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-box-title i {
  color: #3B82F6;
  font-size: 11px;
}

.request-toggle {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s;
}

.request-box.collapsed .request-toggle {
  transform: rotate(-90deg);
}

.request-box-content {
  padding: 0 14px 14px;
  max-height: 400px;
  opacity: 1;
  transition: all 0.25s ease;
}

.request-box.collapsed .request-box-content {
  max-height: 0;
  opacity: 0;
  padding: 0 14px;
  overflow: hidden;
}

/* QUICK ASK STRIP */
.quick-ask-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quick-ask-strip .quick-ask-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #FAFAFA;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-ask-strip .quick-ask-btn:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
  color: #374151;
}

.qa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.qa-dot.red { background: #DC2626; }
.qa-dot.blue { background: #3B82F6; }
.qa-dot.green { background: #10B981; }
.qa-dot.purple { background: #8B5CF6; }
.qa-dot.gold { background: #3B82F6; }

.request-input {
  width: 100%;
  background: #FAFAFA;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.request-input:focus {
  outline: none;
  border-color: #3B82F6;
}

.request-metadata {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.metadata-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid var(--rni-border);
  border-radius: 6px;
  font-size: 13px;
  cursor: default;
  transition: all 0.2s;
}

/* Pills are READ-ONLY system outputs - no hover effect */
.metadata-pill:hover {
  background: #f3f4f6;
  border-color: var(--rni-border);
}

/* System-assigned indicator */
.metadata-pill::before {
  content: "⚙";
  font-size: 10px;
  opacity: 0.4;
  margin-right: 2px;
}

.metadata-pill-label {
  color: var(--rni-muted);
  font-weight: 500;
}

.metadata-pill-value {
  color: var(--rni-text);
  font-weight: 600;
  transition: opacity 0.8s var(--ease-out), color 0.6s var(--ease-out);
}

.metadata-pill-value.updating {
  opacity: 0.3;
}

.metadata-pill-value.revealing {
  animation: gentleReveal 1s var(--ease-out) forwards;
}

@keyframes gentleReveal {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.metadata-pill.locked {
  cursor: default;
  opacity: 0.7;
}

.metadata-pill.locked:hover {
  background: #f3f4f6;
  border-color: var(--rni-border);
}

/* Zen transitions - unhurried reveals */
#gate-warning-display,
#secondary-buckets-display {
  transition: opacity 0.6s var(--ease-out);
}

.metadata-pill[data-tooltip] {
  position: relative;
}

.metadata-pill[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #1f2937;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  margin-bottom: 8px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.request-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.request-info {
  font-size: 12px;
  color: var(--rni-muted);
}

.request-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.request-upload-btn {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--rni-border);
  background: var(--rni-white);
  color: var(--rni-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.request-upload-btn:hover {
  border-color: var(--rni-blue);
  color: var(--rni-blue);
  background: #f0fdf9;
}

/* Split Button Group */
.request-submit-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  position: relative;
}

.request-submit-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.request-submit {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #1F2937;
  border: none;
  padding: 12px 24px;
  border-radius: 8px 0 0 8px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.request-submit:hover {
  background: linear-gradient(135deg, #E5C048 0%, #C9A227 100%);
}

.request-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.request-submit-arrow,
.request-submit-accent {
  background: #2563EB;
  color: #1F2937;
  border: none;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  border-left: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  font-size: 12px;
}

/* Engage Dropdown Menu */
.engage-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.engage-dropdown.active {
  display: block;
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.engage-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: white;
  font-family: 'Heebo', sans-serif;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.engage-dropdown button:hover {
  background: #F9FAFB;
}

.engage-dropdown button i {
  color: #3B82F6;
  width: 16px;
}

/* ROLE-SPECIFIC VIEWS */
.role-view {
  display: none;
}

.role-view.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* SIDEBAR ROLE VIEWS */
.sidebar-role-view {
  display: none;
}

.sidebar-role-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TASK CARDS */
.task-section {
  margin-bottom: 32px;
}

.task-sla {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.task-sla.critical {
  background: #FEF2F2;
  color: #DC2626;
}

.task-sla.warning {
  background: #FFFBEB;
  color: #D97706;
}

.task-sla.ok {
  background: #EFF6FF;
  color: #3B82F6;
}

.complete-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #ECFDF5;
  color: #059669;
}

/* P-CODE DETAIL PANE */
#pcode-detail-pane {
  background: var(--rni-white);
  border: 2px solid var(--rni-blue);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  display: none;
  box-shadow: 0 2px 8px rgba(67, 219, 163, 0.2);
}

/* GOVERNANCE AUTHORIZATION MODAL - APPLE GRADE */
/* ═══════════════════════════════════════════════════════════════════════════════
   TASK DECISION MODAL STYLES — v1.7 Corrected Spec
   "The decision surface IS the artifact surface"
═══════════════════════════════════════════════════════════════════════════════ */

.decision-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

.decision-modal-title {
  font-size: 18px;
  font-weight: 700;
}

.decision-modal-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
}

.modal-close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255,255,255,0.3);
}

.decision-modal-body {
  padding: 20px 24px;
  max-height: 50vh;
  overflow-y: auto;
}

/* Document Preview */
.document-preview {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
}

.document-preview-header {
  padding: 12px 16px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-radius: 8px 8px 0 0;
}

.document-preview-header i {
  margin-right: 8px;
  color: #6b7280;
}

.document-preview-content {
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.document-preview-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 16px 0 8px 0;
}

.document-preview-content h4:first-child {
  margin-top: 0;
}

.document-preview-content p {
  margin: 8px 0;
}

.document-preview-content ul, .document-preview-content ol {
  margin: 8px 0 8px 20px;
}

.document-preview-content li {
  margin: 4px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
}

.doc-table th, .doc-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  text-align: left;
}

.doc-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.status-green { color: #10b981; font-weight: 600; }
.status-yellow { color: #f59e0b; font-weight: 600; }
.status-red { color: #ef4444; font-weight: 600; }

.certification-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 12px;
  font-style: italic;
}

.big-number {
  font-size: 32px;
  font-weight: 700;
  color: #3B82F6;
  text-align: center;
  margin: 16px 0;
}

.finding-detail {
  background: #f9fafb;
  border-left: 3px solid #e5e7eb;
  padding: 12px;
  margin: 12px 0;
}

.timeline {
  margin: 16px 0;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-left: 2px solid #e5e7eb;
  padding-left: 16px;
  margin-left: 8px;
}

.timeline-item.complete { border-left-color: #10b981; }
.timeline-item.active { border-left-color: #3B82F6; }
.timeline-item.pending { border-left-color: #e5e7eb; }

.timeline-date {
  min-width: 120px;
  font-size: 11px;
  color: #6b7280;
}

.timeline-event {
  font-weight: 500;
}

/* Council Evidence Inline */
.council-evidence-inline {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 8px;
  padding: 16px;
}

.council-evidence-header {
  font-size: 14px;
  font-weight: 600;
  color: #854d0e;
  margin-bottom: 12px;
}

.council-reasoning-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.council-reasoning-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.council-doctor-name {
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.council-text {
  color: #4b5563;
  font-style: italic;
}

.council-recommendation {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #fef08a;
  font-size: 13px;
  color: #854d0e;
}

.council-chat-link {
  margin-top: 12px;
}

.council-chat-link a {
  color: #3B82F6;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.council-chat-link a:hover {
  text-decoration: underline;
}

/* 4 PRIMARY ACTION BUTTONS */
.decision-modal-actions {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.decision-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.decision-btn.execute {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
}

.decision-btn.execute:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.decision-btn.evidence {
  background: #3B82F6;
  color: white;
}

.decision-btn.evidence:hover {
  background: #2563EB;
}

.decision-btn.context {
  background: #10B981;
  color: white;
}

.decision-btn.context:hover {
  background: #059669;
}

.decision-btn.primary {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
}

.decision-btn.word {
  background: #2b579a;
  color: white;
}

.decision-btn.word:hover {
  background: #1e3f6f;
}

.decision-btn.pdf {
  background: #dc2626;
  color: white;
}

.decision-btn.pdf:hover {
  background: #b91c1c;
}

.decision-btn.pause {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.decision-btn.pause:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Document Tabs */
.doc-tabs-row {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.doc-tab {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-tab:hover {
  border-color: #3B82F6;
  color: #3B82F6;
}

.doc-tab.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: white;
}

/* Forecast Section */
.forecast-section {
  margin-bottom: 16px;
}

.forecast-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.forecast-label {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
}

.forecast-confidence {
  font-size: 12px;
  color: #10B981;
  font-weight: 500;
}

.forecast-header {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%) !important;
}

/* Evidence Drawer */
.evidence-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: flex-end;
  z-index: 10001;
}

.evidence-drawer-content {
  width: 400px;
  background: white;
  height: 100%;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.evidence-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 16px;
}

.evidence-drawer-header button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
}

.evidence-drawer-body {
  padding: 24px;
}

.evidence-drawer-body p {
  margin-bottom: 12px;
  font-size: 14px;
}

.evidence-export-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.export-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
}

.export-btn.word {
  background: #2b579a;
}

.export-btn.pdf {
  background: #dc2626;
}

.decision-modal-footer {
  padding: 12px 24px;
  background: #f3f4f6;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  border-radius: 0 0 12px 12px;
}

.correlation-id {
  font-family: monospace;
  cursor: help;
}

.correlation-id i {
  margin-right: 4px;
  opacity: 0.6;
}

/* Toast animation */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.governance-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 200ms ease-out;
}

.governance-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--rni-white);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: slideUp 220ms ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--rni-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 14px;
  color: #f59e0b;
  font-weight: 500;
}

.modal-why {
  font-size: 14px;
  color: var(--rni-text);
  line-height: 1.6;
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  text-align: left;
}

.modal-body {
  padding: 28px 32px;
}

.action-summary {
  font-size: 15px;
  line-height: 1.6;
  color: var(--rni-text);
  margin-bottom: 20px;
  text-align: center;
}

.impact-line {
  font-size: 13px;
  color: var(--rni-muted);
  text-align: center;
  padding: 12px 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.modal-actions {
  padding: 0 32px 32px;
}

.primary-action-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-view-evidence {
  padding: 16px 20px;
  background: transparent;
  color: #6B7280;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-view-evidence:hover {
  border-color: var(--dr-williams);
  color: var(--dr-williams);
  background: rgba(212, 175, 55, 0.05);
}

.btn-primary-action {
  flex: 1;
  padding: 16px 24px;
  background: var(--rni-blue);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease-out;
}

.btn-primary-action:hover {
  background: #3B82F6;
  transform: scale(1.01);
}

.btn-primary-action:active {
  transform: scale(0.99);
}

.btn-primary-action.veto-locked {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  pointer-events: none;
}

.veto-lock-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: var(--dr-chen);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.secondary-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  color: var(--rni-text);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease-out;
}

.btn-secondary:hover {
  border-color: var(--rni-blue);
  background: #f9fafb;
}

.btn-tertiary {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  color: var(--rni-muted);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 120ms ease-out;
}

.btn-tertiary:hover {
  color: var(--rni-text);
}

/* Evidence Drawer */
.evidence-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 10001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.evidence-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9CA3AF;
  cursor: pointer;
  line-height: 1;
}

.drawer-close:hover {
  color: #374151;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Validation Panel Styles */
.validation-panel h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-vote-summary {
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.validation-list {
  margin-bottom: 16px;
}

.validation-item {
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
}

.validation-doctor {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.validation-reasoning {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
}

.validation-meta {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 8px;
}

.validation-meta-block {
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
}

.validation-meta-block div {
  margin-bottom: 4px;
}

.validation-meta-block code {
  background: #E5E7EB;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}

.validation-notes {
  margin-bottom: 16px;
}

.btn-add-note {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-add-note:hover {
  border-color: var(--dr-williams);
  color: var(--dr-williams);
}

/* Export Section (inside Evidence) */
.validation-export {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.export-label {
  font-size: 12px;
  color: #9CA3AF;
}

.btn-export {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-export:hover {
  border-color: var(--dr-williams);
  color: var(--dr-williams);
}

.modal-footer {
  text-align: center;
  font-size: 11px;
  color: var(--rni-muted);
  padding: 0 32px 28px;
  line-height: 1.5;
}

#pcode-detail-pane.active {
  display: block;
}

#pcode-detail-pane h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--rni-text);
}

#pcode-detail-pane strong {
  color: var(--rni-muted);
  font-weight: 600;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-comment, .btn-close {
  padding: 8px 16px;
  border: 1px solid var(--rni-border);
  background: var(--rni-white);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-comment:hover {
  background: var(--rni-bg);
  border-color: var(--rni-blue);
}

.btn-close:hover {
  background: #fee;
  border-color: var(--rni-red);
  color: var(--rni-red);
}

.section-header {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header .section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-header .section-dot.red { background: var(--rni-red); }
.section-header .section-dot.yellow { background: var(--rni-yellow); }
.section-header .section-dot.green { background: var(--rni-green); }

.section-count {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 400;
}

.task-card {
  background: var(--rni-white);
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--rni-border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

.task-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--rni-border);
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  transition: all var(--duration-fast) var(--ease-out);
}

/* Status colors for task cards - semantic colors to match sidebar */
.task-card.red::before { background: #EF4444; }
.task-card.yellow::before { background: #F59E0B; }
.task-card.blue::before { background: #3B82F6; }
.task-card.green::before { background: #10B981; }
.task-card.purple::before { background: #8B5CF6; }

/* S.O.A.P. Auto-Draft Button */
.soap-btn {
  background: #EEF2FF !important;
  border-color: #6366F1 !important;
  color: #4F46E5 !important;
}

.soap-btn:hover {
  background: #E0E7FF !important;
}

/* Awaiting Authorization State */
.task-card.awaiting {
  border: 1px solid #f59e0b;
  animation: subtle-pulse 3s ease-in-out infinite;
  transition: all 200ms ease-out;
}

.task-card.awaiting.selected {
  border: 2px solid #f59e0b;
  background: #fffbeb;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.task-card.awaiting.dimmed {
  opacity: 0.4;
}

/* Cross-View Selection States */
.task-card.selected {
  border: 2px solid var(--rni-blue) !important;
  box-shadow: 0 8px 24px rgba(67, 219, 163, 0.25);
  transform: translateY(-2px);
}

.task-card.dimmed {
  opacity: 0.35;
  filter: grayscale(30%);
  transform: scale(0.98);
  transition: all 0.2s ease-out;
}

.task-card.awaiting::before {
  background: #f59e0b;
}

/* Success Toast */
.success-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--rni-white);
  padding: 16px 20px;
  border-radius: 12px;
  border-left: 4px solid var(--rni-blue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--rni-text);
  z-index: 9999;
  animation: toastSlideIn 500ms var(--ease-out);
  max-width: 400px;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Status Badge */
.status-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Badge - 4 States Only */
.status-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Awaiting Approval - Yellow */
/* Awaiting - Gold */
.status-badge.awaiting-auth,
.status-badge.submitted {
  background: #fef3c7;
  color: #92400e;
}

/* Active - Blue */
.status-badge.active,
.status-badge.approved,
.status-badge.executing,
.status-badge.ai-review {
  background: #dbeafe;
  color: #1e40af;
}

/* Blocked - Red */
.status-badge.blocked,
.status-badge.escalated {
  background: #fee2e2;
  color: #991b1b;
}

/* Paused - Gray */
.status-badge.paused,
.status-badge.draft {
  background: #f3f4f6;
  color: #6b7280;
}

/* Completed - Green */
.status-badge.completed,
.status-badge.executed,
.status-badge.closed {
  background: #d1fae5;
  color: #065f46;
}

/* Pause Icon */
.pause-icon {
  font-size: 10px;
  opacity: 0.8;
}

/* Sidebar Badge */
.sidebar-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.task-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--rni-charcoal);
}

.task-code {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 400;
  margin-top: 2px;
}

.task-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 10px;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-meta-item strong {
  font-weight: 500;
  color: #6B7280;
}

.task-description {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.5;
  margin-bottom: 12px;
}

.task-list {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--rni-text);
}

.task-list li {
  margin-bottom: 6px;
}

.task-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F3F4F6;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.8s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: 0.4s;
}

.task-card:hover .task-footer {
  opacity: 1;
  transform: translateY(0);
}

.task-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.progress-bar {
  width: 100px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--rni-blue);
  border-radius: 2px;
  transition: width 0.3s;
}

.task-actions {
  display: flex;
  gap: 6px;
}

.task-btn {
  padding: 6px 14px;
  border: 1px solid var(--rni-border);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--rni-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-btn i {
  font-size: 11px;
  opacity: 0.8;
  transition: opacity 0.3s var(--ease-out);
}

.task-btn:hover {
  background: var(--rni-bg);
  border-color: var(--rni-blue);
  color: var(--rni-blue);
}

.task-btn:hover i {
  opacity: 1;
}

.task-btn:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

.task-btn.primary {
  background: var(--rni-blue);
  color: white;
  border-color: var(--rni-blue);
}

.task-btn.primary i {
  opacity: 1;
}

.task-btn.primary:hover {
  background: #3B6FE8;
  box-shadow: 0 2px 8px rgba(77, 124, 255, 0.25);
}

/* Empty States - Japanese Ma (間) aesthetic */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--rni-subtle);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
}

.empty-state i {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.3;
}

.empty-state .empty-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--rni-muted);
  margin-bottom: 6px;
}

.empty-state .empty-subtitle {
  font-size: 13px;
  color: var(--rni-subtle);
  max-width: 280px;
  margin: 0 auto;
}

.empty-state.success {
  color: var(--rni-green);
}

.empty-state.success i {
  opacity: 0.6;
  color: var(--rni-green);
}

.empty-state.success .empty-title {
  color: #059669;
}

/* Loading State - Calm, unhurried */
.loading-state {
  text-align: center;
  padding: 48px 24px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--rni-border);
  border-top-color: var(--rni-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state .loading-text {
  font-size: 13px;
  color: var(--rni-muted);
}

/* Error State - Gentle, not alarming */
.error-state {
  text-align: center;
  padding: 40px 24px;
  background: #FEF2F2;
  border-radius: 12px;
  border: 1px solid #FEE2E2;
}

.error-state i {
  font-size: 28px;
  color: var(--rni-red);
  opacity: 0.7;
  margin-bottom: 12px;
  display: block;
}

.error-state .error-title {
  font-size: 14px;
  font-weight: 500;
  color: #991B1B;
  margin-bottom: 4px;
}

.error-state .error-message {
  font-size: 13px;
  color: #B91C1C;
}

.error-state .retry-btn {
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--rni-white);
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  color: #DC2626;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.error-state .retry-btn:hover {
  background: #FEE2E2;
}

/* Offline State for The Council */
.offline-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #FEF3C7;
  border-radius: 4px;
  font-size: 11px;
  color: #92400E;
}

.offline-indicator .pulse-dot {
  width: 6px;
  height: 6px;
  background: #F59E0B;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* PIPELINE VISUALIZATION */
.pipeline-section {
  margin-top: 32px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--rni-white);
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pipeline-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  color: var(--rni-muted);
}

.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  padding: 16px 0;
}

.pipeline-node {
  padding: 16px 24px;
  border: none !important;
  border-radius: 12px;
  text-align: center;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.pipeline-node:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Hover tooltip for pipeline nodes */
.pipeline-node[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  width: 260px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.pipeline-node[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
}

.pipeline-node[data-tooltip]:hover::after,
.pipeline-node[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Node color variants with subtle color shadows */
.pipeline-node.node-green {
  background: linear-gradient(135deg, rgba(67, 219, 163, 0.15) 0%, rgba(67, 219, 163, 0.08) 100%);
  box-shadow: 0 4px 12px rgba(67, 219, 163, 0.2), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.pipeline-node.node-green:hover {
  box-shadow: 0 8px 24px rgba(67, 219, 163, 0.3), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.pipeline-node.node-blue {
  background: linear-gradient(135deg, rgba(77, 124, 255, 0.15) 0%, rgba(77, 124, 255, 0.08) 100%);
  box-shadow: 0 4px 12px rgba(77, 124, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.pipeline-node.node-blue:hover {
  box-shadow: 0 8px 24px rgba(77, 124, 255, 0.3), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.pipeline-node.node-yellow {
  background: linear-gradient(135deg, rgba(255, 201, 50, 0.2) 0%, rgba(255, 201, 50, 0.1) 100%);
  box-shadow: 0 4px 12px rgba(255, 201, 50, 0.25), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.pipeline-node.node-yellow:hover {
  box-shadow: 0 8px 24px rgba(255, 201, 50, 0.35), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.pipeline-node-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--rni-text);
}

.pipeline-node-status {
  font-size: 12px;
  color: var(--rni-muted);
}

.pipeline-arrow {
  font-size: 20px;
  color: #9ca3af;
  font-weight: 300;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .rni-sidebar {
    width: 260px;
  }
  
  .rni-main {
    padding: 24px 20px 60px 20px;
  }
}

@media (max-width: 768px) {
  .rni-container {
    flex-direction: column;
  }
  
  .rni-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--rni-border);
  }
  
  .pipeline-flow {
    flex-direction: column;
  }
  
  .pipeline-arrow {
    transform: rotate(90deg);
  }
}

/* EKG FOOTER */
.page-footer {
  padding: 12px 20px;
  text-align: center;
  background: var(--rni-white);
  flex-shrink: 0;
}

.ekg-line {
  height: 32px;
  width: 140px;
  margin: 0 auto 8px;
  position: relative;
  overflow: hidden;
}

.ekg-line svg {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  height: 32px;
  animation: ekg-scroll 3s linear infinite;
}

@keyframes ekg-scroll {
  from { left: 0; }
  to { left: -140px; }
}

.footer-tagline {
  font-size: 11px;
  color: #4A4A4A;
  font-weight: 600;
  letter-spacing: 0.3px;
}
/* S.O.A.P. Modal Styles */
.soap-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.soap-modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.soap-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.soap-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1E2026;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soap-header h3 i {
  color: #4F46E5;
}

.soap-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.soap-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
}

.soap-close:hover {
  color: #4b5563;
}

.soap-body {
  padding: 24px;
}

.soap-section {
  margin-bottom: 20px;
}

.soap-section:last-child {
  margin-bottom: 0;
}

.soap-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soap-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #4F46E5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.soap-content {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #4F46E5;
}

.soap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.soap-auto-tag {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.soap-auto-tag i {
  color: #4F46E5;
}

.soap-actions {
  display: flex;
  gap: 8px;
}

/* Dark mode for S.O.A.P. modal */
body.dark-mode .soap-modal-content {
  background: #1A1D24;
}

body.dark-mode .soap-header {
  border-color: #2D3139;
}

body.dark-mode .soap-header h3 {
  color: #E5E7EB;
}

body.dark-mode .soap-content {
  background: #0F1115;
  color: #E5E7EB;
}

body.dark-mode .soap-footer {
  background: #1A1D24;
  border-color: #2D3139;
}


/* === SOAP Modal Styles (moved from HTML inline) === */
/* S.O.A.P. Modal Styles */
.soap-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.soap-modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.soap-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.soap-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1E2026;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soap-header h3 i {
  color: #4F46E5;
}

.soap-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.soap-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
}

.soap-close:hover {
  color: #4b5563;
}

.soap-body {
  padding: 24px;
}

.soap-section {
  margin-bottom: 20px;
}

.soap-section:last-child {
  margin-bottom: 0;
}

.soap-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soap-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #4F46E5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.soap-content {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #4F46E5;
}

.soap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

.soap-auto-tag {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.soap-auto-tag i {
  color: #4F46E5;
}

.soap-actions {
  display: flex;
  gap: 8px;
}

/* Dark mode for S.O.A.P. modal */
body.dark-mode .soap-modal-content {
  background: #1A1D24;
}

body.dark-mode .soap-header {
  border-color: #2D3139;
}

body.dark-mode .soap-header h3 {
  color: #E5E7EB;
}

body.dark-mode .soap-content {
  background: #0F1115;
  color: #E5E7EB;
}

body.dark-mode .soap-footer {
  background: #1A1D24;
  border-color: #2D3139;
}
