/* Safepack Sentinel Master Unified Theme - Professional Production Grade */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --sentinel-bg: #070c18;
  --sentinel-surface: #0e172a;
  --sentinel-card: #111d33;
  --sentinel-card-hover: #162540;
  --sentinel-border: rgba(255, 255, 255, 0.1);
  --sentinel-border-focus: rgba(6, 182, 212, 0.45);
  
  --sentinel-cyan: #06b6d4;
  --sentinel-cyan-bright: #22d3ee;
  --sentinel-cyan-glow: rgba(6, 182, 212, 0.25);
  
  --sentinel-mint: #10b981;
  --sentinel-mint-bright: #34d399;
  --sentinel-mint-glow: rgba(16, 185, 129, 0.25);
  
  --sentinel-indigo: #6366f1;
  --sentinel-amber: #f59e0b;
  --sentinel-rose: #f43f5e;
  
  --sentinel-text: #f8fafc;
  --sentinel-text-muted: #94a3b8;
  --sentinel-text-dim: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;
}

body {
  background-color: var(--sentinel-bg);
  color: var(--sentinel-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-size: 0.92rem;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

code, kbd, samp, pre, .font-monospace, .code-snippet-box {
  font-family: var(--font-mono) !important;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--sentinel-bg);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Top Navbar Navigation */
.sentinel-navbar {
  background: rgba(13, 20, 35, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sentinel-border);
  padding: 0.65rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1050;
}

.sentinel-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.sentinel-brand-badge {
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #04101e;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sentinel-nav-link {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.sentinel-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sentinel-nav-link.active {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.12);
}

/* Responsive Horizontal Tab Bar (No overlap guarantee on any screen) */
.sentinel-nav-pills {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.35rem;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sentinel-nav-pills::-webkit-scrollbar {
  height: 4px;
}

.sentinel-nav-pills::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.sentinel-nav-pills::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

.sentinel-nav-pills::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.6);
}

.sentinel-nav-pills .nav-item {
  flex-shrink: 0;
}

.sentinel-nav-pills .nav-link {
  white-space: nowrap;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 0.95rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sentinel-nav-pills .nav-link:hover {
  color: #fff;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
}

.sentinel-nav-pills .nav-link.active {
  color: #22d3ee;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(16, 185, 129, 0.18));
  border-color: #06b6d4;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.25);
}

/* Card & Panels */
.sentinel-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sentinel-panel:hover {
  border-color: rgba(6, 182, 212, 0.25);
}

.sentinel-btn-pill {
  border-radius: 50px;
  padding: 0.38rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.sentinel-btn-pill:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.sentinel-btn-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.2));
  border-color: #06b6d4;
  color: #22d3ee;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

/* Top Stat / KPI Cards */
.kpi-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
}

.kpi-card.glow-mint {
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.1);
}

.kpi-card.glow-cyan {
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 24px rgba(6, 182, 212, 0.1);
}

.kpi-title {
  color: var(--sentinel-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-top: 0.4rem;
}

.kpi-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.kpi-badge.mint {
  background: rgba(16, 185, 129, 0.2);
  color: var(--sentinel-mint-bright);
}

.kpi-badge.cyan {
  background: rgba(6, 182, 212, 0.2);
  color: var(--sentinel-cyan-bright);
}

/* Live indicators */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--sentinel-mint-bright);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-pill-cyan {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--sentinel-cyan-bright);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--sentinel-mint-bright);
  animation: pulse-dot 1.8s infinite;
}

.live-dot.cyan {
  background-color: var(--sentinel-cyan-bright);
}

.live-dot.amber {
  background-color: var(--sentinel-amber);
}

.live-dot.rose {
  background-color: var(--sentinel-rose);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Screen Mirroring Frame (Workforce image style) */
.screen-mirror-card {
  background: #0d1629;
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 1.1rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
  transition: all 0.25s ease;
}

.screen-mirror-card.mint-border {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.screen-mirror-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(6, 182, 212, 0.16);
}

.screen-thumb-container {
  width: 200px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #060b17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.screen-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screen-info-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

/* Employee list in left sidebar */
.employee-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-bottom: 0.4rem;
}

.employee-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.employee-item.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
}

.employee-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* Buttons */
.btn-sentinel-cyan {
  background: var(--sentinel-cyan);
  color: #04101e;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  transition: all 0.2s ease;
}

.btn-sentinel-cyan:hover {
  background: var(--sentinel-cyan-bright);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
  color: #04101e;
}

.btn-sentinel-mint {
  background: var(--sentinel-mint);
  color: #04140c;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  transition: all 0.2s ease;
}

.btn-sentinel-mint:hover {
  background: var(--sentinel-mint-bright);
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
  color: #04140c;
}

.btn-sentinel-outline {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.18s ease;
}

