@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ================================================================
   MIKHMON GLASSPRO - EXTRA COMPONENT STYLES v2
   Icon alignment fixes + Traffic chart modernization
   ================================================================ */

/* ══════════════════════════════════════════
   1. BOOTSTRAP ICON ALIGNMENT FIX
══════════════════════════════════════════ */

/* Sidebar: ensure icons are precisely sized & centered in flex row */
.sidenav a,
.dropdown-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
}

/* Target all bootstrap icons inside sidebar links */
.sidenav a>.bi,
.sidenav a>[class^="bi-"],
.sidenav a>[class*=" bi-"],
.dropdown-btn>.bi,
.dropdown-btn>[class^="bi-"],
.dropdown-btn>[class*=" bi-"] {
  font-size: 15px !important;
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  /* Exclude chevron at end */
}

/* Chevron caret icon — stays to the right */
.dropdown-btn>.bi-chevron-compact-down {
  width: auto !important;
  margin-left: auto !important;
  font-size: 11px !important;
}

/* Box group icons — stat boxes */
.box-group-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.box-group-icon .bi,
.box-group-icon [class^="bi-"],
.box-group-icon [class*=" bi-"] {
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  line-height: normal !important;
}

/* Reset Bootstrap Icon offset inside card badges for perfect centering */
.box-group-icon .bi::before,
.box-group-icon [class^="bi-"]::before,
.box-group-icon [class*=" bi-"]::before {
  vertical-align: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
}

/* Card header icons */
.card-header h3 .bi,
.card-header h3 [class^="bi-"],
.card-header h3 [class*=" bi-"] {
  font-size: 15px;
  vertical-align: -2px;
  display: inline-block;
  line-height: 1;
}

/* Navbar icons (logout, etc.) */
.navbar .bi,
.navbar [class^="bi-"],
.navbar [class*=" bi-"] {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
}

/* ══════════════════════════════════════════
   2. SIDEBAR IDENTITY / SESSION LABEL
══════════════════════════════════════════ */
#sidenav .card-header,
#sidenav>.menu.card-header {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  padding: 0 16px 10px !important;
  border-radius: 0 !important;
  margin-bottom: 4px;
}

#sidenav .card-header h3,
#sidenav>.menu.card-header h3 {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #3d4f6b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  background: none !important;
  -webkit-text-fill-color: #3d4f6b !important;
  display: block !important;
}

/* ══════════════════════════════════════════
   3. STAT BOX ICON & LAYOUT ENHANCEMENTS
══════════════════════════════════════════ */
.box {
  min-height: 80px;
}

/* Hover glow per color */
.box.bg-blue:hover,
.box.bg-purple:hover {
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.45) !important;
}

.box.bg-green:hover {
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.45) !important;
}

.box.bg-yellow:hover {
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.45) !important;
}

.box.bg-red:hover {
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.45) !important;
}

.box.bg-cyan:hover {
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.45) !important;
}

.box.bg-orange:hover {
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.45) !important;
}

/* ══════════════════════════════════════════
   4. TRAFFIC CARD — MODERN PROFESSIONAL
══════════════════════════════════════════ */

/* Traffic card: give it a more dramatic look */
.card:has(#trafficMonitor) {
  background: linear-gradient(145deg,
      rgba(20, 22, 45, 0.95) 0%,
      rgba(15, 17, 35, 0.98) 100%);
  border-color: rgba(124, 58, 237, 0.18);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(124, 58, 237, 0.08);
}

/* Traffic card header */
.card:has(#trafficMonitor) .card-header {
  background: rgba(124, 58, 237, 0.05);
  border-bottom-color: rgba(124, 58, 237, 0.12);
  padding: 14px 20px;
}

.card:has(#trafficMonitor) .card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.card:has(#trafficMonitor) .card-header h3 .bi {
  color: #8b5cf6 !important;
}

/* trafficMonitor chart container */
#trafficMonitor {
  min-height: 300px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  /* Subtle inner glow at top */
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
}

/* Highcharts SVG inside traffic monitor */
#trafficMonitor .highcharts-container {
  border-radius: 10px;
  overflow: hidden;
}

/* Highcharts background rect — make transparent */
#trafficMonitor .highcharts-background {
  fill: transparent !important;
}

/* Highcharts plot background */
#trafficMonitor .highcharts-plot-background {
  fill: transparent !important;
}

/* Series colors override for traffic Tx/Rx */
#trafficMonitor .highcharts-series-0 .highcharts-area {
  fill: url(#gp-grad-tx) !important;
  fill-opacity: 1 !important;
}

#trafficMonitor .highcharts-series-0 .highcharts-graph {
  stroke: #00f2fe !important;
  stroke-width: 3px !important;
}

#trafficMonitor .highcharts-series-1 .highcharts-area {
  fill: url(#gp-grad-rx) !important;
  fill-opacity: 1 !important;
}

