/* ===== FACTO ENTERPRISE ERP DASHBOARD STYLES ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --f-bg: #0c0906;
  --f-surface: #120e09;
  --f-card: #17120c;
  --f-card-hover: #1f1810;
  --f-border: #261d13;
  --f-border-hover: #3d2e1e;
  --f-border-glow: rgba(229, 142, 38, 0.4);
  --f-accent: #e58e26;
  --f-accent-hover: #f59e0b;
  --f-accent-dim: rgba(229, 142, 38, 0.12);
  --f-accent-glow: rgba(229, 142, 38, 0.2);
  --f-text: #f5f0ea;
  --f-text-secondary: #a89a8c;
  --f-text-muted: #6e6153;
  --f-green: #22c55e;
  --f-green-dim: rgba(34, 197, 94, 0.14);
  --f-amber: #f59e0b;
  --f-amber-dim: rgba(245, 158, 11, 0.14);
  --f-red: #ef4444;
  --f-red-dim: rgba(239, 68, 68, 0.14);
  --f-blue: #3b82f6;
  --f-blue-dim: rgba(59, 130, 246, 0.14);
  --f-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --f-radius: 8px;
  --f-radius-lg: 12px;
  --f-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-font);
  background: var(--f-bg);
  color: var(--f-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--f-accent);
  color: #000;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

/* ===== TOP BAR ===== */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(18, 14, 9, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--f-border);
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.dash-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--f-text);
  background: #1c150e;
  border: 1px solid #36281a;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: all 0.25s var(--f-ease);
}

.dash-back-btn:hover {
  background: var(--f-accent-dim);
  border-color: var(--f-accent);
  color: var(--f-accent);
  transform: translateX(-2px);
}

.dash-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ===== TOP BAR BRANDING ===== */
.nexus-logo,
.facto-logo {
  font-family: var(--f-font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
}

.nexus-subbadge,
.facto-subbadge {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--f-accent);
  background: var(--f-accent-dim);
  border: 1px solid rgba(229, 142, 38, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

/* Single Contact Pill */
.dash-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--f-accent);
  background: var(--f-accent-dim);
  border: 1px solid rgba(229, 142, 38, 0.3);
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  transition: all 0.25s var(--f-ease);
}

.dash-contact-pill:hover {
  background: rgba(229, 142, 38, 0.22);
  border-color: var(--f-accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.dash-icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--f-text-secondary);
  background: #18120c;
  border: 1px solid var(--f-border);
  transition: all 0.2s;
}

.dash-icon-btn:hover {
  color: var(--f-text);
  border-color: var(--f-border-hover);
}

.btn-badge-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--f-red);
}

/* Profile Container & Interactive Popover (Image 3) */
.dash-profile-container {
  position: relative;
}

.dash-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #18120c;
  border: 1px solid var(--f-border);
  padding: 0.28rem 0.65rem 0.28rem 0.35rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--f-ease);
}

.dash-profile:hover {
  background: #241b12;
  border-color: var(--f-accent);
}

.profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d97706;
  color: #0c0906;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--f-text);
}

.profile-caret {
  color: var(--f-text-muted);
  transition: transform 0.2s;
}

.dash-profile:hover .profile-caret {
  color: var(--f-accent);
}

.dash-profile.active {
  border-color: var(--f-accent);
  background: #241b12;
}

.dash-profile.active .profile-caret {
  transform: rotate(180deg);
  color: var(--f-accent);
}

/* User Profile Dropdown Menu Card (Image 3) */
.profile-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #1c150e;
  border: 1px solid #362618;
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(229, 142, 38, 0.12);
  z-index: 1500;
  animation: modalScaleIn 0.2s var(--f-ease);
}

.prof-pop-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #2e2013;
  margin-bottom: 0.55rem;
}

.prof-pop-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d97706;
  color: #1c150e;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prof-pop-info {
  display: flex;
  flex-direction: column;
}

.prof-pop-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.prof-pop-role {
  font-size: 0.7rem;
  color: #8c7b6d;
  margin-top: 0.15rem;
}

.prof-pop-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.prof-pop-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #d8cfc6;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s;
  text-decoration: none;
}

.prof-pop-item svg {
  color: #8c7b6d;
  flex-shrink: 0;
  transition: color 0.2s;
}

.prof-pop-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.prof-pop-item:hover svg {
  color: var(--f-accent);
}

