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%; }
/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *

*/

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.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;
}

/* Dark theme for Trix editor toolbar */
trix-toolbar {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.5rem;
}

trix-toolbar .trix-button-row {
  gap: 0.25rem;
}

trix-toolbar .trix-button-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 0;
}

trix-toolbar .trix-button {
  background-color: transparent;
  border: none;
  border-bottom: none;
  filter: invert(1);
}

trix-toolbar .trix-button:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

trix-toolbar .trix-button.trix-active {
  background-color: rgba(0, 0, 0, 0.4);
}

trix-toolbar .trix-button:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toolbar dialog inputs (link URL, etc.) */
trix-toolbar .trix-dialog {
  background-color: rgb(24, 24, 27);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  padding: 0.75rem;
}

trix-toolbar .trix-dialog__link-fields input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}

trix-toolbar .trix-dialog__link-fields input::placeholder {
  color: rgb(113, 113, 122);
}

trix-toolbar .trix-dialog .trix-button-group {
  border: none;
}

trix-toolbar .trix-dialog .trix-button-group .trix-button {
  filter: none;
  color: white;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Trix editor content area */
trix-editor {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  color: white;
  min-height: 400px;
  padding: 1rem;
}

trix-editor:focus {
  border-color: rgb(139, 92, 246);
  box-shadow: 0 0 0 1px rgb(139, 92, 246);
  outline: none;
}

trix-editor a {
  color: rgb(167, 139, 250);
}

trix-editor h1,
trix-editor h2,
trix-editor h3 {
  color: white;
}

trix-editor .attachment__caption {
  color: rgb(161, 161, 170);
}
/* ==========================================================================
   Crumbless Animation System
   Subtle, polished animations for dark-themed UI
   ========================================================================== */

/* CSS Variables for Animations
   ========================================================================== */
:root {
  /* Duration tokens */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;

  /* Easing functions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Glow shadows */
  --shadow-glow-violet: 0 4px 20px -4px rgba(139, 92, 246, 0.4);
  --shadow-glow-emerald: 0 4px 20px -4px rgba(16, 185, 129, 0.4);
}

/* Page Transitions
   ========================================================================== */

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

.animate-fade-up {
  animation: fadeUpIn 0.3s ease-out;
}

/* Skeleton Loaders
   ========================================================================== */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Button Effects
   ========================================================================== */

.btn-glow {
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
}

.btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-violet);
}

.btn-glow:active {
  transform: translateY(0);
}

/* Gradient button variant for generate buttons */
.btn-glow-gradient {
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
}

.btn-glow-gradient:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-violet), var(--shadow-glow-emerald);
}

.btn-glow-gradient:active {
  transform: translateY(0);
}

/* Card Effects
   ========================================================================== */

.card-lift {
  transition: all var(--duration-normal) var(--ease-out);
}

.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.5);
}

/* Subtle lift for nested interactive elements */
.card-lift-subtle {
  transition: all var(--duration-fast) var(--ease-out);
}

.card-lift-subtle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4);
}

/* Utility Classes
   ========================================================================== */

/* Smooth transitions for interactive elements */
.transition-smooth {
  transition: all var(--duration-normal) var(--ease-out);
}

.transition-fast {
  transition: all var(--duration-fast) var(--ease-out);
}

.transition-slow {
  transition: all var(--duration-slow) var(--ease-out);
}

/* Spring animations for playful interactions */
.transition-spring {
  transition: all var(--duration-normal) var(--ease-spring);
}

/* Sticky Table Headers
   ========================================================================== */

/* Table container for scroll */
.table-container {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  border-radius: 1rem;
}

/* Sticky header positioning */
.table-sticky thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #12121a;
}

.table-sticky thead tr {
  background: #12121a;
}

.table-sticky thead th {
  position: relative;
  background: inherit;
}

/* Subtle gradient shadow when scrolled */
.table-sticky thead::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(139, 92, 246, 0.3) 0%,
    rgba(16, 185, 129, 0.3) 100%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.table-sticky.scrolled thead::after {
  opacity: 1;
}

/* Custom scrollbar for tables */
.table-container::-webkit-scrollbar {
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: background var(--duration-fast) var(--ease-out);
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* A/B Test Visualizations
   ========================================================================== */

/* Progress bar animation for A/B test comparison bars */
@keyframes progressGrow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ab-test-bar {
  animation: progressGrow 0.8s ease-out forwards;
}

/* Confidence ring animation */
@keyframes drawCircle {
  from {
    stroke-dasharray: 0 100;
  }
}

.confidence-ring {
  animation: drawCircle 1s ease-out forwards;
}

/* Pulse animation for winner badges */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.winner-badge {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Number counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-number {
  animation: countUp 0.5s ease-out forwards;
}

/* Stagger animation for multiple metrics */
.metric-item:nth-child(1) { animation-delay: 0ms; }
.metric-item:nth-child(2) { animation-delay: 100ms; }
.metric-item:nth-child(3) { animation-delay: 200ms; }
.metric-item:nth-child(4) { animation-delay: 300ms; }

/* Auth Page - Animated Gradient Mesh Background
   ========================================================================== */

@keyframes meshDrift1 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translate(80px, -60px) scale(1.1);
    opacity: 0.2;
  }
  50% {
    transform: translate(-40px, 40px) scale(0.95);
    opacity: 0.12;
  }
  75% {
    transform: translate(60px, 80px) scale(1.05);
    opacity: 0.18;
  }
}

@keyframes meshDrift2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.1;
  }
  33% {
    transform: translate(-100px, 60px) scale(1.15);
    opacity: 0.15;
  }
  66% {
    transform: translate(70px, -80px) scale(0.9);
    opacity: 0.08;
  }
}

@keyframes meshDrift3 {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.08;
  }
  50% {
    transform: translate(50px, 50px) scale(1.2) rotate(30deg);
    opacity: 0.14;
  }
}

@keyframes meshDrift4 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.06;
  }
  40% {
    transform: translate(-60px, -40px) scale(1.1);
    opacity: 0.12;
  }
  80% {
    transform: translate(40px, 60px) scale(0.95);
    opacity: 0.08;
  }
}

@keyframes meshPulse {
  0%, 100% {
    opacity: 0.04;
  }
  50% {
    opacity: 0.08;
  }
}

.auth-mesh-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-mesh-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
  animation: meshPulse 8s ease-in-out infinite;
}

.auth-mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform, opacity;
}

.auth-mesh-blob--violet-1 {
  width: 900px;
  height: 900px;
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5) 0%, rgba(124, 58, 237, 0.2) 40%, transparent 70%);
  filter: blur(60px);
  animation: meshDrift1 20s ease-in-out infinite;
}

.auth-mesh-blob--emerald {
  width: 800px;
  height: 800px;
  bottom: -15%;
  right: -5%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, rgba(52, 211, 153, 0.15) 40%, transparent 70%);
  filter: blur(60px);
  animation: meshDrift2 25s ease-in-out infinite;
}

.auth-mesh-blob--violet-2 {
  width: 600px;
  height: 600px;
  top: 30%;
  right: 5%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
  filter: blur(50px);
  animation: meshDrift3 18s ease-in-out infinite;
}

.auth-mesh-blob--violet-3 {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: 15%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, rgba(167, 139, 250, 0.08) 50%, transparent 70%);
  filter: blur(50px);
  animation: meshDrift4 22s ease-in-out infinite;
}

.auth-mesh-blob--accent {
  width: 400px;
  height: 400px;
  top: 10%;
  left: 45%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.25) 0%, transparent 60%);
  filter: blur(40px);
  animation: meshDrift1 30s ease-in-out infinite reverse;
}

/* Noise texture overlay for depth */
.auth-mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(/%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* Auth form card with glassmorphism */
.auth-card {
  background: rgba(17, 17, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(139, 92, 246, 0.08);
}

/* Subtle glow line at top of card */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.4) 30%,
    rgba(52, 211, 153, 0.3) 70%,
    transparent
  );
  border-radius: 1px;
}

/* Entrance animation for auth card */
@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-enter {
  animation: authCardEnter 0.6s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

/* Logo entrance */
@keyframes authLogoEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo-enter {
  animation: authLogoEnter 0.4s ease-out forwards;
}

/* Landing Page Card Animations
   ========================================================================== */

/* Scroll-reveal: cards start hidden, animate in when visible */
.landing-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.7s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: opacity, transform;
}

.landing-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered entrance delays */
.landing-card:nth-child(1) { transition-delay: 0s; }
.landing-card:nth-child(2) { transition-delay: 0.1s; }
.landing-card:nth-child(3) { transition-delay: 0.2s; }

/* 3D perspective container */
.landing-cards-grid {
  perspective: 1200px;
}

/* 3D tilt card wrapper */
.landing-card-tilt {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1),
              box-shadow 0.4s cubic-bezier(0.33, 1, 0.68, 1),
              border-color 0.35s ease;
}

.landing-card-tilt:hover {
  border-color: rgba(139, 92, 246, 0.25) !important;
  box-shadow:
    0 20px 40px -12px rgba(139, 92, 246, 0.15),
    0 0 0 1px rgba(139, 92, 246, 0.08);
}

/* Gradient overlay on hover */
.landing-card-tilt::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(139, 92, 246, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.landing-card-tilt:hover::before {
  opacity: 1;
}

/* CTA button shimmer effect */
.landing-btn-shimmer {
  position: relative;
  overflow: hidden;
}

.landing-btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  animation: btnShimmer 3s infinite;
  pointer-events: none;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Status pulse for tier tags */
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.landing-status-dot {
  animation: statusPulse 2s ease-in-out infinite;
}

/* Discount badge subtle glow */
.landing-discount-badge {
  position: relative;
}

.landing-discount-badge::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: inherit;
  opacity: 0.4;
  filter: blur(8px);
  z-index: -1;
}

/* Section header scroll reveal */
.landing-section-header {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1),
              transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.landing-section-header.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Popular card extra glow pulse */
@keyframes popularGlow {
  0%, 100% {
    box-shadow:
      0 0 40px -8px rgba(139, 92, 246, 0.15),
      0 0 0 1px rgba(139, 92, 246, 0.1);
  }
  50% {
    box-shadow:
      0 0 60px -8px rgba(139, 92, 246, 0.25),
      0 0 0 1px rgba(139, 92, 246, 0.15);
  }
}

.landing-card-popular {
  animation: popularGlow 4s ease-in-out infinite;
}

/* Feature list stagger animation */
.landing-card.is-visible .landing-feature-item {
  opacity: 1;
  transform: translateX(0);
}

.landing-feature-item {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.landing-feature-item:nth-child(1) { transition-delay: 0.3s; }
.landing-feature-item:nth-child(2) { transition-delay: 0.4s; }
.landing-feature-item:nth-child(3) { transition-delay: 0.5s; }
.landing-feature-item:nth-child(4) { transition-delay: 0.6s; }

/* Ambient Morphing Blob
   ========================================================================== */

@keyframes morphBlob {
  0%   { border-radius: 42% 58% 65% 35% / 55% 40% 60% 45%; }
  14%  { border-radius: 55% 45% 38% 62% / 48% 62% 38% 52%; }
  28%  { border-radius: 38% 62% 52% 48% / 60% 35% 65% 40%; }
  42%  { border-radius: 62% 38% 45% 55% / 35% 55% 45% 65%; }
  57%  { border-radius: 48% 52% 60% 40% / 52% 45% 55% 48%; }
  71%  { border-radius: 35% 65% 42% 58% / 62% 48% 38% 55%; }
  85%  { border-radius: 58% 42% 55% 45% / 40% 58% 52% 38%; }
  100% { border-radius: 42% 58% 65% 35% / 55% 40% 60% 45%; }
}

@keyframes colorShift {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 50% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

.morph-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: blur(120px);
  opacity: 0.10;
  background: linear-gradient(135deg, #8B5CF6, #1E3A8A, #34D399, #8B5CF6);
  background-size: 400% 400%;
  animation: morphBlob 25s ease-in-out infinite, colorShift 20s ease-in-out infinite;
}

/* Noise overlay for ambient background */
.ambient-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(/%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* Live Indicator Pulse
   ========================================================================== */

@keyframes livePulse {
  0%, 100% { opacity: 0.5; box-shadow: 0 0 4px rgba(52,211,153,0.3); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(52,211,153,0.6); }
}

.live-pulse {
  animation: livePulse 2.5s ease-in-out infinite;
}

/* Stat Dot Pulse */
@keyframes statPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.stat-pulse {
  animation: statPulse 2s ease-in-out infinite;
}
@import "./sidebar.css";
@import "./animations.css";
@import "./modal_animations.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: 'Avenir';
  src: url(/fonts/AvenirLTStd-Roman.otf) format('opentype');
  font-weight: 400;
  font-style: normal;
}

@layer base {
  /* ═══ Glassmorphic Design Tokens ═══ */
  :root {
    --bg: #030304;
    --surface: rgba(12, 12, 14, 0.85);
    --surface-raised: rgba(18, 18, 22, 0.9);
    --border: rgba(255,255,255,0.05);
    --border-hover: rgba(255,255,255,0.10);
    --text-primary: #EEEEF0;
    --text-secondary: #8B8B96;
    --text-muted: #484852;
    --violet: #8B5CF6;
    --violet-soft: #A78BFA;
    --emerald: #34D399;
    --cyan: #22D3EE;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
  }

  /* Smooth rendering for dark theme */
  html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color-scheme: dark;
    line-height: normal; /* Override Tailwind preflight 1.5 to match concept */
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
  }

  /* Force dark backgrounds on all form elements including dropdown options */
  select,
  select option,
  select optgroup,
  input,
  textarea {
    background-color: rgb(17, 17, 20);
    color: white;
    color-scheme: dark;
  }

  /* Style select dropdown options specifically */
  select option {
    background-color: rgb(24, 24, 27);
    color: white;
    padding: 8px 12px;
  }

  select option:hover,
  select option:focus,
  select option:checked {
    background-color: rgb(139, 92, 246);
    color: white;
  }

  /* Ensure datalist suggestions are dark */
  datalist {
    background-color: rgb(24, 24, 27);
    color: white;
  }

  /* Style autofill to maintain dark theme */
  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active,
  select:-webkit-autofill,
  textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgb(17, 17, 20) inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white;
  }

  /* Safari fix: bg-white/5 with backdrop-filter renders incorrectly in Safari.
     This provides a fallback solid dark background that Safari will use. */
  @supports (-webkit-backdrop-filter: blur(1px)) {
    .safari-dark-bg {
      background-color: rgba(15, 15, 17, 0.95);
    }
  }

  /* Default border color for dark theme elements */
  .dark * {
    border-color: rgba(255, 255, 255, 0.1);
  }

  /* Landing page specific base styles */
  .dark {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity));
  }

  /* Improve heading rendering */
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }

  /* Better paragraph spacing */
  p {
    text-wrap: pretty;
  }
}

