:root {
  --nl-bg: #eef2f6;
  --nl-surface: #ffffff;
  --nl-border: #d9e2ea;
  --nl-text: #17212b;
  --nl-muted: #647386;
  --nl-primary: #245f73;
  --nl-primary-strong: #174657;
  --nl-primary-soft: #e4f2f5;
  --nl-accent: #bd8b2f;
  --nl-accent-soft: #fff3d7;
  --nl-green: #3a7d44;
  --nl-danger: #b42318;
  --nl-info: #386f9b;
  --nl-shadow: 0 16px 42px rgba(29, 47, 67, 0.12);
}

body {
  background:
    linear-gradient(135deg, rgba(36, 95, 115, 0.12), transparent 34rem),
    linear-gradient(225deg, rgba(189, 139, 47, 0.12), transparent 30rem),
    linear-gradient(180deg, #f8fafc 0%, var(--nl-bg) 52%, #f7fbfc 100%);
  color: var(--nl-text);
}

.app-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--nl-border);
  box-shadow: 0 8px 24px rgba(42, 67, 116, 0.08);
}

.app-header__logo {
  background: var(--nl-primary);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

.app-header__logo span {
  color: #f6d878;
}

.app-nav {
  align-items: center;
  gap: 8px;
}

.app-nav__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  margin-right: 4px;
  color: #2f5597;
  background: #edf4ff;
  border: 1px solid rgba(68, 114, 196, .22);
  border-radius: 8px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.app-nav__button:hover,
.app-nav__button:focus {
  color: #fff;
  text-decoration: none;
  background: var(--nl-primary);
  transform: translateY(-1px);
}

.app-nav__button--danger {
  color: #991b1b;
  background: #fff1f2;
  border-color: rgba(180, 35, 24, .18);
}

.app-nav__button--danger:hover,
.app-nav__button--danger:focus {
  color: #fff;
  background: var(--nl-danger);
}

.app-sidebar {
  background: linear-gradient(180deg, #1d3155 0%, #13233d 54%, #0f1a2f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar__user {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.app-sidebar__user-name {
  font-weight: 700;
}

.app-menu__item {
  margin: 4px 10px;
  border-radius: 8px;
  color: #d7dde8;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.app-menu__item:hover,
.app-menu__item:focus,
.app-menu__item.active,
.treeview.is-expanded > .app-menu__item {
  background: var(--nl-primary);
  color: #fff;
  transform: translateX(2px);
}

.treeview-menu {
  background: rgba(15, 23, 42, 0.86);
}

.treeview-item {
  color: #cbd5e1;
}

.treeview-item:hover,
.treeview-item:focus {
  color: #fff;
  background: rgba(68, 114, 196, 0.28);
}

.app-content {
  background: transparent;
  min-height: calc(100vh - 50px);
}

.app-title {
  background: transparent;
  border: 0;
  padding: 0 0 22px;
  margin: 0 0 20px;
}

.app-title h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--nl-text);
}

.app-title p,
.breadcrumb,
.breadcrumb a {
  color: var(--nl-muted);
}

.tile {
  border: 1px solid var(--nl-border);
  border-radius: 8px;
  box-shadow: var(--nl-shadow);
  background: var(--nl-surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(42, 67, 116, 0.15);
  border-color: rgba(68, 114, 196, 0.28);
}

.tile-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--nl-text);
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 18px;
}

.control-label,
label {
  color: #334155;
  font-weight: 700;
  margin-bottom: 7px;
}

.form-control {
  min-height: 44px;
  border: 1px solid #b8c6d4;
  border-radius: 8px;
  color: var(--nl-text);
  background: #fbfdff;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-control:focus {
  border-color: var(--nl-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 95, 115, 0.15);
}

textarea.form-control {
  min-height: 96px;
}

.btn {
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(29, 47, 67, 0.14);
}

