/* HubLink — Industrial Logistics Precision
   Navy frame, clinical teal telemetry, Inter, low-radius data surfaces. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap");

:root {
  --hl-navy: #0f172a;
  --hl-navy-2: #1e293b;
  --hl-sidebar: #0b1220;
  --hl-sidebar-line: rgba(148, 163, 184, 0.16);
  --hl-teal: #0d9488;
  --hl-teal-2: #14b8a6;
  --hl-teal-deep: #0f766e;
  --hl-amber: #f59e0b;
  --hl-amber-soft: #fef3c7;
  --hl-amber-text: #b45309;
  --hl-crimson: #ef4444;
  --hl-canvas: #f4f7fb;
  --hl-panel: #ffffff;
  --hl-ink: #0b1c30;
  --hl-muted: #64748b;
  --hl-line: #e2e8f0;
  --hl-line-strong: #cbd5e1;
  --hl-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --hl-radius: 0.5rem;
  --hl-font: "Inter", "Segoe UI", sans-serif;
  --hl-mono: "JetBrains Mono", ui-monospace, monospace;
  --bs-primary: #0f172a;
  --bs-primary-rgb: 15, 23, 42;
  --primary-rgb: 15, 23, 42;
}

html, body, button, input, select, textarea, .btn, .form-control, .dropdown-item, .sidebar, .header, table, .card {
  font-family: var(--hl-font) !important;
}

body {
  color: #334155 !important;
  background: var(--hl-canvas) !important;
  font-size: 14px;
  letter-spacing: 0;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--hl-font) !important;
  color: var(--hl-ink) !important;
  letter-spacing: -0.02em;
}

::selection {
  background: #99f6e4;
  color: #134e4a;
}

/* ---------- Sidebar ---------- */
.sidebar,
[data-sidebar=dark] .sidebar,
[data-sidebar=light] .sidebar {
  background: var(--hl-sidebar) !important;
  border-right: 1px solid #020617 !important;
  width: 260px;
}

.sidebar .sidebar-logo,
[data-sidebar=dark] .sidebar .sidebar-logo {
  width: 260px;
  height: 64px;
  padding: 12px 16px 0;
  background: transparent;
  border-bottom: 0;
}

.hl-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  min-width: 0;
}

.hl-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(160deg, #14b8a6, #0f766e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 34px;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.hl-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.hl-brand-text strong {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-brand-text small {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .slimScrollDiv {
  top: 64px !important;
  background: transparent;
}

.sidebar .sidebar-menu {
  margin-top: 72px;
  padding: 8px 12px 24px;
}

.sidebar .sidebar-menu > ul > li {
  margin-bottom: 2px;
}

.sidebar .sidebar-menu .menu-title {
  margin: 16px 8px 6px;
}