.prof-pop-item.signout-item:hover {
  color: var(--f-red);
}

.prof-pop-item.signout-item:hover svg {
  color: var(--f-red);
}

.dash-clock-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--f-border);
}

.clock-graphic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #4a3826;
  position: relative;
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  background: var(--f-accent);
  transform-origin: bottom center;
  border-radius: 2px;
}

.hour-hand {
  width: 2px;
  height: 7px;
  transform: rotate(140deg);
}

.minute-hand {
  width: 1.5px;
  height: 10px;
  transform: rotate(260deg);
}

.clock-text-group {
  display: flex;
  flex-direction: column;
}

.clock-day {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--f-text-muted);
  letter-spacing: 0.08em;
}

.clock-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--f-text);
  line-height: 1.1;
}

.clock-digital {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--f-accent);
}

/* ===== WORKSPACE LAYOUT ===== */
.dash-workspace {
  display: flex;
  min-height: calc(100vh - 58px);
}

/* Sidebar */
.dash-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--f-surface);
  border-right: 1px solid var(--f-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #2b2014;
  border-radius: 4px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-group-title {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--f-text-muted);
  letter-spacing: 0.1em;
  padding: 0 0.6rem 0.35rem;
  text-transform: uppercase;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--f-text-secondary);
  border: 1px solid transparent;
  transition: all 0.2s var(--f-ease);
  position: relative;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: #1a140d;
  color: var(--f-text);
}

.sidebar-nav-item.active {
  background: rgba(229, 142, 38, 0.12);
  border-color: var(--f-accent);
  color: #ffffff;
  font-weight: 500;
}

.sidebar-nav-item.active svg {
  stroke: var(--f-accent);
}

.active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--f-accent);
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s;
}

.sidebar-nav-item.active .active-dot {
  opacity: 1;
}

.sidebar-hint {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--f-border);
  font-size: 0.65rem;
  color: var(--f-text-muted);
  line-height: 1.4;
  text-align: center;
  background: #0e0a07;
}

/* ===== MAIN CONTENT AREA ===== */
.dash-content-area {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
  min-width: 0;
}

.module-view {
  display: none;
  animation: fadeIn 0.3s var(--f-ease) forwards;
}

.module-view.active {
  display: block;
}

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

/* View Header */
.view-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.vh-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.vh-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #23190e;
  border: 1px solid #3c2a17;
}

.vh-icon-box.orange {
  color: var(--f-accent);
}

.vh-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.vh-sub {
  font-size: 0.78rem;
  color: var(--f-text-muted);
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0c0906;
  background: var(--f-accent);
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
  transition: all 0.25s var(--f-ease);
}

.btn-action-primary:hover {
  background: var(--f-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(229, 142, 38, 0.3);
}

/* ===== GREETING BANNER ===== */
.facto-greeting-banner {
  background: linear-gradient(135deg, #1f160d 0%, #130e09 100%);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.greeting-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.greeting-quote {
  font-size: 0.82rem;
  color: var(--f-text-secondary);
  font-style: italic;
  max-width: 800px;
}

/* Sub Navigation Tabs */
.facto-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.facto-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--f-text-secondary);
  background: #17120c;
  border: 1px solid var(--f-border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.facto-tab-btn:hover {
  color: var(--f-text);
  border-color: var(--f-border-hover);
}

.facto-tab-btn.active {
  background: #241b12;
  border-color: var(--f-accent);
  color: var(--f-accent);
  font-weight: 600;
}

.tab-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--f-accent);
}

/* Dashboard Split Layout */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem;
}

/* Needs You Column */
.dash-needs-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.needs-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--f-border);
}

.needs-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.needs-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #23190e;
  color: var(--f-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.needs-heading {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.needs-count-pill {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--f-accent);
  background: var(--f-accent-dim);
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
}

.needs-sub {
  font-size: 0.7rem;
  color: var(--f-text-muted);
}

.needs-controls {
  display: flex;
  gap: 0.35rem;
}

.btn-ctrl-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--f-text-secondary);
  background: #17120c;
  border: 1px solid var(--f-border);
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  transition: all 0.2s;
}

.btn-ctrl-pill:hover,
.btn-ctrl-pill.active {
  border-color: var(--f-accent);
  color: var(--f-accent);
  background: #22180e;
}

.severity-section-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--f-red);
  letter-spacing: 0.08em;
  padding-top: 0.25rem;
}

