:root {
  --sidebar-bg: #0f172a;
  --sidebar-active: #1d4ed8;
  --sidebar-text: #cbd5f5;
  --card-bg: #ffffff;
  --page-bg: #f1f5f9;
  --navbar-height: 57px;
  --sidebar-width: 280px;
  --content-max: 1680px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
}

/* ===== Base ===== */
body {
  background: var(--page-bg);
  min-height: 100vh;
  margin: 0;
  padding-top: var(--navbar-height);
  overflow-x: hidden;
}

body.sidebar-lock {
  overflow: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2050;
  min-height: var(--navbar-height);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar .navbar-brand {
  min-width: 0;
  max-width: min(48vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar .ms-auto {
  min-width: 0;
}

.navbar form {
  margin: 0;
}

.navbar .dropdown-menu {
  z-index: 2100;
}

.notification-menu {
  z-index: 2200 !important;
}

.getting-started-hint {
  position: fixed;
  right: 18px;
  bottom: 92px;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  gap: 12px;
  padding: 16px 44px 16px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.18);
  z-index: 2147482500;
}

.getting-started-hint[hidden] {
  display: none !important;
}

.getting-started-hint__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.getting-started-hint__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.getting-started-hint__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 21px;
}

.getting-started-hint__body {
  min-width: 0;
}

.getting-started-hint__title {
  color: #0f172a;
  font-weight: 800;
  margin-bottom: 3px;
}

.getting-started-hint__text {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.getting-started-hint__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 575.98px) {
  .getting-started-hint {
    right: 12px;
    bottom: 84px;
  }
}

/* ===== Layout ===== */
.app {
  display: flex;
  min-height: calc(100vh - var(--navbar-height));
  position: relative;
}

/* ===== Sidebar ===== */

.sidebar-brand-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  flex: 0 0 auto;
}

.sidebar-brand-title {
  color: #ffffff;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar-brand-subtitle {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 2px;
}

.sidebar-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px 10px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

.sidebar-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
}

.sidebar-search input::placeholder {
  color: #94a3b8;
}

.sidebar-search button {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 0;
  line-height: 1;
}

.sidebar-search-empty {
  color: #cbd5e1;
  font-size: 12px;
  margin: 2px 12px 10px;
}

.sidebar.is-searching .sidebar-section-toggle {
  color: #dbeafe;
}

.sidebar-section.has-no-results,
.sidebar-section-toggle.has-no-results,
.sidebar a.is-hidden-by-search {
  display: none;
}
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  position: fixed;
  top: var(--navbar-height);
  bottom: 0;
  left: 0;
  z-index: 2040;
  height: calc(100vh - var(--navbar-height));
  max-height: calc(100vh - var(--navbar-height));
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 14px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.35);
  transition:
    width 0.25s ease,
    min-width 0.25s ease,
    flex-basis 0.25s ease,
    padding 0.25s ease,
    transform 0.25s ease;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border: 2px solid var(--sidebar-bg);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 213, 225, 0.78);
}