.sidebar .sidebar-menu .menu-title span,
.sidebar .sidebar-menu > ul > li.menu-title span {
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.sidebar .sidebar-menu > ul > li > ul > li > a,
.sidebar .sidebar-menu ul li a,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li a,
[data-sidebar=light] .sidebar .sidebar-menu > ul > li > a {
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 9px 12px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  background: transparent !important;
}

.sidebar .sidebar-menu a span,
.sidebar .sidebar-menu li a span,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li > a span,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li a span,
[data-sidebar=light] .sidebar .sidebar-menu a span {
  color: #ffffff !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.sidebar .sidebar-menu a > i,
.sidebar .sidebar-menu > ul > li > ul > li > a i,
.sidebar .sidebar-menu ul li a i,
.sidebar .sidebar-menu > ul > li > a i,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li .submenu > a i {
  font-family: "tabler-icons" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  font-size: 18px !important;
  line-height: 1 !important;
  width: 18px;
  min-width: 18px;
  margin-right: 10px;
  text-align: center;
}

.sidebar .sidebar-menu ul ul a > i {
  font-size: 15px !important;
  width: 16px;
  min-width: 16px;
  margin-right: 8px;
  color: #ffffff !important;
}

.sidebar .sidebar-menu > ul > li > ul > li > a:hover,
.sidebar .sidebar-menu ul li a:hover,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li .submenu > a:hover,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li > ul > li > a:hover {
  background: rgba(148, 163, 184, 0.1) !important;
  color: #f8fafc !important;
}

.sidebar .sidebar-menu > ul > li > ul > li > a.active,
.sidebar .sidebar-menu ul li a.active,
.sidebar .sidebar-menu > ul > li.active > a,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li.active a,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li.active a,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li .submenu > a.active,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li .submenu > a.subdrop {
  background: #0d9488 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}

.sidebar .sidebar-menu > ul > li > ul > li > a.active i,
.sidebar .sidebar-menu ul li a.active i,
.sidebar .sidebar-menu > ul > li.active > a i,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li.active a span,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li.active a i,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li a.active,
[data-sidebar=dark] .sidebar .sidebar-menu > ul > li ul li a:hover {
  color: #ffffff !important;
}

.sidebar .sidebar-menu .menu-arrow::before,
[data-sidebar=dark] .sidebar .sidebar-menu .menu-arrow::before {
  border-color: #ffffff !important;
}

.sidebar .sidebar-menu ul ul {
  background: transparent !important;
}

.sidebar .sidebar-menu ul ul li a {
  padding-left: 36px !important;
  font-size: 13px !important;
  color: #ffffff !important;
}

.sidebar .sidebar-menu ul ul li a span {
  color: #ffffff !important;
  padding: 0 !important;
}

.sidebar .sidebar-menu ul ul li a.active,
.sidebar .sidebar-menu ul ul li a:hover {
  color: #f8fafc !important;
  background: rgba(13, 148, 136, 0.18) !important;
  box-shadow: none !important;
}

.sidebar .sidebar-menu a:hover > i,
.sidebar .sidebar-menu a.active > i,
.sidebar .sidebar-menu li.active > a > i {
  color: #ffffff !important;
}

.modern-profile { display: none !important; }

@media (min-width: 992px) {
  .header .header-left { display: none !important; }
}

@media (min-width: 992px) {
  .page-wrapper { margin-left: 260px !important; }
  .header { left: 260px !important; }
  .mini-sidebar .header { left: 72px !important; }
  .mini-sidebar .page-wrapper { margin-left: 72px !important; }
  .mini-sidebar .sidebar { width: 72px !important; }
}

/* ---------- Command bar ---------- */
.header {
  height: 56px !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--hl-line) !important;
  box-shadow: none !important;
}

.page-wrapper { padding-top: 56px !important; }

.header .header-user,
.header .main-header,
.header .nav.user-menu {
  height: 56px;
}

.hl-search {
  position: relative;
  width: min(420px, 42vw);
}

.hl-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
}

.hl-search input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--hl-line);
  background: #f8fafc;
  border-radius: 8px;
  padding: 0 12px 0 36px;
  font-size: 13px;
  color: var(--hl-ink);
}

