html,
body {
  min-height: 100%;
}

body.dmon-shell {
  margin: 0;
  overflow-x: hidden;
  font-size: 14px !important;
  line-height: 1.42857143;
}

.wrapper {
  min-height: 100vh;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  height: 56px;
  overflow: hidden;
}

.main-header .logo {
  display: block;
  float: left;
  width: 248px;
  height: 56px;
  line-height: 56px;
  text-align: center;
  overflow: hidden;
  text-decoration: none;
}

.main-header .logo .logo-mini {
  display: none;
}

.main-header .logo .logo-lg {
  display: inline;
}

.main-header .navbar {
  margin-left: 248px;
  min-height: 56px;
  height: 56px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  white-space: nowrap;
}

.main-header .navbar-nav {
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.main-header .navbar-nav > li,
.main-header .navbar-nav > .nav-item {
  display: inline-block !important;
  float: none !important;
  vertical-align: middle;
}

.main-header .navbar-nav > li {
  position: relative;
  margin-left: 2px;
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
}

.main-header .navbar-nav > li > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 10px;
  line-height: 1;
  text-decoration: none;
}

.main-header .navbar-custom-menu {
  float: right;
  height: 56px;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.main-header .navbar-custom-menu .navbar-nav {
  height: 56px;
  width: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

.main-header .navbar-custom-menu .nav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

.main-header .navbar-custom-menu .navbar-nav > li > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  white-space: nowrap;
  font-size: 14px;
}

.main-header .navbar-custom-menu .navbar-nav > li {
  margin-left: 8px;
}

.main-header .navbar-custom-menu .navbar-nav > li:first-child {
  margin-left: 0;
}

.main-header .navbar-custom-menu .navbar-nav > li > a .fa,
.main-header .navbar-custom-menu .navbar-nav > li > a .ion {
  font-size: 16px;
  line-height: 1;
}

.main-header .navbar-custom-menu .dropdown-menu {
  top: calc(100% + 2px);
}

.main-header .sidebar-toggle {
  float: left;
  padding: 16px 12px;
}

.main-header .sidebar-toggle .icon-bar {
  display: none;
}

.main-header .sidebar-toggle::before {
  content: "\f0c9";
  font-family: FontAwesome;
  font-size: 18px;
}

.main-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 248px;
  z-index: 1030;
  overflow-y: auto;
}

.right-side,
.content-wrapper {
  margin-left: 248px;
  padding-top: 56px;
  min-height: 100vh;
}

.main-footer {
  margin-left: 248px;
}

.sidebar-menu,
.treeview-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-menu > li > a,
.treeview-menu > li > a {
  display: block;
  padding: 11px 14px;
  text-decoration: none;
}

.treeview-menu {
  display: none;
}

.treeview.menu-open > .treeview-menu {
  display: block;
}

.navbar-nav > .dropdown > .dropdown-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: 100%;
  min-width: 260px;
  padding: 0;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.main-header .navbar-nav .dropdown-menu {
  position: absolute !important;
}