@layer components {
  /* Landing page button styles */
  .landing-btn {
    @apply inline-flex items-center justify-center gap-2 rounded-md font-medium transition-all;
  }

  .landing-btn-lg {
    @apply h-10 px-6 text-sm;
  }

  .landing-btn-xl {
    @apply px-6 py-5 sm:px-8 sm:py-6 text-base sm:text-lg;
  }

  .landing-btn-primary {
    @apply bg-violet-600 hover:bg-violet-700 text-white;
  }

  .landing-btn-outline {
    @apply border border-gray-700 hover:border-violet-500 hover:bg-violet-500/10 text-white;
  }

  /* Landing page gradient text */
  .landing-gradient-text {
    @apply text-transparent bg-clip-text bg-gradient-to-r from-violet-400 to-emerald-400;
  }

  /* ═══ Glassmorphic Surfaces ═══ */
  .glass-surface {
    background: var(--surface);
    backdrop-filter: blur(40px) saturate(1.3);
    -webkit-backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid var(--border);
  }

  .glass-raised {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
  }

  .glass-raised:hover {
    border-color: var(--border-hover);
  }

  .glass-panel {
    background: var(--surface);
    backdrop-filter: blur(40px) saturate(1.3);
    -webkit-backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.02),
      0 20px 60px rgba(0,0,0,0.5),
      0 0 120px rgba(139,92,246,0.03);
  }

  .glass-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }

  /* ═══ Center Column (Panel + Command Bar) ═══ */
  .center-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 94%;
    max-width: 1440px;
    height: 100dvh;
  }

  /* ═══ Panel Header ═══ */
  .panel-header {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.008);
    flex-shrink: 0;
  }
  .panel-header-left { display: flex; align-items: center; gap: 6px; }

  .panel-dots { display: flex; gap: 6px; }
  .panel-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.07);
    transition: background 0.2s;
  }
  .panel-dot:nth-child(1):hover { background: #FF5F57; }
  .panel-dot:nth-child(2):hover { background: #FEBC2E; }
  .panel-dot:nth-child(3):hover { background: #28C840; }

  .panel-breadcrumb {
    flex: 1; display: flex; align-items: center;
    justify-content: center; gap: 6px;
    font-size: 12px; color: var(--text-muted);
  }
  .panel-breadcrumb .current {
    color: var(--text-secondary);
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .panel-tabs { display: flex; gap: 2px; }
  .panel-tab {
    padding: 4px 12px; font-size: 11px;
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
  }
  .panel-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
  .panel-tab.active { color: rgb(196,181,253); background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.3); }
  .panel-tab.active:hover { background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.4); }

  .panel-body {
    flex: 1; overflow-y: auto;
    padding: 32px 40px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
    position: relative;
  }
  .panel-body::-webkit-scrollbar { width: 5px; }
  .panel-body::-webkit-scrollbar-track { background: transparent; }
  .panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
  .panel-content {
    max-width: 100%;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .panel-content.fading { opacity: 0; }

  /* ═══ Status Pills (Panel Header) ═══ */
  .top-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 11px; color: var(--text-muted);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    text-decoration: none;
  }
  .top-pill:hover { background: rgba(255,255,255,0.04); border-color: var(--border-hover); }
  .top-pill .material-symbols-outlined { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
  .top-pill:hover .material-symbols-outlined { color: var(--text-secondary); }
  .top-pill.notif { position: relative; padding: 6px 10px; background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.3); }
  .top-pill.notif:hover { background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.4); }
  .top-pill.notif .material-symbols-outlined { color: rgb(167,139,250); }
  .top-pill.notif:hover .material-symbols-outlined { color: rgb(196,181,253); }
  .top-pill.notif .badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 15px; height: 15px;
    display: flex; align-items: center; justify-content: center;
    background: #EF4444; color: white; font-size: 8px; font-weight: 700;
    border-radius: 8px; padding: 0 4px;
    box-shadow: 0 0 8px rgba(239,68,68,0.4);
  }
  .top-pill.connection .account-id {
    font-weight: 500; color: var(--text-secondary);
    font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  }
  .top-pill.connection .divider { width: 1px; height: 12px; background: var(--border); }
  .top-pill.connection .live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
    animation: livePulse 2.5s ease-in-out infinite;
  }
  .top-pill.connection .live-label { font-weight: 500; color: var(--emerald); }
  .top-pill.connection .chevron { font-size: 14px; color: var(--text-muted); margin-left: -2px; transition: transform 0.2s; }
  .top-pill.connection:hover .chevron { transform: rotate(180deg); }
  @keyframes livePulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 4px rgba(52,211,153,0.3); }
    50% { opacity: 1; box-shadow: 0 0 8px rgba(52,211,153,0.6); }
  }

  /* ═══ Header Tools (Undo/Redo/History) ═══ */
  .header-tools {
    display: inline-flex; align-items: center; gap: 1px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 1px;
    flex-shrink: 0;
    margin-left: auto;
  }
  .header-tools > form { display: contents; }
  .header-tools > form > input[type="hidden"] { display: none; }
  .header-tool-btn {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--text-muted);
    cursor: pointer; flex-shrink: 0;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
  }
  .header-tool-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
  }
  .header-tool-btn:hover .material-symbols-outlined { color: var(--text-secondary); }
  .header-tool-btn .material-symbols-outlined {
    font-size: 12px; color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
  }
  .header-tool-btn:disabled, .header-tool-btn[disabled] {
    opacity: 0.2; cursor: not-allowed; pointer-events: none;
  }

  /* ═══ Date Range Pill ═══ */
  .date-range {
    display: flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 10px; color: var(--text-muted);
    cursor: pointer; flex-shrink: 0;
    transition: all 0.2s;
    text-decoration: none;
  }
  .date-range:hover { background: rgba(255,255,255,0.05); border-color: var(--border-hover); color: var(--text-secondary); }
  .date-range .material-symbols-outlined { font-size: 13px; }
  .date-range .chevron { transition: transform 0.2s; }
  details[open] > .date-range .chevron { transform: rotate(180deg); }

  /* ═══ Date Range Dropdown ═══ */
  .date-range-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px);
    width: 240px; z-index: 60;
    background: rgba(6,6,8,0.95); backdrop-filter: blur(24px);
    border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02);
    overflow: hidden;
    padding: 4px 0;
  }
  .drp-section-label {
    padding: 8px 14px 4px;
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
  }
  .drp-options { padding: 2px 4px; }
  .drp-option {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 7px 10px; border-radius: 10px;
    background: none; border: none; cursor: pointer;
    font-size: 12px; color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
    text-align: left;
  }
  .drp-option:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
  .drp-option .material-symbols-outlined { font-size: 15px; opacity: 0.5; }
  .drp-option-active { color: var(--violet-soft); }
  .drp-option-active .material-symbols-outlined { opacity: 1; color: var(--violet-soft); }
  .drp-check { font-size: 14px !important; margin-left: auto; opacity: 1 !important; }
  .drp-option-custom { margin: 0 4px; }
  .drp-divider { height: 1px; background: var(--border); margin: 4px 10px; }

  /* Custom date panel */
  .drp-custom-panel { padding: 0 4px 4px; }
  .drp-custom-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 6px; padding: 8px 10px 4px;
  }
  .drp-field { display: flex; flex-direction: column; gap: 3px; }
  .drp-field label {
    font-size: 9px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--text-muted);
  }
  .drp-field input {
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: 8px; padding: 5px 8px;
    font-size: 11px; color: var(--text-primary);
    outline: none; transition: border-color 0.15s;
    color-scheme: dark;
  }
  .drp-field input:focus { border-color: var(--violet-soft); }
  .drp-actions {
    display: flex; justify-content: flex-end; gap: 6px;
    padding: 6px 10px 4px;
  }
  .drp-btn-cancel {
    padding: 4px 12px; border-radius: 8px;
    background: none; border: 1px solid var(--border);
    font-size: 11px; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s;
  }
  .drp-btn-cancel:hover { border-color: var(--border-hover); color: var(--text-secondary); }
  .drp-btn-apply {
    padding: 4px 14px; border-radius: 8px;
    background: var(--violet); border: none;
    font-size: 11px; font-weight: 600; color: white;
    cursor: pointer; transition: all 0.15s;
  }
  .drp-btn-apply:hover { background: #7C3AED; }

  /* ═══ Command Bar ═══ */
  .command-row {
    width: 100%; max-width: 560px;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-shrink: 0;
  }
  .command-bar {
    flex: 1; display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px; padding: 0 18px; height: 42px;
    cursor: text; position: relative;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .command-bar::before {
    content: ''; position: absolute; inset: -2px;
    border-radius: 20px;
    background: radial-gradient(ellipse at center, rgba(139,92,246,0.06) 0%, transparent 70%);
    pointer-events: none; z-index: -1; opacity: 0.5;
    transition: opacity 0.4s;
  }
  .command-bar:hover { border-color: var(--border-hover); }
  .command-bar:hover::before { opacity: 1; }
  .command-bar:focus-within {
    border-color: rgba(139,92,246,0.25);
    box-shadow: 0 0 0 4px rgba(139,92,246,0.06), 0 0 40px rgba(139,92,246,0.06), 0 8px 30px rgba(0,0,0,0.3);
    transform: scaleX(1.01);
  }
  .command-bar:focus-within::before { opacity: 1; }
  .command-bar .icon { color: var(--text-muted); font-size: 20px; flex-shrink: 0; }
  .command-bar input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-primary); font-family: inherit; font-size: 14px; min-width: 0;
    cursor: text;
  }
  .command-bar input::placeholder { color: var(--text-muted); }
  .slash-badge {
    font-size: 11px; color: var(--violet-soft);
    padding: 2px 7px; border-radius: 6px;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.12);
    font-weight: 600; flex-shrink: 0;
  }
  .kbd-hint { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
  .kbd-hint kbd {
    font-family: inherit; font-size: 10px;
    padding: 2px 5px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border); border-radius: 5px;
    color: var(--text-muted); line-height: 1.2;
  }
  /* Slash commands popup */
  .cmd-popup {
    position: absolute; bottom: calc(100% + 8px); left: 0; right: 0;
    background: rgba(6,6,8,0.95); backdrop-filter: blur(24px);
    border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02);
    z-index: 50; overflow: hidden;
  }
  .cmd-popup-header {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px 8px; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--violet-soft); border-bottom: 1px solid var(--border);
  }
  .cmd-popup-list {
    max-height: 280px; overflow-y: auto; padding: 4px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .cmd-popup-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px;
    text-decoration: none; transition: background 0.15s;
  }
  .cmd-popup-item:hover, .cmd-active .cmd-popup-item {
    background: rgba(255,255,255,0.06);
  }
  .cmd-popup-slash {
    font-family: 'SF Mono', ui-monospace, monospace; font-size: 12.5px;
    font-weight: 600; color: var(--violet-soft); min-width: 90px;
  }
  .cmd-popup-desc {
    font-size: 12px; color: var(--text-muted);
  }

  /* ═══ Chip Chat (extends .cmd-popup) ═══ */
  .chip-chat-panel {
    display: flex;
    flex-direction: column;
  }
  .chip-chat-messages {
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
    max-height: 300px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
  }
  .chip-chat-messages::-webkit-scrollbar { width: 3px; }
  .chip-chat-messages::-webkit-scrollbar-track { background: transparent; }
  .chip-chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.06); border-radius: 2px; }
  .chip-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 14px 10px;
  }
  .chip-suggestion-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .chip-suggestion-pill:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
    color: var(--violet-soft);
  }
  .chip-undo-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 10px;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.12);
  }
  .chip-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.15s;
  }
  .chip-undo-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
  }
  .cmd-btn {
    width: 42px; height: 42px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    cursor: pointer; flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
  }
  .cmd-btn:hover { border-color: var(--border-hover); background: var(--surface-raised); }
  .cmd-btn .material-symbols-outlined { font-size: 18px; color: var(--text-muted); transition: color 0.2s; }
  .cmd-btn:hover .material-symbols-outlined { color: var(--text-secondary); }
  .cmd-btn.avatar {
    background: linear-gradient(135deg, #7C3AED, #4F46E5);
    border-color: rgba(139,92,246,0.25);
    color: white; font-size: 12px; font-weight: 600;
  }
  .cmd-btn.avatar:hover { box-shadow: 0 0 20px rgba(139,92,246,0.15); }

  /* ═══ Overlay Tools (Right side) ═══ */
  .overlay-tools {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    z-index: 100; display: flex; flex-direction: column; gap: 10px;
  }
  .overlay-btn {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
  }
  .overlay-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(139,92,246,0.06);
  }
  .overlay-btn .material-symbols-outlined { font-size: 16px; color: var(--text-muted); transition: color 0.25s; }
  .overlay-btn:hover .material-symbols-outlined { color: var(--text-secondary); }

  /* ═══ Help Button ═══ */
  .help-btn {
    position: fixed; bottom: 20px; right: 20px; z-index: 100;
    width: 32px; height: 32px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    cursor: pointer; font-size: 12px; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .help-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-hover);
    color: var(--text-secondary);
    box-shadow: 0 0 16px rgba(139,92,246,0.06);
  }

  /* ═══ Dashboard Content Styles ═══ */
  .dash-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 20px; }
  .greeting { flex: 1; }
  .greeting h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 3px; }
  .greeting h1 .highlight {
    background: linear-gradient(135deg, var(--violet-soft), var(--emerald));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }
  .greeting p { font-size: 12.5px; color: var(--text-secondary); }

  .health-pill {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 16px; flex-shrink: 0;
    transition: border-color 0.2s; text-decoration: none;
  }
  .health-pill:hover { border-color: var(--border-hover); }
  .health-score { position: relative; width: 42px; height: 42px; flex-shrink: 0; }
  .health-score svg { width: 42px; height: 42px; transform: rotate(-90deg); }
  .health-score .track { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 4; }
  .health-score .bar { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
  .health-score .val {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; letter-spacing: -0.02em;
  }
  .health-meta { display: flex; flex-direction: column; gap: 2px; }
  .health-meta .label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; }
  .health-meta .rating { font-size: 12px; font-weight: 600; }
  .health-meta .rating.excellent { color: var(--emerald); }
  .health-meta .rating.good { color: #60A5FA; }
  .health-meta .rating.needs-attention { color: #FBBF24; }
  .health-meta .subs { font-size: 10px; color: var(--text-muted); }

  /* Hero metrics grid */
  .metrics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
  .metric-card {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 14px 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative; overflow: hidden;
  }
  .metric-card:hover { border-color: var(--border-hover); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
  .metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .metric-icon {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
  }
  .metric-icon .material-symbols-outlined { font-size: 14px; }
  .metric-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
  .metric-value { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2px; }
  .metric-bottom { display: flex; align-items: center; justify-content: space-between; }
  .metric-delta { font-size: 9.5px; font-weight: 500; display: flex; align-items: center; gap: 2px; }
  .metric-delta .material-symbols-outlined { font-size: 12px; }
  .metric-delta.up { color: var(--emerald); }
  .metric-delta.down { color: #F87171; }
  .metric-sparkline { width: 48px; height: 20px; flex-shrink: 0; }
  .metric-sparkline polyline { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

  /* Chart area */
  .chart-area {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 14px; height: 200px; margin-bottom: 20px;
    position: relative; overflow: hidden; display: flex; align-items: flex-end;
  }
  .chart-area:hover { border-color: var(--border-hover); }
  .chart-area .apexcharts-canvas,
  .chart-area .apexcharts-svg,
  .chart-area .apexcharts-canvas svg { background: transparent !important; }
  .chart-header {
    position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
  }
  .chart-header .chart-label { font-size: 11px; color: var(--text-muted); }
  .chart-legend { display: flex; gap: 12px; }
  .chart-legend-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-muted); }
  .chart-legend-dot { width: 6px; height: 6px; border-radius: 50%; }
  .chart-svg { width: 100%; height: 70%; }

  /* Section labels */
  .section-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px;
  }

  /* Card grid rows */
  .cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
  .dash-card {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; transition: border-color 0.2s;
  }
  .dash-card:hover { border-color: var(--border-hover); }
  .dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .dash-card-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
  .dash-card-badge { font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
  .dash-card-stat { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
  .stat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .stat-dot.pulse { animation: statPulse 2s ease-in-out infinite; }
  @keyframes statPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
  .stat-label { font-size: 12px; color: var(--text-secondary); flex: 1; }
  .stat-value { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

  /* Progress bar */
  .progress-track { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; margin-top: 8px; }
  .progress-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
  .budget-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
  .budget-spent { font-size: 16px; font-weight: 600; }
  .budget-total { font-size: 11px; color: var(--text-muted); }
  .budget-pct { font-size: 11px; font-weight: 600; }

  /* Tables grid */
  .tables-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
  .dash-table {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; overflow: hidden; transition: border-color 0.2s;
  }
  .dash-table:hover { border-color: var(--border-hover); }
  .dash-table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .dash-table-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
  .dash-table-link { font-size: 10px; color: var(--violet-soft); text-decoration: none; }
  .dash-table-link:hover { text-decoration: underline; }
  .t-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12px; }
  .t-row:first-child { border-top: none; }
  .t-name { flex: 1; color: var(--text-primary); font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .t-badge { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
  .t-badge.on { background: rgba(52,211,153,0.12); color: var(--emerald); }
  .t-badge.off { background: rgba(255,255,255,0.05); color: var(--text-muted); }
  .t-stat { font-size: 11px; font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 48px; text-align: right; }
  .t-stat.blue { color: #60A5FA; }
  .t-stat.emerald { color: var(--emerald); }
  .t-stat.muted { color: var(--text-muted); }
  .t-thumb {
    width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
  }
  .t-thumb .material-symbols-outlined { font-size: 14px; color: var(--text-muted); }

  /* Activity feed */
  .activity-list { display: flex; flex-direction: column; gap: 6px; }
  .activity-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px; font-size: 13px;
    transition: border-color 0.2s;
  }
  .activity-row:hover { border-color: var(--border-hover); }
  .activity-dot {
    width: 30px; height: 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .activity-dot .material-symbols-outlined { font-size: 15px; }
  .activity-text { flex: 1; }
  .activity-text .primary { font-weight: 500; font-size: 12.5px; }
  .activity-text .secondary { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
  .activity-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

  /* ═══ Thin Scrollbar ═══ */
  .thin-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .thin-scrollbar::-webkit-scrollbar { width: 5px; }
  .thin-scrollbar::-webkit-scrollbar-track { background: transparent; }
  .thin-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }

  /* Bento card base - uses dark background for Safari compatibility
     Safari renders white/5 + backdrop-blur incorrectly as solid white */
  .bento-card {
    @apply relative rounded-2xl border border-white/10 bg-[#111114]/80 backdrop-blur-sm;
  }

  /* Bento card glow effect */
  .bento-glow {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
  }

  /* Popular card glow */
  .bento-glow-emerald {
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.2);
  }

  /* Section container */
  .landing-section {
    @apply py-16 sm:py-20 lg:py-24 px-4 sm:px-6 lg:px-8;
  }

  /* Section heading */
  .landing-heading {
    @apply text-3xl sm:text-4xl lg:text-5xl font-bold tracking-tight;
  }

  /* Section subheading */
  .landing-subheading {
    @apply text-base sm:text-lg text-gray-400;
  }

  /* ═══ Brand DNA Page ═══ */

  /* ── Brand DNA: reduced padding to match Discovery ── */
  .panel-body:has(.dna-fullpage) {
    padding: 10px 16px;
  }

  .dna-page-header {
    position: relative; padding: 20px 24px 16px; border-radius: 14px; margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(139,92,246,0.10) 0%, rgba(52,211,153,0.06) 50%, rgba(96,165,250,0.05) 100%);
    border: 1px solid rgba(139,92,246,0.12); overflow: hidden;
  }
  .dna-page-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.08) 0%, transparent 60%);
    pointer-events: none;
  }
  .dna-page-header-content { position: relative; z-index: 1; }
  .dna-page-header-row { display: flex; align-items: center; justify-content: space-between; }
  .dna-page-actions { display: flex; align-items: center; gap: 6px; }
  .dna-back-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 500; color: var(--text-muted);
    text-decoration: none; transition: color 0.2s;
  }
  .dna-back-link:hover { color: var(--text-secondary); }
  .dna-back-link .material-symbols-outlined { font-size: 16px; }
  .dna-page-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em;
  }
  .dna-page-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .dna-active-hero {
    background: linear-gradient(135deg, rgba(52,211,153,0.06) 0%, rgba(139,92,246,0.04) 100%);
    border: 1px solid rgba(52,211,153,0.18); border-radius: 14px; padding: 0;
    transition: border-color 0.2s; overflow: hidden; text-decoration: none; display: block;
  }
  .dna-active-hero:hover { border-color: rgba(52,211,153,0.30); }
  .dna-active-hero-header {
    display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px;
  }
  .dna-active-hero-body { padding: 0 22px 18px; }
  .dna-active-hero-stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
  .dna-active-hero-stat {
    background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px; padding: 12px 14px;
  }

  /* Tab bar */
  .dna-tabs { display: flex; gap: 2px; flex-shrink: 0; }
  .dna-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 14px; font-size: 11px; font-weight: 500;
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; transition: all 0.2s;
    background: none; border: none;
  }
  .dna-tab .material-symbols-outlined { font-size: 15px; }
  .dna-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
  .dna-tab.active { color: var(--text-primary); background: rgba(255,255,255,0.05); }

  /* Section card */
  .dna-section {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; transition: border-color 0.2s;
  }
  .dna-section:hover { border-color: var(--border-hover); }

  /* Section header */
  .dna-section-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  }
  .dna-section-dot { width: 4px; height: 14px; border-radius: 2px; flex-shrink: 0; }
  .dna-section-title {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
  }
  .dna-section-hint {
    font-size: 10px; color: var(--text-muted); margin-left: auto; opacity: 0.6;
  }

  /* Field pair (label + value) */
  .dna-field { margin-bottom: 10px; }
  .dna-field:last-child { margin-bottom: 0; }
  .dna-field-label {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted); font-weight: 600; margin-bottom: 3px;
  }
  .dna-field-value { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
  .dna-field-value.empty { color: var(--text-muted); font-style: italic; font-size: 11px; }

  /* Tag container and tags */
  .dna-tags { display: flex; flex-wrap: wrap; gap: 5px; }
  .dna-tag {
    padding: 3px 10px; border-radius: 7px; font-size: 11px; font-weight: 500;
    background: rgba(255,255,255,0.04); color: var(--text-secondary);
    border: 1px solid var(--border); transition: border-color 0.15s;
  }
  .dna-tag:hover { border-color: var(--border-hover); }

  /* Colored tag variants */
  .dna-tag.violet { background: rgba(139,92,246,0.08); color: #A78BFA; border-color: rgba(139,92,246,0.15); }
  .dna-tag.emerald { background: rgba(52,211,153,0.08); color: #34D399; border-color: rgba(52,211,153,0.15); }
  .dna-tag.blue { background: rgba(96,165,250,0.08); color: #60A5FA; border-color: rgba(96,165,250,0.15); }
  .dna-tag.cyan { background: rgba(34,211,238,0.08); color: #22D3EE; border-color: rgba(34,211,238,0.15); }
  .dna-tag.amber { background: rgba(251,191,36,0.08); color: #FBBF24; border-color: rgba(251,191,36,0.15); }
  .dna-tag.red { background: rgba(248,113,113,0.08); color: #F87171; border-color: rgba(248,113,113,0.15); }
  .dna-tag.orange { background: rgba(251,146,60,0.08); color: #FB923C; border-color: rgba(251,146,60,0.15); }
  .dna-tag.pink { background: rgba(244,114,182,0.08); color: #F472B6; border-color: rgba(244,114,182,0.15); }
  .dna-tag.fuchsia { background: rgba(217,70,239,0.08); color: #D946EF; border-color: rgba(217,70,239,0.15); }
  .dna-tag.teal { background: rgba(45,212,191,0.08); color: #2DD4BF; border-color: rgba(45,212,191,0.15); }
  .dna-tag.sky { background: rgba(56,189,248,0.08); color: #38BDF8; border-color: rgba(56,189,248,0.15); }
  .dna-tag.rose { background: rgba(251,113,133,0.08); color: #FB7185; border-color: rgba(251,113,133,0.15); }
  .dna-tag.indigo { background: rgba(129,140,248,0.08); color: #818CF8; border-color: rgba(129,140,248,0.15); }

  /* Grid layouts */
  .dna-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dna-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .dna-grid-2.tight { gap: 6px; }

  /* Hero card (gradient bg for active/featured items) */
  .dna-hero {
    background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(52,211,153,0.04));
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 14px; padding: 20px; transition: border-color 0.2s;
  }
  .dna-hero:hover { border-color: rgba(139,92,246,0.25); }

  /* Empty state */
  .dna-empty {
    display: flex; align-items: center; justify-content: center;
    min-height: 400px;
  }
  .dna-empty-inner {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 20px; padding: 40px; max-width: 480px; width: 100%;
    text-align: center;
  }
  .dna-empty-icon {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(139,92,246,0.2);
  }
  .dna-empty-icon .material-symbols-outlined { font-size: 26px; color: white; }
  .dna-empty h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
  .dna-empty p { font-size: 12px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
  .dna-empty-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px;
  }
  .dna-empty-feature {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    text-align: left;
  }
  .dna-empty-feature .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
  .dna-empty-feature .feature-title { font-size: 11px; font-weight: 600; }
  .dna-empty-feature .feature-desc { font-size: 9px; color: var(--text-muted); }

  /* Tool card (Voice Analyzer, Competitor Comparison) */
  .dna-tool {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; transition: border-color 0.2s;
  }
  .dna-tool:hover { border-color: var(--border-hover); }
  .dna-tool-input {
    width: 100%; padding: 8px 14px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 10px; font-size: 12px; color: var(--text-primary);
    outline: none; transition: border-color 0.2s; resize: none;
  }
  .dna-tool-input::placeholder { color: var(--text-muted); }
  .dna-tool-input:focus { border-color: rgba(139,92,246,0.4); }

  /* Color palette swatch */
  .dna-color-swatch {
    width: 48px; height: 48px; border-radius: 10px;
    border: 1px solid var(--border); flex-shrink: 0;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
  }
  .dna-color-label { font-size: 10px; font-family: 'SF Mono', ui-monospace, monospace; color: var(--text-muted); }

  /* Stat item */
  .dna-stat {
    padding: 12px; border-radius: 10px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    text-align: center; transition: border-color 0.15s;
  }
  .dna-stat:hover { border-color: var(--border-hover); }
  .dna-stat-number { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
  .dna-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

  /* Quote card */
  .dna-quote {
    padding: 12px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    transition: border-color 0.15s;
  }
  .dna-quote:hover { border-color: var(--border-hover); }
  .dna-quote-text { font-size: 12px; color: var(--text-secondary); font-style: italic; line-height: 1.5; }
  .dna-quote-author { font-size: 10px; color: var(--text-muted); margin-top: 6px; }

  /* Edit toggle cluster */
  .dna-edit-toggle { display: flex; align-items: center; gap: 8px; }

  /* Guideline row card (index page) */
  .dna-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    transition: background 0.15s;
  }
  .dna-row:last-child { border-bottom: none; }
  .dna-row:hover { background: rgba(255,255,255,0.02); }
  .dna-row-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(139,92,246,0.08);
  }
  .dna-row-icon .material-symbols-outlined { font-size: 18px; color: var(--violet-soft); }
  .dna-row-body { flex: 1; min-width: 0; }
  .dna-row-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .dna-row-meta { font-size: 10px; color: var(--text-muted); display: flex; gap: 10px; margin-top: 2px; }
  .dna-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

  /* Action buttons */
  .dna-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 10px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; border: 1px solid var(--border);
    background: var(--surface-raised); color: var(--text-secondary);
    text-decoration: none;
  }
  .dna-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .dna-btn .material-symbols-outlined { font-size: 15px; }
  .dna-btn-primary {
    background: linear-gradient(135deg, var(--violet), #6D28D9);
    border-color: rgba(139,92,246,0.3); color: white;
  }
  .dna-btn-primary:hover { box-shadow: 0 0 20px rgba(139,92,246,0.15); color: white; }
  .dna-btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 8px; }
  .dna-btn-sm .material-symbols-outlined { font-size: 14px; }
  .dna-btn-ghost {
    background: none; border-color: transparent;
    color: var(--text-muted); padding: 5px 8px;
  }
  .dna-btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); border-color: transparent; }
  .dna-btn-danger { color: #fca5a5; border-color: rgba(248,113,113,0.15); background: rgba(248,113,113,0.06); }
  .dna-btn-danger:hover { color: #F87171; border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.10); }
  .dna-btn-active {
    color: rgb(196,181,253); background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.3);
  }
  .dna-btn-active:hover { background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.4); }
  .dna-btn-group {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); border-radius: 10px;
  }

  /* Cards */
  .dna-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .dna-card:hover { border-color: var(--border-hover); }
  .dna-card-title {
    font-size: 13px; font-weight: 600;
    color: var(--text-primary); letter-spacing: -0.01em;
  }

  /* Status badge */
  .dna-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 600;
  }
  .dna-badge-sm { padding: 1px 6px; font-size: 9px; border-radius: 5px; }
  .dna-badge.active { background: rgba(52,211,153,0.12); color: var(--emerald); }
  .dna-badge.draft { background: rgba(251,191,36,0.12); color: #FBBF24; }
  .dna-badge.archived { background: rgba(255,255,255,0.05); color: var(--text-muted); }

  /* Value prop numbered item */
  .dna-vp-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.02);
  }
  .dna-vp-num {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
  }

  /* ═══ Products Page ═══ */

  /* Page header for products index */
  .products-page-header {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  }
  .products-page-header-inner {
    display: flex; align-items: center; justify-content: space-between;
  }
  .products-page-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 15px; font-weight: 600; letter-spacing: -0.02em;
  }
  .products-page-title .material-symbols-outlined { font-size: 18px; color: var(--violet-soft); }
  .products-page-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .products-page-actions { display: flex; align-items: center; gap: 6px; }

  /* ── Products pages: reduced padding to match Discovery ── */
  .panel-body:has(.products-fullpage) {
    padding: 10px 16px;
  }

  /* Stats row — 4 mini metric cards */
  .products-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
  }
  .products-stat {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px;
    display: flex; align-items: center; gap: 10px;
    transition: border-color 0.2s;
  }
  .products-stat:hover { border-color: var(--border-hover); }
  .products-stat .stat-icon {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .products-stat .stat-icon .material-symbols-outlined { font-size: 14px; }
  .products-stat .stat-meta { display: flex; flex-direction: column; gap: 1px; }
  .products-stat .stat-meta .stat-count { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
  .products-stat .stat-meta .stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

  /* Toolbar — search + filters + actions */
  .products-toolbar {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .products-toolbar .toolbar-search {
    position: relative; flex: 0 1 240px;
  }
  .products-toolbar .toolbar-search input {
    width: 100%; padding: 7px 12px 7px 34px;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; color: var(--text-primary);
    outline: none; transition: border-color 0.2s;
  }
  .products-toolbar .toolbar-search input::placeholder { color: var(--text-muted); }
  .products-toolbar .toolbar-search input:focus { border-color: var(--violet); }
  .products-toolbar .toolbar-search .material-symbols-outlined {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-size: 16px; color: var(--text-muted); pointer-events: none;
  }
  .products-toolbar .toolbar-select {
    padding: 7px 30px 7px 10px;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; color: var(--text-secondary);
    outline: none; cursor: pointer; transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23484852' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center; background-repeat: no-repeat; background-size: 1.2em 1.2em;
  }
  .products-toolbar .toolbar-select:focus { border-color: var(--violet); }
  .products-toolbar .toolbar-spacer { flex: 1; }
  .products-toolbar .toolbar-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: 8px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; border: 1px solid var(--border);
    background: var(--surface-raised); color: var(--text-secondary);
    text-decoration: none;
  }
  .products-toolbar .toolbar-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .products-toolbar .toolbar-btn .material-symbols-outlined { font-size: 15px; }
  .products-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, var(--violet), #6D28D9);
    border-color: rgba(139,92,246,0.3); color: white;
  }
  .products-toolbar .toolbar-btn-primary:hover {
    box-shadow: 0 0 20px rgba(139,92,246,0.15);
  }

  /* Selection bar — appears when items selected */
  .products-selection-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; margin-bottom: 10px;
    background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.15);
    border-radius: 10px; font-size: 12px;
  }
  .products-selection-bar .sel-count { font-weight: 600; color: var(--violet-soft); }
  .products-selection-bar .sel-divider { width: 1px; height: 16px; background: rgba(139,92,246,0.15); }
  .products-selection-bar .sel-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; border: none;
    background: rgba(255,255,255,0.05); color: var(--text-secondary);
  }
  .products-selection-bar .sel-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
  .products-selection-bar .sel-btn .material-symbols-outlined { font-size: 14px; }
  .products-selection-bar .sel-btn-danger { color: #F87171; }
  .products-selection-bar .sel-btn-danger:hover { background: rgba(248,113,113,0.1); }
  .products-selection-bar .sel-label { font-size: 12px; color: var(--text-secondary); }
  .products-selection-bar .sel-spacer { flex: 1; }

  /* Product card grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
  }

  /* Individual product card */
  .product-card {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative; cursor: pointer;
  }
  .product-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .product-card.selected {
    border-color: rgba(139,92,246,0.4);
    box-shadow: 0 0 0 2px rgba(139,92,246,0.15), 0 8px 24px rgba(0,0,0,0.2);
  }

  /* Card image area */
  .product-card-image {
    position: relative; width: 100%;
    aspect-ratio: 3/2; overflow: hidden;
    background: rgba(255,255,255,0.02);
  }
  .product-card-image img {
    width: 100%; height: 100%; object-fit: cover;
  }
  .product-card-image .card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(139,92,246,0.03));
  }
  .product-card-image .card-placeholder .material-symbols-outlined {
    font-size: 32px; color: var(--text-muted); opacity: 0.5;
  }

  /* Checkbox overlay on card */
  .product-card-check {
    position: absolute; top: 8px; left: 8px; z-index: 2;
  }
  .product-card-check input[type="checkbox"] {
    width: 22px; height: 22px;
    border-radius: 50%; border: 2px solid rgba(255,255,255,0.30);
    background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
    cursor: pointer; appearance: none; -webkit-appearance: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .product-card-check input[type="checkbox"]:hover {
    border-color: rgba(139,92,246,0.6);
    background: rgba(139,92,246,0.15);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(139,92,246,0.25);
  }
  .product-card-check input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    border-color: transparent;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 14px; background-position: center; background-repeat: no-repeat;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.25), 0 2px 10px rgba(139,92,246,0.45);
    transform: scale(1.05);
  }
  .product-card:has(.product-card-check input:checked) {
    border-color: rgba(139,92,246,0.35);
    box-shadow: 0 0 0 1px rgba(139,92,246,0.15), 0 4px 20px rgba(139,92,246,0.10);
  }

  /* Image count badge */
  .product-card-image-count {
    position: absolute; bottom: 8px; right: 8px; z-index: 2;
    display: flex; align-items: center; gap: 3px;
    padding: 3px 8px; border-radius: 6px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.8);
  }
  .product-card-image-count .material-symbols-outlined { font-size: 12px; }

  /* Card body */
  .product-card-body { padding: 12px 14px 10px; }
  .product-card-meta {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  }
  .product-card-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 500;
  }
  .product-card-status .status-dot {
    width: 6px; height: 6px; border-radius: 50%;
  }
  .product-card-status.active .status-dot { background: var(--emerald); box-shadow: 0 0 4px rgba(52,211,153,0.4); }
  .product-card-status.active { color: var(--emerald); }
  .product-card-status.inactive .status-dot { background: var(--text-muted); }
  .product-card-status.inactive { color: var(--text-muted); }
  .product-card-category {
    font-size: 10px; color: var(--text-muted);
    padding: 1px 6px; border-radius: 4px;
    background: rgba(255,255,255,0.04);
  }
  .product-card-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px; line-height: 1.3;
  }
  .product-card-sku {
    font-size: 10px; color: var(--text-muted);
    font-family: 'SF Mono', ui-monospace, monospace;
    margin-bottom: 8px;
  }
  .product-card-price { font-size: 14px; font-weight: 600; color: var(--text-primary); }
  .product-card-price .original { text-decoration: line-through; color: var(--text-muted); font-size: 11px; font-weight: 400; margin-right: 4px; }
  .product-card-price .sale { color: var(--emerald); }
  .product-card-price .discount { font-size: 10px; color: var(--emerald); font-weight: 500; margin-left: 4px; }
  .product-card-price .no-price { color: var(--text-muted); font-size: 11px; font-weight: 400; }

  /* Card actions footer */
  .product-card-actions {
    display: flex; align-items: center; gap: 2px;
    padding: 8px 14px; border-top: 1px solid var(--border);
  }
  .product-card-actions .card-action {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: 7px;
    font-size: 10px; font-weight: 500; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s;
    text-decoration: none; border: none; background: none;
  }
  .product-card-actions .card-action:hover { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
  .product-card-actions .card-action .material-symbols-outlined { font-size: 14px; }
  .product-card-actions .card-action-danger:hover { color: #F87171; background: rgba(248,113,113,0.06); }
  .product-card-actions .card-spacer { flex: 1; }

  /* Skeleton loading states */
  .product-card-skeleton { pointer-events: none; }
  .skeleton-block { width: 100%; height: 100%; background: rgba(255,255,255,0.04); border-radius: 4px; }
  .skeleton-pulse { animation: pulse 2s infinite; }
  .skeleton-line { background: rgba(255,255,255,0.04); border-radius: 4px; }
  .skeleton-line-xs { height: 10px; width: 40%; }
  .skeleton-line-sm { height: 10px; width: 60%; margin-bottom: 6px; }
  .skeleton-line-lg { height: 14px; width: 80%; margin-bottom: 4px; }

  /* Product detail page */
  .product-detail { display: flex; flex-direction: column; gap: 10px; }
  .product-detail-back {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--text-muted); text-decoration: none;
    transition: color 0.15s; margin-bottom: 2px;
  }
  .product-detail-back:hover { color: var(--text-primary); }
  .product-detail-back .material-symbols-outlined { font-size: 15px; }
  .product-detail-top {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
  }
  .product-detail-title-group { display: flex; align-items: center; gap: 8px; }
  .product-detail-title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
  .product-detail-sku {
    font-size: 10px; color: var(--text-muted);
    font-family: 'SF Mono', ui-monospace, monospace;
    padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.03);
  }
  .product-detail-actions { display: flex; align-items: center; gap: 6px; }

  /* Two-column detail layout */
  .product-detail-layout {
    display: grid; grid-template-columns: 280px 1fr; gap: 10px; min-height: 0;
  }
  @media (max-width: 900px) {
    .product-detail-layout { grid-template-columns: 1fr; }
  }

  /* Left column: hero image */
  .product-detail-media {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  }
  .product-detail-hero {
    width: 100%; aspect-ratio: 1/1; overflow: hidden;
    background: rgba(255,255,255,0.02); position: relative;
  }
  .product-detail-hero img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; inset: 0;
  }
  .product-detail-hero-empty {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  }
  .product-detail-hero-empty .material-symbols-outlined { font-size: 36px; color: var(--text-muted); opacity: 0.4; }
  .product-detail-hero-empty span:last-child { font-size: 10px; color: var(--text-muted); }

  /* Thumbnail strip below hero */
  .product-detail-thumbs {
    display: flex; gap: 4px; padding: 6px 8px;
    border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: none;
  }
  .product-detail-thumbs::-webkit-scrollbar { display: none; }
  .product-detail-thumb {
    position: relative; width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 6px; overflow: hidden; cursor: pointer;
    border: 1.5px solid var(--border); transition: border-color 0.15s;
  }
  .product-detail-thumb:hover { border-color: var(--border-hover); }
  .product-detail-thumb.active { border-color: var(--violet); }
  .product-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .product-detail-thumb-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    font-size: 7px; text-align: center; padding: 1px 0;
    color: rgba(255,255,255,0.8); font-weight: 600; text-transform: uppercase;
  }

  /* Gallery navigation overlay */
  .gallery-nav {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(10px);
    padding: 4px 8px; border-radius: 8px; z-index: 2;
  }
  .gallery-nav-btn {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 6px;
    background: none; border: none; color: rgba(255,255,255,0.7);
    cursor: pointer; transition: all 0.15s;
  }
  .gallery-nav-btn:hover:not(:disabled) { color: white; background: rgba(255,255,255,0.12); }
  .gallery-nav-btn:disabled { opacity: 0.3; cursor: default; }
  .gallery-nav-btn .material-symbols-outlined { font-size: 18px; }
  .gallery-counter {
    font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.8);
    min-width: 32px; text-align: center;
  }

  /* Set as primary bar */
  .gallery-set-primary {
    display: flex; gap: 4px; padding: 4px 8px;
    border-top: 1px solid var(--border);
  }
  .gallery-set-primary .dna-btn:disabled { opacity: 0.5; cursor: default; }

  /* Primary image badge on thumbnails */
  .thumb-primary-badge {
    position: absolute; top: 2px; right: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(139,92,246,0.9); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 1;
  }
  .thumb-primary-badge .material-symbols-outlined {
    font-size: 9px; color: white; font-variation-settings: 'FILL' 1;
  }
  .product-detail-thumb.is-primary { border-color: var(--violet); }

  /* Linked campaigns in media column */
  .product-detail-media-campaigns {
    padding: 6px 8px; border-top: 1px solid var(--border);
  }
  .product-detail-media-campaigns .product-detail-section-header { margin-bottom: 4px; }
  .product-detail-media-campaigns .product-campaigns-list { display: flex; flex-direction: column; gap: 2px; }

  /* Media actions bar */
  .product-detail-media-actions {
    display: flex; gap: 6px; padding: 6px 8px;
    border-top: 1px solid var(--border);
  }
  .product-detail-media-actions .dna-btn { flex: 1; justify-content: center; }

  /* Right column: info sections */
  .product-detail-info {
    display: flex; flex-direction: column; gap: 6px;
  }
  .product-detail-section {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px; transition: border-color 0.2s;
  }
  .product-detail-section:hover { border-color: var(--border-hover); }
  .product-detail-section-header {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  }
  .product-detail-section-header .section-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  }
  .product-detail-section-header .section-title {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
  }
  .product-detail-field { margin-bottom: 6px; }
  .product-detail-field:last-child { margin-bottom: 0; }
  .product-detail-field-label {
    font-size: 10px; font-weight: 500; color: var(--text-muted);
    margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em;
  }
  .product-detail-field-value {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  }
  .product-detail-field-value.empty { color: var(--text-muted); font-style: italic; font-size: 11px; }
  .product-detail-field-value.price { font-size: 16px; font-weight: 600; color: var(--text-primary); }
  .product-detail-link { color: var(--violet-soft); text-decoration: none; font-size: 11px; transition: color 0.15s; }
  .product-detail-link:hover { color: var(--text-primary); }
  .product-detail-field-value .price-original { text-decoration: line-through; color: var(--text-muted); font-size: 11px; font-weight: 400; }
  .product-detail-field-value .price-sale { color: var(--emerald); margin-left: 4px; }
  .product-detail-field-value .price-discount { font-size: 10px; color: var(--emerald); font-weight: 500; margin-left: 4px; }

  /* Linked campaigns list */
  .product-detail-campaign-link {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 8px; border-radius: 6px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    text-decoration: none; font-size: 11px; color: var(--text-secondary);
    transition: border-color 0.15s;
  }
  .product-detail-campaign-link:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .product-detail-campaign-link .material-symbols-outlined { font-size: 13px; color: var(--violet-soft); }
  .product-detail-campaign-link span:last-child {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* Product quick-info badges */
  .product-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 500;
  }
  .product-badge .material-symbols-outlined { font-size: 12px; }
  .product-badge-category { background: rgba(139,92,246,0.08); color: var(--violet-soft); border: 1px solid rgba(139,92,246,0.12); }
  .product-badge-images { background: rgba(96,165,250,0.08); color: #60A5FA; border: 1px solid rgba(96,165,250,0.12); }
  .product-badge-campaigns { background: rgba(52,211,153,0.08); color: var(--emerald); border: 1px solid rgba(52,211,153,0.12); }
  .product-badge-ad-ready { background: rgba(251,191,36,0.08); color: #FBBF24; border: 1px solid rgba(251,191,36,0.12); }
  .product-badge-missing { background: rgba(255,255,255,0.03); color: var(--text-muted); border: 1px solid var(--border); }
  .product-badge-price { background: rgba(255,255,255,0.03); color: var(--text-primary); border: 1px solid var(--border); font-weight: 600; }
  .product-badge-price .price-original { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
  .product-badge-price .price-sale { color: var(--emerald); margin-left: 4px; }

  /* Stat icon color variants */
  .stat-icon-violet { background: rgba(139,92,246,0.1); }
  .stat-icon-violet .material-symbols-outlined { color: var(--violet-soft); }
  .stat-icon-blue { background: rgba(96,165,250,0.1); }
  .stat-icon-blue .material-symbols-outlined { color: #60A5FA; }
  .stat-icon-emerald { background: rgba(52,211,153,0.1); }
  .stat-icon-emerald .material-symbols-outlined { color: var(--emerald); }
  .stat-icon-amber { background: rgba(251,191,36,0.1); }
  .stat-icon-amber .material-symbols-outlined { color: #FBBF24; }

  /* Section dot color variants */
  .section-dot-violet { background: var(--violet); }
  .section-dot-amber { background: #FBBF24; }
  .section-dot-blue { background: #60A5FA; }
  .section-dot-emerald { background: var(--emerald); }
  .section-dot-cyan { background: #22D3EE; }

  /* Quick-info badges row */
  .product-badges-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

  /* Campaigns list in detail */
  .product-campaigns-list { display: flex; flex-direction: column; gap: 4px; }

  /* USP pill variant */
  .product-pill-usp {
    border-color: rgba(52,211,153,0.15); background: rgba(52,211,153,0.04); color: var(--emerald);
  }

  /* Product feature pills */
  .product-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
  .product-pill {
    padding: 2px 7px; border-radius: 5px; font-size: 10px;
    background: rgba(255,255,255,0.04); color: var(--text-secondary);
    border: 1px solid var(--border);
  }

  /* ── Product detail: make panel-body flex so content fills without scrolling ── */
  .panel-body:has(.product-detail-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.product-detail-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }

  .product-detail-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column; gap: 4px;
    overflow: hidden;
  }
  .product-detail-fullpage .product-detail-layout {
    flex: 1; min-height: 0; overflow: hidden;
  }
  .product-detail-fullpage .product-detail-media {
    align-self: start; max-height: 100%; overflow-y: auto;
    scrollbar-width: none;
  }
  .product-detail-fullpage .product-detail-media::-webkit-scrollbar { display: none; }
  .product-detail-fullpage .product-detail-info {
    overflow-y: auto; max-height: 100%;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
    padding-right: 4px;
  }
  .product-detail-fullpage .product-detail-info::-webkit-scrollbar { width: 4px; }
  .product-detail-fullpage .product-detail-info::-webkit-scrollbar-track { background: transparent; }
  .product-detail-fullpage .product-detail-info::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08); border-radius: 2px;
  }

  /* Product detail timestamps footer */
  .product-detail-meta {
    display: flex; align-items: center; gap: 16px;
    padding: 4px 10px; margin-top: 2px;
    font-size: 10px; color: rgba(255,255,255,0.35);
    border-top: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
  }
  .product-detail-meta span { white-space: nowrap; }

  /* Icon-only button variant */
  .dna-btn-icon {
    padding: 4px !important; min-width: 0 !important;
  }
  .dna-btn-icon .material-symbols-outlined { font-size: 16px; }

  /* Extra-small button for inline actions */
  .dna-btn-xs {
    padding: 2px 8px !important; font-size: 10px !important;
    min-width: 0 !important; gap: 2px !important;
  }

  /* Actions divider (vertical line) */
  .product-detail-actions-divider {
    width: 1px; height: 18px; background: var(--border); margin: 0 2px;
  }

  /* ── Compact performance stats row ── */
  .product-detail-stats-row {
    display: flex; gap: 16px; align-items: baseline;
  }
  .product-detail-stat {
    display: flex; flex-direction: column; gap: 1px;
  }
  .product-detail-stat .stat-value {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    letter-spacing: -0.02em;
  }
  .product-detail-stat .stat-label-sm {
    font-size: 9px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.04em; font-weight: 500;
  }

  /* ── Inline editing styles ── */
  .inline-editable .inline-edit-input,
  .inline-editable .inline-edit-actions {
    display: none;
  }
  .inline-editable.editing .inline-edit-input,
  .inline-editable.editing .inline-edit-actions {
    display: flex;
  }
  .inline-editable.editing [data-product-inline-edit-target="display"] {
    display: none;
  }
  .inline-editable [data-product-inline-edit-target="display"] {
    cursor: pointer; border-radius: 4px; padding: 2px 4px; margin: -2px -4px;
    transition: background 0.15s;
  }
  .inline-editable [data-product-inline-edit-target="display"]:hover {
    background: rgba(139,92,246,0.06);
  }
  .inline-editable [data-product-inline-edit-target="display"]::after {
    content: '';
    display: inline-block; width: 12px; height: 12px;
    margin-left: 4px; vertical-align: middle; opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat;
    transition: opacity 0.15s;
  }
  .inline-editable [data-product-inline-edit-target="display"]:hover::after {
    opacity: 0.7;
  }
  .inline-edit-input {
    width: 100%; padding: 4px 8px; border-radius: 6px;
    border: 1px solid var(--violet); background: rgba(139,92,246,0.06);
    color: var(--text-primary); font-size: 12px; font-family: inherit;
    outline: none; resize: vertical; box-shadow: 0 0 0 2px rgba(139,92,246,0.12);
  }
  .inline-edit-actions {
    gap: 4px; margin-top: 4px; align-items: center;
  }

  /* ── Inline edit variants ── */
  .inline-edit-input-title {
    font-size: 15px !important; font-weight: 600 !important;
    letter-spacing: -0.02em; padding: 2px 6px !important;
    width: auto; min-width: 180px;
  }
  .inline-edit-input-sm {
    font-size: 10px !important; padding: 2px 4px !important;
  }
  .inline-edit-select {
    padding: 3px 6px !important; cursor: pointer;
  }
  .product-detail-title.inline-editable .inline-edit-input { display: none; }
  .product-detail-title.inline-editable.editing .inline-edit-input { display: inline-block; }
  .product-detail-title.inline-editable.editing [data-product-inline-edit-target="display"] { display: none; }
  .product-detail-sku.inline-editable .inline-edit-input { display: none; }
  .product-detail-sku.inline-editable.editing .inline-edit-input { display: inline-block; }
  .product-detail-sku.inline-editable.editing [data-product-inline-edit-target="display"] { display: none; }

  /* Active toggle badge */
  .product-active-toggle { cursor: pointer; transition: all 0.2s; }
  .product-active-toggle:hover { opacity: 0.8; }

  /* Fields row (side-by-side) */
  .product-detail-fields-row {
    display: flex; gap: 10px; margin-bottom: 6px;
  }
  .product-detail-fields-row > .product-detail-field { flex: 1; min-width: 0; }
  .product-detail-fields-row:last-child { margin-bottom: 0; }

  /* Image URL below gallery */
  .product-detail-media-url {
    padding: 4px 8px; border-top: 1px solid var(--border);
  }
  .product-detail-media-url .product-detail-field { margin-bottom: 0; }
  .product-detail-media-url .product-detail-field-value { font-size: 10px; word-break: break-all; }

  /* Toggle switch */
  .inline-toggle-row {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
  }
  .inline-toggle-switch {
    width: 28px; height: 16px; border-radius: 8px;
    background: rgba(255,255,255,0.1); border: 1px solid var(--border);
    position: relative; transition: all 0.2s; flex-shrink: 0;
  }
  .inline-toggle-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--text-muted); transition: all 0.2s;
  }
  .inline-toggle-switch.on {
    background: rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.5);
  }
  .inline-toggle-switch.on::after {
    left: 14px; background: var(--violet-soft);
  }

  /* ── Lightbox overlay ── */
  .gallery-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.80); backdrop-filter: blur(16px);
    cursor: pointer;
  }
  .gallery-lightbox.open { display: flex; }
  .gallery-lightbox-content {
    position: relative; display: flex; align-items: center;
    flex-direction: column; gap: 12px;
    max-width: 60vw; max-height: 70vh; z-index: 1;
    cursor: default;
  }
  .gallery-lightbox-img {
    max-width: 55vw; max-height: 60vh; object-fit: contain;
    border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  }
  .gallery-lightbox-close {
    position: fixed; top: 20px; right: 20px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; transition: all 0.2s; z-index: 10000;
  }
  .gallery-lightbox-close:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
  .gallery-lightbox-close .material-symbols-outlined { font-size: 20px; }
  .gallery-lightbox-nav {
    position: absolute; top: 50%;
    background: rgba(255,255,255,0.08); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 50%;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.8); cursor: pointer; transition: all 0.2s;
    transform: translateY(-50%);
  }
  .gallery-lightbox-prev { left: -52px; }
  .gallery-lightbox-next { right: -52px; }
  .gallery-lightbox-nav:hover { background: rgba(255,255,255,0.15); color: white; }
  .gallery-lightbox-nav .material-symbols-outlined { font-size: 20px; }
  .gallery-lightbox-hint {
    font-size: 10px; color: rgba(255,255,255,0.35); text-align: center;
  }
  .gallery-lightbox-hint kbd {
    display: inline-block; padding: 1px 4px; border-radius: 3px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    font-size: 9px; font-family: inherit;
  }

  /* ── Toast notifications ── */
  .inline-toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 10000;
    display: flex; flex-direction: column; gap: 6px; pointer-events: none;
  }
  .inline-toast {
    padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 500;
    backdrop-filter: blur(12px); pointer-events: auto;
    animation: toast-in 0.25s ease-out;
  }
  .inline-toast.success {
    background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.25);
    color: var(--emerald);
  }
  .inline-toast.error {
    background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.25);
    color: #F87171;
  }
  @keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Product form sections */
  .product-form-section {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px; transition: border-color 0.2s;
  }
  .product-form-section:hover { border-color: var(--border-hover); }
  .product-form-section-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  }
  .product-form-section-header .section-icon {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
  }
  .product-form-section-header .section-icon .material-symbols-outlined { font-size: 14px; }
  .product-form-section-header .section-title { font-size: 11px; font-weight: 600; color: var(--text-primary); }
  .product-form-section-header .section-subtitle { font-size: 10px; color: var(--text-muted); }

  /* Form field consistent styling */
  .pf-label { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
  .pf-label .required { color: #F87171; }
  .pf-input {
    width: 100%; padding: 7px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; color: var(--text-primary);
    outline: none; transition: border-color 0.2s;
  }
  .pf-input::placeholder { color: var(--text-muted); }
  .pf-input:focus { border-color: var(--violet); }
  .pf-hint { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
  .pf-select {
    width: 100%; padding: 7px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; color: var(--text-primary);
    outline: none; transition: border-color 0.2s;
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat; background-size: 1.25em 1.25em;
  }
  .pf-select:focus { border-color: var(--violet); }
  .pf-textarea {
    width: 100%; padding: 7px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 8px; font-size: 12px; color: var(--text-primary);
    outline: none; transition: border-color 0.2s; resize: none;
  }
  .pf-textarea::placeholder { color: var(--text-muted); }
  .pf-textarea:focus { border-color: var(--violet); }
  .pf-checkbox-row {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
  }
  .pf-checkbox-row input[type="checkbox"] {
    width: 16px; height: 16px; border-radius: 4px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.03);
    accent-color: var(--violet); cursor: pointer;
  }
  .pf-checkbox-row span { font-size: 12px; color: var(--text-secondary); }
  .pf-checkbox-row:hover span { color: var(--text-primary); }
  .pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .pf-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  @media (max-width: 640px) {
    .pf-grid-2, .pf-grid-4 { grid-template-columns: 1fr; }
  }

  /* Product wizard */
  .product-wizard { display: flex; flex-direction: column; align-items: center; margin-top: 8px; }
  .wizard-card {
    width: 100%; max-width: 640px;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
  }
  .wizard-header {
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .wizard-header-left { display: flex; align-items: center; gap: 8px; }
  .wizard-header-icon {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
  }
  .wizard-header-icon .material-symbols-outlined { font-size: 14px; color: white; }
  .wizard-header-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .wizard-header-subtitle { font-size: 10px; color: var(--text-muted); }
  .wizard-close {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); background: none; border: none;
    cursor: pointer; transition: all 0.15s;
  }
  .wizard-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
  .wizard-close .material-symbols-outlined { font-size: 16px; }
  .wizard-body { padding: 16px; }
  .wizard-footer {
    padding: 12px 16px; border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: space-between;
  }
  .wizard-footer-hint { font-size: 10px; color: var(--text-muted); }
  .wizard-option {
    width: 100%; padding: 12px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.02);
    cursor: pointer; text-align: left; transition: all 0.2s;
    display: flex; align-items: flex-start; gap: 10px;
  }
  .wizard-option:hover { border-color: rgba(139,92,246,0.4); background: rgba(139,92,246,0.04); }
  .wizard-option-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .wizard-option-icon .material-symbols-outlined { font-size: 16px; color: white; }
  .wizard-option-title { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
  .wizard-option-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
  .wizard-option-badges { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
  .wizard-option-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; color: var(--text-muted);
  }
  .wizard-option-badge .material-symbols-outlined { font-size: 12px; }
  .wizard-option .chevron {
    color: var(--text-muted); margin-left: auto; align-self: center;
    transition: color 0.15s;
  }
  .wizard-option:hover .chevron { color: var(--violet-soft); }
  .wizard-option:hover .wizard-option-title { color: var(--violet-soft); }
  .wizard-loading {
    text-align: center; padding: 24px 0;
  }
  .wizard-loading-icon {
    position: relative; width: 44px; height: 44px; margin: 0 auto 12px;
  }
  .wizard-loading-icon .ping {
    position: absolute; inset: 0; border-radius: 50%;
    background: rgba(139,92,246,0.2); animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
  }
  .wizard-loading-icon .icon-circle {
    position: relative; width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    display: flex; align-items: center; justify-content: center;
  }
  .wizard-loading-icon .icon-circle .material-symbols-outlined { font-size: 18px; color: white; }
  .wizard-loading h3 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
  .wizard-loading p { font-size: 10px; color: var(--text-muted); }
  .wizard-error { text-align: center; padding: 24px 0; }
  .wizard-error-icon {
    width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%;
    background: rgba(248,113,113,0.15);
    display: flex; align-items: center; justify-content: center;
  }
  .wizard-error-icon .material-symbols-outlined { font-size: 18px; color: #F87171; }
  .wizard-error h3 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
  .wizard-error p { font-size: 10px; color: var(--text-muted); margin-bottom: 16px; }
  .wizard-error-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .wizard-form-scroll {
    flex: 1; overflow-y: auto; padding: 16px;
    max-height: calc(90vh - 120px);
  }

  /* Product edit layout */
  .product-edit-layout {
    display: grid; grid-template-columns: 2fr 1fr; gap: 10px;
    min-height: 0; flex: 1;
  }
  @media (max-width: 1024px) {
    .product-edit-layout { grid-template-columns: 1fr; }
  }
  .product-edit-form {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow-y: auto; scrollbar-width: none;
  }
  .product-edit-form::-webkit-scrollbar { display: none; }
  .product-edit-form-inner { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
  .product-edit-images {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow-y: auto; scrollbar-width: none;
    padding: 14px 16px;
  }
  .product-edit-images::-webkit-scrollbar { display: none; }

  /* Image manager */
  .img-mgr-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
  }
  .img-mgr-header h3 { font-size: 12px; font-weight: 600; color: var(--text-primary); }
  .img-mgr-actions { display: flex; align-items: center; gap: 4px; }
  .img-mgr-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 500;
    border: 1px solid var(--border); color: var(--text-secondary);
    background: none; cursor: pointer; text-decoration: none;
    transition: all 0.15s;
  }
  .img-mgr-btn:hover { border-color: var(--border-hover); color: var(--text-primary); background: rgba(255,255,255,0.03); }
  .img-mgr-btn-primary {
    background: var(--violet); border-color: var(--violet); color: white;
  }
  .img-mgr-btn-primary:hover { background: rgba(139,92,246,0.8); }
  .img-mgr-btn svg { width: 12px; height: 12px; }
  .img-mgr-section-label {
    font-size: 9px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px;
  }
  .img-mgr-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px;
  }
  .img-mgr-thumb {
    position: relative; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border); aspect-ratio: 1;
  }
  .img-mgr-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .img-mgr-thumb.primary { border-color: rgba(139,92,246,0.5); }
  .img-mgr-thumb-badge {
    position: absolute; top: 2px; left: 2px;
    padding: 1px 4px; border-radius: 3px;
    font-size: 8px; font-weight: 600; color: white;
  }
  .img-mgr-thumb-actions {
    position: absolute; bottom: 2px; right: 2px;
    display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s;
  }
  .img-mgr-thumb:hover .img-mgr-thumb-actions { opacity: 1; }
  .img-mgr-thumb-action {
    padding: 4px; background: rgba(10,10,11,0.9); border: 1px solid var(--border);
    border-radius: 4px; cursor: pointer; transition: all 0.15s;
  }
  .img-mgr-thumb-action:hover { border-color: var(--border-hover); }
  .img-mgr-thumb-action svg { width: 10px; height: 10px; }
  .img-mgr-empty {
    text-align: center; padding: 24px 0;
  }
  .img-mgr-empty-icon {
    width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
  }
  .img-mgr-empty-icon .material-symbols-outlined { font-size: 15px; color: var(--text-muted); }
  .img-mgr-empty p { font-size: 10px; color: var(--text-muted); }

  /* Upload dropzone */
  .upload-dropzone {
    border: 2px dashed var(--border); border-radius: 10px;
    padding: 12px; text-align: center; cursor: pointer;
    transition: all 0.2s; margin-bottom: 14px;
  }
  .upload-dropzone:hover { border-color: var(--border-hover); }
  .upload-dropzone.drag-over { border-color: var(--violet); background: rgba(139,92,246,0.05); }
  .upload-dropzone .material-symbols-outlined { font-size: 24px; color: var(--text-muted); display: block; margin-bottom: 4px; }
  .upload-dropzone p { font-size: 10px; color: var(--text-muted); }

  /* Deleted products page */
  .deleted-products-card {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
  }
  .deleted-products-header {
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
  }
  .deleted-products-header h2 { font-size: 12px; font-weight: 600; }
  .deleted-products-header .count-badge {
    font-size: 10px; color: var(--text-muted);
    background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 10px;
  }
  .deleted-product-row {
    padding: 10px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    transition: background 0.15s;
  }
  .deleted-product-row:last-child { border-bottom: none; }
  .deleted-product-row:hover { background: rgba(255,255,255,0.02); }
  .deleted-product-info { display: flex; align-items: center; gap: 10px; flex: 1; }
  .deleted-product-icon {
    width: 28px; height: 28px; border-radius: 7px;
    background: rgba(248,113,113,0.12);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .deleted-product-icon .material-symbols-outlined { font-size: 14px; color: #F87171; }
  .deleted-product-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
  .deleted-product-sku { font-size: 10px; font-family: monospace; color: var(--text-muted); margin-left: 6px; }
  .deleted-product-meta { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
  .deleted-product-actions { display: flex; align-items: center; gap: 10px; }
  .deleted-product-countdown {
    font-size: 11px; font-weight: 500; color: var(--text-muted);
  }
  .deleted-product-countdown.urgent { color: #FBBF24; }
  .deleted-product-restore {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; border-radius: 8px; font-size: 10px; font-weight: 500;
    color: var(--emerald); border: 1px solid rgba(52,211,153,0.2);
    background: none; cursor: pointer; text-decoration: none; transition: all 0.15s;
  }
  .deleted-product-restore:hover { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.4); }
  .deleted-product-restore .material-symbols-outlined { font-size: 13px; }

  /* Empty state for products */
  .products-empty {
    display: flex; align-items: center; justify-content: center;
    min-height: 400px;
  }
  .products-empty-inner {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 32px; max-width: 440px; width: 100%;
    text-align: center;
  }
  .products-empty-icon {
    width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(139,92,246,0.2);
  }
  .products-empty-icon .material-symbols-outlined { font-size: 20px; color: white; }
  .products-empty h2 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
  .products-empty p { font-size: 11px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }

  /* Features grid in empty state */
  .products-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px;
  }
  .products-feature {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    text-align: left;
  }
  .products-feature .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
  .products-feature .feature-icon-violet { color: var(--violet-soft); }
  .products-feature .feature-icon-emerald { color: var(--emerald); }
  .products-feature .feature-icon-blue { color: #60A5FA; }
  .products-feature .feature-icon-amber { color: #FBBF24; }
  .products-feature .feature-title { font-size: 11px; font-weight: 600; }
  .products-feature .feature-desc { font-size: 9px; color: var(--text-muted); }

  .products-empty-actions { display: flex; flex-direction: column; gap: 8px; }
  .products-empty-actions .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 16px; border-radius: 10px;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    color: white; font-size: 12px; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(139,92,246,0.2);
  }
  .products-empty-actions .btn-primary:hover { box-shadow: 0 4px 20px rgba(139,92,246,0.3); }
  .products-empty-actions .btn-primary .material-symbols-outlined { font-size: 15px; }
  .products-empty-actions .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 16px; border-radius: 10px;
    background: none; border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 12px; font-weight: 500;
    text-decoration: none; transition: all 0.2s;
  }
  .products-empty-actions .btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .products-empty-actions .btn-secondary .material-symbols-outlined { font-size: 16px; }

  /* ═══ Audiences Page ═══ */

  /* Stats strip — glass pill row */
  .audiences-stats {
    display: flex; gap: 2px; margin-bottom: 14px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 10px; padding: 2px; overflow: hidden;
  }
  .audiences-stat {
    flex: 1 1 0; min-width: 0;
    border-radius: 8px; padding: 10px 6px; text-align: center;
    transition: background 0.18s;
    position: relative;
  }
  .audiences-stat:hover { background: rgba(255,255,255,0.04); }
  .audiences-stat + .audiences-stat::before {
    content: ""; position: absolute; left: -1px; top: 20%; bottom: 20%;
    width: 1px; background: var(--border); pointer-events: none;
  }
  .audiences-stat .stat-count {
    display: block; font-size: 17px; font-weight: 800;
    letter-spacing: -0.04em; line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .audiences-stat .stat-label {
    display: block; font-size: 8.5px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
    margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Selection bar — appears when items selected */
  .audiences-selection-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; margin-bottom: 10px;
    background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.15);
    border-radius: 10px; font-size: 12px;
  }
  .audiences-selection-bar .sel-count { font-weight: 600; color: var(--violet-soft); }
  .audiences-selection-bar .sel-divider { width: 1px; height: 16px; background: rgba(139,92,246,0.15); }
  .audiences-selection-bar .sel-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 500; cursor: pointer;
    transition: all 0.15s; border: none;
    background: rgba(255,255,255,0.05); color: var(--text-secondary);
  }
  .audiences-selection-bar .sel-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
  .audiences-selection-bar .sel-btn .material-symbols-outlined { font-size: 14px; }
  .audiences-selection-bar .sel-btn-danger { color: #F87171; }
  .audiences-selection-bar .sel-btn-danger:hover { background: rgba(248,113,113,0.1); }
  .audiences-selection-bar .sel-btn-amber { color: #FBBF24; }
  .audiences-selection-bar .sel-btn-amber:hover { background: rgba(251,191,36,0.1); }
  .audiences-selection-bar .sel-label { font-size: 12px; color: var(--text-secondary); }
  .audiences-selection-bar .sel-spacer { flex: 1; }

  /* ── Fullpage layout: lock panel, scroll only cards ── */
  .panel-body:has(.audiences-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.audiences-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  /* Thread flex ONLY through ancestors of .audiences-fullpage, not sibling modals */
  .panel-body:has(.audiences-fullpage) .panel-content > :has(.audiences-fullpage) {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
  }
  .panel-body:has(.audiences-fullpage) .panel-content > * > :has(.audiences-fullpage) {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
  }
  .audiences-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  /* Everything above the grid: don't shrink */
  .audiences-fullpage > *:not(.audiences-grid-scroll):not(.audiences-empty) {
    flex-shrink: 0;
  }
  /* The bulk-action wrapper also needs to flex */
  .audiences-fullpage > [data-controller] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .audiences-fullpage > [data-controller] > .audiences-selection-bar { flex-shrink: 0; }

  /* Scrollable card region */
  .audiences-grid-scroll {
    flex: 1; min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
    padding-bottom: 8px;
  }
  .audiences-grid-scroll::-webkit-scrollbar { width: 4px; }
  .audiences-grid-scroll::-webkit-scrollbar-track { background: transparent; }
  .audiences-grid-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

  /* Card grid — 3 columns always */
  .audiences-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  }

  /* Section header row */
  .audiences-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
  }
  .audiences-section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted);
  }
  .audiences-section-title .material-symbols-outlined { font-size: 14px; }
  .audiences-section-actions { display: flex; align-items: center; gap: 6px; }

  /* View all link */
  .audiences-view-all {
    display: inline-block; font-size: 12px; color: var(--violet-soft);
    text-decoration: none; text-align: center; padding-top: 10px;
    transition: color 0.2s;
  }
  .audiences-view-all:hover { color: var(--text-primary); }
  .audiences-view-all.blue { color: #60A5FA; }
  .audiences-view-all.blue:hover { color: var(--text-primary); }
  .audiences-view-all.emerald { color: var(--emerald); }
  .audiences-view-all.emerald:hover { color: var(--text-primary); }

  /* CTA card — generate targeting, push to keywords */
  .audiences-cta {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; transition: border-color 0.2s;
  }
  .audiences-cta:hover { border-color: var(--border-hover); }
  .audiences-cta.blue { border-color: rgba(96,165,250,0.12); background: linear-gradient(135deg, var(--surface-raised), rgba(96,165,250,0.03)); }
  .audiences-cta.emerald { border-color: rgba(52,211,153,0.12); background: linear-gradient(135deg, var(--surface-raised), rgba(52,211,153,0.03)); }
  .audiences-cta-inner { display: flex; align-items: center; gap: 16px; }
  .audiences-cta-icon {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .audiences-cta-icon .material-symbols-outlined { font-size: 22px; }
  .audiences-cta-body { flex: 1; }
  .audiences-cta-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
  .audiences-cta-desc { font-size: 11px; color: var(--text-secondary); max-width: 480px; line-height: 1.5; }

  /* ══════════════════════════════════════════════════════════════
     ACARD — Next-gen audience card design system
     ══════════════════════════════════════════════════════════════ */

  /* ── Shell ── */
  .acard {
    position: relative; display: flex; flex-direction: column;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; overflow: hidden;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
  }
  .acard:hover {
    border-color: rgba(139,92,246,0.22);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(139,92,246,0.06);
    transform: translateY(-2px);
  }

  /* ── Accent bar — top edge, color-coded ── */
  .acard-accent {
    height: 3px; width: 100%; flex-shrink: 0;
    opacity: 0.5; transition: opacity 0.22s;
  }
  .acard:hover .acard-accent { opacity: 1; }
  .accent-violet { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
  .accent-blue { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
  .accent-emerald { background: linear-gradient(90deg, #10B981, #34D399); }

  /* ── Body — main content area ── */
  .acard-body {
    display: block; text-decoration: none; color: inherit;
    padding: 14px 16px 12px; flex: 1; min-width: 0;
  }
  .acard-selectable .acard-body { padding-left: 36px; }

  /* ── Top row: icon + title + status ── */
  .acard-top {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px;
  }

  /* Icon */
  .acard-icon {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 6px rgba(0,0,0,0.15);
  }
  .acard-icon .material-symbols-outlined { font-size: 17px; }
  .icon-violet { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(139,92,246,0.08)); }
  .icon-violet .material-symbols-outlined { color: #A78BFA; }
  .icon-blue { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.08)); }
  .icon-blue .material-symbols-outlined { color: #60A5FA; }
  .icon-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.08)); }
  .icon-emerald .material-symbols-outlined { color: #34D399; }

  /* Title group */
  .acard-title-group { flex: 1; min-width: 0; }
  .acard-name {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: -0.02em; line-height: 1.3;
  }
  .acard-name-link { text-decoration: none; display: block; }
  .acard-name-link:hover .acard-name { color: #A78BFA; }
  .acard-sub {
    font-size: 10px; color: var(--text-muted); margin-top: 1px;
    letter-spacing: 0.01em; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Status cluster — right side */
  .acard-status-cluster {
    display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  }
  .acard-dot {
    width: 6px; height: 6px; border-radius: 50%;
  }
  .dot-green { background: #34D399; box-shadow: 0 0 6px rgba(52,211,153,0.5); }
  .dot-amber { background: #FBBF24; box-shadow: 0 0 6px rgba(251,191,36,0.5); }
  .acard-badge {
    font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
    padding: 2px 7px; border-radius: 6px; text-transform: uppercase;
    line-height: 1.4;
  }
  .badge-green { background: rgba(52,211,153,0.12); color: #34D399; }
  .badge-amber { background: rgba(251,191,36,0.12); color: #FBBF24; }
  .badge-violet { background: rgba(139,92,246,0.12); color: #A78BFA; }
  .badge-emerald { background: rgba(16,185,129,0.12); color: #34D399; }
  .badge-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); }

  /* Hover action buttons (edit/delete) */
  .acard-actions {
    display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s;
  }
  .acard:hover .acard-actions { opacity: 1; }
  .acard-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px; border: none;
    background: rgba(255,255,255,0.04); color: var(--text-muted);
    cursor: pointer; transition: background 0.15s, color 0.15s;
    text-decoration: none; padding: 0;
  }
  .acard-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
  .acard-action-btn .material-symbols-outlined { font-size: 14px; }

  /* ── Description ── */
  .acard-desc {
    font-size: 11px; color: var(--text-secondary); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 4px;
  }

  /* ── Metrics strip — inset tray with frosted dividers ── */
  .acard-metrics {
    display: flex; gap: 0;
    background: rgba(255,255,255,0.025);
    border-radius: 8px; margin-top: 6px;
    border: 1px solid rgba(255,255,255,0.04);
  }
  .acard-metric {
    flex: 1; text-align: center; padding: 7px 4px;
    position: relative;
  }
  .acard-metric + .acard-metric::before {
    content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
    width: 1px; background: rgba(255,255,255,0.06);
  }
  .acard-metric-val {
    display: block; font-size: 15px; font-weight: 800; color: var(--text-primary);
    letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums;
  }
  .acard-metric-lbl {
    display: block; font-size: 8px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    margin-top: 3px;
  }

  /* ── Chips row ── */
  .acard-chips {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px;
  }
  .acard-chip {
    font-size: 9px; font-weight: 600; padding: 2px 8px;
    border-radius: 5px; letter-spacing: 0.01em; line-height: 1.5;
  }
  .chip-violet { background: rgba(139,92,246,0.1); color: #A78BFA; }
  .chip-blue { background: rgba(59,130,246,0.1); color: #60A5FA; }
  .chip-emerald { background: rgba(16,185,129,0.1); color: #34D399; }

  /* ── Footer ── */
  .acard-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px; padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 10px; color: var(--text-muted);
  }

  /* ── Custom selection checkbox ── */
  .acard-selectable { position: relative; }
  .acard-check {
    position: absolute; top: 25px; left: 12px; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }
  .acard-check input[type="checkbox"] {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
  }
  .acard-check-box {
    width: 18px; height: 18px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.15s;
  }
  .acard-check-box .material-symbols-outlined {
    font-size: 13px; color: transparent; transition: color 0.15s;
  }
  .acard-check:hover .acard-check-box {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
    transform: scale(1.08);
  }
  /* Checked states — color-coded */
  .acard-check input:checked ~ .acard-check-box {
    transform: scale(1.06);
  }
  .check-violet input:checked ~ .acard-check-box {
    background: rgba(139,92,246,0.25); border-color: #8B5CF6;
    box-shadow: 0 0 8px rgba(139,92,246,0.3);
  }
  .check-violet input:checked ~ .acard-check-box .material-symbols-outlined { color: #C4B5FD; }
  .check-blue input:checked ~ .acard-check-box {
    background: rgba(59,130,246,0.25); border-color: #3B82F6;
    box-shadow: 0 0 8px rgba(59,130,246,0.3);
  }
  .check-blue input:checked ~ .acard-check-box .material-symbols-outlined { color: #93C5FD; }
  .check-emerald input:checked ~ .acard-check-box {
    background: rgba(16,185,129,0.25); border-color: #10B981;
    box-shadow: 0 0 8px rgba(16,185,129,0.3);
  }
  .check-emerald input:checked ~ .acard-check-box .material-symbols-outlined { color: #6EE7B7; }

  /* ── Card-type specific hover glow ── */
  .acard-profile { border-color: rgba(139,92,246,0.08); }
  .acard-profile:hover {
    border-color: rgba(139,92,246,0.28);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(139,92,246,0.1);
  }
  .acard-audience { border-color: rgba(59,130,246,0.08); }
  .acard-audience:hover {
    border-color: rgba(59,130,246,0.28);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(59,130,246,0.1);
  }
  .acard-active-targeting { border-color: rgba(16,185,129,0.08); }
  .acard-active-targeting:hover {
    border-color: rgba(16,185,129,0.28);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(16,185,129,0.1);
  }

  /* ══════════════════════════════════════════════════════════════
     Legacy audience-card — kept for backward compat
     ══════════════════════════════════════════════════════════════ */
  .audience-card {
    display: block; text-decoration: none;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 12px; padding: 0; overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
  }
  .audience-card:hover {
    border-color: rgba(139,92,246,0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    transform: translateY(-1px);
  }
  .audience-card-selectable { position: relative; }
  .audience-card-checkbox { position: absolute; top: 14px; left: 14px; z-index: 2; }
  .audience-card-checkbox input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--violet-soft); }
  .audience-card-checkbox.blue input { accent-color: #60A5FA; }
  .audience-card-checkbox.emerald input { accent-color: var(--emerald); }
  .audience-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
  .audience-card-header.compact { margin-bottom: 6px; }
  .audience-card-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .audience-card-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .audience-card-icon .material-symbols-outlined { font-size: 16px; }
  .audience-card-name { font-size: 13px; font-weight: 650; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .audience-card-type { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
  .audience-card-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
  .audience-card-metrics { display: flex; align-items: stretch; gap: 0; background: rgba(255,255,255,0.025); border-top: 1px solid rgba(255,255,255,0.06); margin: 0 -16px; }
  .audience-card-metrics .metric-item { flex: 1; text-align: center; padding: 8px 4px; position: relative; }
  .audience-card-metrics .metric-item + .metric-item::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: rgba(255,255,255,0.06); }
  .audience-card-metrics .metric-val { display: block; font-size: 14px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
  .audience-card-metrics .metric-label { display: block; font-size: 8.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-top: 3px; }
  .audience-card-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 16px 0; }
  .audience-card-footer { padding: 8px 16px 12px; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--text-muted); }
  .audience-card .overlay-btn-group { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
  .audience-card:hover .overlay-btn-group { opacity: 1; }

  /* Targeting strategy summary — glass strip */
  .audiences-strategy-grid {
    display: flex; gap: 2px; margin-bottom: 14px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 10px; padding: 2px; overflow: hidden;
  }
  .audiences-strategy-card {
    flex: 1 1 0; min-width: 0;
    border-radius: 8px; padding: 10px 6px; text-align: center;
    transition: background 0.18s;
    position: relative;
  }
  .audiences-strategy-card:hover { background: rgba(255,255,255,0.04); }
  .audiences-strategy-card + .audiences-strategy-card::before {
    content: ""; position: absolute; left: -1px; top: 20%; bottom: 20%;
    width: 1px; background: var(--border); pointer-events: none;
  }
  .audiences-strategy-label {
    font-size: 8.5px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .audiences-strategy-value { font-size: 17px; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
  .audiences-strategy-value .unit { font-size: 8.5px; font-weight: 500; color: var(--text-muted); margin-left: 1px; }

  /* Helper: section hint text */
  .audiences-hint {
    font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5;
  }

  /* Empty state */
  .audiences-empty {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - 180px);
  }
  .audiences-empty-inner {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 32px; max-width: 440px; width: 100%;
    text-align: center;
  }
  .audiences-empty-icon {
    width: 48px; height: 48px; border-radius: 13px; margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(52,211,153,0.15));
    display: flex; align-items: center; justify-content: center;
  }
  .audiences-empty-icon .material-symbols-outlined { font-size: 24px; color: var(--text-primary); }
  .audiences-empty h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
  .audiences-empty p { font-size: 12px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5; }
  .audiences-empty .highlight { color: var(--text-primary); font-weight: 500; }
  .audiences-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px;
  }
  .audiences-feature {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    text-align: left;
  }
  .audiences-feature .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
  .audiences-feature .feature-icon-violet { color: var(--violet-soft); }
  .audiences-feature .feature-icon-emerald { color: var(--emerald); }
  .audiences-feature .feature-icon-blue { color: #60A5FA; }
  .audiences-feature .feature-icon-amber { color: #FBBF24; }
  .audiences-feature .feature-title { font-size: 11px; font-weight: 600; }
  .audiences-feature .feature-desc { font-size: 9px; color: var(--text-muted); }
  .audiences-empty-actions { display: flex; flex-direction: column; gap: 8px; }
  .audiences-empty-actions .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 10px 20px; border-radius: 10px;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    color: white; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(139,92,246,0.2);
    border: none; cursor: pointer;
  }
  .audiences-empty-actions .btn-primary:hover { box-shadow: 0 4px 20px rgba(139,92,246,0.3); }
  .audiences-empty-actions .btn-primary .material-symbols-outlined { font-size: 16px; }
  .audiences-empty-actions .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 10px 20px; border-radius: 10px;
    background: none; border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    text-decoration: none; transition: all 0.2s;
  }
  .audiences-empty-actions .btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .audiences-empty-actions .btn-secondary .material-symbols-outlined { font-size: 16px; }

  /* Targeting empty inline */
  .audiences-empty-inline {
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px 18px; transition: border-color 0.2s;
  }
  .audiences-empty-inline:hover { border-color: var(--border-hover); }
  .audiences-empty-inline-inner { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
  .audiences-empty-inline-body { flex: 1; }
  .audiences-empty-inline-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
  .audiences-empty-inline-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
  .audiences-empty-inline-actions { display: flex; align-items: center; gap: 8px; }

  /* Audience sections wrapper — consistent vertical rhythm */
  .audiences-sections { display: flex; flex-direction: column; gap: 20px; }

  /* View-all centered wrapper */
  .audiences-view-all-wrap { text-align: center; }

  /* Legacy card icon/badge/border color variants */
  .audience-card-icon.violet { background: rgba(139,92,246,0.12); }
  .audience-card-icon.violet .material-symbols-outlined { color: var(--violet-soft); }
  .audience-card-icon.blue { background: rgba(96,165,250,0.12); }
  .audience-card-icon.blue .material-symbols-outlined { color: #60A5FA; }
  .audience-card-icon.emerald { background: rgba(52,211,153,0.12); }
  .audience-card-icon.emerald .material-symbols-outlined { color: var(--emerald); }
  .audience-card-icon.purple { background: rgba(168,85,247,0.12); }
  .audience-card-icon.purple .material-symbols-outlined { color: #A855F7; }
  .audience-card.emerald-tint { border-color: rgba(52,211,153,0.12); }
  .audience-card.blue-tint { border-color: rgba(96,165,250,0.12); }
  .audience-card.purple-tint { border-color: rgba(168,85,247,0.20); }
  .badge-active { background: rgba(52,211,153,0.12); color: var(--emerald); }
  .badge-draft { background: rgba(251,191,36,0.12); color: #FBBF24; }
  .badge-archived { background: rgba(255,255,255,0.06); color: var(--text-muted); }
  .badge-ai { background: rgba(139,92,246,0.12); color: var(--violet-soft); }
  .badge-template { background: rgba(168,85,247,0.12); color: #A855F7; }
  .badge-blue { background: rgba(96,165,250,0.12); color: #60A5FA; }

  /* Stat value color variants */
  .stat-value.emerald { color: var(--emerald); }
  .stat-value.blue { color: #60A5FA; }
  .stat-value.violet { color: var(--violet-soft); }
  .stat-value.amber { color: #FBBF24; }

  /* Stat value truncation */
  .stat-value.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Audience card header compact (reduced margin) */
  .audience-card-header.compact { margin-bottom: 6px; }

  /* Audience card link wrapper (no decoration) */
  .audience-card-link { display: block; text-decoration: none; flex: 1; min-width: 0; }

  /* Audience card badge area */
  .audience-card-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

  /* Amber button variant */
  .dna-btn.dna-btn-amber { color: #FBBF24; border-color: rgba(251,191,36,0.2); }
  .dna-btn.dna-btn-amber:hover { background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.35); }

  /* Audiences section title icon color */
  .audiences-section-title .material-symbols-outlined.blue { color: #60A5FA; }
  .audiences-section-title .material-symbols-outlined.emerald { color: var(--emerald); }
  .audiences-section-title .material-symbols-outlined.violet { color: var(--violet-soft); }

  /* CTA icon color variants */
  .audiences-cta-icon.blue { background: rgba(96,165,250,0.12); }
  .audiences-cta-icon.blue .material-symbols-outlined { color: #60A5FA; }
  .audiences-cta-icon.emerald { background: rgba(52,211,153,0.12); }
  .audiences-cta-icon.emerald .material-symbols-outlined { color: var(--emerald); }
  .audiences-cta-icon.violet { background: rgba(139,92,246,0.12); }
  .audiences-cta-icon.violet .material-symbols-outlined { color: var(--violet-soft); }

  /* Targeting card stat row (reuses dash-card-stat styling) */
  .audience-card .dash-card-stat { padding: 3px 0; }

  /* Selection bar link reset */
  .sel-btn-link { text-decoration: none; }

  /* Audience card footer stat with icon */
  .audience-card-footer-stat {
    display: flex; align-items: center; gap: 4px;
  }
  .audience-card-footer-stat .material-symbols-outlined { font-size: 13px; }

  /* Audience card action buttons row */
  .audience-card-actions { display: flex; gap: 6px; margin-top: 8px; }
  .audience-card-action-btn { flex: 1; justify-content: center; }

  /* Template card purple button variant */
  .dna-btn.dna-btn-purple {
    color: #A855F7; border-color: rgba(168,85,247,0.25);
    background: rgba(168,85,247,0.06);
  }
  .dna-btn.dna-btn-purple:hover {
    background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.35);
  }

  /* Audience card type purple variant */
  .audience-card-type.purple { color: #A855F7; }
}

@layer utilities {
  /* Backdrop blur for older browsers */
  .backdrop-blur-sm {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  .backdrop-blur-lg {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  /* Safari fix: bg-white/5 with backdrop-filter renders as solid white in Safari.
     This overrides the background to use a dark semi-transparent color instead.
     The @supports rule targets Safari's webkit backdrop-filter support. */
  @supports (-webkit-backdrop-filter: blur(1px)) {
    /* Override bg-white/5 when combined with backdrop-blur */
    .bg-white\/5.backdrop-blur-sm,
    .bg-white\/5.backdrop-blur-lg,
    .backdrop-blur-sm.bg-white\/5,
    .backdrop-blur-lg.bg-white\/5 {
      background-color: rgba(17, 17, 20, 0.85) !important;
    }

    /* Also handle bg-white/10 which can have similar issues */
    .bg-white\/10.backdrop-blur-sm,
    .bg-white\/10.backdrop-blur-lg,
    .backdrop-blur-sm.bg-white\/10,
    .backdrop-blur-lg.bg-white\/10 {
      background-color: rgba(20, 20, 24, 0.9) !important;
    }
  }

  /* Line height utilities for tight headings */
  .leading-none {
    line-height: 1;
  }

  .leading-tight {
    line-height: 1.25;
  }

  /* Letter spacing for headings */
  .tracking-tight {
    letter-spacing: -0.025em;
  }

  .tracking-tighter {
    letter-spacing: -0.05em;
  }

  /* Toast Slide Animations */
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(100%);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideOutRight {
    from {
      opacity: 1;
      transform: translateX(0);
    }
    to {
      opacity: 0;
      transform: translateX(100%);
    }
  }

  .toast-enter {
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .toast-exit {
    animation: slideOutRight 0.2s ease forwards;
  }

  /* Progress bar animation for auto-dismiss */
  @keyframes shrinkWidth {
    from { width: 100%; }
    to { width: 0%; }
  }

  .toast-progress {
    animation: shrinkWidth var(--toast-duration, 5s) linear forwards;
  }

  /* ═══ Discovery Engine ═══ */

  /* Mode card grid */
  .disc-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
    align-items: start;
  }

  /* ── Card shell ── */
  .disc-mode {
    position: relative;
    background: linear-gradient(168deg, rgba(18,18,24,0.95) 0%, rgba(12,12,16,0.92) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s, box-shadow 0.3s;
    overflow: hidden;
  }
  /* subtle top-edge accent glow — set per-card via CSS var */
  .disc-mode::before {
    content: '';
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 2px;
    border-radius: 16px 16px 0 0;
    background: var(--disc-accent, var(--cyan));
    opacity: 0.45;
    transition: opacity 0.3s;
  }
  .disc-mode:hover {
    border-color: rgba(255,255,255,0.09);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.03);
  }
  .disc-mode:hover::before { opacity: 0.7; }

  /* ── Card header ── */
  .disc-mode-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 14px;
  }
  .disc-mode-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  .disc-mode-title {
    font-size: 14px;
    font-weight: 650;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }
  .disc-mode-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 4px;
  }

  /* ── "Generate with AI" separator ── */
  .disc-ai-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 14px;
  }
  .disc-ai-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
  }
  .disc-ai-divider-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.85;
  }

  /* ── Form area ── */
  .disc-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .disc-form-label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .disc-form-input {
    width: 100%;
    padding: 8px 11px;
    border-radius: 9px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    appearance: auto;
  }
  .disc-form-input:hover {
    border-color: rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.28);
  }
  .disc-form-input:focus {
    border-color: rgba(139,92,246,0.45);
    background: rgba(0,0,0,0.32);
    box-shadow: 0 0 0 2px rgba(139,92,246,0.08);
  }
  .disc-form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.55;
    font-weight: 400;
  }
  /* Mini 2-col grid helper */
  .disc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* ── Toggle options ── */
  .disc-form-toggles {
    display: flex;
    gap: 8px;
    margin-top: 2px;
  }
  .disc-form-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s, border-color 0.15s;
  }
  .disc-form-toggle:hover {
    background: rgba(0,0,0,0.22);
    border-color: rgba(255,255,255,0.07);
  }
  .disc-form-toggle input[type="checkbox"] {
    accent-color: var(--violet-soft);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
  }

  /* ── Start Research CTA ── */
  .disc-start-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding: 10px 0;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.25s, filter 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .disc-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    filter: brightness(1.08);
  }
  .disc-start-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    filter: brightness(0.96);
  }
  .disc-start-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: none;
    box-shadow: none;
  }

  /* Checklist (Context Discovery readiness) */
  .disc-checklist {
    margin-bottom: 12px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px;
  }
  .disc-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
  }
  .disc-check-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    transition: all 0.2s;
  }
  .disc-check-dot.on {
    background: var(--emerald);
    box-shadow: 0 0 6px rgba(52,211,153,0.3);
  }
  .disc-check-label {
    font-size: 11px;
    color: var(--text-muted);
    flex: 1;
  }
  .disc-check-dot.on + .disc-check-label { color: var(--text-secondary); }
  .disc-check-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
  }
  .disc-check-value.active { color: var(--emerald); }


  /* Table (inside dna-section) */
  .disc-table {
    width: 100%;
    border-collapse: collapse;
  }
  .disc-table thead th {
    padding: 8px 14px;
    text-align: left;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid var(--border);
  }
  .disc-table tbody tr { transition: background 0.15s; }
  .disc-table tbody tr:hover { background: rgba(255,255,255,0.02); }
  .disc-table tbody tr:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.03); }
  .disc-table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
  }
  .disc-row { transition: background 0.15s; }
  .disc-row:hover { background: rgba(255,255,255,0.02); }
  .disc-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.03); }
  .disc-row td {
    padding: 10px 14px;
    vertical-align: middle;
    font-size: 11px;
    color: var(--text-muted);
  }

  /* Spinner */
  .disc-spinner {
    width: 11px;
    height: 11px;
    display: inline-block;
    animation: disc-spin 1s linear infinite;
  }
  @keyframes disc-spin { to { transform: rotate(360deg); } }

  /* Progress bar */
  .disc-progress {
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
  }
  .disc-progress-bar {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--violet), var(--emerald));
    transition: width 0.4s ease;
  }

  /* Coming Soon empty states */
  .disc-coming {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
  }
  .disc-coming-inner {
    text-align: center;
    max-width: 360px;
  }
  .disc-coming h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
  }
  .disc-coming p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
  }

  /* ── Analyse Tab ── */

  /* Stats strip — ultra-compact single-row for 10 items */
  .analyse-stats {
    display: flex; gap: 3px; margin-bottom: 12px;
  }
  .analyse-stat {
    flex: 1 1 0; min-width: 0;
    background: var(--surface-raised); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 4px; text-align: center;
    transition: border-color 0.15s;
  }
  .analyse-stat:hover { border-color: var(--border-hover); }
  .analyse-stat .stat-count {
    display: block; font-size: 15px; font-weight: 700;
    letter-spacing: -0.03em; line-height: 1;
  }
  .analyse-stat .stat-label {
    display: block; font-size: 9px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.02em; font-weight: 600;
    margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* AIO filter input group */
  .analyse-aio-input { display: flex; align-items: center; gap: 6px; }
  .analyse-aio-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

  /* Table wrapper */
  .analyse-table-wrap {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }
  .analyse-table-scroll { overflow-x: auto; }

  /* ── Analyse Tab: fill panel, only table scrolls ── */
  .panel-body:has(.analyse-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.analyse-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.analyse-fullpage) [data-controller="discovery-engine"] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .analyse-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .analyse-fullpage > *:not(.analyse-table-wrap) {
    flex-shrink: 0;
  }
  .analyse-fullpage > .analyse-table-wrap {
    flex: 1; min-height: 0;
    overflow: hidden auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .analyse-fullpage > .analyse-table-wrap::-webkit-scrollbar { width: 5px; }
  .analyse-fullpage > .analyse-table-wrap::-webkit-scrollbar-track { background: transparent; }
  .analyse-fullpage > .analyse-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
  .analyse-fullpage .disc-table thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--surface-raised);
  }

  /* Checkbox */
  .analyse-checkbox {
    width: 14px; height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    accent-color: var(--violet);
    cursor: pointer;
  }

  /* Empty filter state */
  .analyse-empty-filter {
    padding: 48px 24px;
    text-align: center;
  }
  .analyse-empty-filter h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
  .analyse-empty-filter p { font-size: 11px; color: var(--text-muted); }

  /* ── Campaigns: reduced padding to match Discovery ── */
  .panel-body:has(.campaigns-fullpage) {
    padding: 10px 16px;
  }

  /* ── Asset Library: reduced padding to match Discovery ── */
  .panel-body:has(.asset-library-fullpage) {
    padding: 10px 16px;
  }

  /* ── Discover Tab: fill panel without scrollbar ── */
  .panel-body:has(.discover-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.discover-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.discover-fullpage) [data-controller="discovery-engine"],
  .panel-body:has(.discover-fullpage) [data-controller="content-intelligence"] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .discover-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .discover-fullpage > *:not(:last-child) {
    flex-shrink: 0;
  }

  /* ── Cluster Tab: fill panel without outer scrollbar ── */
  .panel-body:has(.cluster-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.cluster-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.cluster-fullpage) [data-controller="discovery-engine"] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .cluster-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .cluster-fullpage > .dna-page-header,
  .cluster-fullpage > .audiences-stats {
    flex-shrink: 0;
  }

  /* Use default header/stats sizing (matches prune tab) */

  /* Two-column grid: left = rules + quick actions, right = cluster list */
  .cluster-fullpage > .cluster-grid {
    flex: 1; min-height: 0;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 10px;
    align-items: stretch;
  }

  /* Left column: rules + quick actions */
  .cluster-grid > .cluster-rules-col {
    display: flex; flex-direction: column;
    min-height: 0; overflow: hidden;
  }
  .cluster-rules-col > .dna-section {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .cluster-rules-col .cluster-rules-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .cluster-rules-col .cluster-rules-scroll::-webkit-scrollbar { width: 4px; }
  .cluster-rules-col .cluster-rules-scroll::-webkit-scrollbar-track { background: transparent; }
  .cluster-rules-col .cluster-rules-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  /* dna-rows inside cluster rules — match prune tab sizing */
  .cluster-rules-col .dna-row {
    padding: 12px 16px; gap: 12px;
  }
  .cluster-rules-col .dna-row-icon {
    width: 32px; height: 32px; border-radius: 9px;
  }
  .cluster-rules-col .dna-row-icon .material-symbols-outlined { font-size: 15px; }
  .cluster-rules-col .dna-row-name { font-size: 12px; }
  .cluster-rules-col .dna-section-header { margin-bottom: 4px; }

  /* Right column: cluster list */
  .cluster-grid > .cluster-list-col {
    display: flex; flex-direction: column;
    min-height: 0; overflow: hidden;
  }
  .cluster-list-col > .dna-section {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .cluster-list-col .cluster-table-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .cluster-list-col .cluster-table-scroll::-webkit-scrollbar { width: 4px; }
  .cluster-list-col .cluster-table-scroll::-webkit-scrollbar-track { background: transparent; }
  .cluster-list-col .cluster-table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  /* ── Prune Tab: fill panel without outer scrollbar ── */
  .panel-body:has(.prune-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.prune-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.prune-fullpage) [data-controller="discovery-engine"] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .prune-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .prune-fullpage > .dna-page-header,
  .prune-fullpage > .audiences-stats {
    flex-shrink: 0;
  }

  /* Two-column grid */
  .prune-fullpage > .prune-grid {
    flex: 1; min-height: 0;
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 10px;
    align-items: stretch;
  }

  /* Left column: neg lists + impact */
  .prune-grid > .prune-left {
    display: flex; flex-direction: column; gap: 8px;
    min-height: 0; overflow: hidden;
  }
  .prune-left > .dna-section:first-child {
    flex: 3; min-height: 0;
    display: flex; flex-direction: column;
  }
  .prune-left .prune-table-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .prune-left .prune-table-scroll::-webkit-scrollbar { width: 4px; }
  .prune-left .prune-table-scroll::-webkit-scrollbar-track { background: transparent; }
  .prune-left .prune-table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }
  .prune-left > .dna-section:last-child { flex: 2; min-height: 0; display: flex; flex-direction: column; }

  /* Right column: refinement rules */
  .prune-grid > .prune-right {
    display: flex; flex-direction: column;
    min-height: 0; overflow: hidden;
  }
  .prune-right > .dna-section {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .prune-right > .dna-section > .dna-section-header { flex-shrink: 0; }
  .prune-right .prune-rules-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .prune-right .prune-rules-scroll::-webkit-scrollbar { width: 4px; }
  .prune-right .prune-rules-scroll::-webkit-scrollbar-track { background: transparent; }
  .prune-right .prune-rules-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }
  .prune-grid > .prune-right::-webkit-scrollbar { width: 4px; }
  .prune-grid > .prune-right::-webkit-scrollbar-track { background: transparent; }
  .prune-grid > .prune-right::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  /* dna-rows inside prune rules — stretch to fill */
  .prune-right .dna-row {
    padding: 12px 16px; gap: 12px;
    flex: 1;
  }
  .prune-right .dna-row-icon {
    width: 32px; height: 32px; border-radius: 9px;
  }
  .prune-right .dna-row-icon .material-symbols-outlined { font-size: 15px; }
  .prune-right .dna-row-name { font-size: 12px; }

  .prune-impact-card {
    padding: 16px 10px;
    text-align: center;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex: 1;
  }
  .prune-impact-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  .prune-impact-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 6px;
  }
  .prune-impact-sub {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 3px;
  }

  /* ── Decisions Tab: Results-First Master-Detail Layout ── */
  .panel-body:has(.decisions-fullpage) {
    padding: 10px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.decisions-fullpage) .panel-content {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .panel-body:has(.decisions-fullpage) [data-controller="discovery-engine"] {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
  }
  .decisions-fullpage {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  .decisions-fullpage > .decisions-header,
  .decisions-fullpage > .decisions-verdict-strip,
  .decisions-fullpage > .decisions-toolbar {
    flex-shrink: 0;
  }

  /* Header row */
  .decisions-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0 6px; gap: 12px;
  }
  .decisions-header-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--text-primary);
  }
  .decisions-header-actions {
    display: flex; align-items: center; gap: 6px;
  }

  /* Verdict distribution strip */
  .decisions-verdict-strip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0; margin-bottom: 4px;
  }
  .decisions-verdict-bar {
    flex: 1; height: 6px; border-radius: 3px;
    display: flex; overflow: hidden;
    background: rgba(255,255,255,0.04);
  }
  .decisions-verdict-bar > span {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.33,1,0.68,1);
  }
  .decisions-verdict-pills {
    display: flex; gap: 4px; flex-shrink: 0;
  }
  .decisions-verdict-pill {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px; border-radius: 10px;
    font-size: 10px; font-weight: 600;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .decisions-verdict-pill:hover {
    background: rgba(255,255,255,0.08);
  }
  .decisions-verdict-pill.active {
    border-color: currentColor;
    background: currentColor;
  }
  .decisions-verdict-pill.active > span {
    color: #0c0c0e;
  }
  .decisions-verdict-pill .pill-dot {
    width: 5px; height: 5px; border-radius: 50%;
  }

  /* Toolbar with batch actions */
  .decisions-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0 6px;
    min-height: 28px;
  }
  .decisions-toolbar .decisions-select-all {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 10px; color: var(--text-muted);
    user-select: none;
  }
  .decisions-toolbar .decisions-batch-actions {
    display: flex; align-items: center; gap: 4px;
    margin-left: auto;
  }
  .decisions-batch-btn {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 500;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .decisions-batch-btn:hover { background: rgba(255,255,255,0.08); }
  .decisions-batch-btn.approve:hover { background: rgba(52,211,153,0.15); color: #34D399; border-color: rgba(52,211,153,0.3); }
  .decisions-batch-btn.dismiss:hover { background: rgba(248,113,113,0.15); color: #F87171; border-color: rgba(248,113,113,0.3); }
  .decisions-selected-count {
    font-size: 10px; color: var(--violet-soft); font-weight: 500;
  }

  /* Master-detail grid */
  .decisions-master-detail {
    flex: 1; min-height: 0;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 8px;
  }

  /* Left: cluster list */
  .decisions-list-col {
    display: flex; flex-direction: column;
    min-height: 0;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }
  .decisions-list-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .decisions-list-scroll::-webkit-scrollbar { width: 4px; }
  .decisions-list-scroll::-webkit-scrollbar-track { background: transparent; }
  .decisions-list-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  .decisions-cluster-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .decisions-cluster-row:last-child { border-bottom: none; }
  .decisions-cluster-row:hover { background: rgba(255,255,255,0.03); }
  .decisions-cluster-row.selected {
    background: rgba(139,92,246,0.08);
    border-left: 2px solid var(--violet-soft);
  }
  .decisions-cluster-row .cluster-checkbox {
    width: 14px; height: 14px; border-radius: 3px;
    border: 1.5px solid var(--border-hover);
    background: transparent;
    cursor: pointer; flex-shrink: 0;
    appearance: none; -webkit-appearance: none;
    transition: all 0.15s ease;
  }
  .decisions-cluster-row .cluster-checkbox:checked {
    background: var(--violet); border-color: var(--violet);
  }
  .decisions-cluster-info {
    flex: 1; min-width: 0;
  }
  .decisions-cluster-name {
    font-size: 11px; font-weight: 500; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .decisions-cluster-meta {
    display: flex; align-items: center; gap: 5px;
    font-size: 9px; color: var(--text-muted); margin-top: 1px;
  }
  .decisions-cluster-score {
    font-size: 12px; font-weight: 700; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
  }
  .decisions-verdict-badge {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 1px 5px; border-radius: 6px;
    font-size: 9px; font-weight: 600;
    text-transform: capitalize;
  }
  .decisions-verdict-badge.keep    { background: rgba(52,211,153,0.12); color: #34D399; }
  .decisions-verdict-badge.reject  { background: rgba(248,113,113,0.12); color: #F87171; }
  .decisions-verdict-badge.modify  { background: rgba(251,191,36,0.12); color: #FBBF24; }
  .decisions-verdict-badge.review  { background: rgba(96,165,250,0.12); color: #60A5FA; }
  .decisions-status-dot {
    width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  }
  .decisions-status-dot.approved  { background: #34D399; }
  .decisions-status-dot.pending   { background: #FBBF24; }
  .decisions-status-dot.dismissed { background: #94A3B8; }
  .decisions-status-dot.executed  { background: #22D3EE; }

  /* Right: detail panel */
  .decisions-detail-col {
    display: flex; flex-direction: column;
    min-height: 0;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }
  .decisions-detail-scroll {
    flex: 1; min-height: 0; overflow-y: auto;
    padding: 12px 14px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .decisions-detail-scroll::-webkit-scrollbar { width: 4px; }
  .decisions-detail-scroll::-webkit-scrollbar-track { background: transparent; }
  .decisions-detail-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  .decisions-detail-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 12px;
  }
  .decisions-detail-title {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 2px;
  }
  .decisions-detail-subtitle {
    font-size: 10px; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
  }
  .decisions-score-ring {
    width: 52px; height: 52px; flex-shrink: 0;
    position: relative;
  }
  .decisions-score-ring svg { width: 100%; height: 100%; }
  .decisions-score-ring .score-value {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  /* Signal breakdown bars */
  .decisions-signal-section {
    margin-bottom: 12px;
  }
  .decisions-signal-heading {
    font-size: 9px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 6px;
  }
  .decisions-signal-row {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0;
  }
  .decisions-signal-label {
    font-size: 10px; color: var(--text-secondary);
    width: 70px; flex-shrink: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .decisions-signal-track {
    flex: 1; height: 5px; border-radius: 3px;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
  }
  .decisions-signal-fill {
    height: 100%; border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.33,1,0.68,1);
  }
  .decisions-signal-value {
    font-size: 9px; color: var(--text-muted);
    width: 24px; text-align: right; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
  }

  /* Rules matched */
  .decisions-rules-list {
    margin-bottom: 12px;
  }
  .decisions-rule-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 6px;
    font-size: 10px; margin: 2px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
  }

  /* Actions list */
  .decisions-action-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    margin-bottom: 4px;
    transition: background 0.15s ease;
  }
  .decisions-action-item:hover { background: rgba(255,255,255,0.04); }
  .decisions-action-icon {
    width: 24px; height: 24px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .decisions-action-body { flex: 1; min-width: 0; }
  .decisions-action-type {
    font-size: 10px; font-weight: 500; color: var(--text-primary);
    margin-bottom: 1px;
  }
  .decisions-action-desc {
    font-size: 9px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Review controls at bottom of detail */
  .decisions-review-controls {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }
  .decisions-review-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 7px;
    font-size: 11px; font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
  }
  .decisions-review-btn:hover { background: rgba(255,255,255,0.06); }
  .decisions-review-btn.approve {
    background: rgba(52,211,153,0.1); color: #34D399;
    border-color: rgba(52,211,153,0.2);
  }
  .decisions-review-btn.approve:hover { background: rgba(52,211,153,0.2); }
  .decisions-review-btn.dismiss {
    background: rgba(248,113,113,0.08); color: #F87171;
    border-color: rgba(248,113,113,0.15);
  }
  .decisions-review-btn.dismiss:hover { background: rgba(248,113,113,0.15); }
  .decisions-review-btn.override {
    margin-left: auto;
  }

  /* Config drawer */
  .decisions-config-drawer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.33,1,0.68,1);
  }
  .decisions-config-drawer.collapsed { max-height: 32px; }
  .decisions-config-drawer.expanded  { max-height: 340px; }
  .decisions-config-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px; cursor: pointer;
    user-select: none;
  }
  .decisions-config-toggle span {
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    display: flex; align-items: center; gap: 4px;
  }
  .decisions-config-toggle .toggle-icon {
    font-size: 16px; color: var(--text-muted);
    transition: transform 0.2s ease;
  }
  .decisions-config-drawer.expanded .toggle-icon { transform: rotate(180deg); }

  /* Config tabs inside drawer */
  .decisions-config-tabs {
    display: flex; gap: 2px;
    padding: 2px 10px 6px;
    flex-shrink: 0;
  }
  .decisions-config-tab {
    padding: 4px 10px; border-radius: 6px;
    font-size: 10px; font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
  }
  .decisions-config-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
  .decisions-config-tab.active { color: var(--text-primary); background: rgba(139,92,246,0.12); }

  .decisions-config-body {
    padding: 6px 10px 10px;
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent;
  }
  .decisions-config-body::-webkit-scrollbar { width: 3px; }
  .decisions-config-body::-webkit-scrollbar-track { background: transparent; }
  .decisions-config-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

  /* Compact row sizing inside config drawer */
  .decisions-config-body .dna-row {
    padding: 5px 8px; gap: 8px;
  }
  .decisions-config-body .dna-row-icon {
    width: 26px; height: 26px; border-radius: 6px;
  }
  .decisions-config-body .dna-row-icon .material-symbols-outlined { font-size: 13px; }
  .decisions-config-body .dna-row-name { font-size: 10px; }

  /* Empty state */
  .decisions-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px; text-align: center;
  }
  .decisions-empty-icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--violet), var(--emerald));
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
  }
  .decisions-empty-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 4px;
  }
  .decisions-empty-desc {
    font-size: 11px; color: var(--text-muted); max-width: 280px;
    line-height: 1.4;
  }

  /* Scale bar (kept for config drawer) */
  .decisions-config-body .dna-scale-segment {
    width: 9px; height: 7px;
  }

  /* Scale bar — visual segment selector for numeric scales */
  .dna-scale-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .dna-scale-track {
    display: flex;
    gap: 1px;
    border-radius: 3px;
    overflow: hidden;
  }
  .dna-scale-segment {
    width: 10px;
    height: 8px;
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
  }
  .dna-scale-segment:hover {
    background: rgba(255,255,255,0.18);
  }
  .dna-scale-segment.filled {
    background: var(--scale-color, #8B5CF6);
  }
  .dna-scale-segment.filled:hover {
    filter: brightness(1.2);
  }
  .dna-scale-value {
    font-size: 9px;
    color: var(--text-muted);
    min-width: 14px;
    text-align: right;
    font-weight: 500;
    user-select: none;
    line-height: 1;
  }
  /* Compact segments in quadrant grids */
  .decisions-quadrant-grid .dna-scale-segment {
    width: 9px;
    height: 7px;
  }

  /* Modal overlay — class-based display so Tailwind .hidden (utility layer) can override */
  .analyse-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
  }
  .analyse-modal {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
  }
  .analyse-modal-wide { max-width: 480px; }
  .analyse-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .analyse-modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .analyse-modal-field { margin-bottom: 12px; }
  .analyse-modal-field label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }
  .analyse-modal-desc { font-size: 11px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
  .analyse-modal-action { width: 100%; justify-content: center; }
}

/* ═══ Discovery Engine — unlayered overrides ═══ */
/* Element-qualified selectors (0-1-1) beat @tailwindcss/forms (0-1-0). */

textarea.disc-form-input,
input.disc-form-input,
select.disc-form-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  background-color: rgba(0,0,0,0.22);
  background-image: none;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
  outline: none;
  font-family: inherit;
  box-shadow: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
}
select.disc-form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B8B96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  padding-right: 28px;
  cursor: pointer;
}
textarea.disc-form-input {
  resize: none;
}
textarea.disc-form-input:hover,
input.disc-form-input:hover,
select.disc-form-input:hover {
  border-color: rgba(255,255,255,0.10);
  background-color: rgba(0,0,0,0.30);
}
textarea.disc-form-input:focus,
input.disc-form-input:focus,
select.disc-form-input:focus {
  border-color: rgba(139,92,246,0.45);
  background-color: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.10);
  outline: none;
}
textarea.disc-form-input::placeholder,
input.disc-form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
label.disc-form-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
label.disc-form-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s, border-color 0.15s;
}
label.disc-form-toggle:hover {
  background: rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.07);
}
label.disc-form-toggle input[type="checkbox"] {
  accent-color: var(--violet-soft);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 3px;
}
button.disc-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.25s, filter 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ═══ Settings Page ═══ */
.settings-layout {
  display: flex;
  gap: 20px;
  height: 100%;
  min-height: 0;
}

