:root {
    --app-primary: #405189;
    --app-primary-hover: #364574;
    --app-primary-soft: rgba(64, 81, 137, .08);
    --app-primary-soft-2: rgba(64, 81, 137, .14);

    --app-secondary: #1a1a1a;
    --app-secondary-soft: rgba(26, 26, 26, .68);
    --app-border: rgba(26, 26, 26, .08);

    --app-wrapper-bg: #f7fbfb;
    --app-surface: rgba(255,255,255,.92);
    --app-surface-soft: #ffffff;
    --app-sidebar-width: 300px;
}

.test {
    --app-secondary: #1a1a1a;
    --app-primary: #405189;
    background-color: #f7fbfb;
}

body.app-wrapper {
    background: var(--app-wrapper-bg);
    color: var(--app-secondary);
    overflow-x: hidden;
}

.app-wrapper-inner {
    min-height: 100vh;
    display: flex;
}

.app-main {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 1rem 1rem 0;
    backdrop-filter: blur(8px);
}

/* Shown while acting as another user (django-hijack) */
.app-hijack-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: .75rem;
    padding: .6rem 1rem;
    border: 1px solid #ffda6a;
    border-radius: 1rem;
    background: #fff3cd;
    color: #664d03;
    box-shadow: 0 .35rem 1rem rgba(26,26,26,.05);
}

.app-hijack-banner-origin {
    opacity: .8;
}

.app-hijack-banner-origin::before {
    content: "·";
    margin-right: .5rem;
}

.app-topbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: 0 .35rem 1rem rgba(26,26,26,.05);
}

.app-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--app-secondary);
}

.app-topbar-subtitle {
    color: var(--app-secondary-soft);
    font-size: .92rem;
}

.app-content {
    flex: 1 1 auto;
    padding: 1rem;
}

.app-content-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.page-head {
    padding: .5rem .25rem 0;
}

.page-title {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--app-secondary);
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--app-secondary-soft);
}

.breadcrumb-item a:hover {
    color: var(--app-primary);
}

.actions {
    list-style: none;
    padding-left: 0;
}

#messages-container {
list-style: none;
}

.app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, .28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 1035;
}

/* Buttons aligned to new theme */
.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--app-primary-hover);
    border-color: var(--app-primary-hover);
}

.btn-outline-primary {
    color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

.text-primary {
    color: var(--app-primary) !important;
}

.bg-primary-subtle {
    background-color: var(--app-primary-soft) !important;
}

@media (max-width: 991.98px) {
    .app-topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }

    body.sidebar-mobile-open .app-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

form-label, .text-blue {
	color: var(--app-primary);
}

.form-control, .form-select {
	--bs-body-color: #000000;
	--bs-border-color: var(--app-primary);
	--bs-border-width: 2px;
	background-color: #ffffff;
	border-radius: 12px;
}


/* Input for a day of the month (1-31) */
.form-control-day {
	max-width: 10rem;
}

.form-control:focus,
.form-control:hover:not(:disabled):not([readonly]),
.form-select:focus,
.form-select:hover:not(:disabled):not([readonly])
{
	border-color: var(--app-secondary);
	box-shadow: 3px 3px 3px rgba(13, 110, 253, 0.25);
}

.form-control:disabled, .form-control[readonly], .form-select:disabled, .form-select[readonly] {
	--bs-body-color: var(--app-secondary-soft);
	--bs-border-color: var(--app-primary-soft-2);
	background-color: #f1f3f7;
	opacity: 1;
	pointer-events: none;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: .5rem;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform .3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 480px;
    margin: 1.75rem auto;
  }

  .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.12);
  outline: 0;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.modal-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.modal-body {
  padding: 1.25rem;
  color: var(--bs-emphasis-color);
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0,0,0,.08);
  background: rgba(248,249,250,.7);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: .5;
}

body.modal-open {
  overflow: hidden;
}
/* MODAL END */

/* SEARCHABLE SELECT */
.searchable-select {
  position: relative;
}

.searchable-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.searchable-select-toggle {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.searchable-select-panel {
  position: fixed;
  z-index: 1070;
  min-width: 14rem;
  padding: .5rem;
  background: var(--app-surface-soft);
  border: 1px solid var(--app-border);
  border-radius: .5rem;
}

.searchable-select-list {
  max-height: 16rem;
  margin-top: .5rem;
  overflow-y: auto;
}

.searchable-select-option {
  padding: .375rem .625rem;
  border-radius: .375rem;
  cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option.active {
  background: var(--app-primary-soft);
}

.searchable-select-option.selected {
  color: var(--app-primary);
  font-weight: 600;
}

.searchable-select-option[aria-disabled="true"] {
  opacity: .5;
  cursor: default;
}

.searchable-select-empty {
  padding: .375rem .625rem;
}
/* SEARCHABLE SELECT END */
