:root {
  --toastify-color-light: #fff;
  --toastify-color-dark: #121212;
  --toastify-color-info: #3498db;
  --toastify-color-success: #07bc0c;
  --toastify-color-warning: #f1c40f;
  --toastify-color-error: hsl(6, 78%, 57%);
  --toastify-color-transparent: rgba(255, 255, 255, 0.7);

  --toastify-icon-color-info: var(--toastify-color-info);
  --toastify-icon-color-success: var(--toastify-color-success);
  --toastify-icon-color-warning: var(--toastify-color-warning);
  --toastify-icon-color-error: var(--toastify-color-error);

  --toastify-container-width: fit-content;
  --toastify-toast-width: 320px;
  --toastify-toast-offset: 16px;
  --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));
  --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));
  --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));
  --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));
  --toastify-toast-background: #fff;
  --toastify-toast-padding: 14px;
  --toastify-toast-min-height: 64px;
  --toastify-toast-max-height: 800px;
  --toastify-toast-bd-radius: 6px;
  --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  --toastify-font-family: sans-serif;
  --toastify-z-index: 9999;
  --toastify-text-color-light: #757575;
  --toastify-text-color-dark: #fff;

  /* Used only for colored theme */
  --toastify-text-color-info: #fff;
  --toastify-text-color-success: #fff;
  --toastify-text-color-warning: #fff;
  --toastify-text-color-error: #fff;

  --toastify-spinner-color: #616161;
  --toastify-spinner-color-empty-area: #e0e0e0;
  --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);
  --toastify-color-progress-dark: #bb86fc;
  --toastify-color-progress-info: var(--toastify-color-info);
  --toastify-color-progress-success: var(--toastify-color-success);
  --toastify-color-progress-warning: var(--toastify-color-warning);
  --toastify-color-progress-error: var(--toastify-color-error);
  /* used to control the opacity of the progress trail */
  --toastify-color-progress-bgo: 0.2;
}

.Toastify__toast-container {
  z-index: var(--toastify-z-index);
  -webkit-transform: translate3d(0, 0, var(--toastify-z-index));
  position: fixed;
  width: var(--toastify-container-width);
  box-sizing: border-box;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.Toastify__toast-container--top-left {
  top: var(--toastify-toast-top);
  left: var(--toastify-toast-left);
}
.Toastify__toast-container--top-center {
  top: var(--toastify-toast-top);
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}
.Toastify__toast-container--top-right {
  top: var(--toastify-toast-top);
  right: var(--toastify-toast-right);
  align-items: end;
}
.Toastify__toast-container--bottom-left {
  bottom: var(--toastify-toast-bottom);
  left: var(--toastify-toast-left);
}
.Toastify__toast-container--bottom-center {
  bottom: var(--toastify-toast-bottom);
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
}
.Toastify__toast-container--bottom-right {
  bottom: var(--toastify-toast-bottom);
  right: var(--toastify-toast-right);
  align-items: end;
}

.Toastify__toast {
  --y: 0px;
  position: relative;
  touch-action: none;
  width: var(--toastify-toast-width);
  min-height: var(--toastify-toast-min-height);
  box-sizing: border-box;
  margin-bottom: 1rem;
  padding: var(--toastify-toast-padding);
  border-radius: var(--toastify-toast-bd-radius);
  box-shadow: var(--toastify-toast-shadow);
  max-height: var(--toastify-toast-max-height);
  font-family: var(--toastify-font-family);
  /* webkit only issue #791 */
  z-index: 0;
  /* inner swag */
  display: flex;
  flex: 1 auto;
  align-items: center;
  word-break: break-word;
}

@media only screen and (max-width: 480px) {
  .Toastify__toast-container {
    width: 100vw;
    left: env(safe-area-inset-left);
    margin: 0;
  }
  .Toastify__toast-container--top-left,
  .Toastify__toast-container--top-center,
  .Toastify__toast-container--top-right {
    top: env(safe-area-inset-top);
    transform: translateX(0);
  }
  .Toastify__toast-container--bottom-left,
  .Toastify__toast-container--bottom-center,
  .Toastify__toast-container--bottom-right {
    bottom: env(safe-area-inset-bottom);
    transform: translateX(0);
  }
  .Toastify__toast-container--rtl {
    right: env(safe-area-inset-right);
    left: initial;
  }
  .Toastify__toast {
    --toastify-toast-width: 100%;
    margin-bottom: 0;
    border-radius: 0;
  }
}

.Toastify__toast-container[data-stacked='true'] {
  width: var(--toastify-toast-width);
}

@media only screen and (max-width: 480px) {
  .Toastify__toast-container[data-stacked='true'] {
    width: 100vw;
  }
}

.Toastify__toast--stacked {
  position: absolute;
  width: 100%;
  transform: translate3d(0, var(--y), 0) scale(var(--s));
  transition: transform 0.3s;
}

.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,
.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {
  transition: opacity 0.1s;
}

.Toastify__toast--stacked[data-collapsed='false'] {
  overflow: visible;
}

.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {
  opacity: 0;
}

.Toastify__toast--stacked:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--g) * 1px);
  bottom: 100%;
}

.Toastify__toast--stacked[data-pos='top'] {
  top: 0;
}

.Toastify__toast--stacked[data-pos='bot'] {
  bottom: 0;
}

.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {
  transform-origin: top;
}

.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {
  transform-origin: bottom;
}

