/* =====================================================
   Sys Panda — Font Awesome 7 icons + modern nav tiles
   Loaded last so it wins over AdminLTE / FA5 / theme CSS.
   ===================================================== */

:root {
  --sp-icon-tile: 32px;
  --sp-icon-tile-mini: 34px;
  --sp-icon-radius: 9px;
}

/* Keep FA7 glyphs sharp and consistent */
.fa, .fas, .far, .fab, .fal, .fat, .fad,
.fa-solid, .fa-regular, .fa-brands,
.glyphicon, .ion {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
}

/* ---------- Sidebar icon tiles ---------- */
.main-sidebar .sidebar-menu > li > a {
  gap: 10px !important;
}

.main-sidebar .sidebar-menu > li > a > .sp-nav-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 0 !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: transparent !important;
  color: var(--sb-icon, #d1d5db) !important;
  box-shadow: none !important;
  outline: none !important;
  transition: color .18s ease, transform .18s ease !important;
}

.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > i,
.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > .fa,
.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > .fas,
.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > .far,
.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > .ion,
.main-sidebar .sidebar-menu > li > a > .sp-nav-icon > .glyphicon {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  color: inherit !important;
  opacity: 1 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  display: inline-block !important;
}

.main-sidebar .sidebar-menu > li > a:hover > .sp-nav-icon {
  background: transparent !important;
  color: #FF6B35 !important;
  box-shadow: none !important;
  border: none !important;
}

