:root {
  --theme-primary: #1f5e8c;
  --theme-primary-rgb: 31, 94, 140;
  --theme-primary-hover: #185a80;
  --theme-primary-pastel: #7abbda;
  --theme-primary-pastel-rgb: 22, 187, 218;
  --theme-red-pastel: 238, 79, 69;
  --theme-secondary: #1f80ab;
  --theme-secondary-hover: #12bbff;
  --theme-info: #01c0c8;
  --theme-info-hover: #138496;
  --theme-success: #55ce63;
  --theme-success-rgb: 85, 206, 99;
  --theme-success-hover: #29b848;
  --theme-danger: #d83b48;
  --theme-danger-hover: #b42332;
  --theme-warning: #ffbc34;
  --theme-warning-hover: #e0a800;
  --theme-white: #f9fafc;
  --theme-black: #3c3c3c;
  --theme-grey: #929292;
  --theme-color-secondary: #ffd588;
  --bg-gray: #e7e7e7;
  --border-gray: #c4c4c4;
  --border-big-radius: 24px;
  --border-small-radius: 12px;
}

/* Header */

.content-header {
  .container-fluid {
    .row {
      background-color: transparent;
      box-shadow: none;
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: flex-start;
      align-content: stretch;
      gap: 16px;
      .col-sm-6 {
        width: fit-content;
        h1 {
          font-weight: bold;
          small {
            color: rgba(99, 99, 99, 0.5);
            font-size: medium;
            margin-left: -3px;
          }
        }
        ol {
          margin-top: -25px;
          font-size: small;
          li a {
            color: var(--theme-black);
          }
        }
      }
    }
  }
}

/* Widget Custom */
.module-page {
  .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 20px;
    padding: 0 1.5rem;
  }
  .row > [class*="col-"] {
    flex: 1 1 calc(33.333% - 1.5rem);
    max-width: calc(33.333% - 1.5rem);
  }
  #widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  #widgets > [class*="col-"] {
    flex: 1 1 calc(25% - 1.5rem);
    max-width: calc(25% - 1.5rem);
  }
}

[id*="stats_e"] {
  .small-box .icon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    a i {
      border-radius: var(--border-small-radius);
    }
  }
  .fas::before,
  .fa::before {
    padding: 10px;
  }

  .small-box .icon > i,
  .small-box:hover .icon > i.fa,
  .small-box:hover .icon > i.fab,
  .small-box:hover .icon > i.fad,
  .small-box:hover .icon > i.fal,
  .small-box:hover .icon > i.far,
  .small-box:hover .icon > i.fas,
  .small-box:hover .icon > i.ion {
    position: static !important;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
  }
  .small-box {
    position: relative;
    overflow: hidden;
  }
  .small-box::before {
    content: "";
    z-index: 999999;
    position: absolute;
    width: 125px;
    height: 125px;
    bottom: -65px;
    right: -20px;
    background-color: var(--theme-primary);
    opacity: 0.2;
    border-radius: 100%;
    transition: all 0.1s ease;
  }
  .small-box:hover::before {
    bottom: -60px;
    right: -17px;
    transition: all ease 0.3s;
  }
  .bg-primary {
    box-shadow: 0px 0px 27px -10px rgba(0, 0, 0, 0.29);
    background-color: transparent !important;
    .inner {
      color: black;
      background-color: white;
      padding: 5%;
      border-radius: var(--border-big-radius) var(--border-big-radius) 0px 0px;
    }
    .small-box-footer {
      position: relative;
      overflow: hidden;
      font-weight: bold;
      padding: 5%;
      display: flex;
      justify-content: left;
      color: var(--theme-primary) !important;
      border-radius: 0px 0px var(--border-big-radius) var(--border-big-radius);
      background-color: white;
      margin-top: -7%;
      font-size: small;
      border: none;
      .fas {
        margin-left: 5px;
        margin-top: 4px;
        transition: all 0.2s ease;
      }
      transition: all 0.2s ease;
    }
  }
  .small-box {
    p {
      font-size: x-large;
    }
  }
  .small-box:hover .small-box-footer {
    color: var(--theme-primary) !important;
    .fas {
      margin-left: 10px;
      margin-top: 4px;
    }
  }
  .first {
    border: solid rgba(var(--theme-primary-rgb), 0.3) 1px;
    border-radius: var(--border-big-radius);
    &::before {
      background-color: var(--theme-primary);
    }
    .icon a i {
      color: var(--theme-primary);
      background-color: rgba(var(--theme-primary-rgb), 0.2);
    }
  }
  .second {
    border: solid rgba(var(--theme-red-pastel), 0.3) 1px;
    border-radius: var(--border-big-radius);
    &::before {
      background-color: rgb(var(--theme-red-pastel));
    }
    .icon a i {
      color: rgb(var(--theme-red-pastel));
      background-color: rgba(var(--theme-red-pastel), 0.25);
      &:hover {
        color: rgb(var(--theme-red-pastel));
        background-color: rgba(var(--theme-red-pastel), 0.25);
      }
    }
  }
  .third {
    border: solid rgba(var(--theme-success-rgb), 0.3) 1px;
    border-radius: var(--border-big-radius);
    &::before {
      background-color: rgb(var(--theme-success-rgb));
      opacity: 0.3;
    }
    .icon a i {
      color: rgb(var(--theme-success-rgb));
      background-color: rgba(var(--theme-success-rgb), 0.3);
      &:hover {
        color: rgb(var(--theme-success-rgb));
        background-color: rgba(var(--theme-success-rgb), 0.3);
      }
    }
  }
}

