/* ==========================================================================
   SAVANNA NEXUS &bull; ENTERPRISE BRAND DESIGN SYSTEM & THEME
   Source of Truth: Savanna Nexus Login Page & Brand Assets
   Dominant Palette: Savanna Orange (#F5921E) & Charcoal (#181B20)
   ========================================================================== */

:root {
  /* Primary Brand Palette */
  --nexus-orange: #F5921E;
  --nexus-orange-hover: #E07E10;
  --nexus-orange-active: #C96E0A;
  --nexus-orange-subtle: rgba(245, 146, 30, 0.08);
  --nexus-orange-glow: rgba(245, 146, 30, 0.25);

  /* Dark Foundations (Sidebar & Primary Headings) */
  --nexus-dark: #181B20;
  --nexus-dark-surface: #22262E;
  --nexus-dark-subtle: #2C323D;

  /* Surfaces & Canvas */
  --nexus-surface: #FFFFFF;
  --nexus-surface-alt: #F9FAFB;
  --nexus-bg: #F8F9FA;
  --nexus-border: #E5E7EB;
  --nexus-border-light: #F3F4F6;
  --nexus-border-focus: rgba(245, 146, 30, 0.5);

  /* Typography */
  --nexus-text-main: #111827;
  --nexus-text-muted: #6B7280;
  --nexus-text-subtle: #9CA3AF;
  --nexus-text-light: #FFFFFF;

  /* Controlled Semantic Status Palette */
  --nexus-green: #16A34A;
  --nexus-green-bg: #DCFCE7;
  --nexus-green-border: #BBF7D0;

  --nexus-red: #DC2626;
  --nexus-red-bg: #FEE2E2;
  --nexus-red-border: #FECACA;

  --nexus-amber: #D97706;
  --nexus-amber-bg: #FEF3C7;
  --nexus-amber-border: #FDE68A;

  --nexus-gray: #6B7280;
  --nexus-gray-bg: #F3F4F6;
  --nexus-gray-border: #E5E7EB;

  /* Structural Dimensions */
  --nexus-radius-sm: 6px;
  --nexus-radius-md: 10px;
  --nexus-radius-lg: 14px;
  --nexus-radius-xl: 18px;
  --nexus-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --nexus-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.05);
  --nexus-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* Base Body Styles */
body {
  background-color: var(--nexus-bg) !important;
  color: var(--nexus-text-main) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.btn-nexus-primary {
  background-color: var(--nexus-orange) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--nexus-orange) !important;
  font-weight: 600 !important;
  border-radius: var(--nexus-radius-md) !important;
  padding: 0.45rem 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-nexus-primary:hover,
.btn-nexus-primary:focus {
  background-color: var(--nexus-orange-hover) !important;
  border-color: var(--nexus-orange-hover) !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 12px var(--nexus-orange-glow) !important;
}

.btn-nexus-secondary {
  background-color: var(--nexus-surface) !important;
  color: var(--nexus-text-main) !important;
  border: 1px solid var(--nexus-border) !important;
  font-weight: 600 !important;
  border-radius: var(--nexus-radius-md) !important;
  padding: 0.45rem 0.95rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-nexus-secondary:hover {
  background-color: var(--nexus-surface-alt) !important;
  border-color: #D1D5DB !important;
  color: var(--nexus-dark) !important;
}

.btn-nexus-danger {
  background-color: var(--nexus-red-bg) !important;
  color: var(--nexus-red) !important;
  border: 1px solid var(--nexus-red-border) !important;
  font-weight: 600 !important;
  border-radius: var(--nexus-radius-md) !important;
  padding: 0.45rem 0.95rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  transition: all 0.2s ease !important;
}

.btn-nexus-danger:hover {
  background-color: var(--nexus-red) !important;
  color: #FFFFFF !important;
  border-color: var(--nexus-red) !important;
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.nexus-card {
  background-color: var(--nexus-surface) !important;
  border: 1px solid var(--nexus-border) !important;
  border-radius: var(--nexus-radius-lg) !important;
  box-shadow: var(--nexus-shadow-sm) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.nexus-card:hover {
  box-shadow: var(--nexus-shadow-md) !important;
}

.nexus-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nexus-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--nexus-surface);
  border-top-left-radius: var(--nexus-radius-lg);
  border-top-right-radius: var(--nexus-radius-lg);
}

.nexus-card-body {
  padding: 1.25rem;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.nexus-table-wrapper {
  background-color: var(--nexus-surface);
  border: 1px solid var(--nexus-border);
  border-radius: var(--nexus-radius-md);
  overflow: hidden;
}

.nexus-table {
  width: 100%;
  margin-bottom: 0;
  color: var(--nexus-text-main);
  vertical-align: middle;
  border-collapse: collapse;
}

.nexus-table thead th {
  background-color: var(--nexus-surface-alt) !important;
  color: var(--nexus-text-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--nexus-border) !important;
  white-space: nowrap !important;
}

.nexus-table tbody td {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--nexus-border) !important;
  font-size: 0.86rem !important;
}

.nexus-table tbody tr:last-child td {
  border-bottom: none !important;
}

.nexus-table tbody tr:hover td {
  background-color: #FAFAF9 !important;
}

/* ==========================================================================
   BADGES & STATUS
   ========================================================================== */
.nexus-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}

.nexus-badge-operational, .nexus-badge-green {
  background-color: var(--nexus-green-bg);
  color: var(--nexus-green);
  border: 1px solid var(--nexus-green-border);
}

.nexus-badge-warning, .nexus-badge-amber {
  background-color: var(--nexus-amber-bg);
  color: var(--nexus-amber);
  border: 1px solid var(--nexus-amber-border);
}

.nexus-badge-critical, .nexus-badge-red {
  background-color: var(--nexus-red-bg);
  color: var(--nexus-red);
  border: 1px solid var(--nexus-red-border);
}

.nexus-badge-neutral, .nexus-badge-gray {
  background-color: var(--nexus-gray-bg);
  color: var(--nexus-gray);
  border: 1px solid var(--nexus-gray-border);
}

.nexus-badge-orange {
  background-color: var(--nexus-orange-subtle);
  color: var(--nexus-orange-hover);
  border: 1px solid rgba(245, 146, 30, 0.3);
}

/* ==========================================================================
   IMAGE THUMBNAILS & LIGHTBOX PREVIEW
   ========================================================================== */
.nexus-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--nexus-radius-sm);
  object-fit: cover;
  border: 1px solid var(--nexus-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: var(--nexus-surface-alt);
}