#trafficMonitor .highcharts-series-1 .highcharts-graph {
  stroke: #3b82f6 !important;
  stroke-width: 3px !important;
}

/* Highcharts legend */
#trafficMonitor .highcharts-legend-item text {
  fill: #94a3b8 !important;
  font-size: 12px !important;
  font-family: 'Inter', sans-serif !important;
}

#trafficMonitor .highcharts-legend-item:hover text {
  fill: #f1f5f9 !important;
}

/* Highcharts axis labels */
#trafficMonitor .highcharts-axis-labels text {
  fill: #64748b !important;
  font-size: 11px !important;
  font-family: 'Inter', sans-serif !important;
}

/* Highcharts grid lines */
#trafficMonitor .highcharts-grid-line {
  stroke: rgba(255, 255, 255, 0.05) !important;
}

/* Traffic card body padding */
.card:has(#trafficMonitor) .card-body {
  padding: 12px 16px 16px;
}

/* ══════════════════════════════════════════
   5. HOTSPOT LOG TABLE REFINEMENTS
══════════════════════════════════════════ */
.card .table thead th {
  font-size: 11px;
  padding: 8px 14px;
  letter-spacing: 0.08em;
  color: #475569;
}

.card .table tbody td {
  font-size: 13px;
  padding: 7px 14px;
  color: #94a3b8;
}

.card .table tbody tr:last-child td {
  border-bottom: none;
}

.card .table-hover tbody tr:hover {
  background: rgba(124, 58, 237, 0.06);
}

/* ══════════════════════════════════════════
   6. NAVBAR REFINEMENTS
══════════════════════════════════════════ */

/* Page breadcrumb */
#cpage {
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
}

/* Hamburger icons on desktop (hidden) */
@media screen and (min-width: 751px) {
  #closeNav {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
  }
}

/* Mobile hamburger / close buttons container */
#openNav,
#closeNav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  align-self: center !important;
}

/* Attribute selector to hide button when JS sets display: none inline */
#openNav[style*="display: none"],
#openNav[style*="display:none"],
#closeNav[style*="display: none"],
#closeNav[style*="display:none"] {
  display: none !important;
}

/* Mobile hamburger icon */
#openNav i,
#closeNav i {
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

#openNav i:hover,
#closeNav i:hover {
  color: #fff;
}

/* ══════════════════════════════════════════
   7. CARD HEADER SECTION ICONS
══════════════════════════════════════════ */
.card-header h3 .bi-bar-chart {
  color: #8b5cf6 !important;
}

.card-header h3 .bi-people {
  color: #06b6d4 !important;
}

.card-header h3 .bi-hdd-network {
  color: #10b981 !important;
}

.card-header h3 .bi-wifi {
  color: #7c3aed !important;
}

.card-header h3 .bi-activity {
  color: #f59e0b !important;
}

.card-header h3 .bi-cash-coin {
  color: #10b981 !important;
}

/* Dots menu in card header */
.card-header>span[style*="float"] {
  color: #475569;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.card-header>span[style*="float"]:hover {
  color: #94a3b8;
}

/* ══════════════════════════════════════════
   8. MISCELLANEOUS POLISH
══════════════════════════════════════════ */

/* Notify animation */
#notify {
  animation: gp-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gp-slide-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Inline code */
code,
pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  color: #a5f3fc;
}

/* Mobile shadow */
@media screen and (max-width: 750px) {
  .sidenav {
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.65);
  }
}

/* Print */
@media print {

  .navbar,
  .sidenav {
    display: none !important;
  }

  #main {
    margin: 0 !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ══════════════════════════════════════════
   9. ADMIN SESSIONS PAGE (COMPACT v2)
══════════════════════════════════════════ */

/* Session list layout */
.session-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: var(--ease);
}

.session-list-item:hover {
  background: rgba(124, 58, 237, 0.04);
  border-color: rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

.session-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 18px;
  transition: var(--ease);
}

.session-icon:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: #fff;
}

.session-details {
  display: flex;
  flex-direction: column;
}

.session-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}

.session-subtitle {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--ease);
  border: 1px solid transparent;
  color: var(--text-2);
}

.btn-action i {
  font-size: 12px;
}

.btn-open {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}

.btn-open:hover {
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-edit {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.btn-edit:hover {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.btn-delete:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Admin settings table form */
form table.table.table-sm td {
  border-bottom: none;
  padding: 10px 4px;
}

form table.table.table-sm td.align-middle {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  width: 140px;
}

/* Password input show hide checkbox container */
.group-item-r.pd-2p5 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  width: 40px !important;
}

.group-item-r.pd-2p5 input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   10. NAVBAR ELEMENTS ALIGNMENT & TIDINESS
══════════════════════════════════════════ */

/* Force navbar right to align items properly and add spacing */
.navbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding-right: 16px !important;
}

/* Force selects inside navbar to look neat and aligned */
.navbar-right select.ses {
  margin: 0 !important;
  /* overrides mr-t-10 */
  height: 32px !important;
  padding: 0 28px 0 12px !important;
  text-align: left !important;
  text-align-last: left !important;
  border-radius: 8px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-1) !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  width: auto !important;
  max-width: 140px !important;

  /* SVG dropdown arrow chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 11px !important;

  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* Clean select option dropdowns */
.navbar-right select.ses option {
  background-color: #101223 !important;
  color: #f1f5f9 !important;
  padding: 8px !important;
}

/* Logout link alignment */
.navbar-right #logout {
  display: flex !important;
  align-items: center !important;
  height: 32px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  transition: var(--ease) !important;
}