.sidebar h6 {
  color: #94a3b8;
  font-size: 12px;
  padding: 10px 12px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-section-toggle {
  width: calc(100% - 12px);
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  margin: 6px 6px 2px;
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  line-height: 1.2;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-section-toggle:hover,
.sidebar-section-toggle:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.sidebar-section-toggle i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.sidebar-section-toggle[aria-expanded="false"] i {
  transform: rotate(-90deg);
}

.sidebar-section {
  max-height: 1200px;
  opacity: 1;
  overflow: hidden;
  transform-origin: top;
  transition: max-height 0.24s ease, opacity 0.16s ease, margin 0.16s ease;
}

.sidebar-section.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.sidebar-section.is-collapsed a {
  pointer-events: none;
}

.sidebar a {
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  margin: 4px 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar a span {
  grid-column: 2;
  font-weight: 700;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar a small {
  grid-column: 2;
  display: block;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar a:hover small,
.sidebar a.active small {
  color: rgba(255, 255, 255, 0.78);
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar a.active {
  background: var(--sidebar-active);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
}

.sidebar a i {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-size: 1rem;
  align-self: center;
  justify-self: center;
}


.sidebar-edge-toggle {
  position: fixed;
  top: 50%;
  left: calc(var(--sidebar-width) - 14px);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: #ffffff;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
  transform: translateY(-50%) scale(0.72);
  opacity: 0;
  pointer-events: none;
  z-index: 2060;
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.sidebar-edge-toggle i {
  font-size: 0.95rem;
  line-height: 1;
}

.sidebar-edge-toggle::after {
  content: "縮放主選單";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.app:not(.sidebar-collapsed) .sidebar-edge-toggle:hover,
.app:not(.sidebar-collapsed) .sidebar-edge-toggle:focus-visible,
.app:not(.sidebar-collapsed):has(.sidebar:hover) .sidebar-edge-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.sidebar-edge-toggle:hover,
.sidebar-edge-toggle:focus-visible {
  background: var(--sidebar-active);
  color: #ffffff;
  outline: none;
}

.sidebar-edge-toggle:hover::after,
.sidebar-edge-toggle:focus-visible::after {
  opacity: 1;
}

.app.sidebar-collapsed .sidebar-edge-toggle {
  left: 10px;
  opacity: 0.72;
  pointer-events: auto;
  transform: translateY(-50%) scale(0.9);
}

.app.sidebar-collapsed .sidebar-edge-toggle i {
  transform: rotate(180deg);
}

.app.sidebar-collapsed .sidebar-edge-toggle:hover,
.app.sidebar-collapsed .sidebar-edge-toggle:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.sidebar-backdrop {
  display: none;
}

/* ===== Content ===== */
.content {
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: var(--content-max);
  margin-left: var(--sidebar-width);
  padding: 28px;
  transition: margin-left 0.25s ease, width 0.25s ease, padding 0.25s ease;
}

.content > .container,
.content > .container-fluid {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* ===== Common UI ===== */
.card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  background: var(--card-bg);
}

.content > .d-flex.justify-content-between,
.content .container-fluid > .d-flex.justify-content-between,
.content form .d-flex,
.card .d-flex.justify-content-between {
  min-width: 0;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.card,
.alert,
.list-group-item,
td,
th,
p,
span,
a {
  overflow-wrap: anywhere;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.table th,
.table td {
  vertical-align: middle;
}

.btn,
.form-control,
.form-select {
  max-width: 100%;
}

form.d-inline,
form.d-inline button,
form.d-inline .form-control,
form.d-inline .form-select {
  margin-top: 0.125rem;
  margin-bottom: 0.125rem;
}

/* =========================================================
   Sidebar collapsed on desktop
   ========================================================= */
.app.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 0 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.app.sidebar-collapsed .sidebar * {
  display: none !important;
}

.app.sidebar-collapsed .content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
}

/* ===== Tablet ===== */
@media (max-width: 1199.98px) {
  .content {
    padding: 22px;
  }

  .card.p-4 {
    padding: 1.25rem !important;
  }
}

/* ===== Mobile / Off-canvas sidebar ===== */
@media (max-width: 991.98px) {
  :root {
    --sidebar-width: min(82vw, 300px);
  }

  .navbar {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .navbar .navbar-brand {
    max-width: 42vw;
    font-size: 1rem;
  }

  .navbar .ms-auto {
    gap: 0.5rem !important;
  }

  .navbar .btn-sm {
    padding: 0.25rem 0.5rem;
  }

  .app {
    display: block;
    min-height: calc(100vh - var(--navbar-height));
  }

  .content {
    width: 100%;
    margin-left: 0;
  }

  .sidebar {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    left: 0;
    z-index: 2040;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    max-height: calc(100vh - var(--navbar-height));
    transform: translateX(-100%);
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.26);
  }

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

  .sidebar-backdrop {
    position: fixed;
    inset: var(--navbar-height) 0 0 0;
    z-index: 2030;
    display: block;
    pointer-events: none;
    background: rgba(15, 23, 42, 0);
    transition: background 0.2s ease;
  }

  .app.sidebar-open .sidebar-backdrop {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.42);
  }

  .app.sidebar-collapsed .sidebar {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    flex: 0 0 var(--sidebar-width) !important;
    padding: 16px 10px !important;
  }

  .app.sidebar-collapsed .sidebar * {
    display: revert !important;
  }

  .content {
    max-width: 100%;
    padding: 18px;
  }

  .content > .d-flex.justify-content-between,
  .content .container-fluid > .d-flex.justify-content-between {
    align-items: flex-start !important;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .content > .d-flex.justify-content-between > :last-child,
  .content .container-fluid > .d-flex.justify-content-between > :last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    gap: 0.5rem;
  }

  .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }

  .row.g-3,
  .row.g-2 {
    --bs-gutter-y: 0.75rem;
  }

  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs .nav-link {
    white-space: nowrap;
  }
}

/* ===== Phones ===== */
@media (max-width: 575.98px) {
  .navbar {
    min-height: 54px;
  }

  .navbar .navbar-brand {
    max-width: 36vw;
  }

  .navbar .ms-auto {
    gap: 0.35rem !important;
  }

  .navbar a[href*="accounts/profile"] span {
    display: inline-block;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }

  .content {
    padding: 12px;
  }

  .content h2 {
    font-size: 1.35rem;
  }

  .content h5 {
    font-size: 1.05rem;
  }

  .card.p-4,
  .card.p-3,
  .card-body.p-4,
  .card-body.p-5 {
    padding: 1rem !important;
  }

  .content > .d-flex.justify-content-between > :last-child,
  .content .container-fluid > .d-flex.justify-content-between > :last-child {
    width: 100%;
  }

  .content > .d-flex.justify-content-between > .btn,
  .content .container-fluid > .d-flex.justify-content-between > .btn,
  .content > .d-flex.justify-content-between > :last-child > .btn,
  .content .container-fluid > .d-flex.justify-content-between > :last-child > .btn {
    flex: 1 1 auto;
  }

  form.card .btn,
  form.card .btn-group,
  form.card .d-flex.gap-2 .btn {
    flex: 1 1 auto;
  }

  .table-responsive {
    border-radius: 8px;
  }

  .table {
    font-size: 0.9rem;
  }

  .table th,
  .table td {
    padding: 0.55rem 0.65rem;
  }

  .btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.45rem;
  }

  form.d-inline {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
  }

  form.d-inline .form-control,
  form.d-inline .form-select {
    width: auto !important;
    min-width: 7rem;
  }

  .notification-menu {
    max-width: calc(100vw - 16px) !important;
  }
}

@media (max-width: 399.98px) {
  .navbar .navbar-brand {
    max-width: 30vw;
  }

  .navbar a[href*="accounts/profile"] {
    display: none;
  }
}

@media print {
  .navbar,
  .sidebar,
  .sidebar-backdrop {
    display: none !important;
  }

  .app,
  .content {
    display: block !important;
    min-height: auto !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* ===== Dashboard Widgets ===== */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-actions,
.dashboard-scope-switch,
.dashboard-widget-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-widget-toolbar {
  justify-content: space-between;
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.dashboard-widget-card {
  position: relative;
  min-height: 132px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-widget-card--wide {
  grid-column: span 2;
}

.dashboard-chart-card {
  min-height: 300px;
  display: block;
}

.dashboard-ops-widget {
  display: block;
  min-height: 260px;
  overflow-x: auto;
}

.dashboard-ops-widget .dashboard-ops-action {
  position: relative;
  z-index: 1;
}

.dashboard-chart-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-chart-header > span:last-child {
  display: grid;
  gap: 3px;
}

.dashboard-chart {
  min-height: 205px;
}

.dashboard-chart-bars {
  height: 205px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 20px;
}

.dashboard-chart-bar-item {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
  text-align: center;
}

.dashboard-chart-bar-track {
  min-height: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-chart-bar {
  width: min(42px, 72%);
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  position: relative;
}

.dashboard-chart-bar strong {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  color: #334155;
  font-size: 12px;
}

.dashboard-chart-label {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chart-line-svg {
  width: 100%;
  height: 180px;
  overflow: visible;
}

.dashboard-chart-line-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 11px;
}

.dashboard-chart-donut-layout {
  min-height: 205px;
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  align-items: center;
  gap: 24px;
}

.dashboard-chart-donut {
  width: 170px;
  aspect-ratio: 1;
  margin: auto;
  border-radius: 50%;
  position: relative;
}

.dashboard-chart-donut::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: #fff;
}

.dashboard-chart-legend {
  display: grid;
  gap: 8px;
}

.dashboard-chart-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
}

.dashboard-chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dashboard-chart-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: #94a3b8;
}

.dashboard-widget-card:hover,
.dashboard-widget-card:focus-visible {
  color: #0f172a;
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
  outline: none;
}

.dashboard-widget-card.is-dragging {
  opacity: 0.58;
  transform: scale(0.98);
}

.dashboard-widget-card.is-drop-target {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.dashboard-widget-card.is-new {
  animation: dashboard-card-enter .28s ease-out;
}

@keyframes dashboard-card-enter {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dashboard-widget-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 20px;
  flex: 0 0 auto;
}

.dashboard-widget-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-widget-title,
.dashboard-widget-desc {
  overflow-wrap: anywhere;
}

.dashboard-widget-title {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-widget-value {
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-widget-value small {
  margin-left: 4px;
  font-size: 14px;
  color: #64748b;
  font-weight: 700;
}

.dashboard-widget-desc {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-widget-drag {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #94a3b8;
  cursor: grab;
}

.dashboard-widget-drag:active {
  cursor: grabbing;
}

@media (max-width: 767.98px) {
  .dashboard-header {
    display: block;
  }

  .dashboard-actions,
  .dashboard-scope-switch {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .dashboard-widget-toolbar {
    justify-content: flex-start;
  }

  .dashboard-widget-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-widget-card {
    min-height: 118px;
  }

  .dashboard-widget-card--wide {
    grid-column: span 1;
  }

  .dashboard-chart-donut-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-tabs[data-dashboard-tabs] .nav-item {
  border-radius: 8px 8px 0 0;
}

.dashboard-tabs[data-dashboard-tabs] .nav-item[draggable="true"] {
  cursor: grab;
}

.dashboard-tabs[data-dashboard-tabs] .nav-item.is-dragging {
  opacity: 0.55;
}

.dashboard-tabs[data-dashboard-tabs] .nav-item.is-drop-target .nav-link {
  box-shadow: inset 3px 0 0 #2563eb;
}

.dashboard-widget-drag {
  opacity: 0;
  pointer-events: none;
}

.dashboard-widget-remove {
  position: absolute;
  top: 8px;
  right: 34px;
  width: 28px;
  height: 28px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  z-index: 2;
}

.dashboard-tab-remove {
  display: none;
  margin-left: 6px;
  color: #b91c1c;
}

.dashboard-tab-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

.dashboard-catalog-card {
  width: 100%;
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.dashboard-catalog-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.dashboard-catalog-card span:last-child {
  display: grid;
  gap: 4px;
}

.dashboard-catalog-card small {
  color: #64748b;
}

.dashboard-catalog-card em {
  color: #0369a1;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

body.dashboard-edit-mode .dashboard-widget-drag {
  opacity: 1;
  pointer-events: auto;
}

body.dashboard-edit-mode .dashboard-widget-remove,
body.dashboard-edit-mode .dashboard-tab-remove {
  display: inline-grid;
}

body.dashboard-edit-mode .dashboard-widget-card {
  cursor: grab;
  border-style: dashed;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

body.dashboard-edit-mode .dashboard-widget-card:active {
  cursor: grabbing;
}

body.dashboard-edit-mode .dashboard-tabs[data-dashboard-tabs] .nav-link::after {
  content: "\F3FD";
  font-family: "bootstrap-icons";
  margin-left: 8px;
  color: #94a3b8;
  font-size: 0.9em;
}