.main-sidebar .sidebar-menu > li.active > a > .sp-nav-icon,
.main-sidebar .sidebar-menu > li.menu-open > a > .sp-nav-icon {
  background: transparent !important;
  color: #FF4500 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Submenu icons — compact, no heavy tile */
.main-sidebar .sidebar-menu .treeview-menu > li > a {
  gap: 10px !important;
}

.main-sidebar .sidebar-menu .treeview-menu > li > a > .sp-nav-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #9ca3af !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* app.css hides every .treeview-menu i and draws a → on the link.
   Child glyphs live inside .sp-nav-icon, so show those and drop the arrow. */
.main-sidebar .sidebar-menu .treeview-menu > li > a > .sp-nav-icon > i,
.main-sidebar .sidebar-menu .treeview-menu > li > a > .sp-nav-icon > .fa,
.main-sidebar .sidebar-menu .treeview-menu > li > a > .sp-nav-icon > .fas {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: inherit !important;
}

.main-sidebar .sidebar-menu .treeview-menu > li > a::before {
  content: none !important;
  display: none !important;
}

.main-sidebar .sidebar-menu .treeview-menu > li > a:hover > .sp-nav-icon,
.main-sidebar .sidebar-menu .treeview-menu > li.active > a > .sp-nav-icon {
  color: #FF6B35 !important;
  background: rgba(255, 69, 0, 0.12) !important;
}

/* Collapsed rail — icon tiles stay visible */
body.sidebar-collapse .main-sidebar .sidebar-menu > li > a {
  justify-content: center !important;
  padding: 6px 0 !important;
  margin: 3px 6px !important;
}

body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > span:not(.sp-nav-icon),
body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > .pull-right-container {
  display: none !important;
}

body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > .sp-nav-icon {
  display: inline-flex !important;
  width: var(--sp-icon-tile-mini) !important;
  height: var(--sp-icon-tile-mini) !important;
  min-width: var(--sp-icon-tile-mini) !important;
}

body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > .sp-nav-icon > i {
  font-size: 15px !important;
}

/* Treeview chevron — keep native, don't tile it */
.main-sidebar .sidebar-menu > li > a > .pull-right-container > .fa-angle-left {
  background: none !important;
  width: auto !important;
  height: auto !important;
  font-size: 12px !important;
}

/* Header / buttons / content icons — slightly clearer */
.main-header .fa,
.main-header .fas,
.main-header .far,
.btn > .fa,
.btn > .fas,
.btn > .far,
.btn > .glyphicon,
.box-header .fa,
.box-header .fas,
.content-header .fa,
.content-header .fas {
  vertical-align: -0.08em;
}

/* ---------- Glyphicon → FA7 (old Bootstrap 3 buttons) ---------- */
.glyphicon {
  font-family: "Font Awesome 7 Free", "Font Awesome 5 Free" !important;
  font-weight: 900;
  font-style: normal;
  display: inline-block;
  speak: never;
  line-height: 1;
}
.glyphicon:before {
  font-family: inherit !important;
  font-weight: 900;
}

.glyphicon-edit:before { content: "\f044"; }
.glyphicon-pencil:before { content: "\f303"; }
.glyphicon-trash:before { content: "\f2ed"; }
.glyphicon-calendar:before { content: "\f133"; }
.glyphicon-lock:before { content: "\f023"; }
.glyphicon-user:before { content: "\f007"; }
.glyphicon-search:before { content: "\f002"; }
.glyphicon-print:before { content: "\f02f"; }
.glyphicon-download:before { content: "\f019"; }
.glyphicon-upload:before { content: "\f093"; }
.glyphicon-plus:before,
.glyphicon-plus-sign:before { content: "\f067"; }
.glyphicon-minus:before,
.glyphicon-minus-sign:before { content: "\f068"; }
.glyphicon-ok:before,
.glyphicon-ok-sign:before,
.glyphicon-ok-circle:before { content: "\f00c"; }
.glyphicon-remove:before,
.glyphicon-remove-sign:before,
.glyphicon-remove-circle:before { content: "\f00d"; }
.glyphicon-eye-open:before { content: "\f06e"; }
.glyphicon-eye-close:before { content: "\f070"; }
.glyphicon-chevron-left:before { content: "\f053"; }
.glyphicon-chevron-right:before { content: "\f054"; }
.glyphicon-chevron-up:before { content: "\f077"; }
.glyphicon-chevron-down:before { content: "\f078"; }
.glyphicon-arrow-left:before { content: "\f060"; }
.glyphicon-arrow-right:before { content: "\f061"; }
.glyphicon-arrow-up:before { content: "\f062"; }
.glyphicon-arrow-down:before { content: "\f063"; }
.glyphicon-refresh:before { content: "\f2f1"; }
.glyphicon-filter:before { content: "\f0b0"; }
.glyphicon-info-sign:before { content: "\f05a"; }
.glyphicon-warning-sign:before { content: "\f071"; }
.glyphicon-time:before { content: "\f017"; }
.glyphicon-picture:before { content: "\f03e"; }
.glyphicon-font:before { content: "\f031"; }
.glyphicon-list:before { content: "\f03a"; }
.glyphicon-th-list:before { content: "\f00b"; }
.glyphicon-share:before { content: "\f064"; }
.glyphicon-floppy-disk:before { content: "\f0c7"; }
.glyphicon-open:before,
.glyphicon-new-window:before { content: "\f08e"; }
.glyphicon-resize-vertical:before { content: "\f07d"; }
.glyphicon-resize-horizontal:before { content: "\f07e"; }
.glyphicon-indent-left:before { content: "\f03b"; }
.glyphicon-indent-right:before { content: "\f03c"; }

/* ---------- Ionicons leftovers → FA7 ---------- */
.ion {
  font-family: "Font Awesome 7 Free", "Font Awesome 5 Free" !important;
  font-weight: 900;
  font-style: normal;
  display: inline-block;
  speak: never;
  line-height: 1;
}
.ion:before {
  font-family: inherit !important;
  font-weight: 900;
}
.ion-clipboard:before { content: "\f328"; }
.ion-stats-bars:before { content: "\f080"; }
.ion-person-add:before { content: "\f234"; }
.ion-pie-graph:before { content: "\f200"; }
.ion-ios-paper:before,
.ion-document-text:before { content: "\f15c"; }
.ion-ios-people:before { content: "\f0c0"; }
.ion-cash:before { content: "\f0d6"; }
.ion-cube:before { content: "\f1b2"; }
.ion-ios-cart:before { content: "\f07a"; }
.ion-ios-list:before { content: "\f03a"; }

@media print {
  .sp-nav-icon {
    background: none !important;
    box-shadow: none !important;
  }
}
