
.sq-angle {
    border-radius: 0 !important;
}

.board-unlocked .grid-stack .grid-stack-item-content,
.board-unlocked .grid-stack .widget,
.board-unlocked .grid-stack .card {
    border: var(--bs-card-border-width) solid var(--bs-theme) !important;
}

.board-unlocked {
    --bs-card-border-color: var(--bs-theme) !important;
    --bs-card-border-width: 1px !important;
    --bs-border-color: var(--bs-theme) !important;
}

.widget-refreshing {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.widget-refreshed {
    opacity: 0;
    animation: widgetFadeIn 0.24s ease forwards;
}

@keyframes widgetFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#waveform {
  background: #22222200;
  display: flex;
  height: calc( 100vh - 90vh );
  transform: rotate(180deg) scaleX(-1);
  margin-bottom: -1.5rem;
}
.bar {
  background: var(--bs-inverse);
  margin: 0 2px;
  position: relative;
  width: 100%;
}

.peak {
  background:  var(--bs-theme);
  height: 2px;
  width: 100%;
  position: absolute;
}

.v-card-int {
  /* background-image: linear-gradient(to right bottom, #5746cf, #004ac2, #003d94, #002e66, #001d3a, #020812, #ff000000, #ff004400, #ff0078, #ea00ac00, #b81cd700, #8a3ad6); */
  background-color:#000000;
  background-size: 200% 200%;
  background-position: 0% 0%;
  height: 100%;
  border-radius: 25px;
  transition: all 0.6s ease-out;
  overflow: hidden;
}

/* Modal visibility/readability fixes for dark theme */
.modal .modal-content {
  background-color: var(--bs-modal-bg, var(--bs-body-bg)) !important;
  color: var(--bs-modal-color, var(--bs-body-color)) !important;
}
.modal .modal-header,
.modal .modal-footer {
  border-color: var(--bs-border-color) !important;
}
.modal .modal-body {
  color: var(--bs-body-color) !important;
  max-height: 70vh;
  overflow-y: auto;
}
.modal .text-secondary {
  color: var(--bs-secondary-color, rgba(255,255,255,.65)) !important;
}
.modal .form-control,
.modal .form-select,
.modal .form-check-input {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
}

/* --- Display scaling + readability tweaks ---
   Improve perceived sizing on non-retina (low-DPI) displays without
   affecting crispness on retina/high-DPI. Use resolution media queries
   so we don't rely on JS. Keep the adjustments conservative. */
@media (max-resolution: 1.49dppx) {
  html { font-size: 15px; }
  body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
}
@media (max-resolution: 1.25dppx) {
  html { font-size: 14px; }
}

/* Wider containers on very large screens, but keep comfortable max width */
.container-xxl,
.container-media-detail {
  max-width: min(1800px, 96vw);
}

/* Utility: subtle card borders on dark theme stay consistent across DPIs */
.card {
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Responsive layout shell --- */
:root {
  --app-shell-gutter: clamp(0.75rem, 0.75vw + 0.25rem, 1.5rem);
  --app-sidebar-width: clamp(15rem, 22vw, 19rem);
}

body {
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* .app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: var(--app-shell-gutter) calc(var(--app-shell-gutter) * 1.25);
} */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.brand .brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  min-width: 2.75rem;
}

.header-nav-toggle-bar {
  width: 1.35rem;
  height: 2px;
  background: var(--bs-body-color);
  border-radius: 999px;
}

[data-bs-theme=dark] .header-nav-toggle-bar {
  background: var(--bs-white);
}

/* #headerNav {
  width: 100%;
}

#headerNav .menu-item {
  display: flex;
  align-items: center;
}

#headerNav .menu-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
}

#headerNav .menu-text {
  white-space: nowrap;
} */

.menu-text.w-170px {
  width: auto !important;
  max-width: 100%;
}

.dropdown-menu.w-300px {
  width: min(90vw, 300px);
  max-width: 100%;
}

.app-header .menu {
  justify-content: flex-end;
  width: 100%;
  gap: 0.35rem;
}

.app-content {
  flex: 1 1 auto;
  width: 100%;
  padding: var(--app-shell-gutter);
  display: flex;
  flex-direction: column;
}

