/*
 * Default Trix editor styles. See Action Text overwrites below.
*/

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: black; }
  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-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
  background: none; }

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

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

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::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: ' \2022 '; }
  .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%; }

/*
 * 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,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}
/* Audit Details Expandable Sections */
.audit-details-expanded {
  animation: slideDown 300ms ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth transitions for audit details */
[data-controller="audit-details"] [data-audit-details-target="content"] {
  transition: max-height 300ms ease-in-out, opacity 300ms ease-in-out;
}

/* Rotate animation for chevron icon */
[data-controller="audit-details"] [data-audit-details-target="icon"] {
  transition: transform 200ms ease-in-out;
}

[data-controller="audit-details"] [data-audit-details-target="icon"].rotate-180 {
  transform: rotate(180deg);
}

/* Hover effects for expandable rows */
[data-controller="audit-details"] button:hover {
  background-color: rgba(243, 244, 246, 1);
}

/* Focus styles for accessibility */
[data-controller="audit-details"] button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Rule check indicators */
.rule-check-passed {
  background-color: rgba(34, 197, 94, 0.05);
  border-left: 3px solid rgba(34, 197, 94, 1);
}

.rule-check-failed {
  background-color: rgba(239, 68, 68, 0.05);
  border-left: 3px solid rgba(239, 68, 68, 1);
}
/* Email Show View Animations - Matching React Design */

/* Slide-up animation for email cards and time entries */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation classes */
.animate-slide-up {
  animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-up-delay-1 {
  animation: slideUp 0.4s ease-out 0.1s forwards;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: slideUp 0.4s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-slide-up-delay-3 {
  animation: slideUp 0.4s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-slide-up-delay-4 {
  animation: slideUp 0.4s ease-out 0.4s forwards;
  opacity: 0;
}

.animate-slide-up-delay-5 {
  animation: slideUp 0.4s ease-out 0.5s forwards;
  opacity: 0;
}

/* Hover effects for cards */
.email-card {
  transition: all 0.3s ease;
}

.email-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.time-entry-card {
  transition: all 0.3s ease;
}

.time-entry-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Button hover effects */
.btn-primary {
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Icon animations */
.icon-hover {
  transition: all 0.2s ease;
}

.icon-hover:hover {
  transform: scale(1.1);
}

/* Loading shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Prose content animation */
.prose p {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.prose p:nth-child(1) { animation-delay: 0.1s; }
.prose p:nth-child(2) { animation-delay: 0.2s; }
.prose p:nth-child(3) { animation-delay: 0.3s; }
.prose p:nth-child(4) { animation-delay: 0.4s; }
.prose p:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Micro-interactions for buttons */
.micro-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.micro-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.micro-btn:active::before {
  width: 200px;
  height: 200px;
}

/* Status badge animations */
.status-badge {
  transition: all 0.2s ease;
}

.status-badge:hover {
  transform: scale(1.05);
}

/* Attachment hover effects */
.attachment-item {
  transition: all 0.2s ease;
}

.attachment-item:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
}

/* Form field focus animations */
.form-field {
  transition: all 0.2s ease;
}

.form-field:focus {
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Summary section animation */
.summary-stat {
  opacity: 0;
  animation: slideInRight 0.5s ease forwards;
}

.summary-stat:nth-child(1) { animation-delay: 0.1s; }
.summary-stat:nth-child(2) { animation-delay: 0.2s; }
.summary-stat:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Text truncation utilities */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Time entry card improvements */
.time-entry-card {
  transition: all 0.2s ease;
}

.time-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Compact badge styling */
.compact-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

/* Better button spacing in compact layout */
.button-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.button-row > * {
  flex: 1;
}

/* Improved text readability */
.description-text {
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* Enhanced Empty States */

.empty-state {
  @apply flex flex-col items-center justify-center p-8 text-center;
  min-height: 300px;
}

.empty-state.large {
  min-height: 400px;
  @apply p-12;
}

.empty-state.small {
  min-height: 200px;
  @apply p-6;
}

/* Empty state illustrations */
.empty-state-icon {
  @apply w-16 h-16 mb-6 text-muted-foreground;
  animation: float 3s ease-in-out infinite;
}

.empty-state-icon.large {
  @apply w-24 h-24 mb-8;
}

.empty-state-icon.small {
  @apply w-12 h-12 mb-4;
}

/* Animated icons */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.empty-state-icon.pulse {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Empty state content */
.empty-state-title {
  @apply text-xl font-semibold text-foreground mb-2;
}

.empty-state-description {
  @apply text-muted-foreground max-w-md mx-auto leading-relaxed;
}

.empty-state-actions {
  @apply mt-6 flex flex-col sm:flex-row gap-3 justify-center;
}

/* Specific empty states */
.empty-state.inbox {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
}

.empty-state.search {
  @apply bg-background;
}

.empty-state.search .empty-state-icon {
  @apply text-blue-500;
}

.empty-state.error {
  @apply bg-destructive/5;
}

.empty-state.error .empty-state-icon {
  @apply text-destructive;
}

/* Loading states */
.empty-state.loading {
  @apply relative;
}

.empty-state.loading::before {
  content: '';
  @apply absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Interactive empty states */
.empty-state-card {
  @apply bg-card border border-border rounded-lg p-6 hover:shadow-md transition-shadow cursor-pointer;
}

.empty-state-card:hover {
  @apply border-primary/20 shadow-lg;
}

.empty-state-card .empty-state-icon {
  @apply text-primary;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .empty-state.inbox {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
  }
  
  .empty-state.loading::before {
    @apply via-white/10;
  }
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .empty-state {
    @apply p-6;
    min-height: 250px;
  }
  
  .empty-state.large {
    @apply p-8;
    min-height: 300px;
  }
  
  .empty-state-icon {
    @apply w-12 h-12 mb-4;
  }
  
  .empty-state-title {
    @apply text-lg;
  }
  
  .empty-state-actions {
    @apply mt-4;
  }
}

/* Specific component states */
.search-empty-state {
  @apply py-8;
}

.search-empty-state .empty-state-icon {
  @apply w-12 h-12 mb-3 opacity-50;
}

.search-empty-state .empty-state-title {
  @apply text-base mb-1;
}

.search-empty-state .empty-state-description {
  @apply text-sm;
}

/* Inbox specific states */
.inbox-empty-state {
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.inbox-empty-state .empty-state-icon {
  @apply text-indigo-500;
}

/* Calendar empty state */
.calendar-empty-state {
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
}

.calendar-empty-state .empty-state-icon {
  @apply text-green-500;
}

/* Filter empty state */
.filter-empty-state {
  background: radial-gradient(circle at center, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
}

.filter-empty-state .empty-state-icon {
  @apply text-yellow-500;
}
/* Form Component Styles */

/* Base form styles */
.form-group {
  @apply mb-6;
}

.form-label {
  @apply block text-sm font-medium text-foreground mb-2;
}

.form-label-required::after {
  content: " *";
  @apply text-destructive;
}

.form-description {
  @apply text-sm text-muted-foreground mt-1;
}

.form-error {
  @apply text-sm text-destructive mt-1;
}

/* Input styles */
.form-input,
.form-textarea,
.form-select {
  @apply w-full px-4 py-2 bg-background border border-border rounded-lg text-foreground placeholder:text-muted-foreground;
  @apply focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent;
  @apply transition-colors duration-200;
  @apply disabled:opacity-50 disabled:cursor-not-allowed;
}

.form-input-sm {
  @apply px-3 py-1.5 text-sm;
}

.form-input-lg {
  @apply px-5 py-3 text-lg;
}

.form-input-error {
  @apply border-destructive focus:ring-destructive;
}

.form-textarea {
  @apply min-h-[100px] resize-y;
}

/* Toggle Switch Component */
.toggle-switch {
  @apply relative inline-flex h-6 w-11 items-center rounded-full;
  @apply transition-colors duration-200 ease-in-out cursor-pointer;
  background-color: var(--color-muted);
}

.toggle-switch:has(input:checked) {
  background-color: var(--color-primary);
}

.toggle-switch:has(input:disabled) {
  @apply opacity-50 cursor-not-allowed;
}

.toggle-switch input {
  @apply sr-only;
}

.toggle-switch-thumb {
  @apply inline-block h-5 w-5 transform rounded-full bg-white shadow-sm ring-0;
  @apply transition-transform duration-200 ease-in-out;
  @apply translate-x-0.5;
}

.toggle-switch:has(input:checked) .toggle-switch-thumb {
  @apply translate-x-5;
}

/* Toggle Switch with Label */
.toggle-switch-container {
  @apply flex items-center gap-3;
}

.toggle-switch-label {
  @apply text-sm font-medium text-foreground cursor-pointer select-none;
}

.toggle-switch-description {
  @apply text-sm text-muted-foreground;
}

.form-select {
  @apply appearance-none bg-[url('data:image/svg+xml;charset=UTF-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20width%3d%2224%22%20height%3d%2224%22%20viewBox%3d%220%200%2024%2024%22%20fill%3d%22none%22%20stroke%3d%22%236b7280%22%20stroke-width%3d%222%22%20stroke-linecap%3d%22round%22%20stroke-linejoin%3d%22round%22%3e%3cpolyline%20points%3d%226%209%2012%2015%2018%209%22%3e%3c%2fpolyline%3e%3c%2fsvg%3e')] bg-[length:1.5em_1.5em] bg-[right_0.5rem_center] bg-no-repeat pr-10;
}

/* Checkbox and Radio styles */
.form-checkbox,
.form-radio {
  @apply w-4 h-4 text-primary bg-background border border-border rounded;
  @apply focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background;
  @apply disabled:opacity-50 disabled:cursor-not-allowed;
}

.form-radio {
  @apply rounded-full;
}

.form-checkbox-label,
.form-radio-label {
  @apply ml-2 text-sm text-foreground;
}

/* Switch/Toggle styles */
.form-switch {
  @apply relative inline-flex h-6 w-11 items-center rounded-full;
  @apply bg-muted transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background;
}

.form-switch.checked {
  @apply bg-primary;
}

.form-switch-thumb {
  @apply inline-block h-4 w-4 transform rounded-full bg-white transition-transform;
  @apply translate-x-1;
}

.form-switch.checked .form-switch-thumb {
  @apply translate-x-6;
}

/* Button styles */
.btn {
  @apply inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors;
  @apply focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background;
  @apply disabled:opacity-50 disabled:cursor-not-allowed;
}

.btn-primary {
  @apply bg-primary text-primary-foreground hover:bg-primary/90;
}

.btn-secondary {
  @apply bg-secondary text-secondary-foreground hover:bg-secondary/80;
}

.btn-outline {
  @apply border border-border bg-background hover:bg-accent hover:text-accent-foreground;
}

.btn-ghost {
  @apply hover:bg-accent hover:text-accent-foreground;
}

.btn-destructive {
  @apply bg-destructive text-destructive-foreground hover:bg-destructive/90;
}

.btn-sm {
  @apply px-3 py-1.5 text-sm;
}

.btn-lg {
  @apply px-6 py-3 text-lg;
}

.btn-icon {
  @apply p-2;
}

/* File upload styles */
.form-file-upload {
  @apply relative;
}

.form-file-input {
  @apply sr-only;
}

.form-file-label {
  @apply flex items-center justify-center w-full px-4 py-6 border-2 border-dashed border-border rounded-lg;
  @apply hover:border-primary hover:bg-accent/50 transition-colors cursor-pointer;
}

.form-file-label.drag-over {
  @apply border-primary bg-primary/5 scale-[1.02];
}

/* Form card styles */
.form-card {
  @apply bg-card border border-border rounded-lg shadow-sm;
}

.form-card-header {
  @apply px-6 py-4 border-b border-border;
}

.form-card-title {
  @apply text-lg font-semibold text-foreground;
}

.form-card-description {
  @apply text-sm text-muted-foreground mt-1;
}

.form-card-content {
  @apply p-6;
}

.form-card-footer {
  @apply px-6 py-4 border-t border-border bg-muted/30;
}

/* Form actions */
.form-actions {
  @apply flex items-center justify-end gap-3 pt-6 mt-6 border-t border-border;
}

/* Field with icon */
.form-input-with-icon {
  @apply relative;
}

.form-input-with-icon .form-input {
  @apply pl-10;
}

.form-input-icon {
  @apply absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground;
}

/* Inline forms */
.form-inline {
  @apply flex items-center gap-4;
}

.form-inline .form-group {
  @apply mb-0;
}

/* Search input */
.form-search {
  @apply relative;
}

.form-search-input {
  @apply form-input pl-10 pr-10;
}

.form-search-icon {
  @apply absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground;
}

.form-search-clear {
  @apply absolute right-3 top-1/2 transform -translate-y-1/2 p-1 hover:bg-accent rounded transition-colors;
}

/* Loading states */
.form-loading {
  @apply opacity-60 pointer-events-none;
}

.form-spinner {
  @apply animate-spin h-4 w-4;
}

/* Success states */
.form-success {
  @apply border-green-500 focus:ring-green-500;
}

.form-success-message {
  @apply text-sm text-green-600 dark:text-green-400 mt-1;
}
/* Hover Card Styles */
.hover-card {
  /* Ensure card stays visible */
  opacity: 1 !important;
  visibility: visible !important;
  
  /* Smooth transitions */
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent hover effects on interactive elements */
.hover-card a,
.hover-card button {
  /* Reset parent hover effects when hovering on interactive elements */
  position: relative;
  z-index: 10;
}

/* Ensure cards don't disappear during Turbo operations */
[data-turbo-preview] .hover-card,
[data-turbo-permanent] .hover-card {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Disable prefetch on hover for edit links */
.hover-card a[data-turbo="false"] {
  /* Turbo won't prefetch these links */
}

/* Ensure proper stacking context */
.hover-card.group {
  position: relative;
  z-index: 1;
}

.hover-card.group:hover {
  z-index: 10;
}

/* Fix for disappearing cards */
turbo-frame {
  display: contents;
}

turbo-frame[complete] {
  display: contents;
}
/* Mobile Touch Optimization */

/* Touch targets - minimum 44px as per Apple/Google guidelines */
@media (max-width: 768px) {
  
  /* Buttons and interactive elements */
  button, 
  .btn, 
  [role="button"],
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    min-width: 44px;
    @apply px-4 py-3;
  }
  
  /* Small buttons need adequate spacing */
  .btn-sm,
  .button-small {
    min-height: 40px;
    min-width: 40px;
    @apply px-3 py-2;
  }
  
  /* Icon-only buttons */
  .btn-icon,
  .icon-button,
  button:has(svg:only-child) {
    @apply w-11 h-11 p-2;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Links in lists */
  .list-item a,
  .inbox-item a,
  .table-row a {
    min-height: 44px;
    @apply py-3 flex items-center;
  }
  
  /* Form inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  textarea,
  select {
    min-height: 44px;
    @apply px-4 py-3 text-base;
  }
  
  /* Checkboxes and radio buttons */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 20px;
    min-height: 20px;
    @apply w-5 h-5;
  }
  
  /* Checkbox/radio labels */
  label:has(input[type="checkbox"]),
  label:has(input[type="radio"]) {
    min-height: 44px;
    @apply py-3 flex items-center gap-3;
  }
  
  /* Dropdown triggers */
  .dropdown-toggle,
  [data-controller*="dropdown"] > button {
    min-height: 44px;
    @apply px-4 py-3;
  }
  
  /* Navigation items */
  .nav-link,
  .menu-item,
  .tab-button {
    min-height: 44px;
    @apply px-4 py-3 flex items-center;
  }
  
  /* Search inputs */
  .search-input,
  input[type="search"] {
    min-height: 48px;
    @apply px-4 py-3 text-base rounded-lg;
  }
  
  /* Filter buttons */
  .filter-button,
  .sort-button {
    min-height: 40px;
    @apply px-3 py-2 text-sm;
  }
  
  /* Swipe action buttons */
  .swipe-action,
  [data-swipe-actions-target] button {
    min-height: 44px;
    min-width: 44px;
    @apply flex items-center justify-center;
  }
  
  /* Pagination controls */
  .pagination a,
  .pagination button {
    min-height: 44px;
    min-width: 44px;
    @apply flex items-center justify-center;
  }
  
  /* Modal close buttons */
  .modal-close,
  .dialog-close,
  [data-action*="modal#close"] {
    min-height: 44px;
    min-width: 44px;
    @apply p-2;
  }
  
  /* Toast/notification close buttons */
  .toast-close,
  .alert-close {
    min-height: 40px;
    min-width: 40px;
  }
}

/* Touch feedback */
@media (max-width: 768px) {
  
  /* Active states for better feedback */
  button:active,
  .btn:active,
  [role="button"]:active {
    @apply scale-95 bg-accent;
    transition: transform 0.1s ease, background-color 0.1s ease;
  }
  
  /* Link active states */
  a:active {
    @apply opacity-70;
    transition: opacity 0.1s ease;
  }
  
  /* List item active states */
  .list-item:active,
  .inbox-item:active,
  .table-row:active {
    @apply bg-accent/50;
    transition: background-color 0.1s ease;
  }
  
  /* Input focus states */
  input:focus,
  textarea:focus,
  select:focus {
    @apply ring-2 ring-primary ring-offset-2;
    transition: box-shadow 0.2s ease;
  }
  
  /* Remove default tap highlight */
  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  
  /* Custom tap highlight for interactive elements */
  button,
  .btn,
  [role="button"],
  a,
  input,
  textarea,
  select {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
  }
}

/* Spacing adjustments for touch */
@media (max-width: 768px) {
  
  /* Increase spacing between interactive elements */
  .button-group > *,
  .btn-group > * {
    @apply mx-1;
  }
  
  .button-group > * + *,
  .btn-group > * + * {
    @apply ml-2;
  }
  
  /* List spacing */
  .list-item + .list-item,
  .inbox-item + .inbox-item {
    @apply mt-1;
  }
  
  /* Form spacing */
  .form-group + .form-group,
  .field + .field {
    @apply mt-4;
  }
  
  /* Menu spacing */
  .menu-item + .menu-item {
    @apply mt-1;
  }
  
  /* Navigation spacing */
  .nav-item + .nav-item {
    @apply ml-1;
  }
}

/* Scrolling optimization */
@media (max-width: 768px) {
  
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }
  
  /* Momentum scrolling for iOS */
  .scroll-container,
  .overflow-auto,
  .overflow-y-auto {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Hide scrollbars on mobile for cleaner look */
  .scroll-container::-webkit-scrollbar,
  .overflow-auto::-webkit-scrollbar,
  .overflow-y-auto::-webkit-scrollbar {
    display: none;
  }
  
  /* Snap scrolling for carousels */
  .snap-scroll {
    scroll-snap-type: x mandatory;
  }
  
  .snap-scroll > * {
    scroll-snap-align: start;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  
  /* Fix for iOS Safari input zoom */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on focus */
  }
  
  /* Fix for iOS Safari viewport units */
  .full-height,
  .h-screen {
    height: -webkit-fill-available;
  }
  
  /* Fix for iOS Safari safe areas */
  .safe-top {
    padding-top: env(safe-area-inset-top);
  }
  
  .safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .safe-left {
    padding-left: env(safe-area-inset-left);
  }
  
  .safe-right {
    padding-right: env(safe-area-inset-right);
  }
}

/* Android specific optimizations */
@media (max-width: 768px) and (orientation: portrait) {
  
  /* Prevent text size adjust on orientation change */
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  /* Optimize input rendering */
  input,
  textarea,
  select {
    background-clip: padding-box;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  
  button,
  .btn,
  [role="button"] {
    @apply border-2 border-foreground;
  }
  
  .active,
  .selected,
  :focus {
    @apply outline-2 outline-foreground;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* Keep essential animations for feedback */
  button:active,
  .btn:active,
  [role="button"]:active {
    transition: none;
  }
}
/* Safari/iOS specific fixes for form elements */

/* General select element fixes for Safari/iOS */
@supports (-webkit-touch-callout: none) {
  /* Target Safari/iOS specifically */
  select {
    /* Restore native appearance for Safari */
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
    
    /* Ensure background is visible */
    background-color: white !important;
    
    /* Ensure border is visible */
    border: 1px solid #d1d5db !important;
    
    /* Ensure minimum size for touch */
    min-height: 32px !important;
    padding: 4px 8px !important;
    
    /* Prevent text from being invisible */
    color: #111827 !important;
  }
  
  /* Make sure focus styles work */
  select:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
    border-color: #3b82f6 !important;
  }
}

/* Cross-browser fixes for select elements in simple inbox */
/* Target the specific classes used in simple inbox dropdowns */
select.text-sm.border.border-gray-300.rounded {
  /* Ensure these selects are always visible and functional */
  -webkit-appearance: menulist;
  appearance: menulist;
  background-color: white;
  background-image: none; /* Remove any background images that might hide the dropdown arrow */
  border: 1px solid #d1d5db;
  color: #111827;
  min-height: 32px;
  font-size: 0.875rem;
  padding: 4px 8px;
  border-radius: 0.25rem;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* iOS/iPad specific fixes */
@media screen and (max-width: 1024px) {
  select {
    /* Force native appearance on mobile devices */
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
    background-color: white !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
    min-height: 44px !important; /* iOS touch target size */
    padding: 8px !important;
  }
}
/* Skeleton Screen Styles */

/* Base skeleton animation */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Skeleton base class */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: var(--color-muted);
  background-image: linear-gradient(
    90deg,
    var(--color-muted) 0%,
    var(--color-muted-foreground, rgba(0, 0, 0, 0.1)) 20%,
    var(--color-muted) 40%,
    var(--color-muted) 100%
  );
  background-repeat: no-repeat;
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Skeleton shapes */
.skeleton-text {
  height: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-button {
  height: 2.5rem;
  width: 6rem;
  border-radius: 0.375rem;
}

.skeleton-input {
  height: 2.5rem;
  border-radius: 0.375rem;
}

.skeleton-card {
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
}

/* Theme-aware skeleton colors */
[data-theme="dark"] .skeleton {
  background-color: rgba(255, 255, 255, 0.05);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

/* Skeleton loading states for Turbo */
[data-skeleton-loading="true"] {
  position: relative;
}

[data-skeleton-loading="true"] > *:not(.skeleton-container) {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

[data-skeleton-loading="false"] > *:not(.skeleton-container) {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

.skeleton-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

/* Fade out skeleton when content loads */
[data-skeleton-loading="false"] .skeleton-container {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

/* Client card skeleton specific */
.skeleton-client-card {
  @apply bg-card border border-border rounded-xl p-6;
}

.skeleton-client-card .skeleton-header {
  @apply flex items-center justify-between mb-4;
}

.skeleton-client-card .skeleton-avatar-group {
  @apply flex items-center gap-3;
}

.skeleton-client-card .skeleton-content {
  @apply space-y-2;
}

/* Email row skeleton specific */
.skeleton-email-row {
  @apply bg-background border border-border rounded-lg p-4;
}

.skeleton-email-row-desktop {
  @apply hidden md:flex items-center w-full bg-background border border-border rounded p-3 gap-3 min-h-[4rem];
}

/* Dashboard stat skeleton */
.skeleton-stat-card {
  @apply bg-background rounded-xl border border-border p-6;
}

.skeleton-stat-icon {
  @apply w-12 h-12 rounded-lg skeleton;
}

.skeleton-stat-value {
  @apply h-8 w-20 skeleton rounded mt-4 mb-1;
}

.skeleton-stat-label {
  @apply h-4 w-24 skeleton rounded;
}

/* Table skeleton */
.skeleton-table-row {
  @apply border-b border-border;
}

.skeleton-table-cell {
  @apply px-4 py-3;
}

/* Smooth transition when switching from skeleton to content */
.skeleton-transition-enter {
  animation: skeleton-fade-in 0.3s ease-out;
}

@keyframes skeleton-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation variant */
.skeleton-pulse {
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Theme variables from React app design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables for the design system */
:root {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  
  /* Border Radius */
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Light theme colors */
  --background: oklch(1.0000 0.0000 89.8756);
  --foreground: oklch(0.2101 0.0318 264.6645);
  --card: oklch(1.0000 0.0000 89.8756);
  --card-foreground: oklch(0.2101 0.0318 264.6645);
  --popover: oklch(1.0000 0.0000 89.8756);
  --popover-foreground: oklch(0.2101 0.0318 264.6645);
  --primary: oklch(0.2485 0.0590 258.0683);
  --primary-foreground: oklch(1.0000 0.0000 89.8756);
  --secondary: oklch(0.9472 0.0137 258.3454);
  --secondary-foreground: oklch(0.2485 0.0590 258.0683);
  --muted: hsl(210deg 40% 98%);
  --muted-foreground: hsl(220deg 9% 46%);
  --accent: oklch(0.9010 0.0230 256);
  --accent-foreground: oklch(0.2485 0.0590 258.0683);
  --destructive: hsl(2deg 85% 59%);
  --destructive-foreground: oklch(1.0000 0.0000 89.8756);
  --border: hsl(214deg 29% 90%);
  --input: hsl(214deg 32% 93%);
  --ring: oklch(0.2485 0.0590 258.0683);
  
  /* Sidebar specific */
  --sidebar: oklch(1.0000 0.0000 89.8756);
  --sidebar-foreground: oklch(0.2101 0.0318 264.6645);
  --sidebar-primary: oklch(0.2485 0.0590 258.0683);
  --sidebar-primary-foreground: oklch(1.0000 0.0000 89.8756);
  
  /* RGB values for alpha transparency */
  --color-primary-rgb: 59, 130, 246;
  --color-success-rgb: 34, 197, 94;
  --color-warning-rgb: 251, 191, 36;
  --color-danger-rgb: 239, 68, 68;
  --color-info-rgb: 59, 130, 246;
  --sidebar-accent: oklch(0.9472 0.0137 258.3454);
  --sidebar-accent-foreground: oklch(0.2485 0.0590 258.0683);
  --sidebar-border: hsl(214deg 29% 90%);
  --sidebar-ring: oklch(0.2485 0.0590 258.0683);
  
  /* Chart colors */
  --chart-1: hsl(209deg 100% 56%);
  --chart-2: hsl(199deg 100% 50%);
  --chart-3: hsl(265deg 89% 64%);
  --chart-4: hsl(142deg 63% 46%);
  --chart-5: hsl(135deg 63% 62%);
  
  /* Color system mapping for views */
  --color-background: var(--background);
  --color-background-secondary: var(--muted);
  --color-text-primary: var(--foreground);
  --color-text-secondary: var(--muted-foreground);
  --color-text-tertiary: hsl(220deg 9% 60%);
  --color-primary: var(--primary);
  --color-primary-hover: hsl(from var(--primary) h s calc(l * 0.9));
  --color-card: var(--card);
  --color-border: var(--border);
  --color-accent: var(--accent);
  
  /* Additional semantic colors */
  --color-success: hsl(142deg 71% 45%);
  --color-warning: hsl(48deg 100% 50%);
  --color-error: var(--destructive);
  --color-info: hsl(209deg 100% 56%);
  --color-foreground: var(--foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-primary-foreground: var(--primary-foreground);
  --color-popover: var(--popover);
  --color-ring: var(--ring);
}

/* Dark theme */
.dark {
  --background: oklch(0.2485 0.0590 258.0683);
  --foreground: oklch(1.0000 0.0000 89.8756);
  --card: hsl(220deg 15% 12%);
  --card-foreground: oklch(0.9179 0.0122 96.4323);
  --popover: hsl(220deg 15% 12%);
  --popover-foreground: oklch(0.9179 0.0122 96.4323);
  --primary: oklch(0.9472 0.0137 258.3454);
  --primary-foreground: oklch(0.2485 0.0590 258.0683);
  --secondary: oklch(0.2101 0.0318 264.6645);
  --secondary-foreground: oklch(0.9472 0.0137 258.3454);
  --muted: hsl(213deg 20% 15%);
  --muted-foreground: hsl(220deg 12% 65%);
  --accent: oklch(0.4327 0.0222 127.556);
  --accent-foreground: oklch(0.9179 0.0122 96.4323);
  --destructive: hsl(2deg 85% 55%);
  --destructive-foreground: oklch(1.0000 0.0000 89.8756);
  --border: hsl(215deg 28% 28%);
  --input: hsl(216deg 24% 20%);
  --ring: oklch(0.9472 0.0137 258.3454);
  
  /* Sidebar specific */
  --sidebar: hsl(220deg 15% 12%);
  --sidebar-foreground: oklch(0.9179 0.0122 96.4323);
  --sidebar-primary: oklch(0.9472 0.0137 258.3454);
  --sidebar-primary-foreground: oklch(0.2485 0.0590 258.0683);
  --sidebar-accent: hsl(215deg 20% 20%);
  --sidebar-accent-foreground: oklch(0.9179 0.0122 96.4323);
  --sidebar-border: hsl(215deg 28% 28%);
  --sidebar-ring: oklch(0.9472 0.0137 258.3454);
  
  /* Chart colors */
  --chart-1: hsl(210deg 100% 70%);
  --chart-2: hsl(200deg 100% 66%);
  --chart-3: hsl(265deg 100% 75%);
  --chart-4: hsl(142deg 63% 60%);
  --chart-5: hsl(135deg 63% 70%);
  
  /* Color system mapping for views */
  --color-background: var(--background);
  --color-background-secondary: var(--muted);
  --color-text-primary: var(--foreground);
  --color-text-secondary: var(--muted-foreground);
  --color-text-tertiary: hsl(220deg 12% 50%);
  --color-primary: var(--primary);
  --color-primary-hover: hsl(from var(--primary) h s calc(l * 1.1));
  --color-card: var(--card);
  --color-border: var(--border);
  --color-accent: var(--accent);
  
  /* Additional semantic colors */
  --color-success: hsl(142deg 63% 60%);
  --color-warning: hsl(48deg 100% 67%);
  --color-error: var(--destructive);
  --color-info: hsl(210deg 100% 70%);
  --color-foreground: var(--foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-primary-foreground: var(--primary-foreground);
  --color-popover: var(--popover);
  --color-ring: var(--ring);
}

/* Base styles */
body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Layout structure */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

.app-header {
  height: 64px;
  border-bottom: 1px solid var(--border);
  background-color: var(--background);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.app-sidebar {
  width: 256px;
  background-color: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  overflow-y: auto;
  flex-shrink: 0;
}

.app-sidebar nav {
  background-color: var(--card);
  height: 100%;
  position: static !important;
  left: auto !important;
  transform: none !important;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  background-color: var(--background);
}

/* Navigation styles */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 200ms ease;
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.nav-item.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.nav-item-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav-item-label {
  flex: 1;
  text-align: left;
}

.nav-item-badge {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 200ms ease;
}

.nav-item:not(.active) .nav-item-badge {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.nav-item.active .nav-item-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--primary-foreground);
}

/* Mobile styles */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    width: 288px;
    transform: translateX(-100%);
    /* Transition handled by JavaScript for spring physics */
  }
  
  .app-sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    /* Transition handled by JavaScript */
  }
}

/* Component styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: rgba(var(--color-primary-rgb), 0.9);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: rgba(from var(--secondary) r g b / 0.8);
}

.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.btn-destructive:hover {
  background-color: rgba(from var(--destructive) r g b / 0.9);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Icon button styles */
.btn-icon {
  width: 2.5rem;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 2rem;
}

.btn-icon.btn-lg {
  width: 3rem;
}

/* Button with icons */
.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-sm svg {
  width: 0.875rem;
  height: 0.875rem;
}

.btn-lg svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Enhanced Animations */
@keyframes springIn {
  0% {
    transform: translateX(-100%) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateX(10%) scale(1.05);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes springOut {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-100%) scale(0.8);
    opacity: 0;
  }
}

@keyframes shimmer {
  100% {
    left: 100%;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation utilities */
/* Removed duplicate - see line 948 for animate-slide-up definition */

.animate-slide-down {
  animation: slideDown 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade-in {
  animation: fadeIn 300ms ease-out both;
}

.animate-scale-in {
  animation: scaleIn 300ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-spring-in {
  animation: springIn 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.animate-slide-in-left {
  animation: slideInLeft 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-in-right {
  animation: slideInRight 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Stagger animations */
.stagger-animated {
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions */
.spring-transition {
  transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.smooth-transition {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover states */
.hover-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-glow:hover {
  box-shadow: 0 0 40px rgba(var(--color-primary-rgb), 0.15);
}

/* Page transitions */
.page-transitioning {
  pointer-events: none;
}

.page-transitioning main {
  opacity: 0.5;
  transition: opacity 200ms ease-out;
}

/* Loading states */
.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Number counter animation */
.counter-animate {
  animation: counter 1s ease-out;
}

@keyframes counter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card styles */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  padding-top: 0;
}

/* Input styles */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--input);
  background-color: var(--background);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--foreground);
  transition: all 0.2s;
}

.input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px var(--ring);
}

.input::placeholder {
  color: var(--muted-foreground);
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.badge-default {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.badge-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.badge-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

/* Status badge colors matching React app */
.badge-pending {
  background-color: hsl(48deg 100% 67%);
  color: hsl(48deg 100% 20%);
  border-color: hsl(48deg 100% 50%);
}

.badge-approved {
  background-color: hsl(142deg 71% 45%);
  color: white;
}

.badge-rejected {
  background-color: hsl(0deg 84% 60%);
  color: white;
}

.badge-draft {
  background-color: hsl(217deg 91% 60%);
  color: white;
}

/* Status colors for React design */
.bg-green-100 {
  background-color: rgb(220, 252, 231);
}

.text-green-700 {
  color: rgb(21, 128, 61);
}

.dark .bg-green-900\/30 {
  background-color: rgba(20, 83, 45, 0.3);
}

.dark .text-green-400 {
  color: rgb(74, 222, 128);
}

.bg-gray-100 {
  background-color: rgb(243, 244, 246);
}

.text-gray-600 {
  color: rgb(75, 85, 99);
}

.dark .bg-gray-800 {
  background-color: rgb(31, 41, 55);
}

.dark .text-gray-400 {
  color: rgb(156, 163, 175);
}

.bg-yellow-100 {
  background-color: rgb(254, 249, 195);
}

.text-yellow-700 {
  color: rgb(161, 98, 7);
}

.dark .bg-yellow-900\/30 {
  background-color: rgba(113, 63, 18, 0.3);
}

.dark .text-yellow-400 {
  color: rgb(250, 204, 21);
}

.bg-red-100 {
  background-color: rgb(254, 226, 226);
}

.text-red-700 {
  color: rgb(185, 28, 28);
}

.dark .bg-red-900\/30 {
  background-color: rgba(127, 29, 29, 0.3);
}

.dark .text-red-400 {
  color: rgb(248, 113, 113);
}

.bg-blue-100 {
  background-color: rgb(219, 234, 254);
}

.text-blue-700 {
  color: rgb(29, 78, 216);
}

.dark .bg-blue-900\/30 {
  background-color: rgba(30, 58, 138, 0.3);
}

.dark .text-blue-400 {
  color: rgb(96, 165, 250);
}

/* Green theme for success states */
.text-green-600 {
  color: rgb(22, 163, 74);
}

.bg-green-50 {
  background-color: rgb(240, 253, 244);
}

.hover\:bg-green-50:hover {
  background-color: rgb(240, 253, 244);
}

/* Additional colors for severity indicators */
.text-red-500 {
  color: rgb(239, 68, 68);
}

.text-yellow-500 {
  color: rgb(245, 158, 11);
}

.text-blue-500 {
  color: rgb(59, 130, 246);
}

.text-blue-600 {
  color: rgb(37, 99, 235);
}

.bg-blue-50 {
  background-color: rgb(239, 246, 255);
}

.hover\:bg-blue-50:hover {
  background-color: rgb(239, 246, 255);
}

.text-red-600 {
  color: rgb(220, 38, 38);
}

.bg-red-50 {
  background-color: rgb(254, 242, 242);
}

.hover\:bg-red-50:hover {
  background-color: rgb(254, 242, 242);
}

/* Custom shadow utilities with primary color */
.shadow-primary\/5 {
  --tw-shadow-color: rgb(from var(--primary) r g b / 0.05);
  --tw-shadow: var(--tw-shadow-colored);
}

/* Hover effects for cards */
.hover\:shadow-lg:hover {
  box-shadow: var(--shadow-lg);
}

.hover\:shadow-md:hover {
  box-shadow: var(--shadow-md);
}

.hover\:border-primary\/20:hover {
  border-color: rgb(from var(--primary) r g b / 0.2);
}

.hover\:bg-\[var\(--color-accent\)\]\/50:hover {
  background-color: rgb(from var(--accent) r g b / 0.5);
}

/* Transition utilities */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* Scale transform for hover */
.hover\:scale-\[1\.02\]:hover {
  transform: scale(1.02);
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Button Press Effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Input transitions */
input, select, textarea {
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

input:hover:not(:focus), 
select:hover:not(:focus), 
textarea:hover:not(:focus) {
  border-color: var(--border);
  background-color: var(--accent);
}

/* Checkbox animations */
input[type="checkbox"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  background-color: var(--background);
  cursor: pointer;
  position: relative;
  transition: all 200ms ease;
}

input[type="checkbox"]:hover {
  border-color: var(--primary);
  background-color: var(--accent);
}

input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: bold;
  animation: checkmark 200ms ease-out forwards;
}

@keyframes checkmark {
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Radio button animations */
input[type="radio"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  background-color: var(--background);
  cursor: pointer;
  position: relative;
  transition: all 200ms ease;
}

input[type="radio"]:hover {
  border-color: var(--primary);
  background-color: var(--accent);
}

input[type="radio"]:checked {
  border-color: var(--primary);
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--primary);
  transform: translate(-50%, -50%) scale(0);
  animation: radio-dot 200ms ease-out forwards;
}

@keyframes radio-dot {
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Switch/Toggle animations */
.switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--muted);
  transition: all 200ms ease;
  border-radius: 1.5rem;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 1.125rem;
  width: 1.125rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background-color: white;
  transition: all 200ms ease;
  border-radius: 50%;
}

.switch input:checked + .switch-slider {
  background-color: var(--primary);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(1.5rem);
}

/* Focus ring animations */
input:focus, select:focus, textarea:focus, button:focus {
  outline: none;
  box-shadow: 0 0 0 0 var(--ring);
  animation: focus-ring 200ms ease-out forwards;
}

@keyframes focus-ring {
  to {
    box-shadow: 0 0 0 3px var(--ring);
  }
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.2s ease-out forwards;
  opacity: 0;
}

/* Tab-specific animation that ensures visibility */
.tab-animate-in {
  animation: tabSlideIn 0.3s ease-out forwards;
}

@keyframes tabSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography Scale */
.text-xs {
  font-size: 0.75rem; /* 12px */
  line-height: 1rem; /* 16px */
}

.text-sm {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
}

.text-base {
  font-size: 1rem; /* 16px */
  line-height: 1.5rem; /* 24px */
}

.text-lg {
  font-size: 1.125rem; /* 18px */
  line-height: 1.75rem; /* 28px */
}

.text-xl {
  font-size: 1.25rem; /* 20px */
  line-height: 1.75rem; /* 28px */
}

.text-2xl {
  font-size: 1.5rem; /* 24px */
  line-height: 2rem; /* 32px */
}

.text-3xl {
  font-size: 1.875rem; /* 30px */
  line-height: 2.25rem; /* 36px */
}

.text-4xl {
  font-size: 2.25rem; /* 36px */
  line-height: 2.5rem; /* 40px */
}

.text-5xl {
  font-size: 3rem; /* 48px */
  line-height: 1;
}

/* Font Weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Enhanced Animations */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes spring-bounce {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.05);
  }
  75% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slide-up-fade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down-fade {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-up {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Shimmer Effect Classes */
.shimmer {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    90deg,
    var(--color-muted) 0%,
    var(--color-muted-foreground) 20%,
    var(--color-muted) 40%,
    var(--color-muted) 100%
  );
  background-size: 1000px 100%;
}

/* Enhanced Hover Effects */
.hover-lift {
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-scale-sm:hover {
  transform: scale(1.01);
}

.hover-scale-lg:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.3);
}

.hover-brightness {
  transition: filter 200ms ease;
}

.hover-brightness:hover {
  filter: brightness(1.1);
}

/* Card Hover States */
.card-hover {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}

/* Button Press Animation */
.btn-press {
  transition: transform 100ms ease;
}

.btn-press:active {
  transform: scale(0.98);
}

/* Spring Transitions */
.spring-bounce {
  animation: spring-bounce 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.spring-transition {
  transition: all 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.smooth-transition {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fast-transition {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation Utilities */
.animate-slide-up-fade {
  animation: slide-up-fade 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-down-fade {
  animation: slide-down-fade 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-scale-up {
  animation: scale-up 300ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-spring-bounce {
  animation: spring-bounce 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.animate-status-pulse {
  animation: status-pulse 2s infinite;
}

/* Animation Delays for Staggered Effects */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }

/* Loading Skeleton Enhancements */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: var(--color-muted);
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Dark mode skeleton adjustments */
.dark .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
}

/* Interactive Focus States */
.focus-ring {
  transition: box-shadow 200ms ease;
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.4);
}

/* Status Indicators with Animation */
.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

.status-dot-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Utilities */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
}

.bg-gradient-primary-light {
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb), 0.1) 0%, 
    rgba(var(--color-primary-rgb), 0.05) 100%);
}

.bg-gradient-to-br {
  background: linear-gradient(to bottom right, var(--from-color), var(--to-color));
}

.from-primary\/10 {
  --from-color: rgba(var(--color-primary-rgb), 0.1);
}

.to-primary\/5 {
  --to-color: rgba(var(--color-primary-rgb), 0.05);
}

.from-primary\/20 {
  --from-color: rgba(var(--color-primary-rgb), 0.2);
}

.from-blue-500\/10 {
  --from-color: rgba(59, 130, 246, 0.1);
}

.to-blue-500\/5 {
  --to-color: rgba(59, 130, 246, 0.05);
}

.from-green-500\/10 {
  --from-color: rgba(34, 197, 94, 0.1);
}

.to-green-500\/5 {
  --to-color: rgba(34, 197, 94, 0.05);
}

.from-yellow-500\/10 {
  --from-color: rgba(234, 179, 8, 0.1);
}

.to-yellow-500\/5 {
  --to-color: rgba(234, 179, 8, 0.05);
}

.from-secondary\/10 {
  --from-color: rgba(var(--color-secondary-rgb), 0.1);
}

.to-secondary\/5 {
  --to-color: rgba(var(--color-secondary-rgb), 0.05);
}

.border-green-500\/10 {
  border-color: rgba(34, 197, 94, 0.1);
}

.border-yellow-500\/10 {
  border-color: rgba(234, 179, 8, 0.1);
}

.to-green-500\/5 {
  --to-color: rgba(34, 197, 94, 0.05);
}

.from-red-500\/10 {
  --from-color: rgba(239, 68, 68, 0.1);
}

.to-red-500\/5 {
  --to-color: rgba(239, 68, 68, 0.05);
}

.from-yellow-500\/10 {
  --from-color: rgba(251, 191, 36, 0.1);
}

.to-yellow-500\/5 {
  --to-color: rgba(251, 191, 36, 0.05);
}

/* Shadow utilities with opacity */
.shadow-primary\/5 {
  box-shadow: 0 10px 15px -3px rgba(var(--color-primary-rgb), 0.05), 
              0 4px 6px -4px rgba(var(--color-primary-rgb), 0.05);
}

.shadow-primary\/10 {
  box-shadow: 0 10px 15px -3px rgba(var(--color-primary-rgb), 0.1), 
              0 4px 6px -4px rgba(var(--color-primary-rgb), 0.1);
}

/* Enhanced hover shadow */
.hover\:shadow-primary\/5:hover {
  box-shadow: 0 10px 15px -3px rgba(var(--color-primary-rgb), 0.05), 
              0 4px 6px -4px rgba(var(--color-primary-rgb), 0.05);
}

/* Border utilities with opacity */
.border-primary\/10 {
  border-color: rgba(var(--color-primary-rgb), 0.1);
}

.border-primary\/20 {
  border-color: rgba(var(--color-primary-rgb), 0.2);
}

.hover\:border-primary\/20:hover {
  border-color: rgba(var(--color-primary-rgb), 0.2);
}

/* Background utilities with opacity */
.bg-primary\/10 {
  background-color: rgba(var(--color-primary-rgb), 0.1);
}

.bg-primary\/5 {
  background-color: rgba(var(--color-primary-rgb), 0.05);
}

.bg-muted\/30 {
  background-color: rgb(from var(--muted) r g b / 0.3);
}

.bg-muted\/50 {
  background-color: rgb(from var(--muted) r g b / 0.5);
}

/* Text color utilities */
.text-primary {
  color: var(--primary);
}

.text-primary\/80 {
  color: rgba(var(--color-primary-rgb), 0.8);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.hover\:text-primary\/80:hover {
  color: rgba(var(--color-primary-rgb), 0.8);
}

/* Icon container styles */
.icon-container {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb), 0.1) 0%, 
    rgba(var(--color-primary-rgb), 0.05) 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
}

.icon-container-sm {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
}

.icon-container-lg {
  width: 4rem;
  height: 4rem;
}

/* Spacing utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }

/* Flexbox utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }

/* Width and height utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }

/* Border radius utilities */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }

/* Text utilities */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capitalize {
  text-transform: capitalize;
}

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

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }

/* Opacity utilities */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer; }

/* Z-index utilities */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Sidebar visibility fix for desktop */
@media (min-width: 1024px) {
  .app-sidebar {
    position: relative !important;
    transform: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .app-sidebar nav,
  .app-sidebar [data-spring-drawer-target="drawer"] {
    background-color: var(--card);
    height: 100%;
    position: static !important;
    left: 0 !important;
    transform: translateX(0) !important;
    transition: none !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Mobile sidebar behavior */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 30;
    width: 256px;
  }
  
  .app-sidebar nav {
    transform: translateX(-100%);
    transition: transform 300ms ease;
  }
  
  .app-sidebar.open nav {
    transform: translateX(0);
  }
}

/* Email Body Content Styling */
.email-body-content {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--color-foreground);
}

.email-body-content h1 { @apply text-2xl font-bold mb-4 mt-6 first:mt-0; }
.email-body-content h2 { @apply text-xl font-semibold mb-3 mt-5 first:mt-0; }
.email-body-content h3 { @apply text-lg font-semibold mb-2 mt-4 first:mt-0; }
.email-body-content h4 { @apply text-base font-semibold mb-2 mt-3 first:mt-0; }
.email-body-content h5 { @apply text-sm font-semibold mb-1 mt-2 first:mt-0; }
.email-body-content h6 { @apply text-sm font-semibold mb-1 mt-2 first:mt-0; }

.email-body-content ul { @apply list-disc list-inside mb-4 ml-4; }
.email-body-content ol { @apply list-decimal list-inside mb-4 ml-4; }
.email-body-content li { @apply mb-1; }

.email-body-content blockquote {
  @apply border-l-4 border-muted-foreground/30 pl-4 my-4 italic text-muted-foreground;
}

.email-body-content pre {
  @apply bg-muted rounded-lg p-4 mb-4 overflow-x-auto text-sm;
}

.email-body-content code {
  @apply bg-muted px-1 py-0.5 rounded text-sm font-mono;
}

.email-body-content pre code {
  @apply bg-transparent p-0;
}

.email-body-content strong,
.email-body-content b { @apply font-semibold; }

.email-body-content em,
.email-body-content i { @apply italic; }

.email-body-content u { @apply underline; }
/* Unified Inbox Styles */

/* Sort and Filter button states */
.unified-inbox [data-unified-inbox-target="sortButton"].active,
.unified-inbox [data-unified-inbox-target="filterButton"].active {
  @apply bg-muted text-foreground;
}

/* Sort icon animations */
.sort-icon {
  @apply inline-block transition-transform duration-200;
}

.sort-icon.asc {
  transform: rotate(180deg);
}

.sort-icon.desc {
  transform: rotate(0deg);
}

/* Selected item highlighting */
.unified-inbox [data-unified-inbox-target="item"].selected {
  @apply bg-accent border-primary/50;
}

/* Split panel responsive behavior */
@media (max-width: 1023px) {
  .hidden-mobile {
    display: none !important;
  }
}

/* Panel transitions */
.unified-inbox [data-unified-inbox-target="listPanel"],
.unified-inbox [data-unified-inbox-target="detailPanel"] {
  @apply transition-all duration-300 ease-in-out;
}

/* Loading skeleton improvements */
.unified-inbox .skeleton-item {
  @apply animate-pulse bg-muted/30 rounded;
}

/* Type indicators */
.type-indicator {
  @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium;
}

.type-indicator.email {
  @apply bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200;
}

.type-indicator.calendar {
  @apply bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200;
}

/* Priority indicators */
.priority-indicator {
  @apply w-2 h-2 rounded-full;
}

.priority-indicator.high {
  @apply bg-red-500;
}

.priority-indicator.medium {
  @apply bg-yellow-500;
}

.priority-indicator.low {
  @apply bg-gray-400;
}

/* Hover effects are handled by individual components and hover-card controller */

/* Focus styles for accessibility */
.unified-inbox [data-unified-inbox-target="sortButton"]:focus,
.unified-inbox [data-unified-inbox-target="filterButton"]:focus {
  @apply outline-none ring-2 ring-primary ring-offset-2;
}

/* Smooth transitions for show/hide */
.unified-inbox .fade-enter {
  @apply opacity-0 transform scale-95;
}

.unified-inbox .fade-enter-active {
  @apply opacity-100 transform scale-100 transition-all duration-200;
}

.unified-inbox .fade-exit {
  @apply opacity-100 transform scale-100;
}

.unified-inbox .fade-exit-active {
  @apply opacity-0 transform scale-95 transition-all duration-200;
}

/* Empty state styling */
.unified-inbox [data-unified-inbox-target="emptyState"] {
  @apply flex items-center justify-center h-64 text-center;
}

/* Control bar styling */
.unified-inbox .controls-bar {
  @apply px-6 py-3 border-b border-border bg-card/50 backdrop-blur-sm;
}

/* Mobile back button */
.unified-inbox .mobile-back-button {
  @apply lg:hidden fixed top-4 left-4 z-50;
}

/* Detail panel header */
.unified-inbox .detail-header {
  @apply px-6 py-4 border-b border-border bg-background;
}

/* Responsive grid for controls */
@media (max-width: 640px) {
  .unified-inbox .controls-bar .control-group {
    @apply flex-col gap-3;
  }
  
  .unified-inbox .controls-bar .control-buttons {
    @apply flex flex-wrap gap-2;
  }
}
/*
 * 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.
 *


 */
/* app/assets/stylesheets/emails.css */
table {
  width: 100%;
  border-collapse: collapse;
}

table, th, td {
  border: 1px solid black;
}

th, td {
  padding: 8px;
  text-align: left;
}

/* Line clamp utility */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Turbo Frame Loading States */
.turbo-frame-loading {
  position: relative;
  min-height: 100px;
}

.turbo-frame-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.5);
  z-index: 10;
}

.turbo-frame-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border: 4px solid var(--color-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 20;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Optional: Fade in animation for frame content */
turbo-frame {
  transition: opacity 300ms ease-in-out;
}

turbo-frame.turbo-frame-loading > *:not(::before):not(::after) {
  opacity: 0.5;
}
