@import "https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap";

/* ------------------------------
  BASE / GLOBAL
--------------------------------- */
.html, html, body { height: 100%; }

/* slightly smaller base font-size + tighter default spacing */
html {
  font-size: 15px; /* Bootstrap default is 16px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { overflow: hidden; }

* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: #fafafa;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Bootstrap 5 variable overrides  */
  --bs-body-font-family: "Poppins", sans-serif;
  --bs-body-font-size: 0.9375rem; /* 15px base */
  --bs-body-line-height: 1.55;

  --bs-border-color: rgba(15, 23, 42, 0.10);
  --bs-border-radius: 12px;
  --bs-border-radius-sm: 10px;
  --bs-border-radius-lg: 16px;

  --bs-link-color: #0d6efd;
  --bs-link-hover-color: #0b5ed7;

  --bs-box-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --bs-box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
  --bs-box-shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);

  --app-display-font: "Plus Jakarta Sans", "Poppins", sans-serif;
}

/* Centralize sidebar width for reuse */
:root {
  --sidebar-width: 260px;

  /* App tokens */
  --app-bg: #f6f7fb;
  --app-surface: #ffffff;
  --app-surface-2: #fbfcfe;
  --app-border: rgba(15, 23, 42, 0.10);
  --app-text: #0f172a;
  --app-muted: rgba(15, 23, 42, 0.65);

  --app-radius: 16px;
  --app-radius-sm: 12px;

  --app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --app-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
  --app-shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);

  --app-focus-ring: 0 0 0 0.25rem rgba(13, 110, 253, 0.18);

  --app-sidebar-bg: #0f172a;
  --app-sidebar-bg-soft: #1e293b;
  --app-sidebar-link: rgba(248, 250, 252, 0.92);
  --app-sidebar-link-muted: rgba(248, 250, 252, 0.74);
  --app-sidebar-border: rgba(148, 163, 184, 0.22);
  --app-sidebar-hover: rgba(148, 163, 184, 0.16);
  --app-sidebar-active: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

@media (max-width: 768px) {
  html { font-size: 14.5px; }
}

.dropzone { text-align: center; }
.dropzone .dz-preview .dz-error-message {
  top: 150px !important;
}
.hidden-column {
  visibility: collapse;
}

p {
  font-family: "Poppins", sans-serif;
  font-size: 0.95em;
  font-weight: 300;
  line-height: 1.7em;
  color: var(--app-text);
}

small, .small {
  color: var(--app-muted);
}