.Toastify__toast--stacked:before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  transform: scaleY(3);
  z-index: -1;
}

.Toastify__toast--rtl {
  direction: rtl;
}

.Toastify__toast--close-on-click {
  cursor: pointer;
}

.Toastify__toast-icon {
  margin-inline-end: 10px;
  width: 22px;
  flex-shrink: 0;
  display: flex;
}

.Toastify--animate {
  animation-fill-mode: both;
  animation-duration: 0.5s;
}

.Toastify--animate-icon {
  animation-fill-mode: both;
  animation-duration: 0.3s;
}

.Toastify__toast-theme--dark {
  background: var(--toastify-color-dark);
  color: var(--toastify-text-color-dark);
}

.Toastify__toast-theme--light {
  background: var(--toastify-color-light);
  color: var(--toastify-text-color-light);
}

.Toastify__toast-theme--colored.Toastify__toast--default {
  background: var(--toastify-color-light);
  color: var(--toastify-text-color-light);
}

.Toastify__toast-theme--colored.Toastify__toast--info {
  color: var(--toastify-text-color-info);
  background: var(--toastify-color-info);
}

.Toastify__toast-theme--colored.Toastify__toast--success {
  color: var(--toastify-text-color-success);
  background: var(--toastify-color-success);
}

.Toastify__toast-theme--colored.Toastify__toast--warning {
  color: var(--toastify-text-color-warning);
  background: var(--toastify-color-warning);
}

.Toastify__toast-theme--colored.Toastify__toast--error {
  color: var(--toastify-text-color-error);
  background: var(--toastify-color-error);
}

.Toastify__progress-bar-theme--light {
  background: var(--toastify-color-progress-light);
}

.Toastify__progress-bar-theme--dark {
  background: var(--toastify-color-progress-dark);
}

.Toastify__progress-bar--info {
  background: var(--toastify-color-progress-info);
}

.Toastify__progress-bar--success {
  background: var(--toastify-color-progress-success);
}

.Toastify__progress-bar--warning {
  background: var(--toastify-color-progress-warning);
}

.Toastify__progress-bar--error {
  background: var(--toastify-color-progress-error);
}

.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {
  background: var(--toastify-color-transparent);
}

.Toastify__close-button {
  color: #fff;
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  outline: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.3s ease;
  z-index: 1;
}

.Toastify__toast--rtl .Toastify__close-button {
  left: 6px;
  right: unset;
}

.Toastify__close-button--light {
  color: #000;
  opacity: 0.3;
}

.Toastify__close-button > svg {
  fill: currentColor;
  height: 16px;
  width: 14px;
}

.Toastify__close-button:hover,
.Toastify__close-button:focus {
  opacity: 1;
}

@keyframes Toastify__trackProgress {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

.Toastify__progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.7;
  transform-origin: left;
}

.Toastify__progress-bar--animated {
  animation: Toastify__trackProgress linear 1 forwards;
}

.Toastify__progress-bar--controlled {
  transition: transform 0.2s;
}

.Toastify__progress-bar--rtl {
  right: 0;
  left: initial;
  transform-origin: right;
  border-bottom-left-radius: initial;
}

.Toastify__progress-bar--wrp {
  position: absolute;
  overflow: hidden;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  border-bottom-left-radius: var(--toastify-toast-bd-radius);
  border-bottom-right-radius: var(--toastify-toast-bd-radius);
}

.Toastify__progress-bar--wrp[data-hidden='true'] {
  opacity: 0;
}

.Toastify__progress-bar--bg {
  opacity: var(--toastify-color-progress-bgo);
  width: 100%;
  height: 100%;
}

.Toastify__spinner {
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: var(--toastify-spinner-color-empty-area);
  border-right-color: var(--toastify-spinner-color);
  animation: Toastify__spin 0.65s linear infinite;
}