.btn-sentinel-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Leaflet Container without inverted filter */
.leaflet-container {
  background: #0a0f1d !important;
  border-radius: 10px;
}

/* Tooltips */
.geofence-tooltip {
  background: rgba(14, 22, 38, 0.92) !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
}

/* Heatmap Gradient Bar */
.focus-heatmap-bar {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, #34d399 0%, #22d3ee 45%, #64748b 80%, #334155 100%);
  position: relative;
}

/* Action Button Panel in MDM */
.mdm-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 0.55rem;
  cursor: pointer;
}

.mdm-action-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--sentinel-mint-bright);
  color: #fff;
  transform: translateX(3px);
}

.mdm-action-btn i {
  font-size: 1.15rem;
  color: var(--sentinel-mint-bright);
}

/* Agent deployment cards */
.agent-hub-card {
  background: #0d1629;
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 4px 30px rgba(6, 182, 212, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.agent-hub-card.mint-border {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 30px rgba(16, 185, 129, 0.08);
}

.code-snippet-box {
  background: #060b17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: 'Cascadia Code', Consolas, Monaco, monospace;
  font-size: 0.8rem;
  color: #38bdf8;
  position: relative;
  overflow-x: auto;
}

/* Mobile Offcanvas Navigation */
.sentinel-offcanvas {
  background: rgba(13, 20, 35, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--sentinel-border) !important;
}

.sentinel-offcanvas .sentinel-nav-link {
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* Table Responsive Enhancements */
.table-responsive {
  border-radius: 10px;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

.sentinel-table th {
  white-space: nowrap;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.sentinel-table td {
  white-space: nowrap;
}

/* ==============================================================================
   DARK THEME HIGH-CONTRAST FORMS, MODALS, BACKDROPS, DROPDOWNS & RESPONSIVE FIXES
   ============================================================================== */

/* Modal & Backdrop Z-Index Hierarchy */
.modal-backdrop {
  background-color: rgba(4, 8, 18, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1050 !important;
}

.modal {
  z-index: 1055 !important;
}

.modal-dialog {
  margin: 1.5rem auto;
  max-width: 95%;
}

@media (min-width: 576px) {
  .modal-dialog { max-width: 540px; }
  .modal-dialog.modal-lg { max-width: 800px; }
  .modal-dialog.modal-xl { max-width: 1140px; }
}

.modal-content {
  background: #0d1527 !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15) !important;
  color: #f8fafc !important;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.6) !important;
  padding: 1rem 1.25rem;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.6) !important;
  padding: 0.85rem 1.25rem;
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

/* Dark Theme Form Controls & Dropdown Selects */
.form-control,
.form-select,
.input-group-text {
  background-color: #0b1322 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  border-radius: 8px;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: #0f192d !important;
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25) !important;
  color: #ffffff !important;
}

.form-control::placeholder {
  color: #64748b !important;
  opacity: 1;
}

.form-select option {
  background-color: #0b1322 !important;
  color: #f8fafc !important;
  padding: 0.5rem;
}

.form-check-input {
  background-color: #0b1322 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #06b6d4 !important;
  border-color: #06b6d4 !important;
}

/* High Contrast Text & Badges */
.text-muted,
.text-secondary {
  color: #94a3b8 !important;
}

.text-cyan {
  color: #22d3ee !important;
}

.text-mint {
  color: #34d399 !important;
}

/* Universal Dropdown Styling */
.dropdown-menu-dark,
.dropdown-menu {
  background: #0c1424 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(6, 182, 212, 0.12) !important;
  z-index: 1065 !important;
  padding: 0.4rem;
}

.dropdown-item {
  color: #cbd5e1 !important;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.86rem;
  transition: all 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(6, 182, 212, 0.15) !important;
  color: #22d3ee !important;
}

.dropdown-item.text-danger:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
}

/* Floating Bulk Action Toolbars (Universal No-Overlap Guarantee) */
.floating-bulk-toolbar {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 1040 !important;
  background: rgba(13, 22, 39, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(6, 182, 212, 0.45) !important;
  border-radius: 50px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.25) !important;
  padding: 0.55rem 1.25rem !important;
  max-width: 95vw !important;
  animation: slideUpToolbar 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpToolbar {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Responsive Overlap Protection */
@media (max-width: 991.98px) {
  .sentinel-navbar {
    padding: 0.5rem 0.85rem;
  }

  .floating-bulk-toolbar {
    bottom: 16px !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 767.98px) {
  .sentinel-nav-pills {
    gap: 0.35rem;
    padding-bottom: 0.5rem;
  }

  .sentinel-nav-pills .nav-link {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .floating-bulk-toolbar {
    flex-direction: column;
    border-radius: 16px !important;
    gap: 0.4rem;
  }
}