a, a:hover, a:focus {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.center {
  margin-left: auto;
  margin-right: auto;
}

form, input, select, table {
  font-family: "Poppins", sans-serif;
}

/* Make sticky cells fully opaque + always on top */
.table .sticky-col,
.table .sticky-header {
  background-color: #fff !important;
  background-clip: padding-box;
  position: sticky;
}

/* Keep the sticky Office column opaque even on striped rows */
.table.table-striped > tbody > tr:nth-of-type(odd) > .sticky-col {
  background-color: #f8f9fa !important; /* solid (not rgba) */
}
.table.table-striped > tbody > tr:nth-of-type(even) > .sticky-col {
  background-color: #fff !important;
}

/* ------------------------------
  BOOTSTRAP 5 OVERRIDES
--------------------------------- */
body {
  background: var(--app-bg);
}

.container, .container-fluid {
  --bs-gutter-x: 1.25rem; /* slightly less "zoomed" padding than default */
}

hr {
  opacity: 0.12;
}

/* Navbar */
.navbar {
  padding: 12px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: var(--app-shadow-sm);
  backdrop-filter: blur(10px);
}

.navbar .navbar-brand {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.navbar .nav-link {
  font-weight: 500;
}

.app-shell {
  background: var(--app-bg);
}

.app-topbar {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.86) !important;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
  backdrop-filter: saturate(130%) blur(10px);
}

.app-topbar-inner {
  min-height: 44px;
}

.app-page-title {
  font-family: var(--app-display-font);
  font-size: clamp(1.12rem, 1vw + 0.84rem, 1.44rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
}

.app-sidebar-toggle {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  padding: 0.34rem 0.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.app-sidebar-toggle:focus,
.app-sidebar-toggle:focus-visible {
  box-shadow: var(--app-focus-ring);
}

/* Cards */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-sm);
}

.card.shadow-lg {
  box-shadow: var(--app-shadow);
}

.card-header,
.card-footer {
  background: transparent;
  border-color: var(--app-border);
}

.card-title {
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* Buttons */
.btn {
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
  letter-spacing: 0.15px;
  box-shadow: none;
}

.btn:focus,
.btn:focus-visible {
  box-shadow: var(--app-focus-ring);
}

.btn-primary {
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.18);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark {
  background: transparent;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.25rem;
}

/* Your custom .button class (kept but modernized) */
.button {
  background-color: #0d6efd;
  border: none;
  color: white;
  padding: 0.75rem 1.35rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(13, 110, 253, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(13, 110, 253, 0.22);
}
.button:active {
  transform: translateY(0);
}

/* Inputs */
.form-control,
.form-select,
.input-group-text {
  border-radius: var(--app-radius-sm);
  border-color: var(--app-border);
}

.form-control,
.form-select {
  padding: 0.55rem 0.85rem;
  background: var(--app-surface);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(13, 110, 253, 0.45);
  box-shadow: var(--app-focus-ring);
}

.input-group-text {
  background: var(--app-surface-2);
  color: rgba(15, 23, 42, 0.75);
  font-weight: 600;
}

/* Dropdowns */
.dropdown-menu {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
}

.dropdown-item:active {
  background: rgba(13, 110, 253, 0.12);
  color: var(--app-text);
}

/* Alerts */
.alert {
  border-radius: var(--app-radius);
  border-color: var(--app-border);
  box-shadow: var(--app-shadow-sm);
}

/* Modals / Offcanvas (general only; sidebar has its own rules below) */
.modal-content {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-lg);
}

.offcanvas {
  border-color: var(--app-border);
}

/* Tables */
.table {
  white-space: nowrap;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 23, 42, 0.03);
  --bs-table-hover-bg: rgba(13, 110, 253, 0.06);
}

.table thead th {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(15, 23, 42, 0.85);
}

.table td, .table th {
  border-color: rgba(15, 23, 42, 0.08);
  vertical-align: middle;
}

.table-responsive {
  border-radius: var(--app-radius);
}

/* Badges */
.badge {
  border-radius: 999px;
  padding: 0.45em 0.7em;
  font-weight: 700;
}

/* Utilities that often feel "zoomed" when too roomy */
.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.my-5 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------
  LOADER / SPINNER
--------------------------------- */
.loader {
  position: sticky;
  z-index: 999;
  top: 45%;
  left: 0;
  bottom: 0;
  right: 0;
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #0d6efd;
  width: 120px;
  height: 120px;
  margin: auto;
  animation: spin 2s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* ------------------------------
  SIDEBAR 
--------------------------------- */
#sidebar {
  background:
    radial-gradient(650px 260px at -20% -8%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(700px 320px at 120% -10%, rgba(59, 130, 246, 0.2), transparent 62%),
    linear-gradient(180deg, var(--app-sidebar-bg-soft) 0%, var(--app-sidebar-bg) 100%);
  min-height: 100dvh;
  min-height: calc(100dvh - env(safe-area-inset-bottom));
  overflow-y: auto;
  --bs-offcanvas-width: var(--sidebar-width, 260px);
  min-width: var(--bs-offcanvas-width, var(--sidebar-width, 260px));
  color: #fff;
  border-right: 1px solid var(--app-sidebar-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

#sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.24) 0%, rgba(15, 23, 42, 0.52) 65%, rgba(15, 23, 42, 0.68) 100%);
  pointer-events: none;
}

#sidebar > * {
  position: relative;
  z-index: 1;
}

#sidebar::-webkit-scrollbar {
  width: 9px;
}

#sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-color: rgba(148, 163, 184, 0.45);
}

#sidebar .offcanvas-header {
  border-bottom-color: var(--app-sidebar-border) !important;
}

.app-brand {
  min-width: 0;
}

.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(191, 219, 254, 0.35);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.74));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
  font-family: var(--app-display-font);
  font-weight: 800;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.app-brand-copy {
  min-width: 0;
}

