:root {
  --granate: #345a66;
  --granate-light: #5e7c86;
  --border-gray: #ced4da;
}

/* #region Primary layout and side bar ========================================== */

#sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 260px;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
  padding: 0 8px;

  background-color: var(--granate);
  color: white;
  display: flex;
  flex-direction: column;
}

#sidebar-links {
  overflow-y: scroll;
  height: 100%;
}
#main-content {
  padding: 16px;
}
.main-content-dashboard {
  margin-left: 260px;
}
#sidebar.closed-sidebar {
  display: none !important;
}
#main-content.closed-sidebar {
  margin-left: 0;
}

a.nav-link.active {
  background-color: var(--granate-light) !important;
}

/* #endregion Primary layout and side bar ======================================= */

/* #region Macros and Datatables ================================================ */
.page-title {
  display: flex;
  justify-content: start;
  align-items: center;
  margin-right: 60px;
  margin-bottom: 30px;
}
.page-title .crumb,
.page-title .divider {
  color: var(--bs-gray);
  font-size: 1.2rem;
}
.page-title .divider {
  margin: 0 0.5rem;
}
.page-title .title {
  color: black;
}

/* Prevent layout shift when datatables is loaded */
.datatable {
  margin-top: 54px;
  margin-bottom: 50px;
  width: 100% !important;
}
.datatable td {
  white-space: nowrap;
}
.datatable th {
  vertical-align: middle;
}
.datatable td,
.datatable th {
  border-right: 1px solid #dee2e6;
}
.datatable td:first-child,
.datatable th:first-child {
  border-left: 1px solid #dee2e6;
}
.datatable th {
  border-top: 1px solid #dee2e6;
}
.datatable th:first-child {
  border-top-left-radius: var(--bs-border-radius);
}
.datatable th:last-child {
  border-top-right-radius: var(--bs-border-radius);
}
/* .datatable tr:last-child td:first-child {
  border-bottom-left-radius: var(--bs-border-radius);
}
.datatable tr:last-child th:last-child {
  border-bottom-right-radius: var(--bs-border-radius);
} */
.dt-container .datatable {
  margin: 0;
}

.dt-container .dt-length {
  display: inline-block;
  margin-right: 16px;
}
.dt-container .dt-paging {
  display: inline-block;
}

.multi-select-macro {
  overflow-y: auto;
  max-height: 8em;
}
.multi-select-macro label {
  width: 100%;
}

.info-tool-tip {
  color: var(--granate-light);
  font-size: 1rem;
}

/* #endregion Macros ============================================================ */

/* #region Helpers ============================================================== */

.hide {
  display: none !important;
}

.pass,
.pass td {
  background-color: rgb(230, 253, 232) !important;
  color: #003200 !important;
}
.warn,
.warn td {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}
.fail,
.fail td {
  background-color: rgb(255, 244, 242) !important;
  color: darkred !important;
}
.highlight,
.highlight td {
  background-color: #fff3cd !important;
  color: #664d03 !important;
}
.highlight-green,
.highlight-green td {
  background-color: rgb(230, 253, 232) !important;
  color: #003200 !important;
}
.highlight-red,
.highlight-red td {
  background-color: rgb(255, 244, 242) !important;
  color: darkred !important;
}

.trade-type-PURCHASE,
.trade-type-PURCHASE td {
  background-color: #ecffff !important;
}
.trade-type-SALE,
.trade-type-SALE td {
  background-color: #feefff !important;
}

/* #endregion =================================================================== */

/* #region Layout =============================================================== */

section {
  border: 1px solid var(--border-gray);
  border-radius: 0.4rem;
  padding: 16px;
  margin-bottom: 100px;
}
.layout-narrow {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.layout-medium {
  max-width: 900px;
  width: 100%;
}

.flex-spaced {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* #endregion =================================================================== */

/* #region Bootstrap overrides and variants ===================================== */
.btn-wide {
  width: 100%;
  max-width: 200px;
}
.btn-block {
  width: 100%;
}
.form-control[readonly] {
  background-color: var(--bs-secondary-bg);
  opacity: 1;
}
/* #endregion =================================================================== */

/* #region Forms ================================================================ */
input.fmt-number {
  text-align: right;
}

.btn-step:not(:hover) {
  background-color: white;
}
/* #endregion =================================================================== */

.disabled {
  color: grey !important;
}
