.np-dashboard {
  --np-primary: #b30012;
  --np-primary-dark: #8f000e;
  --np-primary-soft: #fce9ec;
  --np-bg: #f4f5f7;
  --np-card: #ffffff;
  --np-text: #23262b;
  --np-muted: #6b7280;
  --np-border: #e6e8ee;
  --np-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  --np-radius: 14px;
  background: var(--np-bg);
  color: var(--np-text);
  min-height: calc(100vh - 90px);
  padding: 24px;
}

.np-modern-layout {
  background: var(--np-bg, #f4f5f7);
  padding-top: 78px;
}

.np-modern-layout > .container:not(.np-modern-nav-shell) {
  max-width: none;
  width: calc(100% - 284px);
  margin-left: 284px;
  background: transparent;
}

.np-modern-nav-shell {
  --np-primary: #b30012;
  --np-primary-dark: #8f000e;
  --np-primary-soft: #fce9ec;
  --np-bg: #f4f5f7;
  --np-card: #ffffff;
  --np-text: #23262b;
  --np-muted: #6b7280;
  --np-border: #e6e8ee;
  --np-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  color: var(--np-text);
}

.np-topbar {
  min-height: 78px;
  background: linear-gradient(90deg, var(--np-primary), #c20d1b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  box-shadow: var(--np-shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
}

.np-topbar-left,
.np-topbar-right,
.np-brand,
.np-topbar-nav,
.np-top-chip {
  display: flex;
  align-items: center;
}

.np-topbar-left {
  gap: 18px;
  min-width: 0;
}

.np-topbar-right {
  gap: 12px;
}

.np-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s ease;
}

.np-menu-btn:hover {
  background: rgba(255, 255, 255, .12);
}

.np-brand {
  gap: 14px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.np-brand:hover {
  color: #fff;
}

.np-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: var(--np-primary);
  border: 3px solid rgba(255, 255, 255, .2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.np-brand-text small,
.np-brand-text strong {
  display: block;
}

.np-brand-text small {
  font-size: 12px;
  opacity: .9;
  font-weight: 500;
}

.np-brand-text strong {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.np-topbar-nav {
  gap: 8px;
  margin-left: 8px;
}

.np-topbar-nav a,
.np-sidebar-menu a {
  text-decoration: none;
}

.np-topbar-nav a {
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .2s ease;
  white-space: nowrap;
}

.np-topbar-nav a:hover,
.np-topbar-nav a.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.np-top-chip {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  white-space: nowrap;
}

.np-year-form label {
  margin: 0;
}

.np-year-form select {
  background: transparent;
  border: 0;
  color: #fff;
  outline: 0;
  font-weight: 700;
  width: 74px;
}

.np-year-form select option {
  color: #111827;
}

.np-user-menu {
  position: relative;
}

.np-user-button {
  cursor: pointer;
}

.np-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: 12px;
  box-shadow: var(--np-shadow);
  padding: 8px;
  display: none;
  z-index: 1050;
}

.np-user-menu.open .np-user-dropdown {
  display: block;
}

.np-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}

.np-user-dropdown a:hover {
  background: #f8f8f9;
  color: var(--np-primary);
}

.np-sidebar {
  position: fixed;
  left: 0;
  top: 78px;
  bottom: 0;
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--np-border);
  padding: 20px 14px;
  overflow-y: auto;
  z-index: 1030;
  transition: transform .2s ease;
}

.np-sidebar-backdrop {
  display: none;
}

.np-sidebar-section {
  margin-bottom: 10px;
  border-radius: 14px;
  transition: .2s ease;
}

.np-sidebar-section.open {
  background: #fff7f8;
  padding: 6px;
}

.np-sidebar-title {
  width: 100%;
  border: 0;
  background: transparent;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 11px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: .2s ease;
  text-align: left;
}

.np-sidebar-section.open > .np-sidebar-title {
  background: var(--np-primary-soft);
  color: var(--np-primary);
}

.np-sidebar-title span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.np-sidebar-title i:first-child {
  width: 18px;
  text-align: center;
  color: var(--np-muted);
}

.np-sidebar-title:hover,
.np-sidebar-section.open > .np-sidebar-title {
  color: var(--np-primary);
}

.np-sidebar-section.open > .np-sidebar-title i:first-child {
  color: var(--np-primary);
}

.np-sidebar-chevron {
  color: var(--np-muted);
  font-size: 11px;
  transition: transform .2s ease;
}

.np-sidebar-section.open .np-sidebar-chevron {
  transform: rotate(180deg);
}

.np-sidebar-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 2px 13px;
  padding: 2px 0 2px 11px;
  border-left: 1px solid #f0b8bf;
}