.ssh-count {
  background: var(--f-red-dim);
  color: var(--f-red);
  padding: 0.05rem 0.4rem;
  border-radius: 100px;
}

.signals-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.facto-signal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--f-card);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius);
  padding: 1rem 1.25rem;
  transition: all 0.25s var(--f-ease);
}

.facto-signal-card:hover {
  border-color: var(--f-border-hover);
  background: var(--f-card-hover);
  transform: translateY(-1px);
}

.fsc-left-val {
  min-width: 110px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.fsc-amount {
  font-family: var(--f-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.fsc-val-tag {
  font-size: 0.68rem;
  color: var(--f-text-muted);
}

.fsc-content {
  flex: 1;
  min-width: 0;
}

.fsc-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--f-text);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.fsc-meta {
  font-size: 0.72rem;
  color: var(--f-text-secondary);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.fsc-footer-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--f-text-muted);
}

.dot-red {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--f-red);
}

.dot-amber {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--f-amber);
}

.dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--f-green);
}

.sep {
  opacity: 0.5;
}

.trend-warn {
  color: var(--f-amber);
}

.btn-review {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0c0906;
  background: var(--f-accent);
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-review:hover {
  background: var(--f-accent-hover);
  transform: translateX(2px);
}

/* Activities Column */
.dash-activities-column {
  background: var(--f-card);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.activities-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--f-border);
  margin-bottom: 1rem;
}

.act-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-day-tag {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--f-text-muted);
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.timeline-dot.green { background: var(--f-green-dim); color: var(--f-green); }
.timeline-dot.amber { background: var(--f-amber-dim); color: var(--f-amber); }
.timeline-dot.blue { background: var(--f-blue-dim); color: var(--f-blue); }
.timeline-dot.red { background: var(--f-red-dim); color: var(--f-red); }

.timeline-info {
  flex: 1;
}

.timeline-desc {
  font-size: 0.75rem;
  color: var(--f-text-secondary);
  line-height: 1.4;
}

.timeline-desc strong {
  color: #ffffff;
}

.timeline-time {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--f-text-muted);
}

/* ===== 4-CARD METRIC GRID ===== */
.metrics-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card-facto {
  background: var(--f-card);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s var(--f-ease);
}

.metric-card-facto:hover {
  border-color: var(--f-border-hover);
  background: var(--f-card-hover);
  transform: translateY(-2px);
}

.mcf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mcf-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--f-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mcf-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.mcf-value {
  font-family: var(--f-mono);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.mcf-trend {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
}

.mcf-trend.positive {
  color: var(--f-green);
}

.mcf-subtext {
  font-size: 0.72rem;
  color: var(--f-text-muted);
}

/* ===== FACTO CARD BLOCK ===== */
.facto-card-block {
  background: var(--f-card);
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.5rem;
}

.fcb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.fcb-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.fcb-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #251a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.fcb-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.fcb-sub {
  font-size: 0.72rem;
  color: var(--f-text-muted);
}

.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--f-green);
  background: var(--f-green-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
}

.fcb-range-tag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--f-text-muted);
}

.fcb-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.fcb-bold-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-right: 0.5rem;
}

.fcb-dim-text {
  font-size: 0.75rem;
  color: var(--f-text-muted);
}

/* Plant Health Gauge Body */
.plant-health-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: center;
}

.ph-gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0;
}

.circular-gauge-container {
  width: 140px;
  height: 140px;
  position: relative;
  margin-bottom: 0.75rem;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg-ring {
  fill: none;
  stroke: #251c12;
  stroke-width: 12;
}

.gauge-bar-ring {
  fill: none;
  stroke: var(--f-green);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 427;
  stroke-dashoffset: 51;
  transition: stroke-dashoffset 1s var(--f-ease);
}

.gauge-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-number {
  font-family: var(--f-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
}

.gauge-meta-text {
  display: flex;
  flex-direction: column;
}

.gm-grade {
  font-size: 0.8rem;
  color: var(--f-text);
}

.gm-grade strong {
  color: var(--f-green);
  font-size: 1rem;
}

.gm-sub {
  font-size: 0.7rem;
  color: var(--f-text-muted);
}

/* Breakdown Bars */
.ph-bars-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ph-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ph-bar-label {
  width: 90px;
  font-size: 0.78rem;
  color: var(--f-text-secondary);
  flex-shrink: 0;
}

.ph-track {
  flex: 1;
  height: 8px;
  background: #251c12;
  border-radius: 100px;
  overflow: hidden;
}

.ph-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s var(--f-ease);
}

.ph-fill.green { background: var(--f-green); }
.ph-fill.amber { background: var(--f-amber); }

.ph-bar-val {
  width: 30px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  color: #ffffff;
}

/* Production Bars Chart */
.production-bars-chart {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  height: 180px;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--f-border);
}

