:root {
  --primary: #42577e;
  --on-primary: white;

  --button-background-color: transparent;
  --button-color: black;
  --button-border-radius: 0.5rem;

  --card-background-color: white;
  --card-color: #3a3a3a;
  --card-border-radius: 1rem;
  --card-padding: 1rem;

  accent-color: var(--primary);
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  overflow: hidden;
}

body {
  padding: 1rem;
  margin: 0;
  height: 100vh;
  overflow-y: scroll;
  box-sizing: border-box;

  background: linear-gradient(180deg, #d8dde6, #c3cad6) fixed;

  display: flex;
  justify-content: space-around;
}

#app {
  position: relative;
  flex: 0 1 1500px;

  display: grid;
  grid-template-areas:
    "header header"
    "aside  main"
    "aside  main";
  grid-template-rows: auto 1fr;
  grid-template-columns: 250px 1fr;
  gap: 1rem;
}

header {
  grid-area: header;

  display: flex;
  align-items: center;
}

aside {
  grid-area: aside;
  align-self: start;
  position: sticky;
  top: 1rem;

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

main {
  grid-area: main;

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

main::after {
  display: block;
  content: "";
  padding: 1rem 0 0 0;
}

button,
input[type="submit"] {
  all: unset;

  padding: 0.5rem;

  background-color: var(--button-background-color);
  border-radius: var(--button-border-radius);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;

  transition: transform 0.25s;
  user-select: none;
  cursor: pointer;
}

button:active,
input[type="submit"]:active {
  transform: scale(0.9);
}

button:hover:not(.active),
input[type="submit"]:hover {
  background-color: #f3f3f3;
}

input + button {
  padding: 0.25rem;
  margin-left: -0.5rem;
}

svg {
  height: 1.5rem;
  width: 1.5rem;
}

tr {
  height: 2.5rem;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background-color: #f3f3f3;
}

th {
  text-align: start;
}

th,
td {
  padding: 0.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

input,
select {
  height: 2rem;
  font-size: 1rem;
}

label {
  font-size: small;
  letter-spacing: 0.05rem;
  font-weight: bold;
  color: #4a4a4a;

  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal {
  max-width: 100%;
  background-color: #34343466;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  padding: var(--card-padding);

  background-color: var(--card-background-color);
  border-radius: var(--card-border-radius);

  box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  animation: 0.25s normal forwards slidein ease-out;
}

.active {
  background-color: var(--primary);
  color: var(--on-primary);
  fill: var(--on-primary);
  font-weight: bold;
}

.row {
  display: flex;
  gap: 1rem;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
}

.align-items-center {
  align-items: center;
}

.justify-content-space-between {
  justify-content: space-between;
}

.text-align-start {
  text-align: start;
}

.text-align-center {
  text-align: center;
}

.text-align-end {
  text-align: end;
}

label.horizontal {
  gap: 0.5rem;
  flex-direction: row;
  align-items: center;
}

.clickable {
  cursor: pointer;
}

.margin-bottom {
  margin-bottom: 0.4rem;
}

.circle {
  border-radius: 50%;
}

input[type="checkbox"],
input[type="radio"] {
  min-width: 1.5rem;
  height: 1.5rem;
  margin-left: 0;
  cursor: pointer;
}

input[type="checkbox"] + *,
input[type="radio"] + * {
  cursor: pointer;
}

*[readonly] {
  color: #4a4a4a;
  border: 1px dashed grey;
}

*[disabled],
button:disabled,
input:disabled {
  pointer-events: none;
  opacity: 0.5;
}

@keyframes slidein {
  from {
    margin-top: 0.5rem;
  }

  to {
    margin-bottom: initial;
  }
}