.np-sidebar-section.open .np-sidebar-menu {
  display: flex;
}

.np-sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
  position: relative;
}

.np-sidebar-menu a i {
  width: 18px;
  text-align: center;
}

.np-sidebar-menu a:hover {
  background: #ffffff;
  color: var(--np-primary);
}

.np-sidebar-menu a.active {
  background: #ffffff;
  color: var(--np-primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(179, 0, 18, .10);
}

.np-sidebar-menu a.active::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--np-primary);
  transform: translateY(-50%);
}

.np-dashboard a {
  text-decoration: none;
}

.np-modern-layout .np-dashboard {
  margin-left: 260px;
  min-height: calc(100vh - 78px);
}

.np-sidebar-collapsed .np-sidebar {
  transform: translateX(-100%);
}

.np-sidebar-collapsed .np-dashboard {
  margin-left: 0;
}

.np-sidebar-collapsed > .container:not(.np-modern-nav-shell) {
  width: 100%;
  margin-left: 0;
}

.np-shell {
  max-width: 1440px;
  margin: 0 auto;
}

.np-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.np-page-title {
  color: var(--np-text);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 6px;
  text-align: left;
  text-shadow: none;
}

.np-page-subtitle {
  color: var(--np-muted);
  font-size: 14px;
  margin: 0;
}

.np-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.np-btn-filter {
  border: 1px solid var(--np-border);
  background: #fff;
  color: #374151;
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .2s ease;
}

.np-btn-filter:hover,
.np-btn-filter.active {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

.np-grid {
  display: grid;
  gap: 18px;
}

.np-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.np-main-grid {
  grid-template-columns: 1.15fr 1fr 1fr;
  margin-bottom: 18px;
}

.np-wide-grid {
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 18px;
}

.np-card {
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius);
  box-shadow: var(--np-shadow);
}

.np-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.np-card-title {
  color: var(--np-text);
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  text-align: left;
  text-shadow: none;
}

.np-card-body {
  padding: 0 18px 18px;
}