.navbar-right #logout:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

/* Timer container alignment */
.navbar-right a[title="Idle Timeout"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  align-self: center !important;
  position: relative !important;
}

.navbar-right a[title="Idle Timeout"] span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 0 12px !important;
  width: auto !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

.navbar-right a[title="Idle Timeout"] span i {
  margin-right: 6px !important;
}

/* ══════════════════════════════════════════
   11. FORM & BUTTON REFINEMENTS (GLOBAL FORMS)
══════════════════════════════════════════ */

/* Button styling inside card bodies for forms */
.card-body .btn,
.card-body button.btn {
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  margin: 4px !important;
  text-transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
  transition: var(--ease) !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

/* Close button - muted red */
.card-body .btn.bg-warning,
.card-body a.btn.bg-warning {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  color: var(--accent-red) !important;
}

.card-body .btn.bg-warning:hover,
.card-body a.btn.bg-warning:hover {
  background: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* User list button - soft violet/blue */
.card-body .btn.bg-pink,
.card-body a.btn.bg-pink {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: var(--accent-primary) !important;
}

.card-body .btn.bg-pink:hover,
.card-body a.btn.bg-pink:hover {
  background: #6366f1 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
}

/* Generate/Submit button - premium purple gradient */
.card-body .btn.bg-primary,
.card-body button.btn.bg-primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3) !important;
}

.card-body .btn.bg-primary:hover,
.card-body button.btn.bg-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
}

/* Print/Secondary buttons - sleek outline glass styles */
.card-body .btn.bg-secondary,
.card-body a.btn.bg-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-2) !important;
}

.card-body .btn.bg-secondary:hover,
.card-body a.btn.bg-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* Print QR/Danger button - sleek red outline glass */
.card-body .btn.bg-danger,
.card-body a.btn.bg-danger {
  background: rgba(239, 68, 68, 0.04) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

.card-body .btn.bg-danger:hover,
.card-body a.btn.bg-danger:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fff !important;
}

/* Print Small/Info button - sleek cyan outline glass */
.card-body .btn.bg-info,
.card-body a.btn.bg-info {
  background: rgba(6, 182, 212, 0.04) !important;
  border-color: rgba(6, 182, 212, 0.15) !important;
  color: #a5f3fc !important;
}

.card-body .btn.bg-info:hover,
.card-body a.btn.bg-info:hover {
  background: rgba(6, 182, 212, 0.12) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
  color: #fff !important;
}

/* Form inputs & selects styling */
.card-body .form-control,
.card-body input[type="text"],
.card-body input[type="number"],
.card-body textarea,
.card-body select {
  height: 38px !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  color: var(--text-1) !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  box-shadow: none !important;
  transition: var(--ease) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.card-body select {
  padding-right: 32px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 11px !important;
  cursor: pointer !important;
}

.card-body select option {
  background-color: #101223 !important;
  color: #f1f5f9 !important;
  padding: 10px !important;
}

.card-body .form-control:focus,
.card-body input:focus,
.card-body textarea:focus,
.card-body select:focus {
  border-color: var(--accent) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
  outline: none !important;
}

/* Modernize form table layout */
.card-body table.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
  padding: 12px 8px !important;
  vertical-align: middle !important;
}

.card-body table.table td.align-middle {
  font-size: 14px !important;
  color: var(--text-2) !important;
  font-weight: 500 !important;
  width: 25% !important;
}

/* ══════════════════════════════════════════
   12. SELLING REPORT PAGE REFINEMENTS
══════════════════════════════════════════ */

/* Search input globally */
#filterTable {
  height: 36px !important;
  margin: 4px 4px 4px 0 !important;
  display: inline-flex !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  color: var(--text-1) !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}


/* Date filter input group container */
.card-body .input-group {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 540px !important;
  margin: 12px 4px !important;
}

/* Ensure columns flex properly */
.card-body .input-group>div[class*="input-group-"] {
  float: none !important;
  flex: 1 !important;
  display: flex !important;
}

.card-body .input-group select.group-item,
.card-body .input-group div.group-item {
  height: 36px !important;
  box-sizing: border-box !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--text-1) !important;
  padding: 0 24px 0 12px !important;
  width: 100% !important;
  margin: 0 !important;
  transition: var(--ease) !important;
  cursor: pointer !important;
}