.prod-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  justify-content: flex-end;
}

.prod-bar-track {
  width: 100%;
  max-width: 44px;
  background: #22180e;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.prod-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s var(--f-ease);
}

.prod-bar-track:hover .prod-bar-fill {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.prod-bar-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--f-text-muted);
}

/* ===== TABLE STYLING ===== */
.table-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #120e09;
  border: 1px solid var(--f-border);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  width: 260px;
}

.search-input-wrap svg {
  color: var(--f-text-muted);
  flex-shrink: 0;
}

.dash-search-input {
  border: none;
  background: none;
  color: var(--f-text);
  font-family: var(--f-font);
  font-size: 0.78rem;
  width: 100%;
  outline: none;
}

.dash-search-input::placeholder {
  color: var(--f-text-muted);
}

.filter-pills-row {
  display: flex;
  gap: 0.35rem;
}

.fpill {
  font-size: 0.74rem;
  color: var(--f-text-secondary);
  background: #140f09;
  border: 1px solid var(--f-border);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  transition: all 0.2s;
}

.fpill:hover {
  color: var(--f-text);
  border-color: var(--f-border-hover);
}

.fpill.active {
  background: var(--f-accent);
  color: #0c0906;
  border-color: var(--f-accent);
  font-weight: 600;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.facto-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.facto-table th {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--f-text-muted);
  letter-spacing: 0.08em;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--f-border);
}

.facto-table td {
  padding: 0.85rem;
  border-bottom: 1px solid #1f170f;
  font-size: 0.8rem;
  vertical-align: middle;
}

.facto-table tr:hover td {
  background: #1e170f;
}

.td-primary {
  color: #ffffff;
  font-weight: 500;
}

.td-primary .row-icon {
  margin-right: 0.4rem;
  opacity: 0.75;
}

.td-dim {
  color: var(--f-text-secondary);
  font-size: 0.75rem;
}

.td-mono {
  font-family: var(--f-mono);
  color: #ffffff;
  font-weight: 600;
}

.tbl-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 140px;
}

.tbl-track {
  flex: 1;
  height: 6px;
  background: #251c12;
  border-radius: 100px;
  overflow: hidden;
}

.tbl-fill {
  height: 100%;
  border-radius: 100px;
}

.tbl-fill.green { background: var(--f-green); }
.tbl-fill.amber { background: var(--f-amber); }

.tbl-pct {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--f-text-muted);
  width: 32px;
  text-align: right;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  margin-right: 0.25rem;
}

.tag-pill.green { background: var(--f-green-dim); color: var(--f-green); }
.tag-pill.blue { background: var(--f-blue-dim); color: var(--f-blue); }
.tag-pill.amber { background: var(--f-amber-dim); color: var(--f-amber); }
.tag-pill.red { background: var(--f-red-dim); color: var(--f-red); }

/* Table Action Buttons */
.btn-table-action {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--f-accent);
  background: var(--f-accent-dim);
  border: 1px solid rgba(229, 142, 38, 0.3);
  padding: 0.3rem 0.65rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-table-action:hover {
  background: var(--f-accent);
  color: #000;
}

.btn-table-action.red {
  color: var(--f-red);
  background: var(--f-red-dim);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-table-action.red:hover {
  background: var(--f-red);
  color: #fff;
}

/* Row Pulse Animation for Newly Added Items */
@keyframes rowPulse {
  0% { background: rgba(229, 142, 38, 0.35); }
  50% { background: rgba(229, 142, 38, 0.15); }
  100% { background: transparent; }
}

.row-newly-added {
  animation: rowPulse 2.5s ease-out forwards;
}

/* ======================================================== */
/* UNIVERSAL DATA COLLECTION MODAL (User Screenshot Match) */
/* ======================================================== */
.data-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 4, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s var(--f-ease);
}