/* Settings sidebar nav */
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.settings-nav-search:focus-within {
  border-color: rgba(139,92,246,0.35);
  background: rgba(255,255,255,0.05);
}
.settings-nav-search .material-symbols-outlined {
  font-size: 16px;
  flex-shrink: 0;
}
.settings-nav-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  min-width: 0;
}
.settings-nav-search input::placeholder {
  color: var(--text-muted);
}

.settings-nav-group-label {
  padding: 10px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  user-select: none;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 400;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}
.settings-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.settings-nav-item[data-active] {
  color: var(--text-primary);
  background: rgba(139,92,246,0.08);
}
.settings-nav-item .material-symbols-outlined {
  font-size: 18px;
  opacity: 0.7;
}
.settings-nav-item[data-active] .material-symbols-outlined {
  opacity: 1;
  color: var(--violet-soft);
}

/* Settings panels area */
.settings-panels {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.settings-panels::-webkit-scrollbar { width: 5px; }
.settings-panels::-webkit-scrollbar-track { background: transparent; }
.settings-panels::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }

/* Account row */
.settings-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.settings-account-row:hover {
  border-color: var(--border-hover);
}
.settings-account-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Toggle row (checkbox/radio rows in content filters) */
.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.settings-toggle-row:hover {
  border-color: var(--border-hover);
  background: rgba(0,0,0,0.18);
}
.settings-checkbox,
.settings-radio {
  accent-color: var(--violet-soft);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Stat strip (billing period) */
.settings-stat-strip {
  display: flex;
  gap: 6px;
}
.settings-stat-item {
  flex: 1;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
  transition: border-color 0.15s;
}
.settings-stat-item:hover {
  border-color: var(--border-hover);
}
.settings-stat-item .stat-count {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.settings-stat-item .stat-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 4px;
}

/* Feature chips (merchant center empty state) */
.settings-feature-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  transition: border-color 0.15s;
}
.settings-feature-chip:hover {
  border-color: var(--border-hover);
}