.hl-search input:focus {
  outline: none;
  border-color: var(--hl-teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.hl-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 8px;
  white-space: nowrap;
}

.hl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.header .btn-menubar {
  width: 34px;
  height: 34px;
  border-radius: 8px !important;
  color: #475569 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

.header .btn-menubar:hover {
  background: #f1f5f9 !important;
  border-color: var(--hl-line) !important;
}

.header .avatar {
  border: 2px solid #ccfbf1;
}

/* ---------- Canvas, cards, tables ---------- */
.page-wrapper { background: var(--hl-canvas) !important; }
.page-wrapper .content { padding: 20px 22px 8px; }

.card,
.dash-stat-card,
.dash-router-card {
  background: #fff !important;
  border: 1px solid var(--hl-line) !important;
  border-radius: 10px !important;
  box-shadow: var(--hl-shadow) !important;
}

.card .card-header,
.card-header {
  background: #fff !important;
  border-bottom: 1px solid var(--hl-line) !important;
  padding: 14px 16px !important;
}

.card .card-header h5,
.card-header h5 {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

.card .card-body { padding: 16px; }

.table {
  --bs-table-bg: transparent;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.table thead th,
.dash-ppp-table thead th,
table.dataTable thead th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--hl-line) !important;
  white-space: nowrap;
}

.table tbody td {
  border-color: #f1f5f9 !important;
  vertical-align: middle;
  font-size: 13px;
  color: #1e293b;
}

.table-hover tbody tr:hover,
.table tbody tr:hover {
  background: #f8fafc !important;
}

.table tbody tr.selected,
.table tbody tr.active {
  background: #f0fdfa !important;
  box-shadow: inset 2px 0 0 #0d9488;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--hl-line-strong) !important;
  border-radius: 6px !important;
  height: 34px;
  padding: 0 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.pagination .page-item.active .page-link {
  background: var(--hl-navy) !important;
  border-color: var(--hl-navy) !important;
  color: #fff !important;
  border-radius: 6px !important;
}

.page-link {
  color: var(--hl-navy) !important;
  border-radius: 6px !important;
  margin: 0 2px;
}

/* ---------- Buttons, badges, forms ---------- */
.btn {
  border-radius: 6px !important;
  font-weight: 600 !important;
  letter-spacing: 0;
}

.btn-primary,
.btn.btn-primary,
.bg-primary,
.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
  background-color: var(--hl-navy) !important;
  border-color: var(--hl-navy) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
  background-color: var(--hl-navy-2) !important;
  border-color: var(--hl-navy-2) !important;
  color: #fff !important;
}

.btn-success,
.btn.btn-success {
  background: var(--hl-teal) !important;
  border-color: var(--hl-teal) !important;
  color: #fff !important;
}

.btn-success:hover,
.btn.btn-success:hover {
  background: var(--hl-teal-deep) !important;
  border-color: var(--hl-teal-deep) !important;
}

.btn-outline-primary {
  color: var(--hl-navy) !important;
  border-color: var(--hl-line-strong) !important;
  background: #fff !important;
}

.btn-outline-primary:hover {
  background: #f8fafc !important;
  color: var(--hl-teal-deep) !important;
  border-color: #99f6e4 !important;
}

.btn-light,
.btn-white {
  background: #fff !important;
  border: 1px solid var(--hl-line) !important;
  color: var(--hl-navy) !important;
}

.text-primary,
a.text-primary,
.link-primary {
  color: var(--hl-teal-deep) !important;
}

a { color: var(--hl-teal-deep); }
a:hover { color: #115e59; }

.badge {
  font-weight: 600 !important;
  letter-spacing: 0.03em;
  border-radius: 999px !important;
  padding: 0.28em 0.65em !important;
}

.bg-success { background: #ccfbf1 !important; color: #0f766e !important; }
.bg-warning { background: #fef3c7 !important; color: #b45309 !important; }
.bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.bg-info { background: #e0f2fe !important; color: #0369a1 !important; }
.bg-secondary { background: #e2e8f0 !important; color: #334155 !important; }

.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info,
.badge.bg-secondary,
.badge.bg-primary {
  border: 1px solid transparent;
}

.badge.bg-success { border-color: #99f6e4; }
.badge.bg-warning { border-color: #fde68a; }
.badge.bg-danger { border-color: #fecaca; }
.badge.bg-primary { background: #e2e8f0 !important; color: #0f172a !important; border-color: #cbd5e1; }

.form-control,
.form-select,
.select2-container--default .select2-selection--single {
  min-height: 38px;
  border: 1px solid var(--hl-line-strong) !important;
  border-radius: 6px !important;
  color: var(--hl-ink) !important;
  font-size: 14px !important;
  background-color: #fff !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--hl-teal) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
}

.form-label {
  color: #334155;
  font-size: 13px;
  font-weight: 500;
}

.nav-pills .nav-link {
  color: #334155 !important;
  background: #fff;
  border: 1px solid var(--hl-line);
  border-radius: 999px !important;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: var(--hl-navy) !important;
  border-color: var(--hl-navy) !important;
  color: #fff !important;
}

.breadcrumb { background: transparent !important; }
.breadcrumb-item,
.breadcrumb-item a { color: var(--hl-muted) !important; font-size: 12px; }
.breadcrumb-item.active { color: var(--hl-ink) !important; }

.alert {
  border-radius: 8px !important;
  border: 1px solid var(--hl-line) !important;
}

.alert-success { background: #f0fdfa !important; color: #115e59 !important; border-color: #99f6e4 !important; }
.alert-danger { background: #fef2f2 !important; color: #991b1b !important; border-color: #fecaca !important; }

.footer {
  background: transparent !important;
  border-top: 1px solid var(--hl-line) !important;
  color: var(--hl-muted) !important;
  font-size: 12px;
}

.dropdown-menu {
  border: 1px solid var(--hl-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04) !important;
}

.modal-content {
  border-radius: 12px !important;
  border: 1px solid var(--hl-line) !important;
}

.progress, .dash-progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
}

/* ---------- Dashboard board ---------- */
.hl-pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hl-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hl-teal-deep);
}

.hl-kicker span { color: var(--hl-muted); font-weight: 600; }

.hl-pagehead h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}

.hl-lead {
  margin: 6px 0 0;
  color: var(--hl-muted);
  font-size: 13.5px;
  max-width: 640px;
}

.hl-pagehead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hl-clock {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid var(--hl-line);
  border-radius: 999px;
  padding: 6px 12px;
}

.hl-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.hl-kpi {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hl-line) !important;
  border-radius: 12px !important;
  box-shadow: var(--hl-shadow);
  height: 100%;
  padding: 16px 16px 14px;
}

.hl-kpi::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
}

.hl-kpi-teal::before { background: #0d9488; }
.hl-kpi-amber::before { background: #f59e0b; }
.hl-kpi-green::before { background: #10b981; }
.hl-kpi-navy::before { background: #0f172a; }

.hl-kpi-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.hl-kpi-value {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--hl-ink);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.hl-kpi-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.hl-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.hl-kpi-teal .hl-kpi-icon { background: #ccfbf1; color: #0f766e; }
.hl-kpi-amber .hl-kpi-icon { background: #fef3c7; color: #b45309; }
.hl-kpi-green .hl-kpi-icon { background: #d1fae5; color: #047857; }
.hl-kpi-navy .hl-kpi-icon { background: #e2e8f0; color: #0f172a; }

.dash-router-card.is-online { border-color: #99f6e4 !important; }
.dash-router-card { border-radius: 10px !important; }

.mono, .hl-mono, td.mono {
  font-family: var(--hl-mono) !important;
  font-size: 12.5px;
}

.welcome-wrap { display: none !important; }

/* ---------- Login ---------- */
body.hl-auth { background: #f4f7fb !important; }

body.hl-auth .login-background,
body.hl-auth .login-background::before {
  background: radial-gradient(900px 480px at 15% 0%, rgba(20, 184, 166, 0.28), transparent 55%),
              linear-gradient(165deg, #0b1220 0%, #0f172a 58%, #134e4a 140%) !important;
}

body.hl-auth .bg-overlay-img { display: none !important; }
body.hl-auth .authen-overlay-item { background: transparent !important; border-color: rgba(255,255,255,0.12) !important; }
body.hl-auth .login-background h1 { font-size: 40px !important; line-height: 1.15; letter-spacing: -0.03em; }
body.hl-auth .authentication-card { padding: 28px; }

body.hl-auth .hl-auth-card {
  background: #fff;
  border: 1px solid var(--hl-line);
  border-radius: 14px;
  box-shadow: var(--hl-shadow);
  padding: 28px 26px 8px;
}

body.hl-auth .btn-primary { height: 42px; }

@media (max-width: 991.98px) {
  .sidebar { width: 260px; }
  .header { left: 0 !important; }
  .hl-live span.hl-live-label { display: none; }
  .hl-pagehead h1 { font-size: 22px; }
  .hl-pagehead-side { align-items: flex-start; }
  .hl-search { display: none; }
}