.nexus-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: var(--nexus-orange);
}

.nexus-gallery-thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--nexus-radius-md);
  object-fit: cover;
  border: 1px solid var(--nexus-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nexus-gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--nexus-shadow-md);
  border-color: var(--nexus-orange);
}

/* Lightbox Modal */
.nexus-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 29, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.nexus-lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  position: relative;
  text-align: center;
}

.nexus-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--nexus-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.nexus-lightbox-caption {
  color: #FFFFFF;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nexus-lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ==========================================================================
   INPUTS & FORM CONTROLS
   ========================================================================== */
.nexus-form-label {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--nexus-text-muted) !important;
  margin-bottom: 0.35rem !important;
}

.nexus-input,
.nexus-select,
.nexus-textarea {
  background-color: var(--nexus-surface) !important;
  border: 1px solid var(--nexus-border) !important;
  border-radius: var(--nexus-radius-md) !important;
  padding: 0.5rem 0.85rem !important;
  font-size: 0.88rem !important;
  color: var(--nexus-text-main) !important;
  width: 100% !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.nexus-input:focus,
.nexus-select:focus,
.nexus-textarea:focus {
  border-color: var(--nexus-orange) !important;
  box-shadow: 0 0 0 3px var(--nexus-orange-subtle) !important;
  outline: none !important;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.nexus-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  margin-bottom: 0.85rem;
}

.nexus-breadcrumb a {
  color: var(--nexus-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nexus-breadcrumb a:hover {
  color: var(--nexus-orange);
}

.nexus-breadcrumb .separator {
  color: var(--nexus-text-subtle);
  font-size: 0.7rem;
}

.nexus-breadcrumb .current {
  color: var(--nexus-orange);
  font-weight: 600;
}

/* ==========================================================================
   SELECTED OLT CATEGORY NAVIGATION PANEL
   ========================================================================== */
.olt-cat-link {
  display: flex !important;
  align-items: center !important;
  padding: 0.6rem 0.85rem !important;
  border-radius: var(--nexus-radius-md) !important;
  color: #334155 !important;
  font-weight: 500 !important;
  font-size: 0.86rem !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
  margin-bottom: 2px !important;
}

.olt-cat-link:hover {
  background-color: #F8FAFC !important;
  color: var(--nexus-text-main) !important;
}

.olt-cat-link.active {
  background-color: #FFF9F2 !important;
  color: #E58212 !important;
  font-weight: 700 !important;
  border-color: rgba(245, 146, 30, 0.35) !important;
  border-left: 4px solid var(--nexus-orange) !important;
}

.olt-cat-link.active i {
  color: var(--nexus-orange) !important;
}

.olt-cat-link i {
  font-size: 1rem !important;
  width: 22px !important;
  text-align: center !important;
  color: #64748B !important;
}