/* Empty mini state */
.settings-empty-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.settings-empty-mini .material-symbols-outlined {
  font-size: 22px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-layout {
    flex-direction: column;
    gap: 12px;
  }
  .settings-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 0;
  }
  .settings-nav-search { display: none; }
  .settings-nav-group-label { display: none; }
  .settings-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ═══ Content Intelligence — Card & Component Styles ═══ */

/* Card hover & lift */
.ci-card {
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ci-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Action buttons */
.ci-action-btn {
  transition: color 0.15s, background 0.15s;
}
.ci-action-btn:hover {
  color: var(--violet-soft) !important;
  background: rgba(139,92,246,0.08);
}
.ci-action-btn.ci-analyzed {
  color: #FBBF24;
}
.ci-action-btn.ci-analyzed:hover {
  color: #FCD34D !important;
  background: rgba(251,191,36,0.08);
}

/* Spinner for loading states */
.ci-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--violet-soft);
  border-radius: 50%;
  animation: ci-spin 0.6s linear infinite;
}
@keyframes ci-spin {
  to { transform: rotate(360deg); }
}

/* Analysis & Recreate panels */
.ci-analysis-panel,
.ci-recreate-panel {
  transition: max-height 0.2s ease;
}

/* Board card in sidebar */
.ci-board-card {
  transition: background 0.15s, border-color 0.15s;
}
.ci-board-card:hover {
  background: rgba(255,255,255,0.04) !important;
}