/* Piechart custom */

[id*="piechart_e"] {
  .card {
    .card-header {
      margin: auto;
      border-bottom: 1px solid var(--theme-secondary) !important;
    }
    .card-body {
      a {
        font-weight: bold;
        font-size: small;
      }
    }
    a i {
      transition: all 0.2s ease;
    }
  }
  .card:hover a {
    i {
      padding-left: 2%;
    }
  }
  .piechart {
    max-width: 330px !important;
  }
  .first {
    border: solid rgba(var(--theme-primary-rgb), 0.3) 1px;
    border-radius: var(--border-big-radius);
  }
  .second {
    border: solid rgba(var(--theme-red-pastel), 0.3) 1px;
    border-radius: var(--border-big-radius);
  }
  .third {
    border: solid rgba(var(--theme-success-rgb), 0.3) 1px;
    border-radius: var(--border-big-radius);
  }
}

/* List Array */

.content .container-fluid .card {
  box-shadow: 0px 0px 27px -10px rgba(0, 0, 0, 0.29);
  border-radius: var(--border-big-radius);
  .card-title {
    padding: 5px;
    font-weight: bold;
  }
  .card-body {
    .btn-default {
      border-radius: var(--border-small-radius);
      background-color: var(--bg-gray);
      border: solid var(--border-gray) 2px;
      color: #444;
    }
    .btn-success {
      border: solid var(--theme-success) 2px;
      border-radius: var(--border-small-radius) !important;
      transition: all 0.1 ease;
    }
    .btn-default:hover {
      box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.19);
    }
    .btn-success:hover {
      border: solid var(--theme-success-hover) 2px;
      box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.19);
    }
  }
  [id*="table_e"] {
    border: transparent;
    .custom-select {
      border-radius: var(--border-small-radius);
    }
    .dt-buttons {
      .btn {
        margin: 7px;
        border-radius: var(--border-small-radius);
        border: solid var(--border-gray) 1px;
        background-color: var(--bg-gray);
        color: #444;
        transition: all ease 0.2;
      }
      .btn:hover {
        box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.19);
      }
    }
    .form-control {
      border-radius: var(--border-small-radius);
      padding: 5px;
      text-align: center;
    }
    .pagination {
      li {
        a {
          margin: 7px;
          border-radius: var(--border-small-radius);
          border: solid var(--border-gray) 1px;
          background-color: var(--bg-gray);
          color: #444;
          transition: all 0.2s ease;
        }
      }

      li:hover a {
        box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.19);
      }
    }
    .odd,
    .even {
      .btn {
        border-radius: var(--border-small-radius);
        border: transparent;
        color: white;
        width: fit-content;
        height: fit-content;
      }
    }
    th {
      text-transform: uppercase;
      font-size: small !important;
    }
    td:first-child,
    td:nth-child(2),
    td:nth-child(3),
    th:first-child,
    th:nth-child(2),
    th:nth-child(3) {
      width: fit-content !important;
      max-width: fit-content !important;
    }
    td {
      .badge {
        border-radius: 50px;
      }
    }
    td a,
    td form {
      display: inline-block;
      text-align: center;
      float: none !important;
    }
    td,
    tr,
    tr th {
      padding: 10px;
      text-align: left;
      white-space: nowrap;
      border: transparent;
    }
  }
}

/* Card Create */
.form-group {
  .input-group-prepend span {
    border-top-left-radius: var(--border-small-radius) !important;
    border-bottom-left-radius: var(--border-small-radius) !important;
    background-color: var(--theme-primary);
    color: white;
    border: transparent;
  }
}
.form-title {
  border-radius: var(--border-small-radius);
  text-transform: uppercase;
  border: solid var(--border-gray) 1px;
  background-color: var(--bg-gray);
  color: #444;
}