.data-modal-card {
  width: 100%;
  max-width: 480px;
  background: #1c150e;
  border: 1px solid #362618;
  border-radius: 16px;
  padding: 1.6rem 1.85rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(229, 142, 38, 0.12);
  transform: translateY(0);
  animation: modalScaleIn 0.25s var(--f-ease);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.data-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dmh-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dmh-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e58e26;
  color: #1c150e;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dmh-title-group {
  display: flex;
  flex-direction: column;
}

.dmh-sublabel {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: #8c7b6d;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.dmh-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.dmh-close-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: #7a6c5f;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.dmh-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.modal-form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #8c7b6d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-input,
.modal-select {
  width: 100%;
  background: #120e09;
  border: 1px solid #362618;
  border-radius: 8px;
  padding: 0.78rem 0.95rem;
  font-size: 0.85rem;
  color: #f5f0ea;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.modal-input:focus,
.modal-select:focus {
  border-color: #e58e26;
  box-shadow: 0 0 0 2px rgba(229, 142, 38, 0.2);
}

.modal-input::placeholder {
  color: #55483d;
}

.modal-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c7b6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.data-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn-dm-cancel {
  background: transparent;
  border: none;
  color: #d5c9bd;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dm-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.btn-dm-create {
  background: #e58e26;
  color: #1c150e;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.65rem 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dm-create:hover {
  background: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 142, 38, 0.35);
}

/* ======================================================== */
/* ACTION GATE DRAWER                                       */
/* ======================================================== */
.action-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 4, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s var(--f-ease);
}

.action-gate-drawer {
  width: 100%;
  max-width: 500px;
  background: #1c150e;
  border: 1px solid #362618;
  border-radius: 16px;
  padding: 1.6rem 1.85rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
  animation: modalScaleIn 0.25s var(--f-ease);
}

.agd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.35rem;
}

.agd-pill-badge {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--f-red);
  background: var(--f-red-dim);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.agd-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.agd-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.agd-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.agd-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: #8c7b6d;
  letter-spacing: 0.08em;
}

.agd-exposure-val {
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #e58e26;
}

.agd-desc {
  font-size: 0.85rem;
  color: var(--f-text-secondary);
  line-height: 1.5;
}

.agd-recommendation-box {
  background: #140e09;
  border: 1px solid #322214;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: #e2d7cd;
  line-height: 1.45;
  border-left: 3px solid #e58e26;
}

.agd-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.btn-agd-approve {
  background: var(--f-green);
  color: #0c0906;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.45rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-agd-approve:hover {
  background: #4ade80;
  transform: translateY(-1px);
}

/* ======================================================== */
/* COMPACT MODE FOR SIGNALS                                 */
/* ======================================================== */
.signals-cards-list.compact-mode .facto-signal-card {
  padding: 0.75rem 1rem;
  gap: 0.85rem;
}

.signals-cards-list.compact-mode .fsc-left-val {
  min-width: 75px;
}

.signals-cards-list.compact-mode .fsc-amount {
  font-size: 0.95rem;
}

.signals-cards-list.compact-mode .fsc-meta {
  display: none;
}

.signals-cards-list.compact-mode .fsc-title {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

/* ======================================================== */
/* CHURN ANALYTICS SECTION STYLES                           */
/* ======================================================== */
.churn-analytics-body {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1.6fr;
  gap: 1.5rem;
  align-items: center;
}

.churn-donut-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.churn-donut-canvas-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.churn-donut-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cdc-rate {
  font-family: var(--f-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.cdc-sub {
  font-size: 0.68rem;
  color: var(--f-text-muted);
}

.churn-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--f-text-secondary);
}

.cleg-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

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

.cleg-dot.green { background: var(--f-green); }
.cleg-dot.amber { background: var(--f-amber); }
.cleg-dot.red { background: var(--f-red); }

.churn-drivers-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.churn-subheading {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #8c7b6d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.churn-watchlist-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.churn-watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cw-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #140e09;
  border: 1px solid #2e2013;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  transition: all 0.2s;
}

.cw-item:hover {
  border-color: #44301d;
  background: #1a120b;
}

.cw-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cw-meta strong {
  font-size: 0.82rem;
  color: #ffffff;
}

.cw-sub {
  font-size: 0.7rem;
  color: var(--f-text-muted);
}

.cw-action-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-cw-retain {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: #e58e26;
  background: rgba(229, 142, 38, 0.12);
  border: 1px solid rgba(229, 142, 38, 0.3);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-cw-retain:hover {
  background: #e58e26;
  color: #1c150e;
}

/* Revenue Chart Canvas */
.revenue-chart-canvas-wrap {
  width: 100%;
  height: 240px;
  position: relative;
  margin-top: 0.5rem;
}

.revenue-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.revenue-horizon-controls {
  display: flex;
  gap: 0.35rem;
}

/* Sector Distribution Grid */
.sector-distribution-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.sector-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #130e09;
  border: 1px solid #2e2013;
  border-radius: 8px;
  padding: 0.85rem;
}

.sector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
}