/* Custom drop-down arrow for selects in date filter group */
.card-body .input-group select.group-item {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  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='%2394a3b8' 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") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px !important;
}

/* Fix overlapping borders between joined inputs */
.card-body .input-group>div:not(:first-child) select.group-item,
.card-body .input-group>div:not(:first-child) div.group-item {
  border-left: none !important;
}

/* Rounded corners for the unified filter pill */
.card-body .input-group select.group-item-l {
  border-radius: 8px 0 0 8px !important;
}

.card-body .input-group select.group-item-md {
  border-radius: 0 !important;
}

.card-body .input-group div.group-item-r {
  border-radius: 0 8px 8px 0 !important;
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
  border: 1px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0 16px !important;
}

.card-body .input-group div.group-item-r:hover {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5) !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25) !important;
}

.card-body .input-group div.group-item-r i {
  margin-right: 6px !important;
}

/* Delete report session and other warning button styles in reports */
.card-body .btn.bg-red,
.card-body a.btn.bg-red {
  background: #ef4444 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.card-body .btn.bg-red:hover,
.card-body a.btn.bg-red:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

/* ══════════════════════════════════════════
   13. INCOME CARD REFINEMENTS (DASHBOARD)
══════════════════════════════════════════ */

/* The outer box containing Income - Red/Rose Premium Gradient Glass */
#r_4 .box.bg-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(190, 24, 74, 0.9) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow:
    0 8px 32px rgba(239, 68, 68, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  border-radius: 16px !important;
  padding: 16px !important;
}

#r_4 .box.bg-red:hover {
  box-shadow:
    0 16px 40px rgba(239, 68, 68, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
}

/* Hide the legacy bulky left icon container on income card */
#r_4 .box.bg-red .box-group-icon {
  display: none !important;
}

#r_4 .box.bg-red .box-group-area {
  width: 100% !important;
  padding: 0 !important;
}

/* Income container inside reloadLreport */
.income-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Clean Header with small icon */
.income-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.income-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.income-header-icon {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* Nested Glass Capsules (Floating Tiles) */
.income-capsule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  transition: all 0.25s ease !important;
}

.income-capsule:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.02) !important;
}

/* Left side alignment: vertical stack for label & vcr badge */
.income-cap-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.income-cap-label {
  font-size: 10.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.income-cap-vcr {
  font-size: 10px;
  font-weight: 700;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 1px 6px;
  border-radius: 99px;
  width: fit-content;
}

/* Right side alignment: Bold, large price value */
.income-cap-right {
  display: flex;
  align-items: center;
}

.income-cap-val {
  font-size: 16px;
  font-weight: 800;
  color: #fff !important;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════
   14. MOBILE VIEW LAYOUT TIDINESS (max-width: 750px)
══════════════════════════════════════════ */
@media screen and (max-width: 750px) {

  /* Re-order navbar left elements: hamburger menu on left, brand on right */
  .navbar-left {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    gap: 0 !important;
  }

  #openNav,
  #closeNav {
    order: 1 !important;
  }

  #brand {
    order: 2 !important;
    display: flex !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    padding: 0 8px 0 4px !important;
    margin: 0 !important;
    letter-spacing: 0.05em !important;
  }

  /* Hide Theme and Session selects in top navbar on mobile */
  .navbar-right select.ses {
    display: none !important;
  }

  /* Hide "Logout" text on mobile, keep only icon */
  .navbar-right #logout {
    padding: 0 !important;
    font-size: 0 !important;
    /* hides text node */
    border: none !important;
    background: transparent !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 8px !important;
  }

  .navbar-right #logout i {
    font-size: 18px !important;
    margin: 0 !important;
    color: #94a3b8 !important;
  }

  .navbar-right #logout:hover i {
    color: #ef4444 !important;
  }

  /* Make sure navbar right has compact layout */
  .navbar-right {
    gap: 4px !important;
    padding-right: 8px !important;
  }

  /* Scale down stat box padding and typography on mobile screens */
  .box {
    padding: 14px 16px !important;
    margin: 4px !important;
    min-height: auto !important;
    border-radius: var(--r-lg) !important;
  }

  .box h1 {
    font-size: 24px !important;
    margin-bottom: 2px !important;
  }

  .box h1 span {
    font-size: 11px !important;
  }

  .box-group {
    gap: 10px !important;
  }

  .box-group-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 8px !important;
  }

  .box-group-icon i,
  .box-group-icon [class^="bi-"],
  .box-group-icon [class*=" bi-"] {
    font-size: 20px !important;
  }

  /* Flex layout adjustments for income card on mobile */
  .income-container {
    gap: 8px !important;
  }

  .income-title {
    font-size: 11px !important;
  }

  .income-capsule {
    padding: 8px 12px !important;
  }

  .income-cap-label {
    font-size: 9.5px !important;
  }

  .income-cap-vcr {
    font-size: 9px !important;
    padding: 1px 5px !important;
  }

  .income-cap-val {
    font-size: 14px !important;
  }

  /* Ensure navbar is rendered on top of sidebar on mobile */
  .navbar {
    z-index: 1001 !important;
  }

  /* Style closeNav icon to render as X instead of list icon */
  #closeNav i::before {
    content: "\f62a" !important;
    /* bootstrap-icons 'x' glyph */
    font-family: "bootstrap-icons" !important;
  }

  /* Hide sidebar brand on mobile and add top padding so menu starts below navbar */
  .sidenav::before {
    display: none !important;
  }

  .sidenav {
    padding-top: var(--navbar-h) !important;
    z-index: 1000 !important;
  }
}