.app-brand-title {
  font-family: var(--app-display-font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.app-brand-subtitle {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  opacity: 0.78;
}

#sidebar .sidebar-device-controls {
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 14px;
  padding: 0.55rem;
  background: rgba(15, 23, 42, 0.25);
}

@media (min-width: 992px) {
  #sidebar.offcanvas-lg {
    position: relative !important;
    transform: none !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column;
    flex: 0 0 var(--bs-offcanvas-width);
    width: var(--bs-offcanvas-width);
    height: 100dvh;
    height: calc(100dvh - env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  #sidebar.offcanvas-lg .offcanvas-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    display: flex !important;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--app-sidebar-border);
  }
  #sidebar.offcanvas-lg .offcanvas-body {
    flex: 1 1 auto;
    overflow-y: visible;
  }
}

#sidebar .sidebar-nav-link {
  color: var(--app-sidebar-link);
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  line-height: 1.35;
}

#sidebar .sidebar-nav-list {
  gap: 0.16rem;
}

#sidebar .sidebar-section-label {
  list-style: none;
  margin: 0.2rem 0 0.45rem;
  padding: 0.08rem 0.7rem;
  font-size: 0.69rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

#sidebar .sidebar-nav-link i:first-child {
  opacity: 0.92;
}

#sidebar .sidebar-nav-link .bi-chevron-right {
  opacity: 0.7;
}

#sidebar .sidebar-nav-link:not(.active):hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.2);
  background: var(--app-sidebar-hover);
  transform: translateX(1px);
}

#sidebar .sidebar-nav-link.active,
#sidebar .sidebar-nav-link.active.bg-primary {
  color: #fff !important;
  border-color: rgba(191, 219, 254, 0.42);
  background: var(--app-sidebar-active) !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

#sidebar .sidebar-drilldown {
  position: relative;
}

#sidebar .sidebar-drilldown .sidebar-menu {
  display: none;
}

#sidebar .sidebar-drilldown #sidebarMenuRoot {
  display: block;
}

#sidebar .sidebar-drilldown .sidebar-menu.is-active {
  display: block;
}

#sidebar .sidebar-drilldown.has-active-menu #sidebarMenuRoot {
  display: none;
}

#sidebar .sidebar-menu-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem;
}

#sidebar .sidebar-menu-back {
  color: var(--app-sidebar-link-muted);
}

#sidebar .sidebar-menu-back:not(.active):hover {
  color: #fff;
}

#sidebar .sidebar-menu-title {
  padding: 0.55rem 0.7rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.86) !important;
  letter-spacing: 0.02em;
}

#sidebar #sidebar-user-area .sidebar-user-name {
  color: var(--app-sidebar-link);
  background: rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  text-align: left;
}

#sidebar #sidebar-user-area .sidebar-user-name:not(.active):hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.16);
}

#sidebar .app-sidebar-user-menu {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 0.4rem;
}

#sidebar a[aria-expanded="true"] {
  color: #0d6efd;
}

#sidebar a[data-bs-toggle="collapse"],
#sidebar a[aria-expanded] {
  position: relative;
}

#sidebar ul ul a:not(.active) {
  font-size: 0.9em !important;
  padding-left: 30px !important;
  background: transparent;
}

/* ------------------------------
  CONTENT STYLE
--------------------------------- */
#content {
  overflow-x: hidden;
  background: var(--app-bg);
}

#blockContent {
  overflow-x: auto;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 0;
  scrollbar-gutter: stable;
}

/* Ensure fixed-bottom bars inside content don't sit under the static sidebar on lg+ */
@media (min-width: 992px) {
  #content .fixed-bottom {
    left: var(--sidebar-width, 260px);
    right: 0;
  }
}

/* Add safe-area padding for bottom-fixed elements on mobile (iOS Safari, etc.) */
.fixed-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ------------------------------
  STICKY TABLE HELPERS
--------------------------------- */
.sticky-col {
  position: sticky;
  left: 0;
  background-color: white;
}
.sticky-header {
  position: sticky;
  top: 0;
  background-color: white;
  white-space: nowrap;
}


/* ------------------------------
  MEDIAQUERIES
--------------------------------- */
@media (max-width: 768px) {
  #blockContent {
    max-height: none;
    overflow-y: auto;
    font-size: 0.875rem;
  }
  .app-page-title {
    font-size: 1.02rem;
    line-height: 1.25;
  }
  .app-brand-subtitle {
    display: none;
  }
  .card-wrapper { flex: 1 1 100%; }
}