.app-content-body {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--app-shell-gutter);
}

.app-sidebar {
  width: var(--app-sidebar-width);
  max-width: 92vw;
}

.app-sidebar .app-sidebar-content {
  width: 100%;
}

/* Media fluidity */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Form fluidity */
form {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select,
.form-control,
.form-select {
  width: 100%;
  max-width: 100%;
}

/* Table responsiveness */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper table {
  width: 100%;
  min-width: min(100%, 760px);
  border-collapse: collapse;
}

.table-responsive-wrapper th,
.table-responsive-wrapper td {
  vertical-align: top;
  white-space: nowrap;
}

.table-responsive-wrapper td {
  white-space: normal;
}

.table-responsive-wrapper.stackable-table tbody tr + tr {
  border-top: 1px solid var(--bs-border-color);
}

/* Breakpoints */
@media (max-width: 1200px) {
  .app-header {
    padding: var(--app-shell-gutter);
  }

  .app-sidebar {
    width: clamp(14rem, 26vw, 18rem);
  }

  .app-content {
    padding: clamp(0.75rem, 1vw + 0.5rem, 1.25rem);
  }
}

@media (max-width: 992px) {
  /* #headerNav {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
  }

  #headerNav .menu-item {
    width: 100%;
    justify-content: space-between;
  }

  #headerNav .menu-link {
    width: 100%;
    justify-content: flex-start;
  }

  .app-header .menu {
    flex-direction: column;
    align-items: stretch;
  } */

  /* .app-sidebar {
    width: min(88vw, 19rem);
  } */

  .app-content-body {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  /* Keep the header controls (hamburger + user menu) visible on small screens */
  /* .app-header {
    height: auto;
    min-height: 52px;
    align-items: center;
    flex-wrap: wrap;
  } */

  /* #header.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    gap: 0.5rem;
    background: var(--bs-app-header-bg, var(--bs-body-bg));
    box-shadow: var(--bs-app-header-scroll-box-shadow, 0 2px 12px rgba(0, 0, 0, 0.12));
    z-index: 1030;
  } */

  /* .app-header .mobile-toggler {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  } */

  /* .app-header .desktop-toggler {
    display: none !important;
  }

  .app-header .menu {
    width: 100%;
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  #headerNav.collapse {
    display: flex !important;
    visibility: visible;
    height: auto !important;
  } */

  /* Give the main wrapper extra top room so the fixed header never overlaps content */
  .app {
    padding-top: 84px;
  }

  .app.app-sidebar-mobile-toggled .app-sidebar {
    left: 0;
  }

  .app.app-sidebar-mobile-toggled .app-sidebar-mobile-backdrop {
    display: block;
  }

  .brand .brand-text {
    font-size: 1rem;
  }

  .menu-search {
    width: 100%;
    margin-top: 0.5rem;
  }

  .table-responsive-wrapper table {
    min-width: 640px;
  }
}

@media (max-width: 576px) {
  .app-header {
    padding: 0.75rem;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
  }

  .table-responsive-wrapper table {
    min-width: 0;
  }

  .table-responsive-wrapper.stackable-table thead {
    display: none;
  }

  .table-responsive-wrapper.stackable-table table,
  .table-responsive-wrapper.stackable-table tbody,
  .table-responsive-wrapper.stackable-table tr,
  .table-responsive-wrapper.stackable-table td {
    display: block;
    width: 100%;
  }

  .table-responsive-wrapper.stackable-table tbody tr {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: rgba(var(--bs-inverse-rgb, 0, 0, 0), 0.02);
  }

  [data-bs-theme=dark] .table-responsive-wrapper.stackable-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
  }

  .table-responsive-wrapper.stackable-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    word-break: break-word;
  }

  .table-responsive-wrapper.stackable-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--bs-secondary-color);
    flex: 1 1 40%;
    max-width: 50%;
  }

  .table-responsive-wrapper.stackable-table td:last-child {
    border-bottom: none;
  }
}

/* @media (min-width: 992px) {
  #headerNav.collapse {
    display: flex !important;
    visibility: visible;
    height: auto !important;
  }

  #headerNav.collapse:not(.show) {
    display: flex !important;
  }
} */