/* ══════════════════════════════════════════
   15. DASHBOARD STATS GRID FIX (FLEXBOX OVER FLOATS)
══════════════════════════════════════════ */

/* Target rows containing stat boxes to force equal height and clean flex wrapping */
.card-body:has(.box) .row {
  display: flex !important;
  flex-wrap: wrap !important;
}

.card-body:has(.box) .row::before,
.card-body:has(.box) .row::after {
  display: none !important;
  /* Disable clearfixes */
}

.card-body:has(.box) .row>div[class*="col-"] {
  float: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.card-body:has(.box) .row>div[class*="col-"]>.box {
  flex: 1 !important;
  width: auto !important;
  box-sizing: border-box !important;
}

/* ══════════════════════════════════════════
   16. TYPOGRAPHY & OUTFIT FONT OVERRIDE
══════════════════════════════════════════ */
body,
input,
select,
textarea,
button,
.box,
.card,
table,
h1,
h2,
h3,
h4,
h5,
h6,
span,
a,
div {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ══════════════════════════════════════════
   17. FROSTED GLASS EFFECT (BACKDROP BLUR)
══════════════════════════════════════════ */
.navbar {
  background: rgba(16, 18, 35, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidenav {
  background: rgba(16, 18, 35, 0.78) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
}

/* ══════════════════════════════════════════
   18. PREMIUM SCROLLBAR
══════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track {
  background: rgba(11, 13, 26, 0.4) !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 99px !important;
  border: 2px solid rgba(11, 13, 26, 0.4) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

/* Custom scrollbar for overflow divs */
.overflow::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

.overflow::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06) !important;
}

.overflow::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ══════════════════════════════════════════
   19. NEON STATUS PULSE INDICATOR
══════════════════════════════════════════ */
/* Pulse animation */
@keyframes neon-pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6), 0 0 8px rgba(16, 185, 129, 0.4);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0), 0 0 10px rgba(16, 185, 129, 0.6);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 0 8px rgba(16, 185, 129, 0.4);
  }
}

/* Pulse indicator for navbar brand */
#brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#brand::after {
  content: "" !important;
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  background-color: #10b981 !important;
  border-radius: 50% !important;
  animation: neon-pulse-green 2s infinite ease-in-out !important;
  margin-top: 1px !important;
}

/* ══════════════════════════════════════════
   20. INTERACTIVE SPRING TRANSITIONS & HOVER GLOWS
══════════════════════════════════════════ */
.box,
.card,
.btn,
.navbar-hover,
.sidenav a,
.dropdown-btn {
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Accent active menu item glow */
.sidenav .active-pill,
.sidenav a.connect[style*="background"] {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35) !important;
}

/* System cards (blue, green, yellow) hover adjustments */
.box.bg-blue:hover {
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-4px) !important;
}

.box.bg-green:hover {
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-4px) !important;
}

.box.bg-yellow:hover {
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-4px) !important;
}

/* ══════════════════════════════════════════
   21. UNIFIED SYSTEM RESOURCES ROW (#r_1)
══════════════════════════════════════════ */

/* Moving gradient animation for the glass bar */
@keyframes glass-gradient-move {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Container row: Styled as a single animated premium glass card on desktop */
/* Container row: Styled as a responsive grid of three modern cards */
#r_1 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin: 10px 12px 24px 12px !important;
}

@media screen and (max-width: 1024px) {
  #r_1 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 750px) {
  #r_1 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin: 8px 12px 14px 12px !important;
  }
}

/* Individual columns: Reset styles since we are using grid */
#r_1>div[class*="col-"] {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
  display: block !important;
  border-right: none !important;
  box-sizing: border-box !important;
}

@keyframes card-entrance {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Dashboard Resource Cards styling */
.modern-resource-card {
  background: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: card-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

#r_1>div:nth-child(1) .modern-resource-card {
  animation-delay: 0.05s !important;
}

#r_1>div:nth-child(2) .modern-resource-card {
  animation-delay: 0.12s !important;
}

#r_1>div:nth-child(3) .modern-resource-card {
  animation-delay: 0.2s !important;
}