/* iOS Safari bottom bar fixes */
@supports (padding: max(0px)) {
  #sidebar {
    padding-bottom: max(env(safe-area-inset-bottom), 20px);
  }

  @media (min-width: 992px) {
    #sidebar.offcanvas-lg {
      height: calc(100dvh - max(env(safe-area-inset-bottom), 0px));
      padding-bottom: max(env(safe-area-inset-bottom), 20px);
    }
  }
}

/* Ensure user dropdown is always visible on mobile */
@media (max-width: 991px) {
  #sidebar.offcanvas,
  #sidebar.offcanvas-lg {
    min-width: 0;
    flex: 0 0 auto;
  }

  #sidebar #sidebar-user-area {
    margin-bottom: env(safe-area-inset-bottom, 20px);
    padding-bottom: 10px;
  }

  #sidebar {
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.45);
  }

  /* Additional iOS Safari mobile fixes */
  #sidebar.offcanvas {
    height: 100vh;
    height: calc(100vh - env(safe-area-inset-bottom, 0px));
  }

  #sidebar .offcanvas-body {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    min-height: calc(100vh - 120px);
  }

  /* Force bottom spacing on iOS Safari */
  #sidebar .offcanvas-body #sidebar-user-area {
    margin-bottom: 15px !important;
  }

  /* Additional fallback for user dropdown */
  #sidebar #sidebar-user-area {
    margin-bottom: 30px !important;
  }

  /* Ensure offcanvas body has proper bottom padding */
  #sidebar.offcanvas .offcanvas-body {
    padding-bottom: 40px !important;
  }
}

/* ------------------------------
  MODULE / DASHBOARD SYSTEM
--------------------------------- */
.module-page {
  min-height: 100%;
  padding: 1rem 0.75rem 1.25rem;
}

.module-filter-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: var(--app-shadow-sm);
}

.module-filter-card.navbar {
  padding: 0.8rem 0.75rem;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
}

.module-filter-form .input-group-text {
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.78);
  font-weight: 600;
}

.module-filter-form .form-check-label {
  color: rgba(15, 23, 42, 0.8);
  font-weight: 500;
}

.module-results-shell {
  margin-top: 0.95rem;
  position: relative;
}

.report-workspace {
  --report-ink: #0f172a;
  --report-muted: rgba(15, 23, 42, 0.62);
  --report-line: rgba(15, 23, 42, 0.08);
  --report-surface: #f8fafc;
  --report-accent: #0d6efd;
}

.report-filter-card {
  border: 1px solid var(--report-line);
  border-radius: 8px;
  overflow: visible;
}

.module-card.report-filter-card {
  border-radius: 8px;
}

.report-filter-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
}

.report-filter-title {
  margin: 0;
  color: var(--report-ink);
  font-family: var(--app-display-font);
  font-size: 1.05rem;
  font-weight: 800;
}