@keyframes Toastify__bounceInRight {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  from {
    opacity: 0;
    transform: translate3d(3000px, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(-25px, 0, 0);
  }
  75% {
    transform: translate3d(10px, 0, 0);
  }
  90% {
    transform: translate3d(-5px, 0, 0);
  }
  to {
    transform: none;
  }
}

@keyframes Toastify__bounceOutRight {
  20% {
    opacity: 1;
    transform: translate3d(-20px, var(--y), 0);
  }
  to {
    opacity: 0;
    transform: translate3d(2000px, var(--y), 0);
  }
}

@keyframes Toastify__bounceInLeft {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  0% {
    opacity: 0;
    transform: translate3d(-3000px, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(25px, 0, 0);
  }
  75% {
    transform: translate3d(-10px, 0, 0);
  }
  90% {
    transform: translate3d(5px, 0, 0);
  }
  to {
    transform: none;
  }
}

@keyframes Toastify__bounceOutLeft {
  20% {
    opacity: 1;
    transform: translate3d(20px, var(--y), 0);
  }
  to {
    opacity: 0;
    transform: translate3d(-2000px, var(--y), 0);
  }
}

@keyframes Toastify__bounceInUp {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  from {
    opacity: 0;
    transform: translate3d(0, 3000px, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, -20px, 0);
  }
  75% {
    transform: translate3d(0, 10px, 0);
  }
  90% {
    transform: translate3d(0, -5px, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes Toastify__bounceOutUp {
  20% {
    transform: translate3d(0, calc(var(--y) - 10px), 0);
  }
  40%,
  45% {
    opacity: 1;
    transform: translate3d(0, calc(var(--y) + 20px), 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -2000px, 0);
  }
}

@keyframes Toastify__bounceInDown {
  from,
  60%,
  75%,
  90%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  0% {
    opacity: 0;
    transform: translate3d(0, -3000px, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, 25px, 0);
  }
  75% {
    transform: translate3d(0, -10px, 0);
  }
  90% {
    transform: translate3d(0, 5px, 0);
  }
  to {
    transform: none;
  }
}

@keyframes Toastify__bounceOutDown {
  20% {
    transform: translate3d(0, calc(var(--y) - 10px), 0);
  }
  40%,
  45% {
    opacity: 1;
    transform: translate3d(0, calc(var(--y) + 20px), 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, 2000px, 0);
  }
}

.Toastify__bounce-enter--top-left,
.Toastify__bounce-enter--bottom-left {
  animation-name: Toastify__bounceInLeft;
}

.Toastify__bounce-enter--top-right,
.Toastify__bounce-enter--bottom-right {
  animation-name: Toastify__bounceInRight;
}

.Toastify__bounce-enter--top-center {
  animation-name: Toastify__bounceInDown;
}

.Toastify__bounce-enter--bottom-center {
  animation-name: Toastify__bounceInUp;
}

.Toastify__bounce-exit--top-left,
.Toastify__bounce-exit--bottom-left {
  animation-name: Toastify__bounceOutLeft;
}

.Toastify__bounce-exit--top-right,
.Toastify__bounce-exit--bottom-right {
  animation-name: Toastify__bounceOutRight;
}

.Toastify__bounce-exit--top-center {
  animation-name: Toastify__bounceOutUp;
}

.Toastify__bounce-exit--bottom-center {
  animation-name: Toastify__bounceOutDown;
}

@keyframes Toastify__zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  50% {
    opacity: 1;
  }
}

@keyframes Toastify__zoomOut {
  from {
    opacity: 1;
  }
  50% {
    opacity: 0;
    transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);
  }
  to {
    opacity: 0;
  }
}

.Toastify__zoom-enter {
  animation-name: Toastify__zoomIn;
}

.Toastify__zoom-exit {
  animation-name: Toastify__zoomOut;
}

@keyframes Toastify__flipIn {
  from {
    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    animation-timing-function: ease-in;
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    animation-timing-function: ease-in;
  }
  60% {
    transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    opacity: 1;
  }
  80% {
    transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  }
  to {
    transform: perspective(400px);
  }
}

@keyframes Toastify__flipOut {
  from {
    transform: translate3d(0, var(--y), 0) perspective(400px);
  }
  30% {
    transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);
    opacity: 1;
  }
  to {
    transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);
    opacity: 0;
  }
}

.Toastify__flip-enter {
  animation-name: Toastify__flipIn;
}

.Toastify__flip-exit {
  animation-name: Toastify__flipOut;
}

@keyframes Toastify__slideInRight {
  from {
    transform: translate3d(110%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, var(--y), 0);
  }
}

@keyframes Toastify__slideInLeft {
  from {
    transform: translate3d(-110%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, var(--y), 0);
  }
}

@keyframes Toastify__slideInUp {
  from {
    transform: translate3d(0, 110%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, var(--y), 0);
  }
}

@keyframes Toastify__slideInDown {
  from {
    transform: translate3d(0, -110%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, var(--y), 0);
  }
}

@keyframes Toastify__slideOutRight {
  from {
    transform: translate3d(0, var(--y), 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(110%, var(--y), 0);
  }
}

@keyframes Toastify__slideOutLeft {
  from {
    transform: translate3d(0, var(--y), 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(-110%, var(--y), 0);
  }
}

@keyframes Toastify__slideOutDown {
  from {
    transform: translate3d(0, var(--y), 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(0, 500px, 0);
  }
}

@keyframes Toastify__slideOutUp {
  from {
    transform: translate3d(0, var(--y), 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(0, -500px, 0);
  }
}

.Toastify__slide-enter--top-left,
.Toastify__slide-enter--bottom-left {
  animation-name: Toastify__slideInLeft;
}

.Toastify__slide-enter--top-right,
.Toastify__slide-enter--bottom-right {
  animation-name: Toastify__slideInRight;
}

.Toastify__slide-enter--top-center {
  animation-name: Toastify__slideInDown;
}

.Toastify__slide-enter--bottom-center {
  animation-name: Toastify__slideInUp;
}

.Toastify__slide-exit--top-left,
.Toastify__slide-exit--bottom-left {
  animation-name: Toastify__slideOutLeft;
  animation-timing-function: ease-in;
  animation-duration: 0.3s;
}

.Toastify__slide-exit--top-right,
.Toastify__slide-exit--bottom-right {
  animation-name: Toastify__slideOutRight;
  animation-timing-function: ease-in;
  animation-duration: 0.3s;
}

.Toastify__slide-exit--top-center {
  animation-name: Toastify__slideOutUp;
  animation-timing-function: ease-in;
  animation-duration: 0.3s;
}

.Toastify__slide-exit--bottom-center {
  animation-name: Toastify__slideOutDown;
  animation-timing-function: ease-in;
  animation-duration: 0.3s;
}

@keyframes Toastify__spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1ab394;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-message {
    margin-top: 15px;
    color: #676a6c;
    font-size: 14px;
}

.loading-spinner-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner-inline .spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1ab394;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-small .spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.loading-spinner-medium .spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

.loading-spinner-large .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

div#slimScrollDiv {
    position: relative;
    overflow: hidden;
    width: auto;
    height: 100%;
}

div#full-height-scroll {
    overflow: hidden;
    width: auto;
    height: 100%;
}

div#slimScrollBar {
    background: rgb(0, 0, 0);
    width: 7px;
    position: absolute;
    top: 0px;
    opacity: 0.4;
    display: none;
    border-radius: 7px;
    z-index: 99;
    right: 1px;
    height: 350.41px;
}

div#slimScrollBar2 {
    background: rgb(0, 0, 0);
    width: 7px;
    position: absolute;
    top: 0px;
    opacity: 0.4;
    display: block;
    border-radius: 7px;
    z-index: 99;
    right: 1px;
}

div#slimScrollRail {
    width: 7px;
    height: 100%;
    position: absolute;
    top: 0px;
    display: none;
    border-radius: 7px;
    background: rgb(51, 51, 51);
    opacity: 0.2;
    z-index: 90;
    right: 1px;
}