.navbar-nav > .dropdown > .dropdown-menu .menu {
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav > .dropdown > .dropdown-menu .menu > li > a {
  display: block;
  padding: 10px 14px;
  color: #334155;
  text-decoration: none;
}

.navbar-nav > .dropdown > .dropdown-menu .menu > li > a:hover {
  background: #f8fafc;
}

.label {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.1;
}

.label-success { background: #10b981; color: #fff; }
.label-info { background: #0ea5e9; color: #fff; }
.label-warning { background: #f59e0b; color: #fff; }
.label-danger { background: #ef4444; color: #fff; }

/* Clean header badges in top-right icons */
.main-header .navbar-custom-menu .label {
  box-shadow: none;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  background: transparent;
}
.main-header .navbar-custom-menu .label-success {
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.6);
}
.main-header .navbar-custom-menu .label-warning {
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.7);
}
.main-header .navbar-custom-menu .label i {
  color: inherit;
}
.bg-green { background-color: #10b981 !important; color: #fff !important; }
.bg-red { background-color: #ef4444 !important; color: #fff !important; }
.bg-yellow { background-color: #f59e0b !important; color: #111827 !important; }
.bg-aqua { background-color: #06b6d4 !important; color: #fff !important; }
.bg-blue { background-color: #2563eb !important; color: #fff !important; }
.bg-gray { background-color: #6b7280 !important; color: #fff !important; }

.pull-right { float: right !important; }
.pull-left { float: left !important; }
.hidden-xs { display: none !important; }
.text-green { color: #10b981 !important; }
.text-red { color: #ef4444 !important; }
.text-yellow { color: #f59e0b !important; }
.text-blue { color: #2563eb !important; }
.text-gray { color: #6b7280 !important; }

.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
  position: relative;
  min-height: 1px;
}

.col-xs-12 { flex: 0 0 100%; max-width: 100%; }
.col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

.btn-default {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}

.btn-flat {
  border-radius: 8px !important;
  box-shadow: none !important;
}

.btn-box-tool {
  border: 0;
  background: transparent;
  padding: 4px 8px;
}

.content-header > h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.content-header > h1 > small {
  font-size: 65%;
  font-weight: 500;
  color: #6b7280;
}

.sidebar-menu > li > a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none !important;
}

.treeview-menu > li > a {
  font-size: 14px;
}

.treeview-menu > li > a {
  text-decoration: none !important;
}

.table,
.table td,
.table th,
.dataTables_wrapper,
.dataTables_wrapper label,
.dataTables_wrapper input {
  font-size: 14px !important;
}

.box {
  position: relative;
}

.box.box-primary { border-top: 3px solid #2563eb; }
.box.box-success { border-top: 3px solid #10b981; }
.box.box-warning { border-top: 3px solid #f59e0b; }
.box.box-danger { border-top: 3px solid #ef4444; }

.box.box-solid {
  border-top-width: 0;
}

.box.collapsed-box .box-body,
.box.collapsed-box .box-footer {
  display: none;
}

.box-header.with-border {
  border-bottom: 1px solid #e5e7eb;
}

.box-tools {
  position: absolute;
  right: 10px;
  top: 10px;
}

.nav-tabs-custom {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-tabs-custom > .nav-tabs {
  margin: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 10px;
}

.nav-tabs-custom > .nav-tabs > li {
  float: none;
  display: inline-block;
  margin-bottom: -1px;
}

.nav-tabs-custom > .nav-tabs > li > a {
  border: 0;
  border-bottom: 2px solid transparent;
  color: #475569;
  font-weight: 600;
  padding: 12px 14px;
}

.nav-tabs-custom > .nav-tabs > li.active > a,
.nav-tabs-custom > .nav-tabs > li > a:hover {
  color: #0f172a;
  border-bottom-color: #2563eb;
  background: transparent;
}

.nav-tabs-custom > .tab-content {
  padding: 14px;
}

.info-box {
  display: flex;
  align-items: stretch;
  min-height: 90px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.info-box-icon {
  width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.info-box-content {
  padding: 10px 12px;
  min-width: 0;
}

.progress { margin-bottom: 0; }

.dm-uptime-ring-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
}

.dm-uptime-ring {
  --pct: 0;
  --ring: #10b981;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), #e5e7eb 0);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dm-uptime-ring::before {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
}

.dm-uptime-ring-text {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

.input-group-addon {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-left: 0;
  background: #f8fafc;
}

.has-feedback {
  position: relative;
}

.form-control-feedback {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hidden-xs { display: block !important; }
}

@media (max-width: 991.98px) {
  .main-header .logo {
    width: 64px;
  }

  .main-header .logo .logo-mini {
    display: inline;
  }

  .main-header .logo .logo-lg {
    display: none;
  }

  .main-header .navbar {
    margin-left: 64px;
  }

  .main-sidebar {
    width: 248px;
    transform: translateX(-248px);
    transition: transform 0.2s ease;
  }

  body.sidebar-open .main-sidebar {
    transform: translateX(0);
  }

  .right-side,
  .content-wrapper,
  .main-footer {
    margin-left: 0;
  }
}

@media (min-width: 992px) {
  body.sidebar-collapse .main-sidebar {
    width: 72px;
  }

  body.sidebar-collapse .right-side,
  body.sidebar-collapse .content-wrapper,
  body.sidebar-collapse .main-footer,
  body.sidebar-collapse .main-header .navbar {
    margin-left: 72px;
  }

  body.sidebar-collapse .main-header .logo {
    width: 72px;
  }

  body.sidebar-collapse .main-header .logo .logo-mini {
    display: inline;
  }

  body.sidebar-collapse .main-header .logo .logo-lg,
  body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > span,
  body.sidebar-collapse .main-sidebar .sidebar-menu > li > a > .pull-right,
  body.sidebar-collapse .main-sidebar .sidebar-menu > li.header,
  body.sidebar-collapse .main-sidebar .treeview-menu,
  body.sidebar-collapse .main-sidebar .dm-sidebar-footer span,
  body.sidebar-collapse .main-sidebar .dm-sidebar-footer .dm-profile-arrow {
    display: none !important;
  }

  body.sidebar-collapse .main-sidebar .sidebar-menu > li > a {
    text-align: center;
  }
}