.btn:active {
  transform: translateY(1px) scale(.99);
  box-shadow: 0 5px 10px rgba(29, 47, 67, 0.12);
}

.btn-primary,
.btn-success {
  background: var(--nl-primary);
  border-color: var(--nl-primary);
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--nl-primary-strong);
  border-color: var(--nl-primary-strong);
}

.btn-info {
  background: var(--nl-info);
  border-color: var(--nl-info);
}

.btn-warning {
  color: #1f2937;
  background: var(--nl-accent);
  border-color: var(--nl-accent);
}

.btn-secondary {
  background: #475569;
  border-color: #475569;
}

.btn-danger {
  background: var(--nl-danger);
  border-color: var(--nl-danger);
}

.table {
  color: var(--nl-text);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background: #edf5f7;
  color: #334155;
  border-bottom: 1px solid var(--nl-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.table-bordered th,
.table-bordered td {
  border-color: var(--nl-border);
}

.table-hover tbody tr:hover {
  background: #f6fbfc;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
}

.widget-small {
  border: 1px solid var(--nl-border);
  border-radius: 8px;
  box-shadow: var(--nl-shadow);
}

.widget-small .icon {
  background: var(--nl-primary);
}

.widget-small.primary .icon,
.widget-small.info .icon,
.widget-small.warning .icon,
.widget-small.danger .icon {
  background: var(--nl-primary);
}

.widget-small .info h4 {
  color: var(--nl-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.widget-small .info p {
  color: var(--nl-text);
  font-size: 24px;
}

.dropdown-menu {
  border: 1px solid var(--nl-border);
  border-radius: 8px;
  box-shadow: var(--nl-shadow);
}

.invoice {
  color: var(--nl-text);
}

.badge-success,
.addRow {
  background: var(--nl-primary) !important;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}

.material-half-bg .cover {
  background: linear-gradient(135deg, #4472c4 0%, #1f2937 64%, #f2b84b 100%);
}

.dashboard-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  min-height: 190px;
  margin-bottom: 24px;
  padding: 30px;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 70, 87, .98) 0%, rgba(36, 95, 115, .98) 52%, rgba(58, 125, 68, .92) 100%);
  box-shadow: 0 22px 60px rgba(29, 47, 67, 0.24);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 280px;
  height: 280px;
  border: 40px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-weight: 800;
}

.dashboard-hero h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
}

.dashboard-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 15px;
}

.dashboard-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 230px;
  gap: 10px;
}

.dashboard-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .13);
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}

.dashboard-action:hover,
.dashboard-action:focus {
  color: #fff;
  text-decoration: none;
  transform: translateX(-3px);
  background: rgba(255, 255, 255, .22);
}

.dashboard-kpis {
  margin-bottom: 10px;
}

.kpi-card {
  position: relative;
  min-height: 142px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid rgba(68, 114, 196, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: var(--nl-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(42, 67, 116, 0.18);
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(36, 95, 115, .1);
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--nl-primary);
  box-shadow: 0 12px 22px rgba(36, 95, 115, .24);
}

.kpi-card--revenue .kpi-icon {
  background: var(--nl-green);
}

.kpi-card--docs .kpi-icon {
  background: var(--nl-accent);
}

.kpi-card--stock .kpi-icon {
  background: #386f9b;
}

.kpi-label {
  display: block;
  color: var(--nl-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  color: var(--nl-text);
  font-size: 32px;
  line-height: 1;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--nl-muted);
}

.dashboard-chart-card {
  min-height: 392px;
}

.dashboard-canvas {
  display: block;
  width: 100% !important;
  min-height: 260px;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.chart-card-header .tile-title {
  margin-bottom: 4px;
}

.chart-card-header p {
  margin: 0;
  color: var(--nl-muted);
}

.chart-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--nl-primary-strong);
  background: var(--nl-primary-soft);
  font-weight: 800;
}

.structure-list {
  display: grid;
  gap: 18px;
  padding-top: 12px;
}

