
trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none;
}

trix-toolbar * {
  box-sizing: border-box;
}
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
}
trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px;
}
trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 1.5vw;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }
}
trix-toolbar .trix-button-group-spacer {
  flex-grow: 1;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button-group-spacer {
    display: none;
  }
}
trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
}
trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-toolbar .trix-button.trix-active {
  background: #cbeefa;
  color: rgb(0, 0, 0);
}
trix-toolbar .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-toolbar .trix-button:disabled {
  color: rgba(0, 0, 0, 0.125);
}
@media (max-width: 768px) {
  trix-toolbar .trix-button {
    letter-spacing: -0.01em;
    padding: 0 0.3em;
  }
}
trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon {
    height: 2em;
    max-width: calc(0.8em + 3.5vw);
  }
}
trix-toolbar .trix-button--icon::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.6;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
@media (max-width: 768px) {
  trix-toolbar .trix-button--icon::before {
    right: 6%;
    left: 6%;
  }
}
trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}
trix-toolbar .trix-button--icon:disabled::before {
  opacity: 0.125;
}
trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%;
}
trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E");
}
trix-toolbar .trix-dialogs {
  position: relative;
}
trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5;
}
trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-toolbar .trix-input--dialog.validate:invalid {
  box-shadow: #F00 0px 0px 1.5px 1px;
}
trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none;
}
trix-toolbar .trix-dialog--link {
  max-width: 600px;
}
trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline;
}
trix-toolbar .trix-dialog__link-fields .trix-input {
  flex: 1;
}
trix-toolbar .trix-dialog__link-fields .trix-button-group {
  flex: 0 0 content;
  margin: 0;
}

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

trix-editor [data-trix-mutable] ::-moz-selection, trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection {
  background: none;
}
trix-editor [data-trix-mutable] ::selection, trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection {
  background: none;
}

trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection {
  background: highlight;
}
trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection {
  background: highlight;
}

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent;
}
trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight;
}
trix-editor .attachment {
  position: relative;
}
trix-editor .attachment:hover {
  cursor: default;
}
trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text;
}
trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in;
}
trix-editor .attachment__progress[value="100"] {
  opacity: 0;
}
trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center;
}
trix-editor .trix-button-group {
  display: inline-flex;
}
trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent;
}
trix-editor .trix-button:not(:first-child) {
  border-left: 1px solid #ccc;
}
trix-editor .trix-button.trix-active {
  background: #cbeefa;
}
trix-editor .trix-button:not(:disabled) {
  cursor: pointer;
}
trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
}
trix-editor .trix-button--remove::before {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.7;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 90%;
}
trix-editor .trix-button--remove:hover {
  border-color: #333;
}
trix-editor .trix-button--remove:hover::before {
  opacity: 1;
}
trix-editor .attachment__metadata-container {
  position: relative;
}
trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}
trix-editor .attachment__metadata .attachment__name {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
trix-editor .attachment__metadata .attachment__size {
  margin-left: 0.2em;
  white-space: nowrap;
}

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}
.trix-content * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.trix-content h1 {
  font-size: 1.2em;
  line-height: 1.2;
}
.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}
.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
  border-width: 0;
  border-right-width: 0.3em;
  margin-right: 0.3em;
  padding-right: 0.6em;
}
.trix-content li {
  margin-left: 1em;
}
.trix-content [dir=rtl] li {
  margin-right: 1em;
}
.trix-content pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 0.9em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}
.trix-content img {
  max-width: 100%;
  height: auto;
}
.trix-content .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
}
.trix-content .attachment a {
  color: inherit;
  text-decoration: none;
}
.trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
  color: inherit;
}
.trix-content .attachment__caption {
  text-align: center;
}
.trix-content .attachment__caption .attachment__name + .attachment__size::before {
  content: " •";
}
.trix-content .attachment--preview {
  width: 100%;
  text-align: center;
}
.trix-content .attachment--preview .attachment__caption {
  color: #666;
  font-size: 0.9em;
  line-height: 1.2;
}
.trix-content .attachment--file {
  color: #333;
  line-height: 1;
  margin: 0 2px 2px 2px;
  padding: 0.4em 1em;
  border: 1px solid #bbb;
  border-radius: 5px;
}
.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}
.trix-content .attachment-gallery .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}
.trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
  flex-basis: 50%;
  max-width: 50%;
}
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content {
  .attachment-gallery {
    & > action-text-attachment,
    & > .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%;
    }
    &.attachment-gallery--2,
    &.attachment-gallery--4 {
      & > action-text-attachment,
      & > .attachment {
        flex-basis: 50%;
        max-width: 50%;
      }
    }
  }
  action-text-attachment {
    .attachment {
      padding: 0 !important;
      max-width: 100% !important;
    }
  }
}
body.administrations {
  grid-table {
    form {
      @apply contents;
    }
    grid-template-columns: min-content repeat(3, minmax(0, 1fr));
    &.has-favorites {
      grid-template-columns: min-content min-content repeat(3, minmax(0, 1fr));
    }
  }

  .contents main {
    @apply flex flex-col flex-1;

    .main-info {
    }
    .additional-info {
      @apply w-full flex flex-row;

      .address {
        @apply flex-1;
      }
      .entity-information {
        @apply flex-1;
      }
    }
  }
}
.alert-wrapper {
  @apply fixed inset-x-0 top-0 flex items-end justify-end px-4 py-6 sm:p-6 z-30 pointer-events-none;
  .alert {
    @apply max-w-sm w-full shadow-lg px-4 py-3 rounded-sm relative text-white pointer-events-auto border-l-4 border-gray-300;
    &.info {
      @apply bg-gray-400 border-[#1F2937CC];
    }
    &.danger {
      @apply bg-red-400 border-[#991B1BCC];
    }
    main {
      @apply flex items-start;
      .message {
        @apply w-0 flex-1 pt-0.5;
        p {
          @apply text-sm leading-5 font-medium;
        }
      }
    }
    .close {
      @apply ml-4 flex-shrink-0 flex;
      button {
        @apply inline-flex text-white focus:outline-none focus:text-gray-300 transition ease-in-out duration-150;
      }
    }
  }
}
:root {
  --animation-duration: 1s;
  --animation-delay: 1s;
  --animation-repeat: 1;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes rotate-border {
  0% {
    background-position:
      left top,
      right bottom,
      left bottom,
      right top;
  }

  100% {
    background-position:
      left 15px top,
      right 15px bottom,
      left bottom 15px,
      right top 15px;
  }
}
@keyframes bounce-up {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes bounce-down {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes flash {
  0% {
  }
  50% {
    background: #fff085;
  }
  to {
  }
}

.flash {
  animation: flash 0.75s 2;
}

@keyframes highlight {
  0% {
    background-color: #ff5c002b;
    outline-color: #ff5c00;
    transform: scale(1);
  }

  14% {
    transform: scale(1.3);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.3);
  }

  70% {
    transform: scale(1);
  }
  99.99% {
    background-color: #ff5c002b;
    outline-color: #ff5c00;
  }
}

@keyframes vs-highlight {
  0% {
    color: #ff5c00;
  }
  100% {
    color: #ff5c00;
  }
}


.highlight {
  animation-duration: calc(var(--animation-duration) * 2);
  animation-fill-mode: both;
  animation-name: highlight;
  animation-timing-function: ease-in-out;
}

.vs-clicked {
  animation-duration: calc(var(--animation-duration) * 2);
  animation-name: vs-highlight;
}
body.approval-conditions {
  .main-content {
    @apply flex flex-row overflow-hidden;
    .master-list {
      @apply w-[355px] min-h-full border-e border-e-custom-gray bg-pale-ice-blue overflow-hidden;
      .tab {
        .headers {
          .icon {
            @apply mr-0;
          }
        }
        .pages {
          .page {
            @apply pt-0 overflow-hidden;
          }
        }
      }
      .items {
        @apply overflow-y-auto flex flex-col gap-1 p-2.5 h-full;
        .condition-list-item {
          @apply flex gap-2 flex-col cursor-pointer border border-transparent px-[15px] py-3.5 text-xs font-medium;
          header {
            @apply flex flex-row items-center;
            h2 {
              @apply font-semibold text-sm flex-1 text-night-fall;
            }
          }
          &:not(:first-child) {
            @apply border-t border-t-[#C3CAD5];
          }
          &:hover {
            @apply bg-white/50 rounded-md border border-[#C3CAD5];
          }
          &.active {
            @apply border-[#44446A] bg-[#44446A] rounded-md;
            header {
              h2 {
                @apply text-white;
              }
            }
          }
        }
      }
    }
    .toolbar {
      @apply flex flex-row gap-2 p-2.5 items-center border-b border-b-custom-gray;
      button {
        @apply cursor-pointer;
      }
      .searchbar {
        @apply flex flex-1 items-center;
        .searchbox {
          @apply flex-1 bg-white border-custom-gray border-1 pl-9;
        }
        .icon {
          @apply text-link-water mt-0.5;
        }
      }
      .icon {
        @apply w-4 h-4 text-dark-electric-blue;
      }
      .btn-submit .icon {
        @apply text-white;
      }
    }
    .pill-organizer {
      @apply line-clamp-2 gap-1;

    }
    .filter-pill {
      @apply inline-block gap-1 px-2 py-1 bg-white border-[#C2C2DE] border rounded-md text-cool-gray font-medium text-xs overflow-hidden text-ellipsis text-nowrap max-w-full;
      .icon {
        @apply  text-[#0F172A];
      }
      em {
        @apply font-semibold text-[#8983EA] font-mono uppercase;
      }
      li.active & {
        @apply bg-white/14 text-white border-white/40;
        .icon {
          @apply text-white;
        }
        em {
          @apply  text-[#D3D0FF];
        }
      }
    }
    .detail-view {
      @apply flex flex-col flex-1 px-5 py-2.5 gap-2.5;
      header {
        @apply flex p-0.5;
        h2 {
          @apply text-lg font-semibold;
        }
      }
      .icon {
        @apply text-dark-electric-blue inline;
      }
      dl {
        @apply grid gap-x-4 gap-y-2.5 items-center;
        grid-template-columns: auto 1fr;
        dt {
          @apply font-medium text-md text-dark-electric-blue text-right;
        }
      }
      .add-condition {
        @apply flex border-[#C2C2DE] rounded-md border px-2 py-1;
      }
    }
  }
  .actually-toggle {
    &>div:not(.hidden){
      @apply flex gap-2.5;
    }
  }
  [placeholder]:empty::before {
    @apply text-gray-300;
    content: attr(placeholder);
  }

  [placeholder]:empty:focus::before {
    content: "";
  }

  table#approval_condition_levels {
    @apply border-separate border-spacing-0 text-xs text-table-body;
    tr {
      td {
        @apply py-2 px-2.5 border-custom-gray bg-white;
        &:first-child {
          @apply w-full;
        }
        .filter-pill {
          .icon {
            @apply text-[#0F172A];
          }
        }
      }
    }
    tbody {
      tr:first-child {
        td {
          @apply bg-[#FBFBFD] text-black font-semibold items-center gap-2.5;
          &:first-child {
            @apply flex;
          }
        }
      }
      &:first-child tr:first-child {
        td {
          @apply border-t;
          &:first-child {
            @apply rounded-tl-md border-l;
          }
          &:last-child {
            @apply rounded-tr-md border-r;
          }
        }
      }
      &.dragover {
        @apply outline-accent outline-2;
      }
      tr td {
        @apply border-b border-b-pale-blue;
        &:first-child {
          @apply border-l;
          div {
            @apply flex gap-2.5 items-center;
          }
        }
        &:last-child {
          @apply border-r;
        }
        &:not(:first-child) {
          @apply text-right;
        }
        .icon.trash {
          @apply text-link-water cursor-pointer hidden group-hover:inline-block;
        }
        .icon.toggle {
          @apply text-black cursor-pointer;
        }
        .icon.badge {
          @apply fill-[#4CCC29]
        }
        span.grabber {
          @apply cursor-move hidden group-hover:inline-block text-link-water;
        }
      }
      tr:has(+ tr.collapse) span[data-action$="approval-conditions--level-user#toggle"] svg {
        @apply -rotate-90;
      }
      .avatar {
        @apply flex items-center justify-center text-3xs rounded-full bg-[#D9D9D9] text-cool-gray w-5 h-5;
      }
    }
    tfoot {
      &:first-child tr td {
        @apply rounded-t-md border-t;
      }
      tr {
        td {
          @apply p-2.5 rounded-b-md border-x border-b bg-[#f1f1f8];
          .btn-generic {
            @apply bg-slate-gray px-2 py-1.5 text-white font-semibold text-xs;
            .icon {
              @apply text-white;
            }
          }
        }
      }
    }
  }


  search .searchbox > span {
    li.active & {
      @apply text-black;
    }
    @apply gap-1 py-1 px-2.5 items-center leading-none bg-white border rounded-md;
    &:not(.hidden) {
      @apply inline-flex;
    }
  }
  search .searchbox > span {
    @apply mx-1;
  }
}
body.batches {
  .main-content {
    @apply flex flex-row overflow-hidden;
    .master-list {
      @apply w-[270px] min-h-full border-e border-e-custom-gray bg-pale-ice-blue overflow-hidden;
      & > header {
        @apply sticky top-0 flex flex-row items-center justify-center text-center;
        a {
          @apply font-semibold text-xs text-cool-gray p-2 border-b border-b-custom-gray;
          &.active {
            @apply text-[#121129] border-b-2 border-b-[#121129];
          }
          &:not(.upload) {
            @apply flex-1;
          }
          .icon {
            @apply w-4 h-4;
          }
        }
      }
      & > main.items {
        @apply overflow-y-auto flex flex-col gap-1 p-2.5 h-full;
        .batch.item {
          @apply cursor-pointer border border-transparent px-[15px] py-3 text-xs font-medium;
          &:not(:first-child) {
            @apply border-t border-t-[#C3CAD5];
          }
          &:hover {
            @apply bg-white/50 rounded-md border border-[#C3CAD5];
          }
          header {
            @apply flex flex-row gap-1;
            .date {
              @apply font-semibold text-[#121129] text-md mr-2;
            }
            .time {
              @apply flex-1 font-normal text-[#121129] text-md;
            }
          }
          p {
            @apply text-cool-gray mb-1;
            svg {
              @apply inline;
              &.connector {
                @apply text-slate-gray mb-1.5 ml-2;
              }
              &.document {
                @apply w-4 h-4 text-blue-bell;
              }
            }
          }
          &.active {
            @apply border-[#44446A] bg-[#44446A] rounded-md;
            .date,
            .time {
              @apply text-white;
            }
            p {
              @apply text-white;
              &.lowercase {
                @apply text-white/90;
              }
              svg.document {
                @apply text-link-water;
              }
            }
          }
        }
      }
    }

    .detail-view {
      @apply flex-1;
      main.form {
        @apply flex flex-row h-full;
        .thumbnails {
          @apply w-64 border-r border-r-custom-gray flex flex-col bg-[#E1E3E8] h-full;
          & > header {
            @apply min-h-[46px] items-center flex flex-row bg-pale-ice-blue p-2.5 border-b border-b-custom-gray;
            .icon {
              @apply inline cursor-pointer text-cool-gray w-5 h-5;
              &.disabled {
                @apply text-cool-gray/50;
              }
            }
            .page-tools {
              @apply flex-1 flex flex-row gap-3;
            }
            .new-tools {
              @apply flex;
            }
          }
          .list {
            @apply p-2.5 overflow-y-auto overflow-x-hidden h-full;
            .group {
              @apply bg-[#9CA4B4] flex flex-col rounded-md border-[#9CA4B4] text-white text-xs font-semibold;
              &:has(.selected) {
                @apply bg-accent border-accent;
              }
              & > header {
                @apply flex py-1.5 px-2.5;
                .title {
                  @apply flex-1 overflow-hidden whitespace-nowrap;
                  span {
                    @apply text-ellipsis overflow-hidden block;
                  }
                  input {
                    @apply rounded-sm bg-transparent text-xs p-0 font-normal w-full;
                  }
                  input,
                  &.edit span {
                    display: none;
                  }
                  &.edit input {
                    display: block;
                  }
                }
                .tools {
                  @apply flex gap-0.5 font-normal;
                  .icon {
                    @apply w-5 h-5 inline;
                  }
                  .menu-item .icon {
                    @apply w-4 h-4 inline;
                  }
                }
              }
              .thumbs {
                @apply flex bg-white/20 rounded-md m-1 flex-col;
                .thumb {
                  @apply flex flex-row items-center gap-2.5 py-1.5 px-2.5;
                  transition: border-radius 0.4s linear;
                  .image {
                    @apply h-20 min-w-16 rounded-sm flex items-center justify-center;
                    img {
                      @apply max-w-full max-h-full;
                    }
                  }
                  .filename {
                    @apply overflow-hidden text-nowrap text-ellipsis;
                  }
                  &.dragging {
                    @apply bg-[#847EE7];
                  }
                  &.selected {
                    @apply bg-black/30 border-white border-2; /* bg-[#4f4aa3] */
                  }
                  &:first-child.selected,
                  &:not(.selected) + .split + .selected,
                  &.selected + .split:hover + .selected {
                    @apply rounded-t-md;
                  }
                  &:last-child.selected,
                  &.selected:has(+ .split + .thumb:not(.selected)),
                  &.selected:has(+ .split:hover + .thumb.selected) {
                    @apply rounded-b-md;
                  }
                  &.selected + .split:not(:hover) + .selected {
                    @apply border-t-0;
                  }
                }
                .split {
                  @apply my-0 min-h-3 flex items-center relative cursor-pointer;
                  transition: min-height 0.4s;
                  margin-top: -6px;
                  margin-bottom: -6px;
                  hr {
                    @apply w-full border-dashed border border-white;
                  }
                  svg {
                    @apply absolute;
                    transform: translateX(32px);
                  }
                  &:hover {
                    @apply min-h-7;
                    hr {
                      @apply block;
                    }
                    svg {
                      @apply block;
                    }
                  }
                }
              }
            }
            .merge {
              @apply h-4 flex items-center flex-col text-accent cursor-pointer gap-1.5;
              transition: height 0.4s;
              .bell-curve {
                &:first-child {
                  @apply mt-[-2px];
                }
                &:last-child {
                  @apply mb-[-2px];
                }
              }
              &:hover {
                @apply h-[56px];
                .bell-curve,
                svg {
                  @apply inline;
                }
                hr {
                  @apply block;
                }
              }
            }
            .group:has(.selected) + .merge .bell-curve:first-child,
            .merge:has(+ .group .selected) .bell-curve:last-child {
              @apply bg-accent;
            }
            .dz-preview {
              @apply bg-[#9CA4B4] grid rounded-md border-[#9CA4B4] text-white text-xs font-semibold mt-3 gap-2.5 py-1.5 px-2.5;
              grid-template-columns: 1fr 1fr;
              .selector {
                @apply hidden;
              }
              .thumbnail {
                @apply h-20 min-w-16 rounded-sm flex items-center justify-center row-1 bg-white;
                img {
                  @apply max-w-full max-h-full;
                }
              }
              .dz-filename {
                @apply row-1 flex items-center justify-center;
                .file {
                  @apply overflow-hidden text-nowrap text-ellipsis max-w-[133px];
                  & > svg {
                    @apply hidden;
                  }
                }
              }

              .progress {
                @apply flex row-2 col-[1/-1];
                .dz-progress {
                  @apply flex-1 h-1.5 mt-1.5 bg-gray-200 rounded-full;
                }
                .dz-upload {
                  @apply block h-1.5 bg-accent rounded-full;
                }
              }
              &.dz-error .progress .dz-upload {
                @apply bg-[#DD2222];
              }
              &.dz-success .progress .dz-upload {
                @apply bg-[#0BCA13];
              }
              .eta {
                @apply row-3 col-[1/-1];
              }
            }
          }
        }
        .document-container {
          @apply flex-1;
          header {
            @apply min-h-[46px] flex bg-pale-ice-blue border-0 border-b-1 border-b-custom-gray rounded-none py-1 pl-8 pr-5 text-blue-bell text-xs gap-8;
            .page-nav {
              @apply p-0 gap-1.5;
              select {
                @apply bg-white border-cool-gray rounded-md px-2.5 py-2 font-bold;
              }
              .total-pages {
                @apply font-bold p-0;
              }
            }
            .zoom-tools {
              @apply flex-1 p-0 text-cool-gray;
              .icon {
                @apply w-5 h-5 inline cursor-pointer;
                &.disabled {
                  @apply text-cool-gray/50;
                }
              }
            }
            .actions {
              @apply p-0;
              .btn-submit {
                @apply text-md leading-full;
              }
              .icon {
                @apply w-4 h-4 inline cursor-pointer;
                &.large {
                  @apply w-6 h-6;
                }
              }
            }
          }
          .scrollspy-container {
            height: calc(100vh - var(--batch-document-top-height));
          }
        }
      }
    }
  }

  #batches-table table {
    @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;
    thead tr th {
      @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
      letter-spacing: 0.02em;
      svg:not(.hidden) {
        @apply inline;
      }
    }
    tbody tr {
      svg.chevron {
        @apply cursor-pointer;
      }
      &:hover,
      &:has(td input:checked) {
        @apply bg-gray-100;
      }
      &.close,
      &.files {
        svg.chevron {
          @apply -rotate-90;
        }
        td {
          @apply border-b border-gray-200;
        }
      }
      &:not(.close) {
        @apply bg-sky-100;
      }
      td {
        &:first-child,
        &:nth-child(2) {
          @apply w-12;
        }
        @apply py-3 pl-[30px] text-gray-900 text-md font-normal;
        letter-spacing: 0.01em;
        &.previews {
          @apply px-3;
          max-width: calc(100vw - 400px);
          & > div {
            @apply flex gap-2 overflow-scroll;
            figure {
              img {
                @apply w-60 max-w-60;
              }
              figcaption {
                @apply text-balance;
              }
            }
          }
        }
      }
    }
  }
  .upload-form {
    @apply h-full;
    header.toolbar {
      &:not(.hidden) {
        @apply min-h-[46px] flex bg-pale-ice-blue border-0 border-b-1 border-b-custom-gray rounded-none p-1 pr-5 text-blue-bell text-xs gap-8;
        /*@apply flex  bg-pale-ice-blue px-4 text-white items-center gap-4 divide-x divide-[#FFFFFF33];*/
      }
      .spacer {
        @apply flex-1;
      }
      .actions {
        @apply flex p-0 text-cool-gray items-center justify-center gap-2;
        .icon {
          @apply w-5 h-5 inline cursor-pointer;
          &.disabled {
            @apply text-cool-gray;
          }
        }
      }
      .submit {
        @apply p-0 text-white;
        .btn-submit {
          @apply text-md leading-full text-white;
        }
        .icon {
          @apply w-4 h-4 inline cursor-pointer;
        }
      }
      /*.submit {
        @apply flex flex-1 justify-end;
        .icon {
          @apply h-4 w-4;
        }
      }*/
    }
    .dropzone {
      @apply flex flex-col w-full h-full  bg-[#E1E3E8] text-sm font-medium text-gray-700;
      &.no-files {
        @apply items-center justify-center;
      }
      .dz-message {
        &:not(.hidden) {
          @apply w-56 flex flex-col items-center text-center;
        }
        .dz-button {
          @apply mt-5;
        }
      }
      &:not(.no-files) .table-header {
        display: flex;
      }
      .table-header {
        @apply font-semibold;
        display: none;
      }
      .table-header,
      .dz-preview {
        @apply border-b border-custom-gray text-md text-gray-900;
        & > div:nth-child(1) {
          @apply w-16 px-5 py-4;
        }
        & > div:nth-child(3) {
          @apply flex-1 px-8 py-4;
        }
        & > div:nth-child(4) {
          @apply w-52 px-8 py-4;
        }
        & > div:nth-child(5) {
          @apply w-40 px-8 py-4;
        }
      }
      .dz-preview {
        @apply flex;
        .progress {
          @apply flex;
          .dz-progress {
            @apply flex-1 h-1.5 mt-1.5 bg-gray-200 rounded-full;
          }
          .dz-upload {
            @apply block h-1.5 bg-accent rounded-full;
          }
        }
        &.dz-error .progress .dz-upload {
          @apply bg-[#DD2222];
        }
        &.dz-success .progress .dz-upload {
          @apply bg-[#0BCA13];
        }
        .thumbnail {
          @apply hidden;
        }
        .dz-filename ul {
          @apply text-md list-inside;
          li {
            @apply flex pt-2.5 ml-5 items-center;
            svg {
              @apply text-[#90CDFF] mr-1.5;
            }
          }
        }
        span[data-dz-name] {
          @apply flex;
          svg {
            @apply mr-1.5;
          }
          &.folder svg {
            @apply text-[#008CFF];
          }
          &.file svg {
            @apply text-[#90CDFF];
          }
        }
      }
    }
  }
  .batch-container {
    @apply flex-1;
    & > main {
      @apply pl-6 flex-1;
      & > div.batch {
        @apply w-full flex;
        height: calc(100vh - var(--batch-top-height));
      }
      & > div.batch .document-container > div {
        height: calc(100vh - var(--batch-document-top-height));
      }
      & > nav.breadcrumb {
        @apply mb-4;
      }
    }
  }
}

@keyframes cut {
  0% {
    transform: translateX(32px);
  }
  100% {
    transform: translateX(260px);
  }
}
@keyframes scissor-top {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-15deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes scissor-bottom {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
  0% {
    transform: rotate(0deg);
  }
}

.cut {
  .top {
    animation: 1s ease-in-out infinite scissor-top;
    transform-origin: bottom left;
  }
  .bottom {
    animation: 1s ease-in-out infinite scissor-bottom;
    transform-origin: top left;
  }
}
.bell-curve {
  @apply w-[216px] h-4 bg-[#9CA4B4];
  clip-path: path(
    "M216 0H0V0.246768C0 1.21505 0.784949 2 1.75323 2H63.6663C73.0648 2 82.306 4.41138 90.5062 9.0035L98.6375 13.557C101.498 15.1588 104.722 16 108 16C111.278 16 114.502 15.1588 117.363 13.557L125.494 9.0035C133.694 4.41138 142.935 2 152.334 2H214.247C215.215 2 216 1.21505 216 0.246768V0Z"
  );

  &.flipped {
    transform: rotate(180deg);
  }
}
.breadcrumbs {
  @apply flex-1 items-center grid grid-flow-col auto-cols-max gap-2.5
    text-gray-700 text-sm font-medium bg-white p-1.5 px-[25px]
    shadow-sm border-b border-custom-gray;

  span {
    @apply capitalize;
    a {
      @apply flex;
    }
  }
  .arrow {
    @apply text-gray-400;
  }
}
body.invoices,
body.contacts {
  .comments-list {
    @apply p-5 flex flex-col gap-2;
  }
  .comment {
    @apply bg-gray-200 p-4 rounded-md flex flex-col gap-3;
    box-shadow: 0px 1px 2px 0px #0000001a;
    .header {
      @apply flex gap-2;
      .avatar {
        @apply w-8 h-8 rounded-full;
        /* rounded-full border-indigo-500 border-2 w-7 h-7 */
      }
      .info {
        @apply flex flex-col gap-0.5 flex-1;
        .author {
          @apply font-semibold text-md;
        }
        time {
          @apply font-medium text-3xs text-[#AAB0B9];
        }
      }
      .actions {
        @apply flex gap-2 text-[#AAB0B9];
      }
    }
    .comment-body {
      @apply text-md font-normal;
      .mention {
        @apply font-semibold text-accent;
      }
    }
  }

  .comment-input-wrapper {
    @apply bg-gray-200 px-2 py-2.5;
    .comment-input {
      @apply rounded-3xl w-full border-2 flex bg-white px-3 py-2 font-medium text-md text-gray-400;
      trix-mentions {
        @apply contents;
      }
      &:has(trix-editor:focus) {
        @apply border-2 border-indigo-500;
      }
      trix-toolbar {
        @apply hidden;
      }
      trix-editor {
        @apply flex-1 outline-none border-0 overflow-x-hidden max-h-32 overflow-y-auto whitespace-pre-wrap min-h-4 p-0;
        scrollbar-width: thin;
        &:not(.condensed) {
          @apply min-h-32;
        }
        figure.attachment {
          @apply inline-block whitespace-normal;
          .mention {
            @apply font-semibold text-accent;
          }
        }
      }
      .mentions-popover {
        @apply absolute text-sm bg-white shadow-lg rounded-sm border border-gray-300 overflow-hidden;
        ul {
          li {
            @apply flex flex-1 gap-1.5 px-4 py-2 text-sm text-gray-700 items-center cursor-pointer;
            &[aria-selected="true"],
            &:hover,
            &:focus {
              @apply bg-gray-100;
            }
          }
        }
      }
      .actions {
        @apply flex gap-0.5 ml-2.5;
        &.condensed {
          .condense {
            display: none;
          }
        }
        &:not(.condensed) {
          .expand {
            display: none;
          }
        }
      }
    }
  }
}
body.contacts {
  turbo-frame#pagination {
    height: 0;
    display: block;
  }

  .contact-container {
    @apply flex flex-row gap-3 mb-3;
    .contact-list {
      @apply flex-1;
    }
    .contact-details {
      @apply relative w-[565px];
      #sidebar {
        @apply sticky top-1;
      }
    }
  }
  #contacts-table {
    tfoot,
    tfoot * {
      max-height: 1px;
      opacity: 0;
      padding: 0;
      border: none;
      /* visibility: hidden; might break lazy loading... */
    }

    table {
      @apply border-x border-gray-200 font-normal rounded-sm mt-3;

      input[type="checkbox"]:not(:checked) {
        @apply bg-transparent;
      }
      .avatar {
        @apply flex items-center justify-center bg-[#787878] text-white w-10 h-10;

        &.company {
          @apply rounded-full;
        }
        &.employee {
          @apply rounded-lg;
        }
      }
      thead tr th {
        @apply bg-[#1F2937CC] p-2 text-white text-left;

        &:first-child {
          @apply rounded-tl text-center;
        }
        &:last-child {
          @apply rounded-tr text-right;
        }
      }
    }
    .contact-list-section-header tr {
      &.contact-row {
        @apply cursor-pointer;
        &:hover td {
          @apply bg-gray-100;
        }
      }
      &:first-child th {
        @apply bg-[#F7F7F9] text-gray-700 capitalize text-left font-medium text-sm p-2;

        &:first-child,
        &:last-child {
          @apply text-center;
        }
      }
      td {
        @apply bg-white py-5 px-2 border-y text-left text-gray-700 text-md border-gray-200;

        &:first-child,
        &:last-child {
          @apply text-center;
        }

        p.name {
          @apply font-semibold text-sm;
          .icon {
            @apply w-4 h-4;
            &:first-child {
              @apply ml-0;
            }
          }

          svg {
            @apply ml-1.5;
          }
        }
        p.phone svg,
        p.email svg {
          @apply mr-1;
        }
      }
    }
  }
  #sidebar {
    @apply bg-white p-5 mt-3 w-[565px] border border-gray-200 rounded-sm;

    & section {
      @apply flex gap-2 items-center mb-3.5;

      &.header {
        contact {
          @apply inline-block;

          p {
            @apply flex gap-2;

            span {
              @apply flex gap-1 items-center;
            }
          }
        }
        &.company contact {
          .name {
            @apply font-semibold text-sm text-gray-700;
            .icon {
              @apply w-4 h-4;
            }
          }
          .info {
            @apply font-normal text-md text-gray-500;
          }
        }
        &.employee {
          @apply items-start bg-black text-white rounded-lg p-5 flex gap-3.5;

          contact {
            @apply flex flex-col flex-1;
          }
          .name {
            @apply text-lg font-semibold;
          }
          .title {
            @apply text-sm font-normal;
          }
          .identification {
            @apply flex items-center gap-2 text-gray-400 text-md font-normal;
          }
        }
      }
      &.contact-info {
        @apply grid grid-cols-2 gap-1.5;

        & > div {
          @apply flex items-center gap-1.5 p-2.5 bg-[#F7F7F9] font-normal text-sm text-gray-700;
        }
      }
      &.company-info {
        @apply flex;

        dl {
          @apply flex flex-1 flex-col rounded-sm border border-gray-200;
        }
        dt {
          @apply text-xs font-semibold text-gray-900;
        }
        dd {
          @apply text-sm font-medium;
        }
        .row {
          @apply flex border-gray-200;

          &:not(:last-child) {
            @apply border-b;
          }
          .field {
            @apply p-3 border-gray-200;

            &:nth-child(2) {
              @apply border-l;
            }
          }
        }
        address {
          @apply not-italic text-sm font-medium;
        }
      }
    }
    .avatar {
      @apply text-white;

      &.company {
        @apply flex items-center justify-center bg-[#787878] rounded-lg w-[34px] h-[34px];
      }
      &.employee {
        @apply flex items-center justify-center bg-white text-black rounded-full w-[70px] h-[70px];
      }
    }
  }
}
body.cost-centres {
  .new-cost-centre {
    @apply mb-2;
  }
  .cost-centre-main {
    @apply flex gap-6;

    #cost-centres-table {
      @apply flex-1;

      table {
        @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;

        thead tr th {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
          letter-spacing: 0.02em;
        }
        tbody tr td {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 text-md font-normal;
          letter-spacing: 0.01em;
        }
      }
    }
  }
  .cost-centre-sidebar {
    @apply min-w-[440px];

    .sidebar {
      @apply overflow-y-scroll rounded-sm border border-gray-200;
    }
    .panel {
      @apply py-3;

      .row {
        .field {
          @apply border-gray-200 border-t border-r p-3 flex text-sm;

          &:first-child {
            @apply border-l;
          }
        }
        &:first-child .field {
          &:first-child {
            @apply rounded-tl;
          }
          &:last-child {
            @apply rounded-tr;
          }
        }
        &:last-child .field {
          @apply border-b;

          &:first-child {
            @apply rounded-bl;
          }
          &:last-child {
            @apply rounded-br;
          }
        }
      }
    }
    section {
      &.totals {
        @apply px-3 pb-4 bg-white;

        .panel {
          .totals .field:first-child {
            @apply flex flex-row justify-end;
          }
          .row {
            @apply grid;
            grid-template-columns: 1fr 2fr;

            .field .value {
              @apply flex flex-1 justify-end;
            }
            &.total .field {
              @apply font-bold;
            }
          }
        }
      }
      &.filter {
        @apply px-3 pb-4 bg-white flex;
        form {
          @apply flex flex-1;
          .input-group {
            @apply flex flex-1;
            input {
              @apply flex-1;
            }
          }
        }
      }
      &.line-items {
        @apply bg-[#DFEDF0];
        & > header {
          @apply px-3 py-1.5 bg-[#9AC0C8] font-semibold text-sm flex;
          span {
            @apply flex-1 flex items-center;
            svg {
              @apply mr-1.5;
            }
          }
          .actions {
            @apply flex items-center gap-1;
            a {
              @apply flex items-center;
            }
            svg {
              @apply cursor-pointer;
              &.close {
                @apply -rotate-90;
              }
            }
          }
        }
        & > main {
          @apply flex flex-col divide-y divide-dashed divide-[#00000033];

          .panel {
            @apply px-3;
          }
        }
      }
    }
    .line-item .row {
      @apply flex;

      .field {
        @apply bg-white flex flex-col;
      }
      .label {
        @apply font-semibold text-xs;
      }
      .value {
        @apply font-medium text-sm;
      }
    }
  }
}
body.devise {
  main#main {
    @apply px-20 py-10 h-screen bg-white gap-20;
    grid-template-columns: 1fr 1fr;
    .showcase-panel {
      @apply rounded-[10px];
      background: linear-gradient(180deg, #5a6886 0%, #151920 100%);
    }
    .main-panel {
      @apply flex flex-col;
      & > main {
        @apply flex flex-col flex-1 gap-8;
        & > header {
          @apply flex flex-col w-[395px] text-center gap-[15px] mx-auto;
          h2 {
            @apply text-4xl text-black font-semibold;
          }
          p {
            @apply font-normal leading-[21px] text-dark-electric-blue text-sm;
          }
        }
        & > div,
        & > form {
          @apply flex flex-col gap-5;
          .credentials {
            @apply flex flex-col;
            .input {
              @apply border-custom-gray;
              &:first-child:not(:last-child) {
                @apply border-b-0;
              }
              &:first-child {
                @apply rounded-t-md;
              }
              &:last-child {
                @apply rounded-b-md;
              }
              .icon {
                @apply text-dark-electric-blue;
              }
            }
          }
          a {
            @apply text-accent;
          }
          .remember {
            @apply flex font-medium text-md text-dark-electric-blue;
            .check {
              @apply flex-1 flex gap-2.5;
            }
            .forgot-password {
            }
          }
          .submit {
            @apply flex mt-2.5;
            .btn {
              @apply flex-1 p-3;
              .icon {
                @apply w-5 h-5 inline;
              }
            }
          }
          .redirecting {
            @apply text-center text-dark-electric-blue;
          }
        }
        .alternate-sign-in,
        .alternate-actions {
          @apply flex flex-col gap-5;
          .or {
            @apply flex flex-row items-center gap-2.5 text-[#A5B0C8] text-md leading-full font-medium;
            hr {
              @apply flex-1 h-0 border-t-link-water;
            }
          }
          .buttons {
            @apply flex flex-row items-center gap-2.5  font-semibold leading-full;
            .btn {
              @apply flex-1 items-center  p-2.5;
              .icon {
                @apply w-6 h-6 inline;
              }
            }
          }
        }
        .alternate-actions {
          @apply flex;
        }
      }
      footer {
        @apply text-[#A5B0C8] text-xxs font-normal leading-[13px] text-center flex flex-col gap-3.5;
        a {
          @apply font-semibold underline;
        }
        .origin {
          @apply flex items-center justify-center gap-2.5 text-dark-electric-blue font-semibold;
        }
        .icon {
          @apply text-[#EC0000] inline;
          &.heart {
            @apply w-5 h-5;
          }
        }
      }
    }
  }
}
remote-modal-container {
  dialog {
    @apply backdrop:bg-black/80;
  }
}
remote-dialog-container:has(> dialog:open) {
  @apply absolute bg-black/80 top-0 left-0 h-full w-full flex items-center justify-center z-[100];
}
remote-modal-container,
remote-dialog-container:has(> dialog:open) {
  dialog {
    @apply m-auto rounded-sm py-4 px-5;
    &.condensed {
      @apply px-3;
    }
    header {
      @apply font-semibold text-sm mb-5 flex;
      h2.modal-title {
        @apply flex-1 flex gap-2;
        &.danger {
          @apply text-danger;
        }
      }
      svg.icon {
        @apply w-5 h-5 inline;
      }
      svg.close {
        @apply w-5 h-5 inline cursor-pointer;
      }
    }
    main {
      @apply font-normal text-md;
    }
    footer {
      @apply mt-5 flex justify-end;
      .btn {
        @apply text-xs ml-2.5;
      }
    }
  }
}

#trash-confirm-modal {
  main {
    h3 {
      @apply mb-2.5;
    }
    textarea {
      @apply w-full;
    }
  }
}
.flash-notification-wrapper {
  @apply fixed inset-x-0 top-0 flex flex-col gap-1 items-end px-4 py-6 sm:p-6 justify-end z-30 pointer-events-none;
  .flash-notification {
    @apply max-w-sm w-full shadow-lg px-4 py-3 rounded relative  border-l-4 pointer-events-auto
    bg-gray-200 border-gray-800 text-black;

    &.info {
      @apply bg-gray-400 border-[#1F2937CC];
    }
    &.info {
      @apply bg-amber-600 border-amber-900;
    }
    &.danger {
      @apply bg-red-400 border-[#991B1BCC] text-white;
      .close button {
        @apply text-white;
      }
    }

    .message-wrapper {
      @apply ml-3 w-0 flex-1 pt-0.5;
      .message {
        @apply text-sm leading-5 font-medium;
      }
    }

    .close {
      @apply ml-4 flex-shrink-0 flex;
      button {
        @apply inline-flex text-black focus:outline-none focus:text-gray-300 transition ease-in-out duration-150;
      }
    }
  }
}
form {
    input,select,textarea {
        &.invalid {
            @apply bg-red-50 text-red-500 border-red-400 focus:outline-red-600;
        }
        &:not(.invalid) {
            @apply border-gray-400 focus:outline-blue-600;
        }
    }
    p.error {
        @apply bg-red-50 text-red-500 border-red-400 focus:outline-red-600;
    }
}
body {
  @apply max-h-screen overflow-hidden bg-blue-gray;

  scrollbar-color: var(--color-blue-gray) var(--color-gray-200);

  & > header {
    @apply shadow-sm border-b border-custom-gray;

    .top-nav {
      @apply mx-auto flex items-center justify-between px-[25px] min-h-[60px];

      .aux-nav {
        @apply items-center gap-4 lg:flex lg:flex-1 lg:justify-end;
        .notifications,
        .settings,
        .trashcan {
          @apply text-gray-500;
          &:hover {
            @apply text-table-body;
          }
        }
        .separator {
          @apply border-e border-gray-200 leading-8;
        }
        .user-menu {
          .menu {
            @apply mt-[30px];
          }
          .user {
            @apply flex flex-row gap-2 cursor-pointer;
            .picture {
              @apply flex items-center;
            }
            .user-info {
              @apply flex-1 flex flex-col;
              .name {
                @apply font-semibold text-sm text-gray-900;
              }
              .organization {
                @apply font-normal text-xs text-gray-600;
              }
            }
          }
        }
      }
    }
    &:has(+ .breadcrumbs) {
      @apply !shadow-none border-pale-blue;
    }
    .company {
      @apply flex items-center content-center ml-8 py-4 h-[60px];

      .inner {
        @apply flex gap-2;

        span {
          @apply flex items-center text-sm font-semibold;
        }
      }
    }
  }
}
body {
  header + main#main {
    min-height: calc(100vh - var(--header-height));
    height: calc(100vh - var(--header-height));
  }
  header + nav.breadcrumbs + main#main {
    min-height: calc(100vh - var(--breadcrumbs-height) - var(--header-height));
    height: calc(100vh - var(--breadcrumbs-height) - var(--header-height));
  }
}
main#main {
  @apply w-full grid grid-rows-[1fr];

  grid-template-columns: auto 1fr;
}
.main-content {
  @apply w-full px-2.5 pt-2.5 row-1 overflow-y-scroll;
  &.no-padding {
    @apply px-0 pt-0;
  }
}
.side-menu {
  @apply flex-none w-[126px] flex flex-row  bg-gray-200 transition-all row-1 border-e border-e-custom-gray overflow-hidden;

  #menu-toggle {
    @apply hidden;
  }

  .administration-menu,
  .global-menu {
    @apply flex flex-col h-full gap-2 p-2.5 w-[126px] transition-all;
  }
  #menu-toggle:checked ~ .administration-menu,
  #menu-toggle:checked ~ .global-menu {
    transform: translateX(-126px);
  }

  .separator {
    @apply flex-1;
  }

  .item {
    @apply p-2.5 font-semibold text-xs rounded-md text-[#44446A] stroke-[#44446A];
    &.back-navigation,
    &.back-navigation:hover {
      @apply flex items-center p-0 text-white  bg-[#44446A] rounded-full leading-6 cursor-pointer;
      svg.icon {
        @apply w-6 h-6 fill-white stroke-[#44446A] p-0 m-0;
      }
      span {
        @apply inline-block overflow-ellipsis overflow-hidden text-nowrap;
      }
    }
    &.cancel-navigation {
      @apply bg-[#e1e1ea] flex items-center p-0 rounded-full leading-6 cursor-pointer;
    }
    span {
      @apply w-full block overflow-ellipsis overflow-hidden text-nowrap text-center;
    }
    svg.icon {
      @apply w-6 h-6 inline text-[#44446A] stroke-[#44446A] mr-0;
    }
    &:hover {
      @apply bg-[#e1e1ea];
    }
    a {
      @apply flex flex-col items-center justify-center gap-0.5;
    }
    &.active,
    &.active svg.icon {
      @apply text-white stroke-white bg-[#44446A];
    }
  }
}
.tag {
  @apply border border-pale-blue px-2.5 py-1 rounded-full inline-flex flex-row gap-1 text-xxs text-table-body font-normal text-nowrap items-center select-none;
  svg {
    @apply w-4 h-4 text-custom-gray;
  }
  &.reviewed {
    svg {
      @apply text-[#4DB43D];
    }
  }
  &.failed {
    svg {
      @apply text-[#E2271D];
    }
  }
}

.inline-badge {
  @apply flex items-center justify-center px-2.5 py-1 text-cloud-burst text-xxs font-medium rounded-md select-none;
}
.btn-submit {
  .inline-badge {
    @apply bg-[#B7B3FD] ml-2.5;
  }
}

.btn-submit {
  @apply relative justify-center rounded-md py-2 px-4 text-sm font-medium inline-block cursor-pointer select-none
    bg-accent text-white
    hover:bg-[#3f38b7];
  /*focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2*/

  &:disabled {
    @apply bg-accent/20 cursor-not-allowed;
  }
  kbd {
    @apply bg-indigo-500 px-1 py-0.5 rounded-sm tracking-[.25em];
  }
}
div.btn-submit,
span.btn-submit {
  @apply inline-flex items-center;
}

.btn-generic,
.btn-cancel,
.btn-delete {
  @apply relative justify-center rounded-md py-2 px-4 text-sm font-medium inline-block cursor-pointer select-none
    bg-zircon text-black
    hover:bg-[#d2d7dd];

  &:disabled {
    @apply bg-slate-50 cursor-not-allowed;
  }
  kbd {
    @apply bg-slate-100 px-1 py-0.5 rounded-sm tracking-[.25em];
  }
}
.btn-delete {
  @apply bg-danger text-white hover:bg-[#b31c15];
}

.btn-group {
  @apply grid grid-flow-col auto-cols-max bg-white border border-pale-blue rounded-sm divide-x divide-pale-blue;
  box-shadow: 1px 2px 2px 0px #00000005;

  & > * {
    @apply p-1.5;
  }
  svg {
    @apply text-gray-400;
  }
}

.btn-condensed {
  @apply px-3 py-1;
}
.btn-condensed-2 {
  @apply p-2.5;
}
.btn-condensed-3 {
  @apply p-1.5;
}
.btn-iconized {
  @apply inline-flex gap-1.5;
}
.btn-dropdown {
  @apply bg-white border rounded-sm w-full px-[8.25px] py-2.5 flex gap-1 items-center cursor-pointer border-pale-blue;

  &.round {
    @apply rounded-full;
  }
  &.semi-condensed {
    @apply px-3 py-1;
  }
  &.condensed {
    @apply p-0.5;
  }
  .icon {
    @apply text-slate-gray mr-1.5 w-4 h-4;
  }
}
.btn-sm {
  @apply text-md;
}

[type="checkbox"]:checked,
[type="radio"]:checked {
  background-color: currentColor;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-color: transparent;
}
[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGZpbGw9JyNmZmYnIHZpZXdCb3g9JzAgMCAxNiAxNic+PHBhdGggZD0nTTEyLjIwNyA0Ljc5M2ExIDEgMCAwIDEgMCAxLjQxNGwtNSA1YTEgMSAwIDAgMS0xLjQxNCAwbC0yLTJhMSAxIDAgMCAxIDEuNDE0LTEuNDE0TDYuNSA5LjA4Nmw0LjI5My00LjI5M2ExIDEgMCAwIDEgMS40MTQgMCcvPjwvc3ZnPg==");
}

input[type="checkbox"] {
  @apply appearance-none
    border-1 border-custom-gray
    text-accent shadow-sm
    focus:ring focus:ring-offset-0 focus:ring-indigo-200/50
    w-[1rem] h-[1rem];
}
input[multiple],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
select,
textarea {
  @apply rounded-sm border border-custom-gray py-1 px-2;
}
input[type="checkbox"],
input[type="radio"],
select {
  @apply rounded-sm;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  @apply bg-accent;
}

input[multiple]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="email"]:focus,
input[type="month"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="week"]:focus,
select:focus,
textarea:focus {
  @apply ring-accent ring-1;
}

input[type="checkbox"]:checked:focus,
input[type="checkbox"]:checked:hover,
input[type="checkbox"]:indeterminate,
input[type="radio"]:checked:focus,
input[type="radio"]:checked:hover {
  @apply bg-indigo-500 ring-accent ring-1;
}
input[type="checkbox"]:disabled {
  @apply opacity-50 cursor-not-allowed;
}
select.no-arrow {
  background-image: none;
}
.icon:not(.hidden) {
  @apply inline;
}
.icon-4 {
  @apply inline w-4 h-4;
}
.icon-5 {
  @apply inline w-5 h-5;
}
.icon-6 {
  @apply inline w-6 h-6;
}

.iconized-input {
  @apply border border-custom-gray grid p-3 gap-2.5;
  grid-template-columns: auto 1fr auto;
  .icon {
    @apply row-1 col-1 w-6 h-6 cursor-pointer;
    &:not(.hidden) {
      @apply inline;
    }
    &.end {
      @apply col-3;
    }
  }
  input {
    @apply border-0 row-1 col-2 focus:outline-0 focus:ring-0 font-medium text-sm leading-full p-0;
  }
}
*[data-controller*="check-availability"] {
  &.available {
    input {
      @apply border-2 border-green-700 ring-green-700;
    }
    .availability-result {
      display: none;
    }
  }
  &.unavailable {
    input {
      @apply border-2 border-red-700 ring-red-700;
    }
    .availability-result {
      @apply text-red-700;
    }
  }
}
.input-group {
  @apply flex bg-white items-center rounded-md border-custom-gray border;

  &.md {
    @apply text-md;
    .prepend > .icon,
    .append > .icon {
      @apply w-4 h-4 inline;
    }
  }

  &.inline {
    @apply inline-flex;
  }
  input {
    @apply border-0 flex-1;
    &::placeholder {
      @apply text-link-water;
    }
  }
  input + .append {
    @apply rounded-r-md pl-0;
  }
  .prepend,
  .append {
    @apply px-2;
    & > .icon {
      @apply w-5 h-5 inline text-link-water;
    }
  }
  .prepend + input {
    @apply rounded-r-md pl-0;
  }
  input:focus,
  .prepend:focus,
  .append:focus {
    @apply ring-0 outline-none border-custom-gray;
  }
  &:has(input:focus),
  &:has(.prepend:focus),
  &:has(.append:focus) {
    @apply rounded ring-accent ring-1;
  }
}

.pill,
.trix-content .pill {
  @apply rounded-md! gap-1 p-1 px-2.5 items-center leading-none;
  &:not(.hidden) {
    @apply inline-flex;
  }
  &.md {
    @apply px-2;
  }
  &.sm {
    @apply px-2 text-sm;
  }
  &.xs {
    @apply px-2 text-xs;
  }
  &.xxs {
    @apply px-2 text-xxs;
  }
  &.xxxs {
    @apply px-2 text-3xs;
  }
  &.default,
  &.variable {
    @apply border border-custom-gray text-gray-600 font-normal text-md;
  }
  &.variable {
    @apply font-mono;
  }
  &.light {
    @apply bg-transparent text-slate-gray border border-link-water;
  }
  &.dark {
    @apply bg-shadow-slate text-white;
  }
  &.info {
    @apply bg-blue-700 text-white;
  }
  &.warning {
    @apply bg-[#FF5C00] text-white;
  }
  &.danger {
    @apply bg-red-700 text-white;
  }
  &.accent {
    @apply bg-accent text-white;
  }
  &.queued {
    @apply bg-yellow-600 text-white;
  }
  &.processing {
    @apply bg-orange-600 text-white;
  }
  &.failed {
    @apply bg-red-600 text-white;
  }
  &.unreviewed {
    @apply bg-purple-600 text-white;
  }
  &.reviewed {
    @apply bg-blue-600 text-white;
  }
  &.booked {
    @apply bg-green-600 text-white;
  }
  &.menu {
    @apply bg-[#C2C2DE]  text-[#44446A] border-0;
  }
  .icon {
    @apply w-4 h-4 m-0;
  }
}

.multi-toggle {
  @apply flex rounded-md p-1 bg-[#DDE1ED] m-auto; /* bg-gray-200*/

  &.round {
    @apply rounded-full;

    label {
      @apply rounded-full;
    }
    a {
      @apply rounded-full;
    }
  }
  input[type="radio"] {
    display: none;
  }
  label {
    @apply flex flex-1 items-center justify-center rounded-sm px-3.5 py-1 text-gray-400 text-md font-semibold select-none;

    .icon {
      @apply mr-2.5;
    }
    &:has(> input[type="radio"]:checked) {
      @apply text-black bg-white drop-shadow;
    }
    &:not(:has(> input[type="radio"]:disabled)) {
      @apply cursor-pointer;

      &:not(:has(> input[type="radio"]:checked)):hover {
        @apply bg-gray-100;
      }
    }
  }
  a {
    @apply rounded-md px-5 py-2 font-semibold text-xs text-[#3E3C61] leading-full;
    &.active {
      @apply bg-white text-midnight-blue;
    }
  }
}

.avatar {
  @apply select-none;
}

.avatar-group {
  @apply flex items-center justify-center;

  .wrapper {
    @apply flex flex-row-reverse;
    .user {
      @apply flex items-center justify-center text-white rounded-full w-7 h-7 border text-sm;
      &:nth-child(1) {
        @apply bg-[#4A467E];
      }
      &:nth-child(2) {
        @apply bg-[#7E7AAF];
      }
      &:nth-child(3) {
        @apply bg-[#ADAAD2];
      }
      img {
        @apply rounded-full;
      }
      &:not(:first-child) {
        @apply mr-[-8px];
      }
    }
  }
  &.small {
    .wrapper {
      .user {
        @apply w-5 h-5 text-xxs;
      }
    }
  }
}

.dropdown {
  @apply inline-block relative;
  svg,
  img {
    @apply cursor-pointer;
  }
  .menu {
    @apply absolute top-4 right-0 z-10 mt-6 w-screen max-w-max bg-white rounded-sm font-normal;
    &.right {
      right: -13px;
    }
    &.left {
      right: -8px;
    }

    .arrow-up {
      @apply absolute bg-white border-t border-t-gray-300 border-l border-l-gray-300;
      width: 15px;
      height: 15px;
      transform: rotateZ(45deg) translateX(calc(-50% - 3px));
      &.right {
        right: 8px;
      }
      &.left {
        left: 18px;
      }
      &:has(+ .inner-menu .menu-item:first-child *:hover),
      &:has(+ .inner-menu .menu-item:first-child *:focus),
      &:has(+ .menu-item *:hover),
      &:has(+ .menu-item *:focus) {
        @apply bg-gray-100;
      }
    }

    &.center {
      left: 50%;
      transform: translateX(-50%);
      .arrow-up {
        left: 50%;
      }
    }
    &.tight {
      @apply mt-3.5;
    }
    &.allow-overflow .inner-menu {
      @apply overflow-visible;
    }

    .inner-menu {
      @apply text-sm bg-white shadow-lg rounded-sm border border-custom-gray overflow-hidden;
      li {
        @apply list-none;
      }
      .menu-item {
        @apply flex;
        a,
        span {
          @apply flex flex-1 gap-1.5 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 focus:bg-gray-100 items-center cursor-pointer;
        }
        .icon {
          @apply cursor-pointer;
        }
        &.disabled {
          @apply cursor-not-allowed;
          .icon {
            @apply cursor-not-allowed;
          }
          a,
          span {
            @apply text-gray-400;
          }
        }
        &.small {
          @apply text-xs!;
          .icon {
            @apply inline w-4! h-4!;
          }
        }
      }
    }
  }
}

table {
  tbody tr {
    &:hover,
    &:has(td:first-child input:checked) {
      @apply bg-gray-100;
    }
    &:focus {
      @apply outline-offset-2 outline-1 outline-accent rounded-sm;
    }
  }
}

.alert {
  @apply p-3 border rounded-sm ml-auto mr-auto w-96 block mt-2;
}
.alert-error {
  @apply bg-red-300 border-red-900;
}

.star-input {
  @apply cursor-pointer;
  input {
    display: none;
    & + svg {
      @apply stroke-accent transition-all;
    }
    &:checked + svg {
      @apply fill-accent;
    }
  }
}

.comment {
  .comment-header {
    @apply flex justify-between;

    .datetime {
      @apply text-gray-500 text-xs;
    }
  }
  .comment-body {
  }
}

.tiles {
  @apply flex flex-wrap gap-6;
  .tile {
    @apply flex flex-col gap-4 border rounded-sm border-custom-gray bg-white justify-center items-center p-4 min-w-36 min-h-36 font-semibold;
  }
  .tile svg {
    @apply w-12 h-12 text-gray-600;
  }
}
@utility grid-table-* {
  grid-template-columns: repeat(--value(integer), minmax(0, 1fr));
}

grid-table {
  @apply grid border border-custom-gray rounded-md w-full bg-white;
  grid-table-header,
  grid-table-body {
    @apply contents;
  }
  grid-table-filter-bar,
  grid-table-header {
    @apply row-1 rounded-t-md;
    grid-column: 1 / -1;
  }
  grid-table-filter-bar + grid-table-header,
  grid-table-filter-bar + grid-table-header > grid-table-toolbar {
    @apply row-2 rounded-none;
  }
  grid-table-row {
    @apply grid grid-cols-subgrid;
    grid-column: 1 / -1;
    .no-results {
      grid-column: 1 / -1;
    }
  }
  grid-table-filter-bar {
    @apply bg-gray-200 border-b border-custom-gray p-2.5 flex flex-col gap-2 px-5 py-2.5;
    .search-reset {
      @apply flex gap-2;
      search {
        @apply border-1 border-custom-gray bg-white rounded-md flex-1;
        .searchbox,
        .searchbox:focus {
          @apply w-full;
        }
      }
    }
    .filters {
      @apply flex gap-2.5;
      .filter-pill {
        .inner-pill {
          @apply bg-white border border-custom-gray rounded-md flex flex-row items-center gap-2.5 px-2.5 py-1.5 text-cloud-burst;
          label {
            @apply font-semibold text-xs;
          }
          .values {
            @apply flex flex-row items-center gap-1 text-xs;
            .value,
            .option {
              @apply text-xxs font-medium px-2.5 py-1 bg-pale-blue rounded-md select-none;
            }
          }
          .remove svg {
            @apply w-5 h-5 cursor-pointer;
          }
        }
      }
      .menu {
        @apply mt-7;
      }
    }
  }
  grid-table-header {
    & > *:not(grid-table-toolbar) {
      @apply border-b border-custom-gray p-2.5 text-black font-semibold text-left text-xs flex items-center gap-1;
      letter-spacing: 0.02em;
    }
    grid-table-toolbar {
      @apply border-b border-custom-gray py-1.5 px-3 text-black text-left text-xs items-center gap-1 row-1;
      grid-column: 2 / -1;
      &:not(.hidden) {
        @apply flex;
      }
      .btn {
        @apply text-xs;
        svg.icon {
          @apply w-4 h-4 mr-1;
        }
      }
    }
    &:has(> grid-table-toolbar:not(.hidden)) > *:not(:first-child, grid-table-toolbar) {
      @apply hidden;
    }
  }
  grid-table-body {
    grid-table-row {
      & > * {
        @apply border-b border-custom-gray px-2 py-2.5 text-table-body text-xs font-normal flex items-center;
        letter-spacing: 0.01em;
        .action.icon {
          @apply h-5 w-5 inline text-blue-bell;
          &:hover {
            @apply text-table-body;
          }
        }
      }
      &:last-child > * {
        @apply border-none;
      }
      &:has(> *:first-child input:checked) > * {
        @apply bg-gray-100;
      }
      &:focus {
        @apply outline-offset-2 outline-1 outline-accent rounded-md;
      }
      &:hover > * {
        @apply bg-gray-200;
      }
      &:last-child > *:first-child,
      &:last-child:hover > *:first-child {
        @apply rounded-bl-md;
      }
      &:last-child > *:last-child,
      &:last-child:hover > *:last-child {
        @apply rounded-br-md;
      }
    }
  }
  &.scrollable {
    grid-table-body {
      @apply grid grid-cols-subgrid overflow-y-scroll;
      grid-column: 1 / -1;
      max-height: calc(100vh - var(--middle-top-height));
    }
  }
  .dropdown.filter,
  .dropdown.filter-pill {
    &.active svg {
      @apply bg-black text-white rounded-md;
    }
    .menu {
      @apply max-w-[219px];
      .inner-menu {
        @apply flex flex-col px-5 py-2.5;
        .inputs {
          @apply flex flex-col py-2.5 gap-0.5;
          .from,
          .till {
            @apply flex items-center;
            label {
              @apply flex-1;
            }
          }
          input {
            @apply max-w-full;
          }
          .option {
            @apply bg-[#F9F9FD] p-2.5 flex flex-row gap-2.5 rounded-sm;
            label {
              @apply text-xs font-normal;
            }
          }
        }
        .actions {
          @apply p-2.5 flex flex-row gap-2.5 border-t border-t-pale-blue;
          .btn-cancel,
          .btn-submit {
            @apply p-2.5 text-xs;
          }
        }
        input {
          @apply font-normal;
        }
      }
    }
  }
}
body {
    .hero-img {
        width: 80%;
        margin: 0 auto;
    }
}
[data-controller="inline-form"] {
  &.submitted *:invalid {
    @apply outline-danger outline;
  }
}
body.integrations {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .integrations-content {
    @apply flex;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium bg-white;
        }
      }
    }
    .dropdown {
      @apply cursor-pointer;
      .menu {
        @apply max-w-full;
      }
    }
    #integrations-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(2, 1fr);
      .integration-row {
        @apply contents;
        &.no-integrations div {
          grid-column: span 4;
          @apply flex items-center p-3;
        }
        & > a {
          @apply contents;
        }
        .check,
        .name,
        .status,
        .webhooks,
        .actions {
          @apply flex items-center p-3 border-b border-gray-200;
        }
        .webhooks {
          svg {
            @apply ml-1;
            &.enabled {
              @apply text-green-800;
            }
            &.disabled {
              @apply text-red-800;
            }
          }
        }
        &:last-child {
          & > .check,
          & > .name,
          & > .status,
          & > .webhooks,
          & > .actions,
          & > a {
            @apply border-b-0;
          }
        }
        &:hover {
          & > .check,
          & > .name,
          & > .status,
          & > .webhooks,
          & > .actions,
          & > a {
            @apply bg-gray-100;
          }
        }
        button {
          @apply cursor-pointer;
        }
      }
    }
    .form {
      .row {
        .field {
          .redirect-uri {
            .icon {
              @apply cursor-pointer w-5 h-5;
            }
          }
          .status {
            .icon {
              @apply cursor-help w-5 h-5;
            }
          }
        }
      }
    }
  }
}
body.invoices {
  .main-content {
    &.edit,
    &.duplicates {
      @apply p-0 overflow-hidden;
    }
    &.edit .panels {
      @apply w-full grid;
      grid-template-areas: "left-panel resizer right-panel";
      grid-template-columns: 1fr 3px 600px;
    }
    & > header {
      @apply flex flex-row pt-2.5 pb-5;
    }
  }
  .pill.duplicate {
    @apply ml-2;
  }

  grid-table {
    form {
      @apply contents;
    }
    grid-template-columns: min-content min-content max-content repeat(5, minmax(min-content, 1fr));
    .chat.icon {
      @apply min-w-5 h-5 inline ml-1;
    }
  }
  svg.icon {
    @apply w-5 h-5 mr-1;
    &.currency {
      @apply w-2 h-2 inline-block align-top cursor-help;
    }
  }

  #exchange-popover {
    @apply backdrop:bg-black/80 bg-white rounded-sm border border-custom-gray;

    .exchange-inner {
      @apply p-2 flex flex-col gap-2.5;

      header {
        @apply flex justify-end;
      }
      main {
        @apply flex gap-1.5 items-center;

        select {
          @apply rounded border-gray-400 text-sm;
        }
      }
      footer {
        @apply flex justify-end;
      }
    }
  }
  /* EDIT FORM */
  .left-panel {
    @apply flex-1 flex flex-col;
    grid-area: left-panel;

    & > header {
      @apply flex-none flex bg-[#FAFBFD] px-5 py-2;

      .title {
        @apply flex flex-1 items-center text-cloud-burst text-base font-semibold;
      }
      .actions {
        @apply flex flex-row gap-2.5 items-center;

        label {
          @apply cursor-pointer;
          &:has(input:checked) {
            @apply bg-custom-gray;
            box-shadow: 0px 0px 6px 0px #00000040 inset;
          }
        }
      }
    }
    & > main {
      @apply flex-1;
    }
  }

  .resizer {
    @apply col-2 cursor-ew-resize flex flex-col bg-hw-gray select-none;
    grid-area: resizer;
    div:nth-child(1) {
      @apply bg-[#FAFBFD] h-[54px];
    }
    div:nth-child(2) {
      @apply bg-pale-ice-blue h-[52px] border-y border-custom-gray;
    }
    div:nth-child(3) {
      @apply flex-1;
    }
  }

  .right-panel {
    @apply flex-none flex flex-col row-1 col-3 bg-[#FAFBFD] border-l border-custom-gray;
    grid-area: right-panel;
    & > header {
      @apply px-5 py-2;
    }

    & > main {
      @apply flex-1 flex;
      #invoice-page {
        @apply divide-pale-blue divide-solid;
      }
      #invoice-page,
      #activity-page {
        @apply relative;
      }
      remote-dialog-container {
        dialog {
          @apply w-auto mx-6;
        }
      }
      .pages {
        @apply relative;
        .page {
          @apply overflow-y-scroll overflow-x-hidden pt-0;
          height: calc(100vh - var(--right-top-height));
        }
      }
      header {
        .title,
        .toggle {
          .icon {
            @apply w-6 h-6 inline;
          }
        }
      }
      header:has(+ .panel) {
        @apply w-full sticky top-0 z-50 bg-[#FAFBFD] px-4 pb-2 pt-4;

        &#general-header {
          @apply top-[49px] pt-4;
        }
        &#totals-header {
          @apply top-[98px] pt-4;
        }
        &#line-items-header {
          &:has(+ .panel > main.hidden) {
            .input-group {
              @apply invisible;
            }
          }
          @apply top-[147px] pt-4 flex flex-col gap-2;
          .top-bar,
          .action-bar {
            @apply flex gap-2.5 items-center;
          }
          .input-group {
            @apply flex-1;
          }
          .action-bar > .icon,
          .action-bar a .icon {
            @apply w-5 h-5 inline text-dark-electric-blue;
          }
        }
      }
      .panel {
        @apply pb-4 px-4 border-b-pale-blue border-b relative;
        &#vendor-panel,
        &#customer-panel {
          .title {
            svg.icon {
              @apply w-6 h-6;
            }
          }
        }
        &:has(> main.hidden) {
          @apply pb-0;
        }

        &:not(:first-child) {
        }
        &.totals-panel {
        }
      }
      a#general,
      a#vendor,
      a#customer {
        scroll-margin-top: 50px;
      }
      a#totals {
        scroll-margin-top: 100px;
      }
      a#line-items {
        scroll-margin-top: 150px;
      }
      .comments-tab {
        @apply flex-1;
        grid-template-rows: 1fr auto;
        &:not(.hidden) {
          @apply grid;
        }
        /*height: calc(100vh - var(--right-top-height));*/
        .comments-list {
          @apply overflow-y-scroll max-h-full h-full;
        }
      }
    }
  }

  .form {
    @apply flex-1 flex flex-col rounded-sm text-gray-900 bg-white;

    .row {
      @apply flex-1 flex;

      &:last-of-type .field {
        @apply border-b;

        &:first-child {
          @apply rounded-bl;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-bl;
          }
        }
        &:last-child {
          @apply rounded-br;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-br;
          }
        }
      }
      &:first-child .field {
        &:first-child {
          @apply rounded-tl;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-tl;
          }
        }
        &:last-child {
          @apply rounded-tr;

          &:has(input:focus),
          &:has(select:focus) {
            @apply rounded-tr;
          }
        }
      }

      .field {
        @apply border-custom-gray border-t border-r p-3 flex flex-col text-sm;

        &:first-child {
          @apply border-l;
        }

        &.horizontal {
          @apply flex-row items-center;

          label {
            @apply m-0;
          }
          input {
            @apply w-4 mr-2;
          }
        }
        label {
          @apply text-xs flex mb-0.5 font-semibold select-none relative;
          span {
            @apply flex-1 font-semibold;
          }
          button {
            @apply relative size-4 ml-1;
            &:not(.invisible) {
              @apply flex;
              svg.ping {
                animation: ping 1s cubic-bezier(0, 0, 0.2, 1) 4;
              }
            }
            svg.ping {
              @apply absolute inline-flex h-full w-full rounded-full opacity-75;
            }
            svg {
              @apply text-gray-400 cursor-pointer relative inline-flex size-4;
            }
          }
          button[popovertarget]:has(+ [popover]:popover-open) svg {
            @apply text-gray-400;
          }
          [popover] {
            @apply absolute backdrop:bg-gray-800/50 rounded-sm min-h-[88px] max-h-[264px] w-80;
            .loader {
              @apply min-h-[88px];
            }
            /*
            ideally we want to use `right: anchor(left)` here, without the transform and the fixed width/height
            but that's currently not working, even with a polyfill
            setting top and left here doesn't work when reapplying the polyfill
            these styles have to be inlined as well
            */
            /* top: anchor(bottom);
            left: anchor(right); */
            transform: translateX(-100%);
            .pages,
            .page {
              @apply h-auto;
            }
            .tab {
              .headers {
                @apply top-0 sticky;
              }
              .pages {
                .page {
                  @apply p-0 m-0 overflow-y-visible;
                  & > .changes {
                    @apply p-0 m-0;
                    /*header {
                      @apply top-7;
                    }*/
                  }
                }
              }
            }
            .changes {
              @apply flex flex-col gap-0.5 rounded-sm;
              .no-change {
                @apply p-2 font-normal text-sm;
              }
              header {
                @apply py-1 px-2 justify-end font-medium text-sm bg-gray-300 sticky top-0 border-l-4 border-gray-600;
              }
              .change {
                @apply flex p-2.5 flex-col gap-1 border-l-4 border-gray-600 hover:bg-gray-100;
                .meta {
                  @apply flex gap-1 items-center;
                  .icon {
                    @apply flex-initial w-4 h-4 text-gray-900;
                  }
                  .user {
                    @apply font-semibold text-xs flex-initial py-1 text-black;
                  }
                  .action {
                    @apply font-normal text-xs flex-1 py-1 text-gray-900;
                  }
                  .date {
                    @apply flex-initial flex gap-1.5 items-center border border-gray-300 py-1 px-2 rounded-sm text-gray-500;
                    line-height: 0.83125rem;
                    font-size: 0.6875rem;
                    time {
                    }
                  }
                }
                .input {
                  @apply flex gap-1 border border-black rounded-xs p-2.5 font-normal text-xs text-black;
                  & > span {
                    @apply flex-1 font-normal text-xs min-h-4;
                  }
                  & > svg {
                    @apply hidden;
                  }
                  &:hover > svg {
                    @apply h-4 w-4 cursor-pointer inline;
                  }
                }
              }
            }
          }
        }
        span,
        input,
        select,
        trix-editor {
          @apply text-sm block font-medium rounded-sm;
          &.small {
            @apply text-xs;
          }
          .variable {
            @apply font-normal;
          }
        }
        input,
        select,
        trix-editor {
          @apply border-0 p-0 w-full min-h-4;
        }
        select.currency,
        select.currency + input {
          @apply w-[4.2rem] inline-block max-w-[48%];
        }
        &:has(input:focus),
        &:has(select:focus),
        &:has(trix-editor:focus),
        &:has([popover]:popover-open) {
          @apply outline-2 outline-accent outline-offset-[-2px] z-10;
        }
        &:has([popover]:popover-open) {
          @apply bg-yellow-200;
        }
        input:focus,
        select:focus,
        trix-editor:focus,
        input:focus-visible,
        select:focus-visible,
        trix-editor:focus-visible {
          @apply ring-0 border-0 outline-0;
        }
        trix-toolbar {
          @apply hidden;
        }
      }
      .action {
        @apply flex items-center pl-2.5 text-gray-400;

        &.spacer {
          @apply w-[50px];
        }
      }
    }
    /* Totals section */
    &.totals {
      @apply grid bg-transparent;
      grid-template-columns: 1fr auto 40px;
      .row {
        @apply grid col-span-full grid-cols-subgrid;
        .field {
          @apply flex flex-row justify-end bg-white;

          &.amount {
            @apply flex flex-row;

            *:last-child {
              @apply flex-1 text-right;
            }
          }
          label {
            @apply text-sm font-normal;
          }
        }
        &:first-child .field:nth-last-child(2) {
          @apply rounded-tr;
        }
        &:last-child .field {
          /* @apply border-0 !important; */
          @apply !border-0;
        }
        &:nth-last-child(2) .field {
          @apply border-b;

          &:first-child {
            @apply rounded-bl;
          }
          &:nth-last-child(2) {
            @apply rounded-br;
          }
        }
        &.vat .field:first-child {
          @apply flex;

          input {
            @apply text-right flex-1 mr-[1px];
          }
        }
        &.total .field,
        &.total .field span {
          @apply font-bold bg-transparent;
        }
      }
    }
  }

  .currency {
    @apply whitespace-nowrap;
    span {
      @apply !inline-block;
    }
  }

  /* Line items section */
  .line-items > main {
    @apply flex-col gap-2;
    &:not(.hidden) {
      @apply flex;
    }

    .line-item-group {
      @apply bg-white rounded-md border border-pale-blue;
      .pill {
        @apply ml-1;
      }
      &.uncategorized {
        & > header {
          @apply text-red-600;
        }
      }
      & > header {
        @apply flex items-center gap-2 p-3 bg-[#FDFDFD] border-b border-b-pale-blue font-medium text-sm text-shadow-slate;
        .identifier {
          @apply bg-black px-2 py-[3px] rounded-sm text-white text-xs;
        }
        .name {
          @apply flex-1 flex items-center;

          span:first-child {
            @apply flex-1;
          }
        }
        .toggle {
          @apply text-slate-gray;
          .icon {
            @apply w-4 h-4 inline cursor-pointer;
          }
        }
      }
      .line-item-group-items {
        @apply gap-2 text-black p-3 text-sm;
        &:not(:first-of-type) {
          @apply pt-0;
        }
        grid-template-columns: auto auto 1fr auto 1rem 1rem;
        &:not(.hidden) {
          @apply grid;
        }
        & > header {
          @apply font-semibold grid grid-cols-subgrid col-span-full items-center;
          .icons {
            @apply flex gap-2.5;
            .icon {
              @apply w-4 h-4 cursor-pointer;
            }
          }
          .name {
            @apply flex-1 col-span-2 flex;
            span:first-child {
              @apply flex-1;
            }
          }
          &:hover .edit,
          &:hover .show,
          &:hover .trash {
            @apply visible cursor-pointer;
          }
        }
        main {
          @apply gap-2.5 items-center font-medium grid grid-cols-subgrid col-span-full;
          /*grid-template-columns: auto 1fr auto 1rem;*/
        }
        .edit,
        .show,
        .trash {
          @apply w-4 h-4 invisible text-slate-gray;
        }
        .line-item {
          @apply grid grid-cols-subgrid col-span-full;
          .description {
            @apply overflow-hidden text-ellipsis text-nowrap cursor-move;
          }
          &:hover .edit,
          &:hover .show,
          &:hover .trash {
            @apply visible cursor-pointer;
          }
        }
      }
    }
  }

  /* Activity section */
  #activity-page {
    @apply px-4 gap-6 divide-none;

    .period {
      @apply flex flex-col;

      & > header {
        @apply flex flex-row items-center mb-2 gap-1.5;

        .icon {
          @apply font-semibold;
        }
        .section {
          @apply font-semibold flex-1 text-sm;
        }
        .date {
          @apply border border-gray-300 rounded-sm text-gray-500 px-2 py-1 text-xs;
        }
      }
      & > main {
        @apply ml-1.5;

        & > .activity {
          &:not(.hidden) {
            @apply flex flex-col text-xs leading-[15px] gap-2.5 border-l-2 border-custom-gray pl-1.5 pb-2.5;
          }
          & > header {
            @apply flex flex-row gap-1.5 items-center;

            .icon {
              @apply font-semibold;
            }
            .user {
              @apply font-semibold;
            }
            .action {
            }
            .property {
              @apply flex-1 font-semibold capitalize;

              &.create {
                @apply text-green-600;
              }
              &.destroy {
                @apply text-red-600;
              }
            }
            .time {
              @apply text-gray-500;
            }
          }
          & > main {
            @apply flex flex-row gap-1.5 pl-2.5;

            .value {
              @apply border rounded-sm py-0.5 px-2 flex-1 font-semibold text-center;
            }
            .from {
              @apply text-gray-400 border-gray-400;
            }
            .to {
              @apply text-black border-black;
            }
            .create {
              @apply bg-green-50 border-green-600;
            }
            .destroy {
              @apply bg-red-50 border-red-600;
            }
          }
        }
      }
    }
  }
  dialog#organize_line_items_modal {
    @apply w-[90vw] h-[90vh];
    form {
      @apply contents;
    }
    .icon {
      @apply m-0;
    }
    div.inner {
      @apply flex flex-col h-full;
      main {
        @apply grid flex-1 bg-[#daddea] border border-[#daddea] rounded-lg p-2.5 gap-3;
        grid-template-rows: 1fr fit-content(100%);
        grid-template-columns: minmax(320px, max-content) minmax(0px, max-content) 1fr;
        section:first-child {
          .line-item-group {
            @apply flex-1;
          }
        }
        /* Organize line items modal */
        section.groups {
          @apply flex flex-row gap-3 overflow-y-auto row-1;
          .line-item {
            @apply cursor-pointer;
          }
          .btn {
            @apply border-1 border-[#8596B1]/50 rounded-md px-5 py-1.5 flex gap-2.5 text-shadow-slate font-semibold text-xs items-center h-fit cursor-pointer text-nowrap;
            .icon {
              @apply text-dark-electric-blue;
            }
          }

          .line-item-group {
            @apply bg-[#F1F1F8] min-w-[320px] max-w-[320px] rounded-md border-custom-gray border p-2.5;
            header {
              @apply flex gap-2.5 items-center text-[#0F172A] text-md mb-2.5;
              .circle {
                @apply w-4 h-4 rounded-full;
              }
              .name {
                @apply flex-1;
              }
              span.name {
                @apply leading-7;
              }
              .icon {
                @apply w-5 h-5 inline cursor-pointer text-shadow-slate;
              }
              .handle {
                @apply hidden h-[13px] w-[13px];
              }
              &:hover .handle {
                @apply inline;
              }
              input.name {
                @apply hidden;
              }
            }
            &.edit-name {
              header {
                input.name {
                  @apply block;
                }
                span.name {
                  @apply hidden;
                }
              }
            }
            .line-item {
              @apply bg-white font-medium text-xs p-2.5 flex gap-2;
              &:first-of-type {
                @apply rounded-t-md;
              }
              &:last-child {
                @apply rounded-b-md;
              }
              &:not(:last-child) {
                @apply border-b border-b-[#F1F1F8];
              }
              .description {
                @apply flex-1 overflow-hidden text-ellipsis text-nowrap;
              }
              & > .icon {
                @apply hidden w-4 h-4 text-link-water;
              }
              &:hover > .icon {
                @apply inline;
              }
            }
          }
          .line-item-group:nth-of-type(5n-4) header .circle {
            @apply bg-blue-600;
          }
          .line-item-group:nth-of-type(5n-3) header .circle {
            @apply bg-violet-600;
          }
          .line-item-group:nth-of-type(5n-2) header .circle {
            @apply bg-orange-600;
          }
          .line-item-group:nth-of-type(5n-1) header .circle {
            @apply bg-lime-600;
          }
          .line-item-group:nth-of-type(5n) header .circle {
            @apply bg-rose-600;
          }
        }
      }
      section.actions {
        @apply flex-1;
        svg.icon {
          @apply inline;
        }
      }
    }
  }

  /* Duplicates page */
  .duplicates {
    @apply grid bg-hw-gray;
    grid-template-columns: 50% 50%;
    grid-template-rows: auto 1fr;
    .no-duplicates {
      @apply flex items-center justify-center row-span-full text-cloud-burst italic;
    }
    .type-indicator {
      @apply flex gap-1 items-center p-1 rounded-sm bg-hw-gray text-white font-semibold text-xs select-none;
      .type.icon {
        @apply w-4 h-4;
      }
    }
    .original {
      header {
        @apply border-r border-r-slate-gray;
      }
      .document-container {
        @apply border-r border-r-slate-gray;
        & > header {
          @apply border-r-0;
        }
      }
    }
    .potential-duplicates {
      .sync-scroll-tools {
        @apply hidden;
      }
    }
    .original,
    .potential-duplicates {
      @apply grid row-span-2;
      grid-template-rows: subgrid;
      grid-template-columns: subgrid;
      & > header {
        @apply flex gap-2.5 items-center  bg-ghost-white px-5 py-3.5;
        .actions {
          svg {
            @apply m-0;
          }
        }

        select,
        ::picker(select) {
          appearance: base-select;
        }
        select {
          @apply w-full;
          selectedcontent {
            @apply overflow-hidden;
          }
        }
        select:open::picker(select) {
          @apply flex flex-col gap-1 p-2 border-cool-gray border rounded-sm;
        }

        select {
          @apply bg-white border-cool-gray px-3.5 py-2.5 font-semibold text-base text-cloud-burst flex-1;
        }
        .title {
          @apply flex gap-2.5 flex-1 font-semibold text-base text-cloud-burst overflow-hidden;
          span:not(.hidden) {
            @apply block overflow-hidden text-ellipsis text-nowrap;
          }
        }
        .icon {
          @apply w-6 h-6;
        }
      }
      .properties {
        @apply flex flex-row gap-2.5 bg-pale-ice-blue px-5 py-2 text-blue-bell text-xs border-custom-gray border-b min-h-[69px] overflow-y-scroll;
        .property {
          @apply rounded-sm flex flex-col items-center justify-center text-xs;
          .icon {
            @apply w-4 h-4 cursor-pointer;
          }
          input[type="checkbox"]:checked ~ .icon.eye-slash {
            @apply hidden;
          }
          input[type="checkbox"]:not(:checked) ~ .icon.eye {
            @apply hidden;
          }
          div.header {
            @apply text-white font-semibold p-1 flex text-nowrap;
            label {
              span {
                @apply px-2.5;
              }
            }
          }
          div.value {
            @apply bg-white/80 text-black font-medium w-full p-1 rounded-sm text-center text-nowrap;
          }
          &[data-properties~="invoice_date"] {
            @apply border-property-1 border-2 bg-property-1;
          }
          &[data-properties~="invoice_number"] {
            @apply border-property-2 border-2 bg-property-2;
          }
          &[data-properties~="total_ex_vat"] {
            @apply border-property-3 border-2 bg-property-3;
          }
        }
      }
    }
    .text-block {
      &[data-properties~="invoice_date"] {
        @apply outline-property-1 bg-property-1/20;
      }
      &[data-properties~="invoice_number"] {
        @apply outline-property-2 bg-property-2/20;
      }
      &[data-properties~="total_ex_vat"] {
        @apply outline-property-3 bg-property-3/20;
      }
      &.highlight ~ .text-block:not(.highlight),
      &:has(~ .text-block.highlight) {
        @apply outline-black/60 bg-white/60 outline-dashed;
      }
    }
  }
}

.current-version-date {
  @apply text-md font-semibold;
}
body.journals {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .journals-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #journals-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(5, 1fr);
      .journal-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
.notifications {
  .bell {
    @apply grid place-content-center;
    svg,
    #notification-pill {
      grid-area: 1/1;
    }
    #notification-pill:not(.hidden) {
      @apply flex items-center justify-center text-[0.5rem] p-1 place-self-end mb-[-0.25rem] mr-[-0.25rem] w-[16px];
    }
  }
  .menu {
    .inner-menu {
      @apply max-h-[65vh] overflow-scroll;
      li {
        @apply bg-gray-100;
        &.unread {
          @apply bg-white;
        }
        .notication {
          @apply grid p-2 gap-3 flex-1;
          grid-template-columns: 48px 1fr auto;
          .user {
            @apply row-1 flex;
            .avatar {
              @apply rounded-full h-12 w-12 align-middle;
            }
          }
          .message {
            @apply row-1 flex flex-col flex-1 gap-2 max-w-[25vw];
            .preview {
              @apply border border-gray-300 rounded-sm whitespace-normal p-2;
              .text {
                @apply line-clamp-2;
              }
            }
          }
          .time {
            @apply row-1 flex justify-end;
          }
        }
      }
    }
  }
}
header:has(+ .panel) {
  @apply flex cursor-pointer;

  .title {
    @apply flex-1 flex items-center text-gray-900 font-semibold text-md;

    .icon {
      @apply mr-2;
    }
    .name {
      @apply flex-1;
    }
  }
  & > .top-bar .summary,
  & > .summary {
    @apply invisible text-gray-900 font-semibold text-md;
  }
}
header:has(+ .panel > main.hidden) {
  .toggle {
    @apply -rotate-90;
  }
  .top-bar .summary,
  .summary {
    @apply visible flex items-center;
  }
  .actions {
    display: none;
  }
}
.panel {
  @apply flex-col gap-2 w-full;

  .panel:not(.hidden) {
    @apply flex;
  }

  main {
  }

  header {
    @apply flex cursor-pointer;

    .title {
      @apply flex-1 flex items-center text-gray-900 font-semibold text-md;

      .icon {
        @apply mr-2;
      }
      .name {
        @apply flex-1;
      }
    }
    .toggle {
    }
    & > .top-bar .summary,
    & > .summary {
      @apply invisible text-gray-900 font-semibold text-md;
    }
    &:has(+ main.hidden) {
      .toggle {
        @apply -rotate-90;
      }
      .summary {
        @apply visible flex items-center;
      }
      .actions {
        display: none;
      }
    }
  }
}
body.payment-conditions {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .payment-conditions-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #payment-conditions-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(5, 1fr);
      .payment-condition-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
body.roles {
  #roles-table {
    table {
      @apply border-collapse border rounded-sm w-full bg-white;
      thead tr th {
        @apply border-b border-gray-200 py-3 px-2 text-gray-900 font-semibold  text-md whitespace-nowrap;
        letter-spacing: 0.02em;
      }
      tbody tr td {
        @apply border-b border-gray-200 py-3 px-2 text-gray-900 text-md text-center font-normal;
        letter-spacing: 0.01em;
      }
    }
  }
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .role-grid {
    @apply grid text-sm h-[80vh] overflow-scroll;
    form:not(.hidden) {
      @apply contents;
    }
    form:not(.hidden) + .swap {
      display: none;
    }
    .header {
      @apply border-t sticky top-0 bg-white flex flex-col gap-0.5;
      grid-row: 1;
      z-index: 1;
      .actions {
        @apply text-xs font-semibold text-gray-500 flex;
        span {
          @apply flex-1;
        }
        svg {
          @apply cursor-pointer;
        }
      }
    }
  }
}
body.rubrics {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .rubrics-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #rubrics-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(6, 1fr);
      .rubric-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
.searchbox,
.searchbar {
  @apply relative;
}

.searchbox .search-results {
  @apply absolute w-full left-0 right-0 z-10 mt-2 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black/5 focus:outline-none divide-y divide-gray-100;

  ul {
  }
  ul li {
    @apply block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer;
  }
  li.empty {
    @apply flex items-center gap-1.5;
  }
}
.searchbar {
  &:has(.searchbox.options) {
    @apply relative w-80 inline-block;
  }
  .icon {
    @apply absolute text-gray-300 top-[6px];
  }
  .searchbox {
    @apply pl-11 text-gray-500 border border-gray-200 rounded-md text-sm p-[5px] transition-all w-44;

    &.options {
      @apply w-full;

      & + .icon + .icon {
        @apply block;
      }
    }
    &::placeholder {
      @apply text-gray-300;
    }
    &:focus:not(.non-expandable) {
      @apply w-72;

      & + .icon {
        @apply text-gray-500;
      }
    }
    & + .icon {
      @apply left-[12px];

      & + .icon {
        @apply right-[12px];
        display: none;
      }
    }
  }
}
body.settings {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
}
body.roles,
body.users {
  .role-grid {
    .field,
    .col-span-1,
    .header {
      @apply py-1.5 px-2 border-b border-gray-200;
    }
    .field:not(.section),
    .col-span-1:not(.section),
    .header {
      @apply border-r;
    }
    .col-span-1,
    .header {
      @apply border-l;
    }
    .permission {
      @apply sticky left-0 bg-white;
      grid-column: 1;
      z-index: 2;
      &.header.col-span-1 {
        z-index: 3;
      }
      &.section {
        @apply flex gap-1 items-center cursor-pointer;
      }
      &.close svg {
        @apply -rotate-90;
      }
      &:not(:first-child) {
        top: 35px;
      }
    }
    .section {
      @apply bg-accent font-semibold text-white;
    }
    .field {
      @apply text-center;
    }
  }
}
.company-header {
  @apply flex flex-1 gap-3;

  .btn-iconized {
    @apply leading-full;
    .icon {
      @apply w-4 h-4 inline;
    }
  }
  .avatar {
    @apply bg-black rounded-sm w-10 h-10;
  }
  .info {
    @apply flex flex-col gap-0.5;

    .name {
      @apply flex text-black font-semibold text-lg leading-[22px];
    }
    .location {
      @apply flex items-center text-gray-700 text-xs;

      svg {
        @apply stroke-gray-400 fill-gray-400;
      }
    }
  }
}

.toast-container {
  @apply absolute w-full bottom-5 flex justify-center z-10 select-none invisible;

  &.show {
    @apply visible;
    animation:
      fade-in 0.7s,
      fade-out 0.7s 2.5s;
  }
  .toast {
    @apply py-2.5 px-5 bg-[#37414E] rounded-md text-md shadow-sm text-white;

    span {
      @apply inline-block;

      &:first-letter {
        @apply capitalize;
      }
    }
  }
}

.loader {
  @apply flex h-full items-center justify-center;
  svg {
    @apply size-7 animate-spin text-accent;
  }
}

nav.breadcrumb.extended {
  @apply flex bg-white drop-shadow-sm rounded-md h-16 border border-gray-200;

  .step {
    @apply flex text-gray-200 flex-1;

    &.active {
      box-shadow: 0 2px 0px 0px var(--color-accent);

      .inner {
        @apply text-accent;

        .number {
          @apply border-accent;
        }
      }
    }
    &.completed .inner {
      @apply text-gray-900;

      .number {
        @apply border-accent bg-accent text-white;
      }
    }
    .inner {
      @apply flex items-center flex-1 px-5 py-2.5 text-[#6C727F];

      .number {
        @apply h-[43px] w-[43px] border-2 rounded-full flex items-center justify-center mr-3;
      }
    }
    .divider {
      @apply h-full;
    }
  }
}
.spacer {
  @apply flex-1;
}
.document-container {
  @apply bg-hw-gray text-white text-md relative overflow-hidden;

  & > header {
    @apply bg-pale-ice-blue flex px-5 py-2 text-blue-bell text-xs gap-7 border-custom-gray border-y;

    & > div {
      @apply flex items-center gap-1.5;
    }
    & > div {
      @apply flex items-center;
    }
    div.page-nav {
      @apply gap-1.5;

      .current-page {
        @apply px-2.5 py-2 rounded-sm border-cool-gray text-center font-bold bg-white;
        -webkit-appearance: none;
        margin: 0;
        -moz-appearance: textfield;
      }
      .separator {
        @apply text-slate-gray;
      }
      .total-pages {
        @apply font-bold;
      }
    }
    .zoom-tools {
      @apply text-cool-gray;
    }
    .canvas-tools {
      @apply text-cool-gray;
    }
    .sync-scroll-tools {
      label {
        @apply flex items-center gap-2;
      }
    }
    .icon {
      @apply m-1.5;
    }
    .disabled {
      @apply text-cool-gray/50 cursor-default;
    }
    .very-disabled {
      @apply text-cool-gray/10 cursor-default;
    }
  }
  & > div {
    @apply overflow-y-scroll;
    height: calc(100vh - var(--middle-top-height));
  }
  main {
    @apply origin-top-left; /* h-svh  */

    section {
      @apply p-5;
    }
  }
}

.duplicates .document-container {
  & > div {
    height: calc(100vh - var(--duplicates-top-height));
  }
}

.preview-modal.invoice,
.preview-modal.trash {
  @apply backdrop:bg-black/80 bg-transparent w-lvw h-lvh m-0 p-0 overflow-hidden max-w-full max-h-full;

  & > header {
    @apply flex items-center bg-[#00000066] text-white font-medium text-[15px] p-4 fixed w-full top-0;

    .title {
      @apply flex-1 ml-2.5;
    }
    .actions {
      @apply flex items-center gap-4;

      .btn-dropdown {
        @apply bg-transparent border-gray-200 border-2 text-white;

        .icon {
          @apply text-white w-3 h-3;
        }
      }
      .dropdown .avatar {
        @apply w-5.5 h-5.5;
      }
    }
    svg {
      @apply cursor-pointer;
    }
  }
  & > main {
    @apply flex items-center mt-[70px] pointer-events-none;
    height: calc(100% - 70px);

    .previous,
    .pages,
    .next {
      @apply flex-1;
    }
    .previous,
    .next {
      @apply flex px-5 pointer-events-auto;

      a {
        @apply flex items-center justify-center bg-[#000000B2] rounded-full p-2.5 text-white w-9 h-9;
      }
    }
    .previous {
      @apply justify-start;
    }
    .next {
      @apply justify-end;
    }
    .pages,
    .item {
      @apply items-center overflow-y-scroll max-h-full flex flex-col gap-5 mt-5 pointer-events-auto;
    }
  }
}

.participants.menu {
  @apply bg-white rounded-sm shadow border border-gray-200 w-[400px];

  header,
  footer {
    @apply p-3 text-gray-700 font-normal flex text-md;

    span {
      @apply flex-1;
    }
  }
  header {
    @apply font-semibold text-sm;
  }
  footer .icon {
    @apply text-slate-900 mr-1.5;
  }
  main {
    @apply border-gray-200 border-y flex p-3 flex-col gap-2.5;

    .menu-item {
      @apply flex text-sm gap-1.5 items-center;

      .avatar {
        @apply flex items-center justify-center bg-gray-500 text-white rounded-full w-6 h-6 border text-xs hover:cursor-default;

        img {
          @apply rounded-full;
        }
      }
      .name {
        @apply flex-1 text-gray-700 p-0 hover:bg-white hover:cursor-default;
      }
      .time {
        @apply text-hw-gray p-0 hover:bg-white hover:cursor-default;
      }
    }
  }
}

dialog[popover] {
  @apply p-5 rounded-md border-gray-600 border-1 backdrop:bg-gray-50/50;
  top: anchor(bottom);
  left: anchor(left);
}
.switch {
  @apply flex bg-baby-blue rounded-full p-1 w-11 max-h-7;
  input {
    @apply hidden;
  }
  .toggle {
    @apply bg-white w-5 h-5 rounded-full;
  }
  &.small {
    @apply p-0.5 w-[22px] max-h-3.5;
    .toggle {
      @apply w-2.5 h-2.5;
    }
  }
  &.medium {
    @apply p-[3px] w-[31px] max-h-5;
    .toggle {
      @apply w-3.5 h-3.5;
    }
  }
  &:has(input:checked) {
    @apply bg-vibrant-blue justify-end;
  }
  &:has(input:disabled) {
    @apply bg-[#C2C8D6];
  }
}
.tab {
  @apply flex flex-col;

  .headers {
    @apply grid grid-flow-col auto-cols-auto bg-transparent;

    .header {
      @apply flex items-center p-2.5 gap-2 text-md text-dark-electric-blue font-semibold cursor-pointer overflow-hidden border-b-[#9E9EB7] border-b;
      .title {
        @apply flex-1 text-center;
      }
      .icon {
        @apply inline m-0;
      }
      &.condensed {
        @apply p-1 text-xs;
      }
      &:hover {
        @apply border-b-midnight-blue text-midnight-blue;
      }
      svg {
        @apply mr-2;
      }
      &.active {
        @apply text-midnight-blue border-b-midnight-blue border-b-2;
      }
      &:not(.active) .action {
        display: none;
      }
      span {
        @apply flex-1 select-none text-nowrap text-ellipsis overflow-hidden;
      }
    }
  }

  .pages {
    @apply flex-1 flex;

    .page {
      @apply flex-1 px-0 py-4 flex-col;

      & > * {
        @apply px-3;
      }
      &:not(.hidden) {
        @apply flex;
      }
    }
  }

  &.condensed .headers .header {
    @apply py-[3px];
  }

  &.centered .headers .header {
    @apply justify-center;
  }

  &.toggle {
    @apply border-none;

    .headers {
      @apply mb-5 rounded-sm p-0.5;

      .header {
        @apply rounded-sm text-gray-400;

        &:hover {
          @apply bg-gray-100;
        }
        &.active {
          @apply bg-white text-gray-900 drop-shadow;
        }
      }
    }
  }
}
body.teams {
  .teams-main {
    @apply flex gap-6;

    #teams-table {
      @apply flex-1;

      table {
        @apply border-collapse border border-gray-200 rounded-sm w-full bg-white;

        thead tr th {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 font-semibold text-left text-md;
          letter-spacing: 0.02em;
        }
        tbody tr td {
          @apply border-b border-gray-200 py-3 pl-[30px] text-gray-900 text-md font-normal;
          letter-spacing: 0.01em;
        }
      }
    }
  }
}
.page-container {
  @apply relative;

  .bookmark-label {
    @apply rounded-sm px-2.5 py-1 flex items-center w-9 absolute left-[-18px] transition-all text-xxs z-10 select-none;
    /* Arrow shape */
    /*clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%);*/
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    transform: translateY(-8.5px);
    &[data-properties~="invoice_date"] {
      @apply border-property-1 border-2 bg-property-1;
    }
    &[data-properties~="invoice_number"] {
      @apply border-property-2 border-2 bg-property-2;
    }
    &[data-properties~="total_ex_vat"] {
      @apply border-property-3 border-2 bg-property-3;
    }
  }
  #text-block-canvas {
    @apply w-full h-full absolute top-0 left-0;
  }

  .text-block-canvas {
    @apply w-full h-full absolute top-0 left-0;

    .text-block {
      @apply absolute bg-gray-100/15 outline-2 outline-gray-300 rounded-sm cursor-pointer;

      &:hover {
        @apply bg-gray-400/20 outline-gray-500;
      }
      &.selected {
        @apply bg-[#0075FF2B] outline-[#0075FF];
      }
      &.active {
        .popover {
          @apply visible;
        }
      }
      &.linked {
        @apply outline-[#0075FF];
        .popover {
          @apply  bg-[#0075FF];
          input {
            @apply bg-[#C9E2FF]
          }
          &::after {
            @apply border-b-[#0075FF];
          }
        }
      }
      .popover {
        @apply absolute left-2/4 translate-x-[-50%] bottom-6 w-max max-w-[210px] rounded-sm invisible flex-col p-px bg-gray-400;

        header {
          @apply text-xs font-semibold py-1.5 px-2.5 flex;

          span {
            @apply flex-1 overflow-hidden text-nowrap text-ellipsis;
          }
        }
        input {
          @apply text-sm rounded-sm bg-white text-gray-900 p-1.5;
        }
        &::after {
          @apply content-[""] absolute top-full left-1/2 ml-[-10px] border-[10px] rotate-180 border-transparent border-b-gray-400;
        }
      }
    }
    .selection {
      @apply absolute bg-gray-400/10 rounded-sm;
      background-image:
        linear-gradient(90deg, #1f293766 50%, transparent 50%), linear-gradient(90deg, #1f293766 50%, transparent 50%),
        linear-gradient(0deg, #1f293766 50%, transparent 50%), linear-gradient(0deg, #1f293766 50%, transparent 50%);
      background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
      background-size:
        15px 2px,
        15px 2px,
        2px 15px,
        2px 15px;
      background-position:
        left top,
        right bottom,
        left bottom,
        right top;
      /* border-2 border-gray-800/40 border-dashed */

      &.loading {
        animation: rotate-border 0.8s infinite linear;
      }
    }
  }
}
body.trashcan {
  grid-table {
    form {
      @apply contents;
    }
    grid-template-columns: min-content repeat(7, minmax(min-content, 1fr)) max-content;
    grid-table-row {
      @apply cursor-pointer;
      .no-reason {
        @apply italic;
      }
      .icon {
        @apply w-5 h-5 inline mr-2;
      }
    }
  }
}
body.users {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .users-content {
    @apply flex;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium bg-white;
        }
      }
    }
    #users-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(3, 1fr);
      .user-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
        .info {
          @apply flex p-3 items-center border-b border-gray-200;
          .avatar {
            @apply flex items-center justify-center bg-[#787878] text-white w-10 h-10 rounded-lg mr-2;
          }
        }
        .administrations {
          @apply flex p-3 items-start justify-start border-b border-gray-200;
        }
        .roles {
          @apply flex p-3 items-start justify-start border-b border-gray-200;
          .pill {
            @apply text-sm px-2 p-1 mr-1;
          }
          .dropdown {
            .dropdown-text {
              @apply overflow-hidden w-0 max-w-0 transition-all duration-300;
            }
            &:hover .dropdown-text {
              @apply w-auto max-w-40;
            }
            .dropdown-menu {
              @apply absolute top-4 right-0 z-10 mt-3 w-screen max-w-max;
              .dropdown-contents {
                @apply text-sm bg-white shadow-lg rounded-sm border overflow-hidden w-32;
                form {
                  @apply flex flex-col gap-1;
                  label {
                    @apply px-2 py-1 hover:bg-gray-200 cursor-pointer;
                  }
                }
              }
            }
          }
        }
        &:last-child {
          & > .check,
          & > a,
          & > a > .info,
          & > .administrations,
          & > .roles {
            @apply border-b-0;
          }
        }
        &:hover {
          & > .check,
          & > a,
          & > a > .info,
          & > .administrations,
          & > .roles {
            @apply bg-gray-100;
          }
        }
      }
    }
    #user-detail {
      @apply border rounded-sm bg-white border-gray-200 font-normal p-3 w-[350px];
      .user-card {
        @apply items-start bg-black text-white rounded-lg p-5 flex gap-3.5;
        contact {
          @apply flex flex-col flex-1;
          .name {
            @apply text-lg font-semibold;
          }
          .type {
            @apply text-sm font-normal;
          }
          .email {
            @apply flex items-center gap-1.5 text-gray-400 text-md font-normal;
          }
        }
        .avatar {
          @apply flex items-center justify-center bg-white text-black rounded-full w-[70px] h-[70px];
        }
      }
      ul {
        @apply list-disc list-inside;
        a {
          @apply text-accent;
        }
      }
      h2 {
        @apply text-lg font-semibold mt-3;
      }
      .permissions {
        select {
          @apply rounded-sm border border-gray-300 py-1 mb-2;
        }
      }
    }
  }

    #edit_user {
        .password-confirmation {
            display: none;
        }
        dd:has(input#user_password:not(:placeholder-shown)) + dt.password-confirmation {
            &, & + dd.password-confirmation {
                display: block;
            }
        }
        .at-prefix {
            h3 { @apply pb-1 absolute inset-1; }
            input { padding-left: 20px }
            position: relative;
            align-content: center;
        }
    }
}
:root {
  --header-height: 61px;
  --breadcrumbs-height: 33px;
  --document-viewer-toolbar-height: 52px;
  --middle-top-height: calc(
    var(--header-height) + var(--breadcrumbs-height) + var(--document-viewer-toolbar-height) + 54px
  );
  --duplicates-top-height: calc(
    var(--header-height) + var(--breadcrumbs-height) + var(--document-viewer-toolbar-height) + 69px + 69px
  );
  --right-top-height: calc(var(--header-height) + var(--breadcrumbs-height) + 112px);
  --batch-top-height: 228px;
  --batch-document-top-height: calc(var(--header-height) + var(--breadcrumbs-height) + 46px);
  --batch-doc-top-height: 284px;
}
@theme {
  /* using --color-* makes utilities like bg-*, text-*, border-*, and fill-* work */
}
body.vat-codes {
  h1 {
    @apply text-2xl font-bold capitalize;
  }
  .vat-codes-content {
    @apply flex-1;
    header {
      @apply flex gap-2  mr-3;
      form {
        @apply flex-1;
        .search {
          @apply text-sm w-full py-1 px-1.5 font-medium;
        }
      }
    }
    #vat-codes-table {
      @apply flex-1 mr-3 grid border border-gray-200 rounded-sm bg-white mt-3;
      grid-template-columns: minmax(40px, min-content) repeat(7, 1fr);
      .vat-code-row {
        @apply contents;
        & > a {
          @apply contents;
        }
        .check {
          @apply p-3 border-b border-gray-200;
        }
      }
    }
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
