:root {
  --primary: #4a89dc;
  --secondary: #888888;
  --important: #ffc440;
}

:root {
  --mute: #565d5b;

  --text-main: #222222;
  --text-secondary: #2f2d46;
  --text-button: #000000;
  --text-footer: #888888;

  --background-main: #f9fafc;
  --background-sidebar: #f0f2f5;
  --background-input: #dad1e0;
  --background-header: #edf0f3;
  --background-card: #f3f5f7;
  --background-status: #e8ebef;
  --background-secondary: #f2f2f2;
  --background-action: #a3b8b6;
  --background-busy: #9090B0A0;

  --border-generic: #e1e4e8;
  --border-input: #d1d6dc;

  --danger: #dbdbdb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mute: #91b8ad;

    --text-main: #f4f4f4;
    --text-secondary: #dae0c5;
    --text-button: #ffffff;
    --text-footer: #bbbbbb;

    --background-main: #101010;
    --background-sidebar: #24292e;
    --background-input: #363a3f;
    --background-header: #1a1d21;
    --background-card: #000000;
    --background-status: #454a4f;
    --background-secondary: #232a36;
    --background-action: #282a35;
    --background-busy: #707090A0;

    --border-generic: #3a3f44;
    --border-input: #454a4f;

    --danger: #c3c3c3;
  }
}

body {
  background: var(--background-main);
  color: var(--text-main);
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--text-footer) transparent;
}

.header {
  border-bottom: 1px solid var(--border-generic);
  background: var(--background-header);
  padding: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.content {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow-y: hidden;
}

.content>*:not(:last-child) {
  border-right: 1px solid var(--border-generic);
}

.aside {
  overflow-y: auto;
}

.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: row;
}

.section {
  flex-grow: 1;
  box-sizing: border-box;
}

.footer {
  border-top: 1px solid var(--border-generic);
  position: sticky;
  bottom: 0;
}

.header-logo {
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
}

.header-brand {
  margin-block: 0.5rem;
  font-family: 'Arial Rounded MT Bold', 'Arial Rounded MT', 'Arial Rounded', 'Helvetica Rounded', Arial, sans-serif;
}