.select2-container--default {
  .select2-results__option--highlighted[aria-selected],
  .select2-container--default
    .select2-results__option--highlighted[aria-selected]:hover {
    border-radius: var(--border-small-radius);
  }
  .select2-dropdown.select2-dropdown--below {
    border-bottom-left-radius: var(--border-small-radius);
    border-bottom-right-radius: var(--border-small-radius);
  }
  .select2-selection--single {
    border-radius: var(--border-small-radius);
  }
  .select2-dropdown .select2-search__field,
  .select2-container--default .select2-search--inline .select2-search__field {
    border-radius: var(--border-small-radius);
  }
  .select2-results > .select2-results__options {
    border-radius: var(--border-small-radius);
  }
}
.select2-results {
  border-radius: var(--border-small-radius);
}

section {
  .card-body {
    input,
    textarea {
      border-radius: var(--border-small-radius);
    }
  }
}
.note-editor {
  border-radius: var(--border-small-radius);
  .note-btn {
    border: solid var(--border-gray) 1px !important;
    background-color: var(--bg-gray) !important;
    color: #444 !important;
    margin: 5px;
  }
}

/* Show Card */

.card-body {
  .actions {
    .btn {
      margin-right: 7px;
      transition: all ease 0.2;
    }
    .btn-danger {
      border-radius: var(--border-small-radius);
      border: solid var(--theme-danger) 2px;
    }
    .btn-warning {
      border-radius: var(--border-small-radius);
      border: solid var(--theme-warning) 2px;
    }
    .btn-primary {
      border-radius: var(--border-small-radius);
    }
    .btn:hover {
      box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.2) !important;
    }
  }
}

.card-footer {
  .btn-default {
    border-radius: var(--border-small-radius);
    background-color: var(--bg-gray);
    border: solid var(--border-gray) 2px;
    color: #444;
  }
  .btn-primary {
    border-radius: var(--border-small-radius) !important;
    &:hover {
      box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.19);
    }
  }
}

/* Navigation */
.elevation-2 {
  box-shadow: none !important;
}
.main-sidebar {
  .sidebar {
    margin: 7px;
    border-radius: var(--border-small-radius);
    box-shadow: 0px 0px 12px -1px rgba(0, 0, 0, 0.4) !important;
    #first {
      i {
        color: var(--theme-primary);
      }
    }
    #second {
      i {
        color: rgba(var(--theme-red-pastel), 0.7);
      }
    }
    #third {
      i {
        color: rgba(var(--theme-success-rgb), 0.8);
      }
    }
  }
  .brand-link {
    background-color: var(--theme-primary);
    color: white;
    text-transform: uppercase;
    font-weight: bolder;
    text-align: center;
    img {
      display: none;
    }
    &:hover {
      color: white;
    }
  }
  .nav {
    .nav-item {
      i {
        color: var(--theme-primary);
      }
    }
  }
}

/* Login Page */

body.login-page,
.register-page {
  background: rgba(var(--theme-primary-pastel-rgb), 0.7);
  position: relative;
  .row {
    display: ruby;
  }
  .login-box .card {
    border-radius: var(--border-big-radius);
    padding: 25px;
    box-shadow: 0px 0px 25px 5px rgba(var(--theme-red-pastel), 0.3);
    .login-box-msg {
      text-align: left;
      color: black;
      padding-left: 0;
      font-size: xx-large;
      line-height: 30px;
      b {
        font-size: medium;
        color: var(--theme-primary);
        text-transform: uppercase;
      }
    }
    form {
      .input-group {
        display: flex;
        align-items: stretch;
        height: 50px;
        .input-group-append {
          .input-group-text {
            border-top-left-radius: var(--border-small-radius);
            border-bottom-left-radius: var(--border-small-radius);
            background-color: white;
            border-right: transparent;
          }
        }
      }
      .fas {
        color: #444;
      }
      .input-group .form-control {
        border-left: transparent;
        border-radius: var(--border-small-radius);
        order: 2;
        flex: 1;
        height: 50px;
      }

      .input-group .input-group-append {
        order: 1;
        display: flex;
      }

      .input-group .input-group-text {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
      }
      .input-group .form-control {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }
      [class*="icheck-"] {
        border: solid var(--border-gray) 1px;
        border-radius: 7px;
        padding: 10px;
      }
      .btn {
        border-radius: var(--border-small-radius);
        padding: 10px;
        background-color: var(--theme-secondary);
        border: transparent;
        color: white;
      }
    }
    p .fa {
      display: none;
    }
  }
}

body.login-page::before,
.register-page::before {
  content: "";
  position: absolute;
  top: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

body.login-page::after,
.register-page::after {
  content: "";
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  background-color: rgba(var(--theme-primary-pastel-rgb), 0.5);
  border-radius: 50%;
  z-index: 99999;
}

/* Last records widget */
/* Overdide des row pour que le widget soit affiché correctement */

.row > [id*="lastrecords_e"] {
  flex: initial !important;
  max-width: none !important;
}