/* Trending bar pills */
.ci-trend-pill {
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.ci-trend-pill:hover {
  background: rgba(139,92,246,0.08) !important;
  border-color: rgba(139,92,246,0.25) !important;
  transform: translateY(-1px);
}

/* Board dropdown */
.ci-board-dropdown {
  animation: ci-dropdown-in 0.15s ease;
}
@keyframes ci-dropdown-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Strategy tag pills on cards */
.ci-strategy-tag {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
  background: rgba(139,92,246,0.08);
  color: var(--violet-soft);
  white-space: nowrap;
}

/* Engagement ring SVG animation */
.ci-engagement-ring svg circle:last-child {
  transition: stroke-dasharray 0.5s ease;
}

@import 'actiontext.css';
/* Modal Backdrop Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.modal-backdrop-enter {
  animation: fadeIn 0.2s ease forwards;
}

.modal-backdrop-exit {
  animation: fadeOut 0.15s ease forwards;
}

/* Modal Content Animations */
@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-content-enter {
  animation: modalEnter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-content-exit {
  animation: modalExit 0.15s ease forwards;
}

/* Lightbox Animations - faster, more dramatic */
@keyframes lightboxBackdropEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

.lightbox-backdrop-enter {
  animation: lightboxBackdropEnter 0.15s ease forwards;
}

.lightbox-backdrop-exit {
  animation: lightboxBackdropExit 0.12s ease forwards;
}

.lightbox-image-enter {
  animation: lightboxImageEnter 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lightbox-image-exit {
  animation: lightboxImageExit 0.12s ease forwards;
}
/* ==========================================================================
   Sidebar — Clean Linear List (Glassmorphic)
   ========================================================================== */

/* Base sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width, 240px);
  z-index: 110;
  background: rgba(6, 6, 8, 0.7);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  margin-bottom: 20px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sidebar-logo:hover { background: rgba(255,255,255,0.04); }
.sidebar-logo .logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon svg { width: 16px; height: 16px; }
.sidebar-logo .logo-text {
  font-size: 16px; font-weight: 600; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--violet-soft));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap;
  transition: opacity 0.3s, width 0.3s;
}

/* Search bar */
.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.sidebar-search:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
}
.sidebar-search .material-symbols-outlined { font-size: 16px; }
.sidebar-search kbd {
  margin-left: auto;
  font-size: 10px; font-family: inherit;
  padding: 1px 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Nav groups */
.nav-group { margin-bottom: 4px; }
.nav-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px 6px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.nav-group-header:hover { color: var(--text-secondary); }
.nav-group-header .material-symbols-outlined {
  font-size: 14px;
  transition: transform 0.2s;
}
.nav-group.collapsed .nav-group-header .material-symbols-outlined {
  transform: rotate(180deg);
}
.nav-group-content {
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-group.collapsed .nav-group-content {
  max-height: 0 !important;
}

/* Nav items */
.c-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px; font-weight: 400;
  text-decoration: none;
}
.c-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.c-item.active {
  color: var(--text-primary);
  background: rgba(139,92,246,0.08);
}
.c-item .material-symbols-outlined { font-size: 18px; opacity: 0.7; }
.c-item.active .material-symbols-outlined { opacity: 1; color: var(--violet-soft); }
.c-item .nav-text { white-space: nowrap; transition: opacity 0.3s, width 0.3s; }
.c-item .c-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(52,211,153,0.12);
  color: var(--emerald);
}

/* Accent button (New Campaign) */
.c-item.accent-btn {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(16,185,129,0.15));
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--text-primary);
  font-weight: 500;
}
.c-item.accent-btn:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(16,185,129,0.25));
  border-color: rgba(139,92,246,0.3);
}

