*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Nunito', sans-serif;
}

:root {
  --fontSize: 1rem;

}

body {
  margin: 0;
}



.grid-container {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "navbar"
    "output"
    "footer";
  gap: 1px;
}

.mynavbar {
  grid-area: navbar;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: linear-gradient(to top, #69ACD8, #8DC0E1);
  
}

.mynavbar .nav-list {
  display: flex;
  margin: 0;
  padding-right: 1rem;
}


.mynavbar .nav-list li {
  list-style: none;
  border-left: 1px solid #4B9BD0;

}

.mynavbar .nav-list li:last-child {
  border-right: 1px solid #4B9BD0;
}


.mynavbar .nav-list li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
  padding: 1rem;
  display: block;
}

.mynavbar .nav-list li:hover,
.mynavbar .nav-list li.active {
  background-image: linear-gradient(to bottom, #509ED1, #73B2DA);
}

.brand-section {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.brand-title {
  background-image: url('ChargeRx_logo_design.png');
  background-size: auto 100%;   /* 👈 key change */
  background-position: center;
  background-repeat: no-repeat;

  width: 4rem;
  height: 3.5rem;
  flex: 0 0 4rem;

  margin-left: 1rem;
  font-size: 0;
}

.user-info {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.logged-user {
  display: flex;
  align-items: center;
  gap: 0.4rem; /* 👈 THIS fixes spacing cleanly */
}

.logged-user,
.logout-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 1rem;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  border-left: 1px solid #4B9BD0;
}

.logout-link {
  cursor: pointer;
}

.logged-user:last-child,
.logout-link:last-child {
  border-right: 1px solid #4B9BD0;
}

.logout-link:hover,
.logout-link.active,
.logged-user:hover {
  background-image: linear-gradient(to bottom, #509ED1, #73B2DA);
}

.open_problem_list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
    
}

.open_problem_list li {
  list-style: none;
  text-wrap: nowrap;  
}

.open_problem_list li:not(:last-child) {
  border-right: 1px solid #4B9BD0;
  padding-right: 1rem;
}

.open_problem_list li {
  padding-left: 1rem;
}

.open_problem_list li a {
  text-decoration: none;
}

.open_problem_list li.active {
    font-weight: 600;
}

.open_problem_list li.highlighted {
    color: #ec1212;
}




.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: hsl(20, 30%, 60%);

}

.sidebar .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  text-align: center;
  display: none;
}

.sidebar .nav-list.active {
  display: inherit;
}

.sidebar .nav-list li {
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
}

.sidebar .nav-list li:first-child,
.sidebar .nav-list li:first-child>a {
  animation: custom;
  animation-duration: .3s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li:nth-child(2),
.sidebar .nav-list li:nth-child(2)>a {
  animation: custom;
  animation-duration: .6s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li:nth-child(3),
.sidebar .nav-list li:nth-child(3)>a {
  animation: custom;
  animation-duration: .9s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li:nth-child(4),
.sidebar .nav-list li:nth-child(4)>a {
  animation: custom;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li:nth-child(5),
.sidebar .nav-list li:nth-child(5)>a {
  animation: custom;
  animation-duration: 1.5s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li:nth-child(6),
.sidebar .nav-list li:nth-child(6)>a {
  animation: custom;
  animation-duration: 1.8s;
  animation-timing-function: ease-out;
}

.sidebar .nav-list li a {
  background-color: hsl(20, 30%, 70%);
  color: #ffffff;
  text-decoration: none;
  padding: 1em 0;
}

.sidebar .nav-list li:hover,
.sidebar .nav-list li a:hover {
  background-color: hsl(20, 30%, 80%);
  cursor: pointer;
  color: #555;
  font-weight: bolder;
  transition: background-color .5s;
}

.sidebar .nav-list li.active {
  background-color: hsl(20, 30%, 90%);
  cursor: default;
  color: #444;
  font-weight: bolder;
  transition: background-color .5s;
}



.sidebar .nav-list li a.active {
  background-color: hsl(20, 30%, 90%);
  cursor: default;
  color: #444;
  font-weight: bolder;
  transition: background-color .5s;
}

.sidebar .nav-list li:hover.active,
.sidebar .nav-list li a:hover.active {
  background-color: hsl(20, 30%, 100%);
  color: black;
}

/*@keyframes custom {
  from {
    transform: translateX(-100%);
    display: none;
  }

  to {
    transform: translateX(0);
    display: block;
  }
}*/

.info-hint {
  color: #6610f2;
}

.mymodal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: 200ms ease-in-out;
  border: 1px solid back;
  border-radius: 10px;
  z-index: 10;
  background-color: white;
  width: 300px;
  max-width: 80%;
}

.mymodal.active {
  transform: translate(-50%, -50%) scale(1);
}

.mymodal-header {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid black;
}

.mymodal-header .title {
  font-size: 1.25rem;
  font-weight: bold;
}

.mymodal-header .close-button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-size: 1.25rem;
  font-weight: bold;
}

.mymodal-body {
  padding: 10px 15px;
}

#overlay {
  position: fixed;
  opacity: 0;
  transition: 200ms ease-in-out;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, .5);
  pointer-events: none;
}

#overlay.active {
  pointer-events: all;
  opacity: 1;
}


.output {
  grid-area: output;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  overflow: hidden;

  background-color: hsl(20, 30%, 90%);
}

button[data-modal-target] {
  margin-top: 1em;
}

.output-content {
  margin: 0 1em 1em 1em;
  overflow: auto;
  max-height: 60%;
  box-shadow: 0 0 10px 0 hsl(200, 50%, 50%);
  width: auto;

}

.output-content-buttons {
  display: flex;
  justify-content: space-between;
  margin: 0 1em 1em 1em;
  max-width: 90%;
}

