:root {
  --background: #fafafa;
  --foreground: 0, 0, 0;
  --accent: 190, 217, 26;
  --emphasis-background: #252525;
  --card-color: white;
  --sidebar-background: #ffffff;
  --sidebar-foreground: 0, 0, 0;

  --accent: 190, 217, 26;
  --accent-diatech: rgba(190, 217, 26, 1);
  --accent-dark: rgba(var(--accent), 0.8);
  --accent-light: rgba(var(--accent), 0.3);
  --accent-lightest: rgba(var(--accent), 0.15);
  --ui-background-lightest: rgba(var(--foreground), 0.05);
  --ui-background-light: rgba(var(--foreground), 0.1);
  --border-width: 1px;
  --border-radius: calc(0.5rem - 2px);
  --form-control-height: 36px;
}

html,
body {
  position: relative;
  width: 100%;
  height: 100%;
  color: rgba(var(--foreground), 0.8);
  background-color: var(--background);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

h1 {
  font-size: 30px;
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.btn {
  font-family: inherit;
  cursor: pointer;
  outline: none;
  border: none;
  text-decoration: none;
  color: inherit;
  transition: all 250ms ease-in-out;
  /* background-color: color-mix(
    in srgb,
    rgb(var(--foreground)) 5%,
    var(--background)
  ); */
  background-color: var(--card-color);
  padding: 0 12px;
  font-size: 0.875rem;
  flex-wrap: wrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--form-control-height);
  border-radius: var(--border-radius);
  border: solid var(--border-width) var(--ui-background-lightest);
  box-shadow: 0 0px 1px var(--ui-background-lightest);
  gap: 5px;
}

.btn.ghost {
  background: none;
  box-shadow: none;
  border: none;
}

.btn.link {
  background: none;
  border: none;
  border-bottom: solid;
  height: auto;
  border-radius: 0;
}

.btn.btn-sm {
  height: 30px;
  padding: 0 5px;
}

.btn.btn-sm {
  font-size: 14px;
}

.btn.btn-sm .material-symbols-outlined {
  font-size: 20px;
}

.btn.btn-xs {
  padding: 2px;
  height: auto;
  font-size: 12px;
}

.btn.btn-xs .material-symbols-outlined {
  font-size: 14px;
}

.btn:active {
  background-color: color-mix(
    in srgb,
    rgb(var(--foreground)) 15%,
    var(--background)
  );
  border-color: color-mix(
    in srgb,
    rgb(var(--foreground)) 15%,
    var(--background)
  );
}

.btn:disabled {
  cursor: default;
  background-color: rgba(var(--foreground), 0.03);
}

.btn.outline {
  border: solid var(--border-width) var(--ui-background-light);
  background-color: var(--background);
}

.btn:hover {
  background-color: color-mix(
    in srgb,
    rgb(var(--foreground)) 1%,
    var(--background)
  );
  box-shadow: 0 1px 1px var(--ui-background-lightest);
}

.btn.primary {
  background-color: var(--emphasis-background);
  border-color: var(--emphasis-background);
  color: var(--background);
}

.btn.danger {
  background-color: #B62325;
  border-color: #B62325;
  color: whitesmoke;
}

.button-bar {
  display: flex;
  padding: 10px 0;
  gap: 5px;
  justify-content: flex-end;
}

.button-bar .material-symbols-outlined {
  display: flex;
}

.pill-bar {
  display: flex;
  gap: 0;
}

.pill-bar .btn {
  border-radius: 0;
  border-right: none;
}

.pill-bar .btn:first-child {
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
}

.pill-bar .btn:last-child {
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  border-right: solid var(--border-width) var(--ui-background-lightest);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.header .button-bar {
  padding: 0;
}

.container {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.container > .table-container,
.container > .loading-container > .table-container {
  margin: 0 -20px;
}

.container > .table-container .tabulator,
.container > .loading-container > .table-container .tabulator {
  border-radius: 0;
}

.input input {
  background: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  border: none !important;
}

.textarea {
  display: block;
  resize: none;
  height: 400px;
}

.input,
input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
.textarea {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  flex: 1;
  border: none;
  outline: none;
  width: 100%;
  /* background: var(--ui-background-lightest); */
  background-color: var(--card-color);
  color: rgba(var(--foreground), 0.8);
  transition: all 250ms ease-in-out;
  font-family: inherit;
  min-height: var(--form-control-height);
  font-size: 0.875rem;
  border-radius: var(--border-radius);
  border: solid var(--border-width) var(--ui-background-lightest);
  box-shadow: 0 0px 1px var(--ui-background-lightest);
}

.input.outline {
  border: solid var(--border-width) var(--ui-background-light);
  background-color: var(--background);
}

input[type="date"] {
  display: inline-block;
}

input[type="file"] {
  padding-top: 8px;
}

.textarea {
  padding: 8px;
}

.input:hover,
input[type="text"]:hover,
input[type="url"]:hover,
input[type="number"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="date"]:hover,
select:hover,
textarea:hover {
  box-shadow: 0 1px 1px var(--ui-background-lightest);
}

.input:focus-within,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  background: var(--card-color);
  border: solid var(--border-width) var(--ui-background-light);
}

b {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  display: block;
}


.popup-btn.show::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: color-mix(in srgb, transparent 30%, var(--background));
  backdrop-filter: blur(2px);
  z-index: 10;
}

.popup-btn + .popup {
  background-color: var(--card-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: solid var(--border-width) var(--ui-background-lightest);
  box-shadow: 0 1px 2px var(--ui-background-lightest);
  display: flex;
  flex-direction: column;
  z-index: 99;
  position: fixed;
  top: 50%;
  width: 500px;
  max-width: 95vw;
  left: 50%;
  transform: translate(-50%, -50%);
}

p.help {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 5px;
  white-space: normal;
}

.popup-btn + .popup h2 {
  margin: 0 -1.5rem;
  margin-top: -1rem;
  padding: 0.5rem 1.5rem;
  margin-bottom: 10px;
}


.spacer {
  flex: 1;
}

.login-form {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.form-container form,
.form-container .form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  margin-bottom: 10px;
}

.form-control.full {
  grid-column: span 2;
}

h2 {
  font-weight: 500;
  font-size: 18px;
  padding: 5px;
  margin: 5px 0;
}

.form-container h2 {
  grid-column: span 2;
}

.form-label,
.form-container label {
  margin-top: 10px;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
}

.form-container .button-bar {
  grid-column: span 2;
}

.form-container .button-bar .btn {
  flex: 1;
  margin-top: 10px;
}

.message-error {
  padding: 10px;
  border-radius: var(--border-radius);
  background-color: #fdedeb;
  border: solid var(--border-width) rgb(250, 219, 216);
  font-size: 13px;
  color: black;
}

.message-warning {
  padding: 10px;
  border-radius: var(--border-radius);
  background-color: rgb(255, 243, 224);
  border: solid var(--border-width) rgb(255, 236, 179);
  font-size: 13px;
  color: black;
}

.message-success {
  padding: 10px;
  border-radius: var(--border-radius);
  background-color: rgb(235, 243, 186);
  border: solid var(--border-width) rgb(222, 236, 140);
  font-size: 13px;
  color: black;
}

.message.full {
  grid-column: span 2;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.nothing {
  padding: 50px 10px;
  text-align: center;
  border: solid var(--border-width) var(--ui-background-lightest);
  box-shadow: 0 1px 2px var(--ui-background-lightest);
  font-style: italic;
  background: var(--card-color);
  border-radius: var(--border-radius);
}

.tab-bar {
  border-bottom: solid 1px var(--ui-background-light);
  padding: 0 20px;
  margin: 0 -20px;
  display: flex;
  gap: 5px;
}

.tab-bar .btn {
  padding: 5px;
  font-weight: 300;
  background: none;
  border-bottom-color: transparent;
  box-shadow: none;
}

.tab-bar .btn.active {
  border-bottom: solid 2px var(--accent-dark);
}

.sub-tab-bar {
  margin-top: 10px;
}

table.details-table {
  width: 100%;
}

table.details-table td {
  white-space: pre-wrap;
  vertical-align: top;
  padding: 2px;
  border-bottom: solid 1px var(--ui-background-light);
  font-size: 12px;
  word-break: break-word;
}

.sidebar {
  border-right: solid 1px rgba(var(--foreground), 0.01);
  box-shadow: inset 0 0 3px rgba(var(--foreground), 0.1);
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  transition: all 200ms ease-in-out;
  padding-top: 32px;
}

.container > .paginator {
  margin-bottom: -15px;
}

.menu-item {
  padding: 2px;
  background: none;
  border-radius: var(--border-radius);
  display: block;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
  color: rgba(var(--sidebar-foreground), 0.5);
  transition: all 200ms ease-in-out;
  border: none;
  font-size: inherit;
}

.menu-item:hover:not(.big-logo) {
  background-color: var(--ui-background-lightest);
}

.menu-item.logo {
  margin-bottom: 20px;
  background: none;
}

.menu-item.active {
  color: rgba(var(--sidebar-foreground), 0.8);
  background-color: rgba(var(--sidebar-foreground), 0.05);
}

.layout {
  display: grid;
  grid-template-areas: "sidebar content";
  grid-template-columns: 55px 1fr;
  height: calc(100dvh - 1px);
}

.logo img {
  width: 35px;
  height: 35px;
}

.layout .content {
  grid-area: content;
  min-width: 0;
  overflow-y: auto;
  max-height: 100dvh;
}

.menu-item a {
  color: inherit;
}

span.tag,
.btn.tag {
  left: 0;
  top: calc(100% + 5px);
  display: inline-block;
  width: fit-content;
  padding: 0;
  border: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.33333;
  letter-spacing: 0.32px;
  background-color: var(--ui-background-light);
  color: rgba(var(--foreground), 0.8);
  min-width: 2rem;
  max-width: 100%;
  min-height: 1.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  margin: 0.25rem;
  border-radius: var(--border-radius);
  cursor: default;
  vertical-align: middle;
  word-break: break-word;
  margin-left: 0;
  margin-top: 0px;
  margin-bottom: 20px;
}

h1:has(.tag) {
  position: relative;
  padding-bottom: 30px;
}

h1 .tag {
  position: absolute;
}

h1 span.tag,
h1 .btn.tag {
  bottom: 0;
  top: auto;
}

a {
  color: rgb(var(--foreground));
}

.chart-container {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.diatech-card {
  background-color: var(--card-color);
  border: solid var(--border-width) rgba(var(--foreground), 0.05);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 2px var(--ui-background-lightest);
}

.diatech-card h5 {
  font-weight: 400;
  margin-bottom: 5px;
  margin-top: 0;
}

.card-title {
  color: #303030;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.social-login div {
    padding: 0 !important;
    justify-content: center !important;
}

@media screen and (max-width: 730px) {
  .form-control.full,
  .form-container .button-bar,
  .form-container h2 {
    grid-column: span 1;
  }

  .form-container form,
  .form-container .form {
    grid-template-columns: 1fr;
  }
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid var(--ui-background-lightest);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table td,
.table th {
  padding: 0.5rem;
  border-bottom: 1px solid var(--ui-background-lightest);
  font-size: 12px;
}

.table.table-compact td,
.table.table-compact th {
  padding: 0.1rem 0.5rem;
}

.table th {
  text-align: left;
  font-weight: 500;
}

.table td:has(.input) {
  padding: 0;
}

.table td .input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0.5rem;
  font-size: 12px;
  background-color: transparent;
}

.info-box {
  margin-top: 0;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  display: flex;
  gap: 10px;
  justify-content: left;
  align-items: center;
  flex-direction: row;
  margin-bottom: 5px;
}

@media screen and (max-width: 750px) {
  .info-box span {
    font-size: 15px;
  }

  .info-box {
    font-size: 13px;
  }
}