/* ═══ Bug Reporter — pinned to sidebar bottom ═══ */
.sidebar-bug-reporter {
  margin-top: auto;
  padding-top: 8px;
  flex-shrink: 0;
}
.sidebar-bug-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
}
.sidebar-bug-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}
.sidebar-bug-btn .material-symbols-outlined {
  font-size: 18px;
}
.sidebar-bug-btn .nav-text {
  white-space: nowrap;
  transition: opacity 0.3s, width 0.3s;
}

/* Bug reporter tooltip — visible on hover when collapsed */
.sidebar-bug-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(20, 20, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.sidebar-bug-tooltip::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: rgba(255,255,255,0.1);
}
.sidebar[data-collapsed="true"] .sidebar-bug-btn {
  position: relative;
}
.sidebar[data-collapsed="true"] .sidebar-bug-btn:hover .sidebar-bug-tooltip {
  display: block;
}

/* ═══ Bug Reporter Panel — glassmorphic flyout ═══ */
.bug-reporter-panel {
  position: fixed;
  z-index: 2147483647;
  width: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(139,92,246,0.04);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom left;
}

.bug-reporter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.008);
  flex-shrink: 0;
}

.bug-reporter-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.bug-reporter-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.bug-reporter-close:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

.bug-reporter-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.bug-reporter-action-btn:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.bug-reporter-divider {
  height: 1px;
  margin: 0 16px;
  background: var(--border);
}