.sector-name { color: #ffffff; }
.sector-val { font-family: var(--f-mono); color: #e58e26; }
.sector-sub { font-size: 0.68rem; color: var(--f-text-muted); }

/* ======================================================== */
/* NOTIFICATIONS POPOVER                                    */
/* ======================================================== */
.notifications-popover {
  position: fixed;
  top: 65px;
  right: 1.5rem;
  width: 320px;
  background: #1c150e;
  border: 1px solid #362618;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  z-index: 1500;
  animation: fadeIn 0.2s var(--f-ease);
}

.np-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #2e2013;
  margin-bottom: 0.75rem;
}

.np-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.np-clear-btn {
  font-size: 0.68rem;
  color: #8c7b6d;
  background: none;
  border: none;
  cursor: pointer;
}

.np-clear-btn:hover { color: #e58e26; }

.np-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.np-item {
  display: flex;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: var(--f-text-secondary);
  line-height: 1.4;
}

.np-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.np-dot.red { background: var(--f-red); }
.np-dot.amber { background: var(--f-amber); }
.np-dot.green { background: var(--f-green); }

.np-time {
  display: block;
  font-size: 0.66rem;
  color: var(--f-text-muted);
  margin-top: 0.2rem;
}

/* ======================================================== */
/* TOAST NOTIFICATION CONTAINER                             */
/* ======================================================== */
.dash-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.dash-toast {
  pointer-events: auto;
  background: #241b12;
  border: 1px solid #e58e26;
  border-radius: 8px;
  padding: 0.75rem 1.15rem;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastSlideIn 0.3s var(--f-ease) forwards;
}

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

/* ======================================================== */
/* REPORT LIBRARY (Screenshots 1, 2, 3 Match)              */
/* ======================================================== */
.rl-section {
  margin-bottom: 2rem;
}

.rl-header-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #18120c;
  border: 1px solid #281c10;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.15rem;
}

.rl-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(229, 142, 38, 0.25);
}

.rl-header-text {
  display: flex;
  flex-direction: column;
}

.rl-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.rl-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.rl-count-badge {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #e58e26;
  background: #251a0e;
  border: 1px solid #4a3219;
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
}

.rl-sub {
  font-size: 0.75rem;
  color: #8c7b6d;
  margin: 0.15rem 0 0;
}

/* Controls: Filters + Search */
.rl-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.rl-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.rl-pill {
  background: #18120c;
  border: 1px solid #281c10;
  color: #a8998c;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.95rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--f-ease);
}

.rl-pill:hover {
  background: #241b12;
  color: #ffffff;
  border-color: #3d2a18;
}

.rl-pill.active {
  background: #e58e26;
  border-color: #e58e26;
  color: #0c0906;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(229, 142, 38, 0.3);
}

.rl-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.rl-search-icon {
  position: absolute;
  left: 0.75rem;
  color: #7c6d61;
  pointer-events: none;
}

.rl-search-input {
  background: #18120c;
  border: 1px solid #281c10;
  border-radius: 8px;
  padding: 0.42rem 0.85rem 0.42rem 2.2rem;
  color: #ffffff;
  font-size: 0.8rem;
  outline: none;
  width: 190px;
  transition: all 0.2s var(--f-ease);
}

.rl-search-input:focus {
  border-color: #e58e26;
  width: 230px;
  background: #20170f;
}

.rl-search-input::placeholder {
  color: #7c6d61;
}

/* Cards Grid */
.rl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.rl-card {
  background: #18120c;
  border: 1px solid #261b0f;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s var(--f-ease);
  position: relative;
}

.rl-card:hover {
  border-color: #4a341c;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.rl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.rl-top-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rl-card-icon {
  font-size: 0.95rem;
  color: #a8998c;
  display: flex;
  align-items: center;
}