.np-card-link {
  color: var(--np-primary);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.np-stat-card {
  min-height: 105px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.np-stat-icon,
.np-list-icon {
  background: var(--np-primary-soft);
  color: var(--np-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.np-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
}

.np-stat-number {
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 6px;
}

.np-stat-label {
  color: var(--np-muted);
  font-size: 14px;
  font-weight: 600;
}

.np-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.np-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f1f4;
}

.np-list-item:last-child {
  border-bottom: 0;
}

.np-list-left {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.np-list-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  margin-top: 1px;
}

.np-list-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  word-break: break-word;
}

.np-list-meta {
  color: var(--np-muted);
  font-size: 13px;
}

.np-list-right {
  color: var(--np-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.np-calendar-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.np-calendar-actions {
  display: inline-flex;
  gap: 6px;
}

.np-calendar-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--np-border);
  border-radius: 8px;
  background: #fff;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: .2s ease;
}

.np-calendar-btn:hover {
  border-color: var(--np-primary);
  color: var(--np-primary);
}

.np-calendar-btn.is-disabled {
  pointer-events: none;
  opacity: .45;
  background: #f3f4f6;
  color: #6b7280;
}

.np-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.np-badge-red {
  background: #ffe4e6;
  color: #c1121f;
}

.np-badge-soft {
  background: #f3f4f6;
  color: #374151;
}

.np-import-subtitle,
.np-help-text {
  color: var(--np-muted);
  font-size: 14px;
}

.np-import-subtitle {
  margin-bottom: 14px;
}

.np-help-text {
  margin-top: 12px;
  line-height: 1.5;
}

.np-file-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.np-file-input {
  border: 1px solid var(--np-border);
  border-radius: 12px;
  background: #fafafa;
  padding: 10px 12px;
  font-size: 14px;
  color: #374151;
  min-width: 0;
}

.np-btn-primary {
  width: 100%;
  border: 0;
  background: var(--np-primary);
  color: #fff;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 800;
  transition: .2s ease;
}

.np-btn-primary:hover {
  background: var(--np-primary-dark);
  color: #fff;
}

.np-empty-panel {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 18px;
}

.np-empty-panel span {
  font-size: 15px;
  font-weight: 700;
}

.np-empty-panel i {
  color: var(--np-muted);
  font-size: 22px;
}

.np-table-card .table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.np-table-card .table th {
  color: #4b5563;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.np-actions-cell {
  min-width: 250px;
}

.np-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.np-summary-item {
  border: 1px solid var(--np-border);
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
}

.np-summary-label {
  color: var(--np-muted);
  font-size: 12px;
  font-weight: 700;
}

.np-summary-number {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  margin-top: 6px;
}

.np-search-form {
  background: #fafafa;
  border: 1px solid var(--np-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.np-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.np-quick-link {
  min-height: 82px;
  border: 1px solid var(--np-border);
  border-radius: 12px;
  background: #fafafa;
  color: #374151;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 14px;
  font-weight: 800;
  transition: .2s ease;
}

.np-quick-link i {
  color: var(--np-primary);
  font-size: 18px;
}

.np-quick-link:hover {
  border-color: var(--np-primary);
  background: var(--np-primary-soft);
  color: var(--np-primary);
}

@media (max-width: 1300px) {
  .np-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .np-main-grid,
  .np-wide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .np-modern-layout {
    padding-top: 0;
  }

  .np-topbar {
    min-height: auto;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    position: sticky;
    left: auto;
    right: auto;
  }

  .np-topbar-left,
  .np-topbar-right,
  .np-topbar-nav {
    flex-wrap: wrap;
  }

  .np-topbar-right {
    width: 100%;
  }

  .np-sidebar {
    transform: translateX(-100%);
    top: 0;
    width: min(84vw, 280px);
    z-index: 1060;
    box-shadow: var(--np-shadow);
  }

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

  .np-sidebar-open {
    overflow: hidden;
  }

  .np-sidebar-open .np-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .42);
    z-index: 1050;
  }

  .np-modern-layout > .container:not(.np-modern-nav-shell) {
    width: 100%;
    margin-left: 0;
  }

  .np-modern-layout .np-dashboard {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .np-brand-text strong {
    font-size: 20px;
  }

  .np-topbar-nav {
    width: 100%;
    margin-left: 0;
  }

  .np-topbar-nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .np-top-chip {
    flex: 1 1 auto;
    justify-content: center;
  }

  .np-user-menu {
    width: 100%;
  }

  .np-user-button {
    width: 100%;
    justify-content: center;
  }

  .np-user-dropdown {
    left: 0;
    right: 0;
  }

  .np-dashboard {
    padding: 16px;
  }

  .np-page-header {
    flex-direction: column;
  }

  .np-page-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .np-btn-filter {
    flex: 1 1 auto;
    justify-content: center;
  }

  .np-stats-grid,
  .np-summary-grid {
    grid-template-columns: 1fr;
  }

  .np-page-title {
    font-size: 24px;
  }

  .np-list-item {
    align-items: flex-start;
  }

  .np-list-right {
    white-space: normal;
    text-align: right;
  }

  .np-calendar-cell {
    min-width: 72px;
  }
}