.bug-reporter-console {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 10px 12px;
  height: 110px;
  overflow-y: auto;
  border: 1px solid var(--border);
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.6;
}

.bug-reporter-env-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.bug-reporter-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.008);
  flex-shrink: 0;
}

.bug-reporter-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(139,92,246,0.15));
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--violet-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.bug-reporter-submit:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.35), rgba(139,92,246,0.25));
  border-color: rgba(139,92,246,0.4);
  color: #c4b5fd;
  box-shadow: 0 0 20px rgba(139,92,246,0.1);
}

/* ═══ Collapsed state — icon-only ═══ */
.sidebar[data-collapsed="true"] {
  width: var(--sidebar-collapsed-width, 64px);
  padding: 16px 8px;
}
.sidebar[data-collapsed="true"] .logo-text { opacity: 0; width: 0; overflow: hidden; }
.sidebar[data-collapsed="true"] .sidebar-search { display: none; }
.sidebar[data-collapsed="true"] .nav-group-header > span:first-child { opacity: 0; width: 0; overflow: hidden; }
.sidebar[data-collapsed="true"] .nav-group-header .material-symbols-outlined { display: none; }
.sidebar[data-collapsed="true"] .nav-group-header {
  height: 1px; background: var(--border); padding: 0; margin: 8px 4px;
  overflow: hidden; font-size: 0; min-height: 0;
}
.sidebar[data-collapsed="true"] .c-item .nav-text { opacity: 0; width: 0; overflow: hidden; position: absolute; }
.sidebar[data-collapsed="true"] .c-item .c-badge { display: none; }
.sidebar[data-collapsed="true"] .c-item {
  justify-content: center;
  padding: 9px;
  width: 44px;
  border-radius: 12px;
}
.sidebar[data-collapsed="true"] .sidebar-bug-btn {
  justify-content: center;
  padding: 9px;
  width: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.25);
}
.sidebar[data-collapsed="true"] .sidebar-bug-btn .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  position: absolute;
}