.modern-resource-card:hover {
  border-color: rgba(99, 102, 241, 0.3) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
}

/* Card Header */
.resource-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-bottom: 4px !important;
  margin-bottom: 6px !important;
}

.resource-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-icon-wrap {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  flex-shrink: 0;
}

.resource-card-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0.2px !important;
  color: #cbd5e1 !important;
}

.resource-header-menu {
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.resource-header-menu:hover {
  color: #cbd5e1;
}

/* Card Content Grid: Device Spec 2-column layout */
.unifi-spec-grid {
  display: grid !important;
  grid-template-columns: 1.3fr 1fr !important;
  gap: 16px !important;
  align-items: center !important;
  flex: 1;
}

.unifi-spec-list {
  display: flex !important;
  flex-direction: column !important;
}

.unifi-spec-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.unifi-label {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

.unifi-value {
  font-size: 12px !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  text-align: right !important;
}

/* CPU Card Panel */
.unifi-cpu-panel {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding-left: 16px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
  height: 100% !important;
}

.unifi-cpu-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.unifi-cpu-val {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #c084fc !important;
}

/* Hardware performance layout - Stacked lists (Model A) */
.unifi-hardware-list {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  justify-content: center !important;
}

.unifi-hw-item {
  display: flex !important;
  flex-direction: column !important;
}

.unifi-hw-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.unifi-hw-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
}

.unifi-hw-details {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.unifi-hw-sub {
  font-size: 10.5px !important;
  color: #64748b !important;
}

.unifi-hw-pct {
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

.unifi-progress-bg {
  width: 100% !important;
  height: 4px !important;
  /* Extremely thin progress bars */
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

.unifi-progress-fill {
  height: 100% !important;
  border-radius: 2px !important;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Live Network Status layout - Vertical Row List (Model A) */
.unifi-network-list {
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
  justify-content: center !important;
}

.unifi-net-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.unifi-net-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.unifi-net-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.online-dot {
  background: #10b981 !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6) !important;
}

.active-dot {
  background: #3b82f6 !important;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6) !important;
}

.download-dot {
  background: #06b6d4 !important;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.6) !important;
}

.upload-dot {
  background: #a78bfa !important;
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.6) !important;
}

.unifi-net-title {
  font-size: 12px !important;
  color: #cbd5e1 !important;
  font-weight: 500 !important;
}

.hs-active-val {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #10b981 !important;
  text-align: right !important;
  display: inline-block !important;
}

.ppp-active-val {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #3b82f6 !important;
  text-align: right !important;
  display: inline-block !important;
}

.rx-bytes-val {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #06b6d4 !important;
  text-align: right !important;
  display: inline-block !important;
}

.tx-bytes-val {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #a78bfa !important;
  text-align: right !important;
  display: inline-block !important;
}

/* ══════════════════════════════════════════
   22. MOBILE RESPONSIVE OPTIMIZATIONS
   ══════════════════════════════════════════ */
@media screen and (max-width: 750px) {

  /* Ensure page content has enough space at the bottom to scroll past iOS Safari address bar */
  #main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
  }
}

@media screen and (max-width: 576px) {

  /* Session list items optimization */
  .session-list-item {
    padding: 10px 12px !important;
  }

  .session-info {
    gap: 8px !important;
    min-width: 0 !important;
  }

  .session-details {
    min-width: 0 !important;
  }

  .session-title {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .session-subtitle {
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .session-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
  }

  .session-actions {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .btn-action {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    font-size: 0 !important;
    gap: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: auto !important;
  }

  .btn-action i {
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* Admin settings table stack layout */
  form table.table.table-sm,
  form table.table.table-sm tbody,
  form table.table.table-sm tr,
  form table.table.table-sm td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  form table.table.table-sm td.align-middle {
    padding-top: 8px !important;
    padding-bottom: 4px !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  form table.table.table-sm td:not(.align-middle) {
    padding-top: 0 !important;
    padding-bottom: 12px !important;
  }

  /* Hide the first empty td in the button row */
  form table.table.table-sm tr:last-child td:first-child:empty {
    display: none !important;
  }

  /* Form input sizing */
  form table.table.table-sm input.form-control,
  form table.table.table-sm select.form-control,
  form table.table.table-sm .input-group {
    width: 100% !important;
  }
}

/* ══════════════════════════════════════════
   BUTTON COLORS FOR MIKHMON GLASSPRO THEME
   ══════════════════════════════════════════ */
.btn-primary {
  background: var(--grad-purple) !important;
  color: #fff !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--text-1) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.08) !important;
}

.btn-success {
  background: var(--grad-green) !important;
  color: #fff !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-success:hover {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
}

.btn-info {
  background: var(--grad-cyan) !important;
  color: #fff !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-info:hover {
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.45) !important;
}

.btn-warning {
  background: var(--grad-yellow) !important;
  color: #fff !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-warning:hover {
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
}

.btn-danger {
  background: var(--grad-red) !important;
  color: #fff !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-danger:hover {
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45) !important;
}

/* ══════════════════════════════════════════
   23. CUSTOM GRAPHICS & ANIMATIONS
   ══════════════════════════════════════════ */

/* Skeleton Loading Pulse */
@keyframes skeleton-pulse {
  0% {
    opacity: 0.65;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    opacity: 0.65;
  }
}

.unifi-skeleton-text {
  display: inline-block !important;
  height: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  animation: skeleton-pulse 1.6s ease-in-out infinite !important;
}

/* Shimmer Progress Filling */
@keyframes progress-shimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.ram-fill {
  background: linear-gradient(90deg, #10b981, #06b6d4, #10b981) !important;
  background-size: 200% auto !important;
  animation: progress-shimmer 3s linear infinite !important;
}

.hdd-fill {
  background: linear-gradient(90deg, #a78bfa, #ec4899, #a78bfa) !important;
  background-size: 200% auto !important;
  animation: progress-shimmer 3s linear infinite !important;
}

/* CPU Load Value Smooth Color transition */
.cpu-val {
  transition: color 0.4s ease !important;
}

/* Grid & List Item Smooth Hover Effects */
.unifi-spec-item,
.unifi-hw-item,
.unifi-net-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ══════════════════════════════════════════
   INCOME CARD — Modern Redesign
   ══════════════════════════════════════════ */

.modern-income-card {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(16, 185, 129, 0.15) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.modern-income-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
  opacity: 0.8;
}

.modern-income-card:hover {
  border-color: rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.1) !important;
  transform: translateY(-1px);
}

/* — Header — */
.modern-income-card .income-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-bottom: 10px !important;
}

.modern-income-card .income-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-income-card .income-icon-wrap {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
}

.modern-income-card .income-card-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.2px !important;
}

.modern-income-card .income-header-right {
  display: flex;
  align-items: center;
}

.modern-income-card .income-badge-status {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 99px !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

/* — Stats Grid — */
.modern-income-card .income-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.modern-income-card .income-stats-box {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 10px !important;
  padding: 9px 11px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.modern-income-card .income-stats-box:hover {
  background: rgba(16, 185, 129, 0.05) !important;
  border-color: rgba(16, 185, 129, 0.18) !important;
}

.modern-income-card .stats-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modern-income-card .label-text {
  font-size: 10.5px !important;
  color: #64748b !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.modern-income-card .vcr-badge {
  font-size: 9px !important;
  color: #a78bfa !important;
  font-weight: 700 !important;
  background: rgba(167, 139, 250, 0.1) !important;
  border: 1px solid rgba(167, 139, 250, 0.18) !important;
  padding: 1px 7px !important;
  border-radius: 6px !important;
  width: fit-content;
  letter-spacing: 0.2px;
}

.modern-income-card .stats-val-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.modern-income-card .currency-symbol {
  font-size: 10px !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

.modern-income-card .income-val-count {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #10b981 !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.25) !important;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.01em;
}

/* — Today vs Month tint differentiation — */
.modern-income-card .today-stats {
  background: rgba(16, 185, 129, 0.04) !important;
  border-color: rgba(16, 185, 129, 0.08) !important;
}

.modern-income-card .month-stats {
  background: rgba(59, 130, 246, 0.04) !important;
  border-color: rgba(59, 130, 246, 0.08) !important;
}

.modern-income-card .month-stats .income-val-count {
  color: #60a5fa !important;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.2) !important;
}

.modern-income-card .month-stats .currency-symbol {
  color: #93c5fd !important;
}

/* ══════════════════════════════════════════
   HOTSPOT LOG CARD — Modern Redesign
   ══════════════════════════════════════════ */

.modern-log-card {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.modern-log-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #818cf8, #6366f1, #a78bfa);
  opacity: 0.7;
}

/* Log Card Header */
.log-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-icon-wrap {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  flex-shrink: 0;
  background: rgba(129, 140, 248, 0.15) !important;
  color: #818cf8 !important;
}

.log-card-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  letter-spacing: 0.2px !important;
}

.log-view-all {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #818cf8 !important;
  background: rgba(129, 140, 248, 0.1) !important;
  border: 1px solid rgba(129, 140, 248, 0.18) !important;
  padding: 3px 9px !important;
  border-radius: 99px !important;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.log-view-all:hover {
  background: rgba(129, 140, 248, 0.2) !important;
  color: #a5b4fc !important;
  text-decoration: none !important;
}

/* Log Table Wrapper */
.log-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 350px;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 140, 248, 0.3) transparent;
}

.log-table-wrap::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.log-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.log-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(129, 140, 248, 0.3);
  border-radius: 4px;
}

/* Log Table */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.log-table thead th {
  padding: 7px 12px !important;
  text-align: left !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  white-space: nowrap;
}

.log-table tbody tr {
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

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

.log-table tbody tr:hover {
  background: rgba(129, 140, 248, 0.05) !important;
}

.log-table tbody td {
  padding: 6px 12px !important;
  color: #cbd5e1 !important;
  font-size: 11.5px !important;
  border: none !important;
  vertical-align: middle;
}

.log-loader-cell {
  text-align: center !important;
  padding: 20px !important;
  color: #475569 !important;
  font-size: 12px !important;
}

/* ══════════════════════════════════════════
   RESPONSIVE — All Dashboard Cards
   ══════════════════════════════════════════ */

/* Tablet & smaller desktop (max-width: 1200px) */
@media screen and (max-width: 1200px) {
  /* Traffic + Income column layout: stack vertically */
  #r_2 > .col-8,
  #r_2 > .col-4 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Income card full width on smaller screens */
  #r_4 {
    margin-top: 12px !important;
  }
}

/* Mobile landscape & tablet portrait (max-width: 900px) */
@media screen and (max-width: 900px) {
  /* Resource cards row: 3 cols → 1 col */
  #r_1 > .col-4 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
  }

  /* Income stat boxes: side by side on medium */
  .modern-income-card .income-grid {
    flex-direction: row !important;
    gap: 8px !important;
  }

  .modern-income-card .income-stats-box {
    flex: 1 !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .modern-income-card .stats-val-row {
    align-items: baseline;
  }
}

/* Mobile portrait (max-width: 600px) */
@media screen and (max-width: 600px) {
  /* Reduce card padding */
  .modern-resource-card,
  .modern-income-card,
  .modern-log-card {
    border-radius: 10px !important;
    padding: 8px 10px !important;
  }

  /* Resource card smaller icon */
  .resource-icon-wrap,
  .log-icon-wrap,
  .income-icon-wrap {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }

  /* Income grid: stack vertically again on mobile portrait */
  .modern-income-card .income-grid {
    flex-direction: column !important;
  }

  /* Smaller value counts on tiny screens */
  .modern-income-card .income-val-count {
    font-size: 15px !important;
  }

  .hs-active-val,
  .ppp-active-val {
    font-size: 15px !important;
  }

  /* Log table: allow horizontal scroll, reduce font */
  .log-table-wrap {
    max-height: 260px;
  }

  .log-table tbody td,
  .log-table thead th {
    padding: 5px 8px !important;
    font-size: 10.5px !important;
  }

  /* Reduce progress bar label text */
  .unifi-hw-sub,
  .unifi-hw-title,
  .unifi-hw-pct {
    font-size: 10px !important;
  }

  /* Header badge hide on mobile */
  .income-badge-status,
  .log-view-all span {
    display: none !important;
  }
  
  .log-view-all {
    padding: 3px 7px !important;
  }

  /* Download/Upload values */
  .rx-bytes-val,
  .tx-bytes-val {
    font-size: 12px !important;
  }
}

/* ══════════════════════════════════════════
   DASHBOARD UNIFORM SPACING
   Targets #r_traffic (traffic + right panel row)
   NOTE: #r_2, #r_3, #r_4 are reserved by AJAX loaders
   ══════════════════════════════════════════ */

/* Outer traffic+income row — match #r_1 horizontal margin (12px each side) */
#r_traffic {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  margin-left: 12px !important;
  margin-right: 12px !important;
  margin-bottom: 16px !important;
  gap: 20px !important;
  box-sizing: border-box !important;
}

/* Traffic chart column */
#r_traffic > .col-8 {
  flex: 0 0 calc(66.666% - 10px) !important;
  max-width: calc(66.666% - 10px) !important;
  width: auto !important;
  float: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* Income + log panel column */
#r_traffic > .col-4 {
  flex: 0 0 calc(33.333% - 10px) !important;
  max-width: calc(33.333% - 10px) !important;
  width: auto !important;
  float: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* Income row — reset Bootstrap row negative margins */
#r_4 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

/* Log row — reset Bootstrap row negative margins */
#r_3 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Income and log cards fill full column width */
.modern-income-card,
.modern-log-card {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure income card wrapper div stretches */
#r_4 > div[style] {
  width: 100% !important;
  display: block !important;
}

/* ── Tablet ≤ 1100px: stack traffic chart above right panel ── */
@media screen and (max-width: 1100px) {
  #r_traffic {
    flex-wrap: wrap !important;
    gap: 14px !important;
  }

  #r_traffic > .col-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  #r_traffic > .col-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    flex-direction: row !important;
    gap: 14px !important;
  }

  #r_4,
  #r_3 {
    flex: 1 !important;
    min-width: 0 !important;
  }
}

/* ── Mobile ≤ 600px: stack income and log vertically ── */
@media screen and (max-width: 600px) {
  #r_traffic {
    margin-left: 8px !important;
    margin-right: 8px !important;
    gap: 10px !important;
  }

  #r_traffic > .col-4 {
    flex-direction: column !important;
  }
}