:root {
  --blue-300: #000099;
  --blue-500: #0000ff;
  --blue-600: #4d4dff;
  --blue-800: #ccccff;
  --green-100: #008000;
  --green-300: #009900;
  --green-900: #ccffcc;
  --grey-300: #2e2e39;
  --grey-400: #314545;
  --grey-500: #6a9595;
  --grey-600: #9a9a9a;
  --grey-700: #d9d9d9;
  --grey-800: #e9eef6;
  --grey-900: #f8fafd;
  --purple-700: #6366f1;
  --purple-800: #4338ca;
  --red-900: #ffc2b3;
  --red-300: #b32400;
  --red-100: #4d0f00;
  --white: #FFF;
  --yellow-900: #fffcc8;
  --max-container-width: 1400px;
}
* {
  margin: 0;
  padding: 0;
  font-family: inherit;
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  height: 100vh;
  background: var(--grey-900);
  background: linear-gradient(0deg, var(--grey-600) 0%, var(--grey-700) 100%);
}
a {
  color: inherit;
  text-decoration: inherit;
  cursor: pointer;
}
a:hover {
  color: var(--blue-300);
}
pre {
    font-family: monospace;
}
img { max-width: 100%; }
input[type=text],
input[type=password],
button {
  line-height: 1.5em;
  padding: 0 .25em;
  border-radius: .25rem;
  border: none;
  font-size: 1.2rem;
  max-width: 100%;
  box-shadow: 0px 0px 1px var(--grey-300);
}
.link {
  color: var(--blue-300);
  text-decoration: underline;
}
.hidden { display: none; }
nav.topmenu {
  background-color: var(--grey-900);
  position: sticky;
  top: 0;
  &> ul {
    display: flex;
    margin: auto;
    list-style-type: none;
    &> li {
      padding: .5rem;
    }
    &> li:hover {
      background-color: var(--grey-700);
      color: black;
    }
    &> li:hover a {
      color: black;
    }
    &> li.logout {
      margin-left: auto;
    }
  }
}
.debug {
  background: var(--white);
  padding: 1rem;
  border-radius: .25rem;
  max-width: max-content;
  overflow-x: scroll;
  margin: 1rem auto 0 auto;
  dt {
    margin-top: 1em;
    font-weight: 500;
  }
  dd {
    margin: .5em 0 0 .25em;
  }
}
.card {
  margin: 1rem auto 0 auto;
  border-radius: 1rem;
  box-shadow: 1px 1px 4px var(--grey-300);
  background: var(--white);
  max-width: max-content;
  overflow: hidden;
  &> nav {
    display: flex;
    gap: 1em;
    background: var(--grey-800);
    color: var(--grey-400);
    padding: .5rem;

  }
}
form.add_client {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: .5rem;
  margin: .5rem;
  &> h1,
  &> button {
    grid-column: 1 / -1;
  }
  &> label {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    &> input {
        width: 30em;
    }
    &> input[type=checkbox] {
        width: 1.25em;
    }
  }
  &> div.buttons {
    grid-column: 1 / -1;
  }
  &> fieldset {
    grid-column: 1 / -1;
    padding: .5rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    &> label {
      padding: .25rem .5rem;
      border: 1px solid var(--grey-500);
    }
  }
}
dl.client_details {
  max-width: max-content;
  display: grid;
  grid-template-columns: repeat(2, minmax(max-content, 100%));
  gap: 1rem;
  padding: 1rem;
 &> dt {
  font-weight: 500;
 }
}
ul.apps {
  --gap: 1rem;

  margin: 1rem auto;
  display: flex;
  flex-wrap: wrap;
  max-width: min(100%, 700px);
  gap: var(--gap);
  list-style-type: none;

  &> li {
    background-color: var(--white);
    box-shadow: 1px 1px 4px var(--grey-300);
    transition: box-shadow 0.3s ease-in-out;
    min-height: 5rem;
    overflow: hidden;
    width: 100px;
    height: 100px;
    border-radius: 1rem;
    position: relative;
    padding: 5px 0px;
    cursor: move;

    display: grid;
    grid-template-columns: auto 20px;
    grid-template-rows: auto min-content;
    justify-items: center;
    align-items: center;


    .imgbox {
      grid-area: 1 / 1 / 1 / -1;
      justify-self: center;
      display: flex;
      justify-content: center;
      align-content: center;
      padding-inline: 5px;
    }
    img.logo {
      max-height: 64px;
      max-width: 100%;
      width: auto;
      height: auto;
    }
    .description {
      grid-area: 2 / 1 / 2 / -1;
      justify-self: center;
      align-self: center;
      text-align: center;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      height: 22px;
      max-width: 95px;
      font-size: 14px;
      font-weight: 500;
    }
    .details {
      grid-area: 1 / 2 / 1 / 3;
      color: var(--grey-300);
      padding-top: 5px;
      font-size: .8rem;
      font-weight: 300;
      align-self: start;
      display: none;
    }
  }
  &> li:hover {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.8);
    cursor: pointer;
    overflow: visible;
    .details {
      display: block;
    }
    .description {
      text-overflow: clip;
      overflow: visible;
      white-space: normal;
      z-index: 10;
    }
  }

}

@media (max-width: 400px) {
  ul.apps {
    .client_details {
      grid-template-columns: 100%;
    }
  }
}

.content-centered {
    background: white;
    max-width: 100%;
    padding: 1rem;
}

@media (min-width: 400px) {
  body {
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
  }
  .content-centered {
    border-radius: .25rem;
    box-shadow: 1px 1px 4px var(--grey-300);
    padding: 3rem;
    background-color: var(--white);
  }
}
/* Utility */
.flex { display: flex; }
.flex-grow { flex-grow: 1; }
.m-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.p-2 { padding: .5rem; }
.size-4 { height: 16px; width: 16px; }
.text-grey-400 { color: var(--grey-400); }
.w-100 { width: 100%; }