/* ═══ Mobile hamburger ═══ */
.sidebar-hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 120;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(12,12,14,0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}
.sidebar-hamburger:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-hover);
}
.sidebar-hamburger .material-symbols-outlined { font-size: 20px; }

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 105;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ═══ Responsive — Tablet ≤1024px ═══ */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed-width, 64px);
    padding: 16px 8px;
  }
  .sidebar .logo-text { opacity: 0; width: 0; overflow: hidden; }
  .sidebar .sidebar-search { display: none; }
  .sidebar .nav-group-header > span:first-child { opacity: 0; width: 0; overflow: hidden; }
  .sidebar .nav-group-header .material-symbols-outlined { display: none; }
  .sidebar .nav-group-header {
    height: 1px; background: var(--border); padding: 0; margin: 8px 4px;
    overflow: hidden; font-size: 0; min-height: 0;
  }
  .sidebar .c-item .nav-text { opacity: 0; width: 0; overflow: hidden; position: absolute; }
  .sidebar .c-item .c-badge { display: none; }
  .sidebar .c-item {
    justify-content: center; padding: 9px; width: 44px; border-radius: 12px;
  }
  .sidebar .sidebar-bug-btn {
    justify-content: center; padding: 9px; width: 44px; border-radius: 12px;
    background: rgba(239, 68, 68, 0.25);
  }
  .sidebar .sidebar-bug-btn .nav-text {
    opacity: 0; width: 0; overflow: hidden; position: absolute;
  }
  .sidebar .sidebar-bug-btn { position: relative; }
  .sidebar .sidebar-bug-btn:hover .sidebar-bug-tooltip { display: block; }
}

/* ═══ Responsive — Mobile ≤768px ═══ */
@media (max-width: 768px) {
  .sidebar {
    width: 240px; padding: 16px 12px;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar.mobile-open .logo-text { opacity: 1; width: auto; overflow: visible; }
  .sidebar.mobile-open .sidebar-search { display: flex; }
  .sidebar.mobile-open .nav-group-header > span:first-child { opacity: 1; width: auto; overflow: visible; }
  .sidebar.mobile-open .nav-group-header .material-symbols-outlined { display: inline; }
  .sidebar.mobile-open .nav-group-header {
    height: auto; background: none; padding: 10px 8px 6px; margin: 0;
    overflow: visible; font-size: 10px; min-height: auto;
  }
  .sidebar.mobile-open .c-item .nav-text { opacity: 1; width: auto; overflow: visible; position: static; }
  .sidebar.mobile-open .c-item .c-badge { display: inline-flex; }
  .sidebar.mobile-open .c-item {
    justify-content: flex-start; padding: 7px 10px; width: auto; border-radius: 8px;
  }
  .sidebar.mobile-open .sidebar-bug-btn {
    justify-content: flex-start; padding: 7px 10px; width: auto; border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
  }
  .sidebar.mobile-open .sidebar-bug-btn .nav-text {
    opacity: 1; width: auto; overflow: visible; position: static;
  }
  .sidebar-overlay { display: block; }
  .sidebar-hamburger { display: flex; }
}
/*
 * 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.
 *


 */

@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
    font-family: 'Avenir';
    src: url(/fonts/AvenirLTStd-Roman.otf) format('otf'),
    url(/fonts/AvenirLTStd-Roman.otf) format('otf');
    font-weight: 400;
    font-style: normal;
}