div#progress {
    width: 48%;
}

div#progress2 {
    width: 22%;
}

div#progress3 {
    width: 72%;
}
div.centerImage180 {
    width: 180px;
    height: 180px;
    margin: 6px 0;
    padding: 4px;
}

div.centerImage180 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image thumbnail wrapper for delete overlay */
span.image-thumbnail-wrapper {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

/* Delete button on image thumbnails */
button.image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
}

div.centerImage180:hover button.image-delete-btn {
    opacity: 1;
}

button.image-delete-btn:hover {
    background: rgba(220, 53, 69, 0.9);
}

button.image-delete-btn:disabled {
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.3);
}


/* Stretch patient list card to fill viewport height */
.wrapper.wrapper-content {
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    padding-bottom: 24px;
}

.wrapper-content > .row {
    flex: 1;
}

.wrapper-content > .row > .col-sm-8 > .ibox {
    min-height: calc(100vh - 88px);
    display: flex;
    flex-direction: column;
}

.wrapper-content > .row > .col-sm-8 > .ibox > .ibox-content {
    flex: 1;
}

.clients-list {
    display: flex;
    flex-direction: column;
    /* h2(~32) + label+br(~40) + input-group(~50) + padding(~48) = ~170px above */
    min-height: calc(100vh - 230px);
}

.clients-list > .tab-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.clients-list > .tab-content > .tab-pane {
    height: 100%;
}

div#scrollDiv {
    position: relative;
    overflow: auto;
    width: auto;
    height: 100%;
}

div#fullHeightScroll {
    overflow: auto;
    width: auto;
    height: 100%;
}

div#slimScrollBar {
    background: rgb(0, 0, 0);
    width: 7px;
    position: absolute;
    top: 0;
    opacity: 0.4;
    display: none;
    border-radius: 7px;
    z-index: 99;
    right: 1px;
    height: 365px;
}

div#slimScrollRail {
    width: 7px;
    height: 100%;
    position: absolute;
    top: 0;
    display: none;
    border-radius: 7px;
    background: rgb(51, 51, 51);
    opacity: 0.2;
    z-index: 90;
    right: 1px;
}

/* Search input smaller, button bigger */
.ibox-content .input-group {
    max-width: 350px;
}

.input-group .input-group-btn {
    display: flex;
}

.input-group-btn .btn {
    padding: 8px 20px;
    font-size: 15px;
    border-radius: 0 6px 6px 0;
}

th.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.sortable-header:hover {
    background-color: #f5f5f5;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 0 2px;
    gap: 12px;
    flex-shrink: 0;
}

.pagination-size select {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 11px;
    color: #999;
    background: transparent;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-nav .btn-xs {
    padding: 1px 6px;
    font-size: 14px;
    line-height: 1.3;
    min-width: 22px;
}

.pagination-info {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    min-width: 30px;
    text-align: center;
}

.pagination-count {
    font-size: 11px;
    color: #bbb;
}

/* =============================================
   ORTHO - Complete Modern Redesign
   ============================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f0f2f5;
  --sidebar-bg: #1b2a3b;
  --sidebar-active: #243447;
  --sidebar-hover: #243447;
  --sidebar-width: 220px;
  --accent: #4a90d9;
  --accent-dark: #357abd;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --border: #dde3ea;
  --card-bg: #ffffff;
  --header-h: 56px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Login Page ---- */
body.gray-bg {
  background: linear-gradient(135deg, #1b2a3b 0%, #243447 50%, #2c5282 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.middle-box.loginscreen {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  width: 360px;
  max-width: 95vw;
  animation: fadeInDown 0.4s ease;
}

.middle-box.loginscreen h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--sidebar-bg);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.middle-box.loginscreen p {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.loginscreen .form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
  outline: none;
}

.loginscreen .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
  background: #fff;
}

.loginscreen .btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}

.loginscreen .btn-primary:hover { opacity: 0.92; }
.loginscreen .btn-primary:active { transform: scale(0.98); }

.loginscreen .field-error {
  display: block;
  color: var(--danger);
  font-size: 12px;
  margin-top: -8px;
  margin-bottom: 8px;
  text-align: left;
}