.rl-cat-pill {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #a8998c;
  background: #241b12;
  border: 1px solid #362618;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
}

.rl-grade-pill {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.rl-grade-pill.amber {
  background: rgba(229, 142, 38, 0.15);
  border: 1px solid rgba(229, 142, 38, 0.35);
  color: #e58e26;
}

.rl-grade-pill.green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.rl-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.55rem 0;
  line-height: 1.3;
}

.rl-metric-group {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.rl-metric-with-gauge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.rl-main-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.rl-main-val small {
  font-size: 0.72rem;
  font-weight: 500;
  color: #8c7b6d;
  margin-left: 0.2rem;
}

.rl-delta {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.rl-delta.green {
  color: #10b981;
}

.rl-delta.amber {
  color: #e58e26;
}

/* Circular Gauge in Card (Image 1, 2) */
.rl-circle-gauge {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.rl-gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rl-gauge-bg {
  fill: none;
  stroke: #251b11;
  stroke-width: 3.2;
}

.rl-gauge-stroke {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s var(--f-ease);
}

.rl-gauge-stroke.amber {
  stroke: #e58e26;
}

.rl-gauge-stroke.green {
  stroke: #10b981;
}

.rl-gauge-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

/* Sparkline in Card */
.rl-sparkline-wrap {
  width: 100%;
  height: 40px;
  margin-top: 0.45rem;
  margin-bottom: 0.75rem;
}

.rl-sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Card Footer */
.rl-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #20160b;
  padding-top: 0.65rem;
  margin-top: auto;
}

.rl-meta {
  font-size: 0.72rem;
  color: #7c6d61;
}

.rl-view-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e58e26;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s;
  padding: 0;
}

.rl-view-btn:hover {
  color: #ffaa40;
  transform: translateX(2px);
}

/* Empty State when Search has no matches */
.rl-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #8c7b6d;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
  }
  .plant-health-body {
    grid-template-columns: 1fr;
  }
  .metrics-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .churn-analytics-body {
    grid-template-columns: 1fr;
  }
  .sector-distribution-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-sidebar {
    width: 60px;
  }
  .sidebar-group-title,
  .nav-label,
  .sidebar-hint {
    display: none;
  }
  .sidebar-nav-item {
    justify-content: center;
    padding: 0.75rem 0;
  }
  .dash-content-area {
    padding: 1rem;
  }
  .metrics-grid-4 {
    grid-template-columns: 1fr;
  }
  .dash-topbar-right .clock-text-group,
  .dash-contact-pill span {
    display: none;
  }
  .sector-distribution-grid {
    grid-template-columns: 1fr;
  }
  .rl-grid {
    grid-template-columns: 1fr;
  }
  .rl-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .rl-search-input {
    width: 100% !important;
  }
}

/* ======================================================== */
/* REPORT DETAIL INSPECTION MODAL                           */
/* ======================================================== */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 4, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s var(--f-ease);
}

.report-modal-card {
  width: 100%;
  max-width: 560px;
  background: #1c150e;
  border: 1px solid #362618;
  border-radius: 16px;
  padding: 1.6rem 1.85rem;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(229, 142, 38, 0.15);
  animation: modalScaleIn 0.25s var(--f-ease);
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #281c10;
  padding-bottom: 0.95rem;
}

.rmh-tag {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e58e26;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.rmh-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.report-modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.rm-stat-box {
  background: #140e09;
  border: 1px solid #2a1d11;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.rm-stat-label {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: #8c7b6d;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.rm-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.rm-stat-trend {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #10b981;
}

.report-modal-body {
  margin-bottom: 1.4rem;
  background: #140e09;
  border: 1px solid #2a1d11;
  border-radius: 8px;
  padding: 0.95rem 1.1rem;
}

.rm-section-title {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #8c7b6d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.rm-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.rm-meta-item {
  display: flex;
  justify-content: space-between;
  color: #d6cac0;
}

.rm-meta-item span:first-child {
  color: #8c7b6d;
}

.report-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #281c10;
  padding-top: 1.1rem;
  gap: 0.75rem;
}

.rm-export-group {
  display: flex;
  gap: 0.5rem;
}

.btn-rm-export {
  background: #241b12;
  border: 1px solid #3d2a18;
  color: #d6cac0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-rm-export:hover {
  background: #362618;
  color: #ffffff;
  border-color: #e58e26;
}