.header-icon {
  width: 2rem;
  height: 2rem;
  vertical-align: middle;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-username {
  width: 2rem;
  font-size: 1rem;
  background-color: var(--secondary);
}

.header-button {
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  fill: var(--text-main);
}

.aside-toolbar {
  text-align: right;
}

.subtitle {
  font-size: .9rem;
  color: var(--text-main);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.disabled {
  pointer-events: none;
}

.highlighted {
  fill: var(--important) !important;
}

.hider {
  display: none !important;
}

.primary-btn,
.secondary-btn,
.action-btn,
.outline-btn,
.div-btn,
.link-btn {
  transition: all 0.2s;
  border-top-left-radius: 1rem 50%;
  border-top-right-radius: 1rem 50%;
  border-bottom-left-radius: 1rem 50%;
  border-bottom-right-radius: 1rem 50%;
  outline: none;
  padding: 0.5rem 1rem;
}

.primary-btn:focus,
.secondary-btn:focus,
.action-btn:focus,
.outline-btn:focus {
  border: 1px solid var(--primary);
}

.primary-btn:hover,
.secondary-btn:hover,
.action-btn:hover,
.outline-btn:hover {
  opacity: 0.9;
  transition: background 0.18s;
}

.primary-btn {
  background: var(--secondary);
  color: var(--text-button);
  border: none;
  font-size: 1rem;
  font-weight: 500;
}

.secondary-btn {
  background: var(--secondary);
  color: var(--text-button);
  border: none;
  font-size: 1rem;
  font-weight: 500;
}

.action-btn {
  background: var(--background-action);
  color: var(--text-main);
  border: none;
  font-size: 1rem;
  font-weight: 400;
}

.outline-btn {
  background: rgb(217, 93, 5);
  color: var(--text-main);
  border: 2px solid var(--primary);
  font-size: 1rem;
  font-weight: 400;
}

.div-btn {
  display: flex;
  cursor: pointer;
  user-select: none;
  justify-content: center;
  align-items: center;
}

.link-btn {
  text-decoration: none;
  cursor: pointer;
  display: block;
  text-align: center;
}

.svg-btn {
  stroke: var(--text-main);
  cursor: pointer;
}

.hex-btn {
  aspect-ratio: 10/12;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.round-btn {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  padding: 0;
}

.centered>div {
  text-align: center;
}

.escaper {
  color: var(--text-main);
  background: none;
  border-radius: 50%;
  border: 1px solid var(--border-generic);
  padding: 0.5rem;
  width: 2rem;
  height: 2rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
  outline: none;
}

.escaper:focus {
  border: 1px solid var(--primary);
}

.info {
  text-align: left;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.input input,
.input select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-input);
  border-top-left-radius: 1rem 50%;
  border-top-right-radius: 1rem 50%;
  border-bottom-left-radius: 1rem 50%;
  border-bottom-right-radius: 1rem 50%;
  font-size: 1em;
  background: var(--background-input);
  color: var(--text-main);
  box-sizing: border-box;
  transition: border 0.2s;
}

.input label {
  color: var(--text-main);
  padding: 0.5rem;
  display: block;
}

.input input:focus {
  border-color: var(--primary);
  outline: none;
}

.password {
  position: relative;
}

.eye {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  background: none;
  border: none;
  color: var(--text-footer);
  font-size: 1.2em;
  cursor: pointer;
}

.small-limit {
  width: 12rem;
  max-width: 12rem;
  text-wrap: nowrap;
  text-overflow: ellipsis;
  overflow-x: hidden;
}

.big-limit {
  max-width: 90ch;
}

.resizer {
  position: relative;
}

.resizer[data-side="vertical"] {
  width: 0;
  height: 100%;
  position: relative;
}

.resizer[data-side="horizontal"] {
  width: 100%;
  height: 0;
}

.resizer>div {
  margin: auto;
  position: absolute;
}

.resizer[data-side="vertical"]>div {
  width: 0.8rem;
  height: calc(100% - 1rem);
  cursor: ew-resize;
  left: -0.4rem;
  top: 0.5rem;
}

.resizer[data-side="horizontal"]>div {
  width: calc(100% - 1rem);
  height: 0.8rem;
  cursor: ns-resize;
  left: 0.5rem;
  top: -0.4rem;
}

.resizer>div>div {
  background-color: var(--background-sidebar);
}

.resizer[data-side="vertical"]>div>div {
  width: .25rem;
  height: 100%;
  margin-inline: 0.25rem;
}

.resizer[data-side="horizontal"]>div>div {
  width: 100%;
  height: .25rem;
  margin-block: 0.25rem;
}

.resizer>div:hover {
  background-color: var(--background-card);
}

.busy-initial,
.busy-operation,
.busy-error {
  position: relative;
}

.busy-initial::after,
.busy-operation::after,
.busy-error::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: var(--background-busy);
  z-index: 1000;
  cursor: wait;
  border-radius: inherit;
}

.dialog {
  margin: auto;
  background: var(--background-card);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.13);
}

.dialog .form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding-bottom: 1rem;
}

.dialog-title {
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text-main);
  margin-right: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.footer-content {
  text-align: center;
  color: var(--text-main);
  font-size: 0.97em;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.footer-contact {
  color: var(--text-main);
  text-decoration: underline;
}

/* spacing between footer contact items */
.footer-content .footer-contact:not(:last-child) {
  margin-right: 0.6rem;
}

.new-item {
  animation: glow-animation 1s ease-in-out 1;
}

@keyframes glow-animation {
  0% {
    box-shadow: 0 0 0px 0px var(--secondary) inset;
  }

  50% {
    box-shadow: 0 0 20px 0px var(--secondary) inset;
  }

  100% {
    box-shadow: 0 0 0px 0px var(--secondary) inset;
  }
}