/*
.output-content-buttons.action {
    justify-content: space-between;
}
*/

.output-content-buttons.pagination {
  display: none;
  /*This property is controlled by JS, and is set to 'flex' when table contents is above threshold*/
  justify-content: space-between;
}


.output-content-buttons.pagination .pagination-buttons {
  display: inline-block;
}

.output-content-buttons.pagination .pagination-buttons .mybtn {
  margin-right: 2px;
}


/*Table Output*/

.table-output {
  border-collapse: collapse;
  border-spacing: 0;
}


.table-output th,
.table-output td {
  text-align: left;
}

.table-output th {
  background-color: #555;
  padding: .5rem 1rem;
  color: #fff;
  position: sticky;
  top: 0;
  cursor: pointer;
  border-style: none;
}

.table-output th:hover {
  background-color: #777;
  transition: background-color .3s;
}

.table-output td {
  font-size: calc(var(--fontSize) - 0.1rem);
  padding: .2rem 1rem;
}

.table-output .th-sort-asc::after {
  content: "\25b4";
}

.table-output .th-sort-desc::after {
  content: "\25be";
}

.table-output .th-sort-asc::after,
.table-output .th-sort-desc::after {
  margin-left: 5px;
}

.table-output tr:hover {
  font-weight: bold;
}

.table-output tr:nth-child(even) {
  background-color: #eee;
}

.table-output tr:nth-child(odd) {
  background-color: #fff;
}

.table-output tr:nth-child(even):hover,
.table-output tr:nth-child(odd):hover {
  background-color: #ccc;
}

/*Pagination & Buttons*/


/*Scroll Bar*/
/* width */
/*
::-webkit-scrollbar {
  width: 5px;
}
*/

/* Track */
/*
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey; 
  border-radius: 10px;
}
*/

/* Handle */
/*
::-webkit-scrollbar-thumb {
  background: grey; 
  border-radius: 10px;
}
*/

/* Handle on hover */
/*
::-webkit-scrollbar-thumb:hover {
  background: #509ED1; 
}
*/



.footer {
  grid-area: footer;
  background-image: linear-gradient(to top, #69ACD8, #8DC0E1);
  text-align: center;
  padding: .5em;
  font-weight: lighter;
}


/*Button Library*/
.mybtn {
  --background-hue: 0;
  --background-saturation: 0%;
  --initial-background-lightness: 90%;
  --background-lightness: var(--initial-background-lightness);
  --border-lightness: calc(var(--initial-background-lightness) - 20%);

  background-color: hsl(var(--background-hue),
      var(--background-saturation),
      var(--background-lightness));
  border: 1px solid hsl(var(--background-hue),
      var(--background-saturation),
      var(--border-lightness));
  outline: none;
  cursor: pointer;
  padding: .5em 1em;
  border-radius: .3em;
}


.mybtn:hover,
.mybtn:focus,
.active {
  --background-lightness: calc(var(--initial-background-lightness) - 10%);
  box-shadow: 0 0 5px 0 hsl(var(--background-hue),
      var(--background-saturation),
      var(--border-lightness));
}

.mybtn.btn-primary {
  --background-hue: 271;
  --background-saturation: 70%;
  --initial-background-lightness: 50%;
  color: white;
}

.mybtn.btn-accent {
  --background-hue: 200;
  --background-saturation: 100%;
  --initial-background-lightness: 40%;
  color: white;
}

.mybtn.btn-success {
  --background-hue: 120;
  --background-saturation: 50%;
  --initial-background-lightness: 40%;
  color: white;
}

.mybtn.btn-danger {
  --background-hue: 0;
  --background-saturation: 60%;
  --initial-background-lightness: 50%;
  color: white;
}

.mybtn.btn-large {
  font-size: 1.25rem;
}

.mybtn.btn-small {
  font-size: .75rem;
}

.mybtn.btn-pill {
  border-radius: 1000000px;
}

.mybtn.btn-custom {
  background: linear-gradient(to right, hsl(271, 70%, 50%), hsl(200, 100%, 40%));
  color: white;
  border-color: #222;
}

.mybtn.btn-custom:hover,
.mybtn.btn-custom:focus {
  background: linear-gradient(to right, hsl(271, 70%, 40%), hsl(200, 100%, 30%));
  border-color: black;
  box-shadow: 0 0 5px 0 black;
}

/*Input Library*/
.input {
  --border-color: #AAA;

  border: 1px solid var(--border-color);
  outline: none;
  font-size: inherit;
  padding: 0 .5em;
  border-radius: .2em;
}

.input:focus {
  --border-color: #0AF;
  box-shadow: 0 0 5px 0 var(--border-color);
}

.input.input-success {
  --border-color: #27AE60;
}

.input.input-success:focus {
  --border-color: #0F0;
}

.input.input-error {
  --border-color: #EB5757;
}

.input.input-error:focus {
  --border-color: #F00;
}

.input.input-large {
  font-size: 1.25rem;
}

.input.input-small {
  font-size: .75rem;
}

.input:disabled {
  background-color: #EAEAEA;
}

/*Checkbox Library*/
.custom-checkbox+label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.custom-checkbox {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.custom-checkbox+label::before {
  content: '';
  width: 1.1em;
  height: 1.1em;
  margin-right: .5em;
  border-radius: .15em;
  border: .05em solid black;
}

.custom-checkbox+label:hover::before {
  background-color: #0AF;
}

.custom-checkbox:focus+label::before {
  box-shadow: 0 0 20px 0 black;
}

.custom-checkbox:checked+label::before {
  content: '✔';
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #069;
  color: white;
}

.custom-checkbox:disabled+label {
  color: #AAA;
  cursor: not-allowed;
}

.custom-checkbox:disabled+label::before {
  background-color: #CCC;
  border-color: #999;
}