.structure-item {
  padding: 16px;
  border: 1px solid rgba(36, 95, 115, .14);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f7fbfc 100%);
}

.structure-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.structure-item__head span {
  color: var(--nl-text);
  font-size: 16px;
  font-weight: 900;
}

.structure-item__head strong {
  color: var(--nl-primary-strong);
  font-size: 15px;
  white-space: nowrap;
}

.structure-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.structure-item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  color: #334155;
  border-radius: 999px;
  background: #eef5f7;
  font-size: 12px;
  font-weight: 800;
}

.monthly-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 270px;
  padding: 22px 8px 4px;
}

.monthly-chart__item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-width: 0;
  height: 248px;
  text-align: center;
}

.monthly-chart__bar-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 210px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(68, 114, 196, .08), rgba(68, 114, 196, .02));
  overflow: hidden;
}

.monthly-chart__bar {
  display: block;
  width: 56%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #6f98de 0%, var(--nl-primary) 100%);
  box-shadow: 0 12px 24px rgba(68, 114, 196, .25);
}

.monthly-chart__value {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 1;
  max-width: 92%;
  padding: 3px 6px;
  color: var(--nl-primary-strong);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(68, 114, 196, .12);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  transform: translateX(-50%);
  white-space: nowrap;
}

.monthly-chart__item small {
  color: var(--nl-muted);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-products {
  display: grid;
  gap: 17px;
  padding-top: 18px;
}

.top-product {
  display: grid;
  gap: 8px;
}

.top-product__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.top-product__meta strong {
  color: var(--nl-text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.top-product__meta span {
  flex: 0 0 auto;
  color: var(--nl-primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.progress-line,
.comparison-track {
  height: 10px;
  border-radius: 999px;
  background: #e7eef3;
  overflow: hidden;
}

.progress-line span,
.comparison-track strong {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nl-primary) 0%, #58a6a6 100%);
}

.compact-chart-card {
  min-height: 260px;
}

.comparison-bars {
  display: grid;
  gap: 22px;
  padding-top: 24px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 132px minmax(80px, 1fr) 112px;
  align-items: center;
  gap: 14px;
}

.comparison-row > span {
  color: var(--nl-muted);
  font-weight: 800;
}

.comparison-row em {
  color: var(--nl-text);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.comparison-row:not(.is-primary) .comparison-track strong {
  background: linear-gradient(90deg, var(--nl-accent) 0%, #e5c06f 100%);
}

.empty-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  gap: 12px;
  color: var(--nl-muted);
  text-align: center;
  border: 1px dashed rgba(68, 114, 196, .25);
  border-radius: 8px;
  background: #f8fbff;
}

.empty-chart i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--nl-primary);
  border-radius: 8px;
  background: var(--nl-primary-soft);
  font-size: 20px;
}

.empty-chart span {
  max-width: 280px;
  font-weight: 700;
}

.login-content .logo h2 {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

.login-content .logo h2 span {
  color: #f6d878;
}

.login-content .logo p {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
}

.login-box {
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.login-box .login-head {
  color: var(--nl-text);
  font-weight: 800;
}

.login-box .btn-container .btn {
  min-height: 44px;
}

.app-title + .btn,
.app-title + div .btn,
.app-title + .row .btn {
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .dashboard-hero {
    display: block;
    padding: 24px;
  }

  .dashboard-actions {
    margin-top: 20px;
    min-width: 0;
  }

  .dashboard-hero h1 {
    font-size: 27px;
  }

  .app-title {
    display: block;
  }

  .app-title h1 {
    font-size: 22px;
  }

  .btn {
    margin-bottom: 6px;
  }

  .monthly-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
  }

  .monthly-chart__item {
    height: 210px;
  }

  .monthly-chart__bar-wrap {
    min-height: 174px;
  }

  .top-product__meta,
  .comparison-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .comparison-row em {
    text-align: left;
  }
}