.report-filter-subtitle {
  display: block;
  margin-top: 0.15rem;
  color: var(--report-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.report-filter-card .card-body {
  padding: 1rem;
}

.report-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.report-filter-field {
  min-width: 0;
}

.report-filter-field-wide {
  grid-column: span 2;
}

.report-filter-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--report-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-filter-card .form-control,
.report-filter-card .form-select,
.report-filter-card .btn {
  min-height: 38px;
  border-radius: 8px;
}

.report-filter-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.5rem;
  align-items: end;
  justify-content: start;
  min-width: 0;
}

.report-filter-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.report-filter-actions-wide {
  grid-column: span 2;
}

.report-results-shell {
  padding-left: 0;
  padding-right: 0;
}

.report-results-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-stat-card {
  min-height: 100%;
}

.report-stat-card .card-body {
  padding: 1rem;
}

.report-stat-label {
  margin-bottom: 0.45rem;
  color: var(--report-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-stat-value {
  color: var(--report-ink);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.report-stat-meta {
  margin-top: 0.45rem;
  color: var(--report-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.report-progress {
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.report-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6efd, #198754);
}

.report-table-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-table {
  font-size: 0.86rem;
}

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

.report-table .btn {
  white-space: nowrap;
}

.report-money {
  color: #157347;
  font-weight: 700;
}

.report-empty-state {
  border: 1px dashed rgba(13, 110, 253, 0.3);
  border-radius: 1rem;
  background: rgba(13, 110, 253, 0.04);
  color: var(--report-muted);
  font-weight: 700;
  min-height: 180px;
}

.report-row-muted {
  color: var(--report-muted);
  font-size: 0.78rem;
}

.report-device-dropdown #telephony_device_wrapper,
.report-device-dropdown .dropdown-center,
.report-device-dropdown .dropdown {
  width: 100%;
}

.report-device-dropdown #deviceDropdown {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border-radius: 8px;
}

@media (max-width: 767.98px) {
  .report-filter-field-wide {
    grid-column: span 1;
  }

  .report-filter-actions {
    width: 100%;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: unset;
  }

  .report-filter-actions .form-check {
    grid-column: 1 / -1;
  }

  .report-filter-actions .btn {
    width: 100%;
  }

  .report-table-toolbar,
  .report-table-toolbar .btn,
  .report-table-toolbar .module-kpi-badge {
    width: 100%;
    justify-content: center;
  }
}

.module-kpi-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.module-kpi-badge {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.module-note {
  color: rgba(15, 23, 42, 0.65);
  font-size: 0.82rem;
  text-align: center;
}

.module-card {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--app-shadow-sm);
  overflow: hidden;
}

.module-card .card-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.85rem 1rem;
}

.module-card .card-header[class*="bg-"] {
  border-bottom-color: transparent;
}

.module-card .card-header h3,
.module-card .card-header h5 {
  font-family: var(--app-display-font);
  letter-spacing: 0.01em;
}

.module-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.module-card-subtitle {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.62);
}

.module-card-meta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.62);
}

.module-page .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 0;
}

.module-page .nav-tabs .nav-link {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.module-page .nav-tabs .nav-link:hover {
  border-color: rgba(13, 110, 253, 0.35);
  color: #0d6efd;
}

.module-page .nav-tabs .nav-link.active {
  color: #ffffff;
  border-color: #0d6efd;
  background: #0d6efd;
}

.module-page .tab-content {
  padding-top: 0.55rem;
}

.module-tab-pane {
  padding-top: 0.75rem;
}

.module-pane-caption {
  display: block;
  text-align: center;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  color: rgba(15, 23, 42, 0.65);
}

.module-table-shell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: auto;
  background: #ffffff;
  scrollbar-gutter: stable;
  max-height: 450px;
}

.module-table-shell.module-table-shell-sm {
  max-height: 400px;
}

.module-table-shell.module-table-shell-md {
  max-height: 560px;
}

.module-table-shell.module-table-shell-lg {
  max-height: 640px;
}

.module-table {
  margin-bottom: 0;
  white-space: nowrap;
}

.module-table thead,
.module-table thead.table-light {
  --bs-table-bg: #f8fafc;
}

.module-table thead th,
.module-table .sticky-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc !important;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
}

.module-table tbody tr {
  transition: background-color 0.16s ease;
}

.module-table tfoot th,
.module-table tfoot td {
  background: #ffffff;
}

.module-inline-search {
  max-width: 340px;
}

.module-pagination .page-link {
  border-radius: 10px;
}

.module-empty-state {
  opacity: 0.6;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}

.module-badge-soft {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e3a8a;
  background: rgba(59, 130, 246, 0.12);
}

.module-overlay-spinner {
  z-index: 1051;
}

@media (max-width: 991px) {
  .module-page {
    padding: 0.85rem 0.5rem 1rem;
  }

  .module-card .card-header {
    padding: 0.75rem 0.85rem;
  }

  .module-card-title {
    font-size: 0.98rem;
  }

  .module-table-shell,
  .module-table-shell.module-table-shell-sm {
    max-height: 390px;
  }

  .module-filter-card.navbar {
    border-radius: 15px;
    padding: 0.72rem 0.6rem;
  }

  .module-filter-form .col-auto {
    width: 100%;
  }

  .module-filter-form .input-group {
    width: 100%;
  }

  .module-filter-form .form-check {
    margin-top: 0.2rem;
  }
}