/* ---- Layout ---- */
#wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar Navigation ---- */
.navbar-default.navbar-static-side {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.sidebar-collapse {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.nav.metismenu { list-style: none; margin: 0; padding: 0; flex: 1; }

/* Logo / profile area */
.nav.metismenu .nav-header {
  padding: 0;
  background: rgba(0,0,0,0.2);
}

.nav.metismenu .nav-header .profile-element {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.profile-element .dropdown-toggle {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-element .font-bold {
  font-size: 15px;
  font-weight: 600;
  display: block;
  color: #fff;
}

.profile-element .text-muted.text-xs {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  display: block;
}

.logo-element {
  display: none;
}

/* Nav links */
.nav.metismenu > li > a,
.nav.metismenu > li > a:hover {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.nav.metismenu > li > a:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--accent);
}

.nav.metismenu > li.active > a {
  background: var(--sidebar-active);
  color: #fff;
  border-left-color: var(--accent);
}

.nav.metismenu .nav-label { flex: 1; }

.nav.metismenu .fa {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

.nav.metismenu > li > a:hover .fa,
.nav.metismenu > li.active > a .fa {
  color: var(--accent);
}

/* dropdown menu in sidebar */
.dropdown-menu {
  background: var(--sidebar-active);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  min-width: 140px;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ---- Main Content Area ---- */
#page-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ---- Top Header ---- */
.row.border-bottom { margin: 0; }

.navbar.navbar-static-top {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin: 0 !important;
}

.navbar-top-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.navbar-top-links li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.navbar-top-links li a:hover {
  background: #f0f2f5;
  color: var(--danger);
}

.navbar-top-links .fa { font-size: 15px; }

/* ---- Content Wrapper ---- */
.wrapper.wrapper-content,
.wrapper-content {
  padding: 24px;
  flex: 1;
}

/* ---- Cards (ibox) ---- */
.ibox {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.ibox-title {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.ibox-title h5 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.ibox-title h5 small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.ibox-content {
  padding: 20px;
}

.float-e-margins { margin-bottom: 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
}

.btn-primary:hover { opacity: 0.88; }

.btn-white, .btn-default {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-white:hover, .btn-default:hover { background: #f5f7fa; }

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover { opacity: 0.88; }

.btn-success {
  background: var(--success);
  color: #fff;
}

/* ---- Labels / badges ---- */
.label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: default;
}

.label.cursor-pointer { cursor: pointer; transition: opacity 0.2s; }
.label.cursor-pointer:hover { opacity: 0.8; }
.label-primary { background: rgba(74,144,217,0.12); color: var(--accent-dark); }
.label-warning { background: rgba(243,156,18,0.12); color: #c87f0a; }
.label-danger  { background: rgba(231,76,60,0.12);  color: #c0392b; }
.label-success { background: rgba(39,174,96,0.12);  color: #1e8449; }

/* ---- Patient List heading ---- */
.ibox-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

/* ---- Search Bar ---- */
.input-group {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: #fff;
  transition: border-color 0.2s;
}

.input-group:focus-within { border-color: var(--accent); }

.input-group .form-control {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  background: transparent;
  color: var(--text);
}

.input-group-btn .btn {
  border-radius: 0;
  padding: 10px 18px;
  border: none;
  font-size: 13px;
}

/* ---- Table ---- */
.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.table thead tr {
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
}

.table thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}

.table tbody tr:hover { background: #f0f6ff; }
.table tbody tr:last-child { border-bottom: none; }

.table tbody td {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}

.client-link {
  font-weight: 600;
  color: var(--accent-dark);
}

/* Patient count badge */
.clients-list .pull-right.small.text-muted {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
  text-align: right;
}

/* ---- Patient Detail Panel ---- */
.centerImage180 {
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.centerImage180:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.centerImage180 img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ---- Image Upload ---- */
.dropzone, [class*="dropzone"] {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f8fafc;
  margin-bottom: 16px;
}

.dropzone:hover, [class*="dropzone"]:hover {
  border-color: var(--accent);
  background: rgba(74,144,217,0.04);
}

/* ---- Forms ---- */
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,144,217,0.12);
}

.form-horizontal .form-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding-top: 8px;
  flex-shrink: 0;
}

.col-lg-2.control-label { width: 160px; }
.col-lg-10 { flex: 1; }

.field-error, .text-danger {
  display: block;
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

.hr-line-dashed {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 20px 0;
}

/* ---- Tabs ---- */
.nav.nav-tabs {
  display: flex;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-bottom: 2px solid var(--border);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Notifications (toast) ---- */
.Toastify__toast {
  border-radius: var(--radius) !important;
  font-size: 13px !important;
  font-family: inherit !important;
}

/* ---- Analysis Page toolbar ---- */
#toolbar {
  background: #1b2a3b;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
  padding: 8px 12px;
}

#toolbar .nav.navbar-nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

#toolbar .nav.navbar-nav li { list-style: none; }

#toolbar .nav.navbar-nav li a.link,
#toolbar .nav.navbar-nav li button.link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

#toolbar .nav.navbar-nav li a.link:hover,
#toolbar .nav.navbar-nav li button.link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

#toolbar .icon-right { margin-left: auto; }

/* Filter sliders */
.filter-setting {
  background: #243447;
  border-radius: 6px;
  padding: 10px 14px;
  position: absolute;
  z-index: 10;
  white-space: nowrap;
}

.filter-setting input[type="range"] {
  accent-color: var(--accent);
  width: 160px;
}

.toolbar-sub-wrapper { position: relative; }

/* ---- Loading State ---- */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.pull-right { float: right; }
.pull-left  { float: left; }
.clearfix::after { content:''; display:table; clear:both; }
.hidden { display: none !important; }
.hidden-print { }
.m-t { margin-top: 16px; }
.m-b { margin-bottom: 16px; }
.m-t-xs { margin-top: 4px; }
.block { display: block; }
.full-width { width: 100%; }
.cursor-pointer { cursor: pointer; }

/* Grid (minimal) */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.row > [class*="col-"] { padding: 0 12px; box-sizing: border-box; }
.col-xs-12, .col-sm-12, .col-md-12 { width: 100%; }
.col-sm-4 { width: 33.333%; }
.col-sm-6 { width: 50%; }
.col-sm-8 { width: 66.666%; }
.col-md-3 { width: 25%; }
.col-md-9 { width: 75%; }
.col-lg-2 { width: 16.666%; }
.col-lg-10 { width: 83.333%; }
.col-sm-offset-2 { margin-left: 16.666%; }
.col-sm-4.col-sm-offset-2 { width: 33.333%; }

@media (max-width: 768px) {
  .col-sm-4, .col-sm-6, .col-sm-8,
  .col-md-3, .col-md-9,
  .col-lg-2, .col-lg-10 { width: 100%; }
  .navbar-default.navbar-static-side { width: 60px; }
  #page-wrapper { margin-left: 60px; }
  .nav.metismenu .nav-label { display: none; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0cdd8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0b0c0; }

/* ---- Animation ---- */
.animated { animation-duration: 0.4s; animation-fill-mode: both; }
.fadeInDown { animation-name: fadeInDown; }

/* =============================================
   ORTHO - Crisp Modern Medical UI
   ============================================= */

/* Inter is self-hosted via a static stylesheet (backend public/css/inter.css,
   linked from application.ftl) so the @font-face url() is served from the app
   origin (CSP-safe) and isn't run through webpack/css-loader. --font references
   'Inter' below, which resolves to that self-hosted face. */

:root {
  --bg: #f8f9fb;
  --sidebar-w: 220px;
  --sidebar-bg: #111827;
  --sidebar-border: rgba(255,255,255,0.06);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59,130,246,0.08);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --border-2: #f3f4f6;
  --card: #ffffff;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --ease: cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
}

/* ---- Base ---- */
*,*::before,*::after { box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- Login ---- */
body.gray-bg {
  background: #111827;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.gray-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(59,130,246,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.middle-box.loginscreen {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 40px 36px;
  width: 360px;
  max-width: 92vw;
  position: relative;
  z-index: 1;
}
.middle-box.loginscreen h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}
.middle-box.loginscreen > div > p {
  color: var(--text-3);
  margin: 0 0 24px;
  font-size: 13px;
}
.loginscreen .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: var(--border-2);
  transition: all 0.15s var(--ease);
  margin-bottom: 10px;
  outline: none;
}
.loginscreen .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}
.loginscreen .btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.15s;
}
.loginscreen .btn-primary:hover { background: var(--accent-hover); }
.loginscreen .field-error {
  display: block;
  color: var(--danger);
  font-size: 11px;
  margin-top: -6px;
  margin-bottom: 8px;
}
.loginscreen .register-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.loginscreen .register-link:hover { text-decoration: underline; }

/* ---- Layout ---- */
#wrapper { display: flex; min-height: 100vh; }
#page-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

/* ---- Sidebar ---- */
.sidebar,
.navbar-default.navbar-static-side {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-inner,
.sidebar-collapse {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-brand svg { opacity: 0.7; }

/* Profile */
.sidebar-profile {
  padding: 14px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-profile-name {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
}
.sidebar-profile-role {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

/* Legacy profile compat */
.nav.metismenu { list-style: none; margin: 0; padding: 0; flex: 1; }
.nav.metismenu .nav-header { padding: 0; }
.nav.metismenu .nav-header .profile-element { padding: 20px 18px; border-bottom: 1px solid var(--sidebar-border); }
.profile-element .dropdown-toggle { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.profile-element .font-bold { font-size: 13px; font-weight: 600; display: block; color: rgba(255,255,255,0.9); }
.profile-element .text-muted.text-xs { font-size: 11px; color: rgba(255,255,255,0.35); display: block; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }
.logo-element { display: none; }
.dropdown-menu { background: #1f2937; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 4px; min-width: 140px; }
.dropdown-menu li a { display: block; padding: 8px 12px; color: rgba(255,255,255,0.75); font-size: 12px; text-decoration: none; border-radius: 4px; transition: background 0.1s; cursor: pointer; }
.dropdown-menu li a:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Nav links */
.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 8px 8px 0;
  flex: 1;
}
.sidebar-nav li a,
.nav.metismenu > li > a,
.nav.metismenu > li > a:hover {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s var(--ease);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  border-left: none;
}
.sidebar-nav li a:hover,
.nav.metismenu > li > a:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
}
.sidebar-nav li.active a,
.nav.metismenu > li.active > a {
  color: #fff;
  background: rgba(59,130,246,0.15);
}
.sidebar-nav-icon,
.nav.metismenu .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.12s;
}
.sidebar-nav li.active a .sidebar-nav-icon,
.sidebar-nav li a:hover .sidebar-nav-icon,
.nav.metismenu > li.active > a .nav-icon,
.nav.metismenu > li > a:hover .nav-icon {
  opacity: 1;
}
.nav.metismenu .nav-label { flex: 1; }
.nav.metismenu .fa { display: none; }

/* Sidebar footer / logout */
.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  color: rgba(255,255,255,0.45);
  background: none;
  border: none;
  font: inherit;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.12s;
  cursor: pointer;
}
.sidebar-logout:hover {
  color: #f87171;
  background: rgba(239,68,68,0.1);
}
.sidebar-logout .sidebar-nav-icon { width: 16px; height: 16px; }

/* ---- Header (hidden - logout moved to sidebar) ---- */
.row.border-bottom { display: none; }
.navbar.navbar-static-top { display: none; }

/* ---- Content ---- */
.wrapper.wrapper-content,
.wrapper-content {
  padding: 24px;
  flex: 1;
}

/* ---- Cards ---- */
.ibox {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
}
.ibox-title {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.ibox-title h5 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.ibox-title h5 small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  margin-top: 2px;
}
.ibox-content {
  padding: 20px;
}
.float-e-margins { margin-bottom: 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.12s var(--ease);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-white, .btn-default { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-white:hover, .btn-default:hover { background: var(--border-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }

/* ---- Labels ---- */
/* Inspinia style.css sets `.label`/`.badge { font-family: 'Open Sans' }` with no
   fallback; that web font is CSP-blocked in prod, so without this it falls back
   to the browser default serif (Times). Force the app font stack. */
.label, .badge {
  font-family: var(--font);
}
.label {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: default;
}
.label.cursor-pointer { cursor: pointer; transition: opacity 0.1s; }
.label.cursor-pointer:hover { opacity: 0.75; }
.label-primary { background: var(--accent-soft); color: var(--accent-hover); }
.label-warning { background: rgba(245,158,11,0.1); color: #b45309; }
.label-danger  { background: rgba(239,68,68,0.08); color: #dc2626; }
.label-success { background: rgba(34,197,94,0.1); color: #16a34a; }

/* ---- Tables ---- */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.table thead tr {
  border-bottom: 1px solid var(--border);
}
.table thead th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-3);
  text-align: left;
}
.table tbody tr {
  border-bottom: 1px solid var(--border-2);
  transition: background 0.1s;
  cursor: pointer;
}
.table tbody tr:hover { background: var(--accent-soft); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  vertical-align: middle;
}
.client-link {
  font-weight: 600;
  color: var(--text);
}

/* Patient heading */
.ibox-content h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

/* ---- Search ---- */
.input-group {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: border-color 0.12s;
}
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-group .form-control {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
}
.input-group-btn .btn { border-radius: 0; padding: 8px 14px; border: none; }

/* ---- Forms ---- */
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  outline: none;
  transition: all 0.12s;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-horizontal .form-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}
.control-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding-top: 8px;
  flex-shrink: 0;
}
.col-lg-2.control-label { width: 140px; }
.col-lg-10 { flex: 1; }
.field-error, .text-danger {
  display: block;
  color: var(--danger);
  font-size: 11px;
  margin-top: 3px;
}
.has-error .error { color: var(--danger); font-size: 12px; }
.hr-line-dashed { border: none; border-top: 1px solid var(--border-2); margin: 20px 0; }

/* ---- Patient Images ---- */
.centerImage180 {
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.centerImage180:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- Dropzone ---- */
.dropzone, [class*="dropzone"] {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--border-2);
  margin-bottom: 12px;
}
.dropzone:hover, [class*="dropzone"]:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================
   ANALYSIS TOOLBAR - Modern
   ========================== */
#toolbar {
  background: var(--sidebar-bg);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
  padding: 0;
}
#toolbar .col-xs-12 { padding: 0; }

.toolbar-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.toolbar-group:first-child { padding-left: 6px; }
.toolbar-group:last-child { border-right: none; }
.toolbar-group-right { margin-left: auto; padding-right: 6px; }

.toolbar-group-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.25);
  padding: 0 10px 4px;
  line-height: 1;
}

.toolbar-group-items {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 4px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  text-decoration: none;
  transition: all 0.1s;
  cursor: pointer;
}
.toolbar-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}
.toolbar-btn img { display: none; }
.toolbar-btn-accent {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.toolbar-btn-accent:hover {
  background: rgba(59,130,246,0.25);
  color: #93c5fd;
}
.toolbar-btn-muted {
  color: rgba(255,255,255,0.25);
}
.toolbar-btn-muted:hover {
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
}

/* Legacy toolbar compat - hide old nav structure */
#toolbar .nav.navbar-nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px;
  width: 100%;
}
#toolbar .nav.navbar-nav li { list-style: none; }
#toolbar .nav.navbar-nav li a.link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: all 0.1s;
}
#toolbar .nav.navbar-nav li a.link:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}
#toolbar .icon-right { margin-left: auto; }

/* Filter sliders */
.toolbar-sub-wrapper { position: relative; }
.filter-setting {
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  position: absolute;
  z-index: 10;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.filter-setting input[type="range"] {
  width: 140px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.filter-setting input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
}
.filter-setting input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
}
.filter-setting input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
}
.filter-setting input[type="range"]::-moz-range-track {
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* Analysis page */
.analysis-page { padding: 16px 24px; }

/* ---- Loading ---- */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-bottom: 12px;
}

/* ---- Footer ---- */
.footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11px;
}

/* ---- Toast ---- */
.Toastify__toast-container { width: 320px !important; }
.Toastify__toast {
  border-radius: var(--radius) !important;
  font-size: 13px !important;
  font-family: var(--font) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 12px 16px !important;
  min-height: auto !important;
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
  color: var(--text) !important;
}
.Toastify__toast--success {
  border-left: 3px solid var(--success) !important;
}
.Toastify__toast--error {
  border-left: 3px solid var(--danger) !important;
}
.Toastify__toast--warning {
  border-left: 3px solid var(--warning) !important;
}
.Toastify__toast--info {
  border-left: 3px solid var(--accent) !important;
}
.Toastify__toast-icon {
  width: 18px !important;
  min-width: 18px !important;
}
.Toastify__toast-body {
  color: var(--text) !important;
  padding: 0 !important;
}
.Toastify__progress-bar { display: none !important; }
.Toastify__close-button {
  color: var(--text-3) !important;
  opacity: 0.6 !important;
}
.Toastify__close-button:hover { opacity: 1 !important; }

/* ---- Tabs ---- */
.nav.nav-tabs {
  display: flex;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Patient count */
.patient-count {
  font-size: 11px;
  text-align: right;
  margin: 12px 0 4px;
}

/* ---- Registration ---- */
.registration-page {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 40px 36px;
  width: 380px;
  max-width: 92vw;
  position: relative;
  z-index: 1;
}
.registration-page h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.registration-page > p { color: var(--text-3); margin: 0 0 24px; font-size: 13px; }
.registration-page .form-control { margin-bottom: 10px; background: var(--border-2); }
.registration-page .form-control:focus { background: #fff; }
.registration-page .btn-primary { width: 100%; padding: 10px; background: var(--success); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.registration-page .btn-primary:hover { background: #16a34a; }
.registration-page .field-error { margin-top: -6px; margin-bottom: 8px; }
.registration-page .login-link { display: block; text-align: center; margin-top: 16px; color: var(--accent); text-decoration: none; font-size: 12px; }
.registration-page .success-message { background: rgba(34,197,94,0.1); color: #16a34a; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; margin-bottom: 12px; text-align: center; }
.registration-page .error-message { background: rgba(239,68,68,0.08); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; margin-bottom: 12px; text-align: center; }

/* ---- Grid ---- */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.row > [class*="col-"] { padding: 0 12px; box-sizing: border-box; }
.col-xs-12, .col-sm-12, .col-md-12 { width: 100%; }
.col-sm-4 { width: 33.333%; }
.col-sm-6 { width: 50%; }
.col-sm-8 { width: 66.666%; }
.col-md-3 { width: 25%; }
.col-md-9 { width: 75%; }
.col-lg-2 { width: 16.666%; }
.col-lg-10 { width: 83.333%; }
.col-sm-offset-2 { margin-left: 16.666%; }
.col-sm-4.col-sm-offset-2 { width: 33.333%; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar, .navbar-default.navbar-static-side { width: 56px; }
  #page-wrapper { margin-left: 56px; }
  .sidebar-brand span, .sidebar-nav li a span, .sidebar-logout span,
  .sidebar-profile, .toolbar-group-label,
  .nav.metismenu .nav-label { display: none; }
  .col-sm-4, .col-sm-6, .col-sm-8,
  .col-md-3, .col-md-9,
  .col-lg-2, .col-lg-10 { width: 100%; }
}

/* ---- Utils ---- */
.text-muted { color: var(--text-3); }
.text-danger { color: var(--danger); }
.pull-right { float: right; }
.pull-left { float: left; }
.clearfix::after { content:''; display:table; clear:both; }
.hidden { display: none !important; }
.hidden-print { }
.m-t { margin-top: 16px; }
.m-b { margin-bottom: 16px; }
.m-t-xs { margin-top: 4px; }
.block { display: block; }
.cursor-pointer { cursor: pointer; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ---- Animations ---- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
.animated { animation-duration: 0.3s; animation-fill-mode: both; }
.fadeInDown { animation-name: fadeInDown; }

::selection { background: rgba(59,130,246,0.15); }

/* ---- Settings page ---- */
.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}
.settings-field {
  margin-bottom: 14px;
}
.settings-field .form-control {
  margin-top: 4px;
}
.settings-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.settings-row .settings-label {
  min-width: 140px;
}
.trial-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.trial-active {
  background: rgba(59,130,246,0.08);
  color: var(--accent);
}
.trial-expired {
  background: rgba(239,68,68,0.08);
  color: var(--danger);
}

/* ---- Patient form stacked layout ---- */
.form-horizontal .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.form-horizontal .control-label {
  padding-top: 0;
  width: auto;
}

/* ---- Confirm Modal ---- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  animation: confirmFadeIn 0.15s var(--ease);
}
.confirm-modal {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-md), 0 8px 32px rgba(0,0,0,0.12);
  padding: 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  animation: confirmSlideIn 0.15s var(--ease);
}
.confirm-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239,68,68,0.1);
  margin-bottom: 16px;
}
.confirm-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.confirm-message {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-actions .btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.confirm-actions .btn-default {
  background: var(--card);
  border: 1px solid #ddd;
  color: var(--text);
}
.confirm-actions .btn-default:hover {
  background: var(--bg);
  border-color: #ccc;
}
.confirm-actions .btn-danger {
  background: #dc3545;
  border: 1px solid #dc3545;
  color: #fff;
}
.confirm-actions .btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
}
.confirm-actions .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@keyframes confirmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes confirmSlideIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

