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;
}
/* CSS específico do app (que não veio dos protótipos).
   Carregado depois do tailwind e do prototipo.css via require_tree em application.css. */

/* Pills de dia da semana — visual controlado pelo checkbox via sibling selector.
   Importante: a pill NÃO pode ter style inline (inline ganha specificity sobre :checked). */

/* O checkbox fica invisível MAS sobreposto à pill (não usar sr-only / off-screen):
   assim clicar só marca/desmarca e o foco não tira a página do lugar (sem rolagem). */
.dia-option {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.dia-checkbox {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  /* clique/hover passam pra pill (preserva :hover); o label cuida do toggle e
     o foco fica na posição da pill — sem rolagem. */
  pointer-events: none;
}
.dia-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  user-select: none;
  transition: all 0.15s;
}
.dia-pill:hover {
  border-color: var(--text-mid);
}
.dia-checkbox:checked + .dia-pill {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Suporte a utilitário .hidden (Tailwind tem, mas garantimos em CSS bruto) */
.hidden { display: none !important; }

/* Canto fixo do card do pátio: ícone de presente + distância até o parque. */
.kid-tile { position: relative; }
.kid-corner {
  position: absolute; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 6px;
}
.gift-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; text-decoration: none; transition: all 0.15s;
  flex-shrink: 0;
}
.kid-dist {
  display: inline-flex; align-items: center; gap: 3px;
  height: 30px; padding: 0 8px; box-sizing: border-box;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11px; font-weight: 600; color: var(--text-mid);
  white-space: nowrap;
}
.kid-dist i { font-size: 13px; color: var(--text-soft); }

/* Logo do empreendimento na topbar (no lugar do "recurso · unidade"). */
.tb-title { display: flex; align-items: center; }
.tb-logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; display: block; }

/* Pátio: no máximo 3 cards por linha (4-up deixava os cards estreitos e o texto encavalado).
   `.view .patio-grid` vence o `.patio-grid` do prototipo.css por especificidade. */
.view .patio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .view .patio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .view .patio-grid { grid-template-columns: minmax(0, 1fr); } }

/* Timer + valor lado a lado no card do pátio (mesmo destaque). */
.kid-timer-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.kid-valor {
  font-family: var(--font-mono); font-weight: 700; font-size: 26px;
  letter-spacing: -0.5px; line-height: 1; color: var(--success); white-space: nowrap;
}
.gift-btn.on {
  background: var(--accent-soft); color: var(--accent-dk);
  border: 1px solid var(--accent); cursor: pointer;
}
.gift-btn.on:hover { background: var(--accent); color: #fff; }
.gift-btn.off {
  background: var(--bg-2); color: var(--text-soft);
  border: 1px solid var(--border); opacity: 0.5; cursor: default;
}

/* "Switch" estilizado para inputs type=checkbox marcados com a classe .switch */
.switch {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-2);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  transition: left 0.15s;
  box-shadow: var(--shadow-1);
}
.switch:checked { background: var(--success); }
.switch:checked::after { left: 20px; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}
.switch-row .switch-info { flex: 1; }
.switch-row .switch-info .lbl { font-weight: 600; font-size: 14px; }
.switch-row .switch-info .desc { font-size: 12px; color: var(--text-mid); margin-top: 2px; }

/* ============== Timeline semanal de regras (Fase 2) ============== */
.timeline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  font-size: 11px;
}
.timeline-headers {
  display: flex;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tl-corner   { width: 48px; flex-shrink: 0; }
.tl-day-h {
  flex: 1;
  padding: 6px 0;
  text-align: center;
  font-weight: 700;
  color: var(--text-mid);
  border-left: 1px solid var(--border);
  letter-spacing: 0.3px;
}
.timeline-body { display: flex; }
.timeline-hours-col {
  width: 48px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.timeline-hour {
  height: 36px;
  padding-top: 3px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.timeline-day-cols { display: flex; flex: 1; }
.timeline-day {
  flex: 1;
  position: relative;
  border-left: 1px solid var(--border);
  /* linhas horizontais a cada hora (36px) */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 35px,
    var(--border) 35px 36px
  );
}
.timeline-day:first-child { border-left: none; }
.timeline-bar {
  position: absolute;
  left: 4px; right: 4px;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.timeline-bar.atual {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  color: var(--primary);
}
.timeline-bar.outro {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text-mid);
}
.timeline-bar.conflito {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(184,80,66,0.18) 4px,
    rgba(184,80,66,0.18) 8px
  );
  z-index: 2;
}
.timeline-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-mid);
  flex-wrap: wrap;
}
.timeline-legend .swatch {
  display: inline-block;
  width: 12px; height: 12px; border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.timeline-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
}

/* ============== h-tags em fundo claro (cards de plano, listagens) ==============
   Variante "light" das h-tags do .cli-hero (que são para fundo escuro). */
.h-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-2);
  color: var(--text-mid);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.h-tag.accent  { background: var(--accent-soft);  color: var(--accent-dk); }
.h-tag.warning { background: var(--warning-soft); color: var(--warning); }
.h-tag.info    { background: var(--info-soft);    color: var(--info); }
.h-tag.success { background: var(--success-soft); color: var(--success); }
.h-tag.pcd     { background: var(--pcd-soft);     color: var(--pcd); }

/* ============== Check-in: seleção via :has() (checkbox/radio nativos) ============== */
.selectable:has(input:checked) {
  opacity: 1;
  filter: none;
  border-color: var(--success);
  background: var(--surface);
}
/* Badge de check (verde, canto sup. direito) só aparece quando o item está marcado.
   Escopado em .checkin-section pra vencer o `.selectable .check { display:flex }`
   do prototipo.css independente da ordem de carga. */
.checkin-section .selectable .check { display: none; }
.checkin-section .selectable:has(input:checked) .check { display: flex; }
.selectable:has(input:disabled) { cursor: not-allowed; }
.plan-option {
  justify-content: space-between;
  align-items: center;
}
.plan-option > .ti-circle-check {
  opacity: 0;
  color: var(--primary);
  flex-shrink: 0;
}
.plan-option:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.plan-option:has(input:checked) > .ti-circle-check { opacity: 1; }

/* Card do pátio: 4 ações na mesma linha — Finalizar 45%, demais dividem 55%.
   Ícones 20px sem alterar a altura do botão (padding compensado, line-height: 1). */
.patio-grid .kid-actions { grid-template-columns: 1fr 1fr 1fr 45%; gap: 6px; }
.patio-grid .kid-actions > * { width: 100%; }
.patio-grid .kid-actions button,
.patio-grid .kid-actions a.finish {
  padding: 6px 4px; font-size: 11px; font-weight: 600;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  line-height: 1; transition: all 0.15s;
}
.patio-grid .kid-actions i { font-size: 20px; line-height: 1; }
/* Finalizar: link estilizado como botão verde, mesmo visual do resto. */
.patio-grid .kid-actions a.finish {
  border: 1px solid var(--success); background: var(--success); color: #fff; text-decoration: none;
}
.patio-grid .kid-actions a.finish:hover { background: #3a6024; border-color: #3a6024; }
.patio-grid .kid-actions a.finish { text-transform: uppercase; letter-spacing: 0.5px; }

/* Forma de pagamento selecionada no checkout */
.pay-method:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.pay-method:has(input:checked) .ic {
  background: var(--primary);
  color: white;
}

/* ============== Crop modal (ajuste de foto) ============== */
.crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.crop-modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-3);
}
.crop-modal-content h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}
.crop-modal-content .crop-hint {
  font-size: 12px;
  color: var(--text-mid);
  margin: 0;
}
.crop-img-wrap {
  background: #1a1a1a;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 400px;
}
.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============== Stack de avatares das crianças (card de família) ==============
   Círculos com 40% de sobreposição. Borda branca destaca um do outro. */
.kid-stack {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.kid-stack-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 1px var(--border);
}
.kid-stack-item + .kid-stack-item {
  margin-left: -18px; /* ≈ 40% de 44px */
}
.kid-stack-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card clicável (hover sutil) */
.card.clickable { cursor: pointer; transition: all 0.15s; }
.card.clickable:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
  border-color: var(--primary-mid);
}

/* Aviso de conflito ao lado do botão Salvar */
.submit-conflict {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.submit-conflict i { font-size: 14px; }

/* Bloco de erros simples */
.errors-box {
  background: var(--danger-soft);
  border: 1px solid rgba(184,80,66,0.25);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.errors-box strong { font-weight: 700; }
.errors-box ul { margin: 6px 0 0 18px; font-size: 12px; }

/* ===== Consumo (pedir lanche) no card do pátio ===== */
.kid-consumo-ind { display: block; width: 100%; }
.kid-consumo-btn { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; width: 100%; padding: 6px 4px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-mid); cursor: pointer; line-height: 1; }
.kid-consumo-btn[disabled] { opacity: 0.45; cursor: default; }
.kid-consumo-btn.tem-pedido { background: var(--accent); border-color: var(--accent); color: #fff; }
.kid-consumo-badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
/* Visão "Lista" do pátio: botões quadrados maiores, ícone maior. */
.kid-row-acoes .kid-consumo-ind { width: 52px; height: 52px; }
.kid-row-acoes .kid-consumo-btn { width: 52px; height: 52px; padding: 0; border-radius: 10px; font-size: 22px; }

@keyframes consumoBlink { 0%, 100% { box-shadow: 0 0 0 0 rgba(184,80,66,0); } 50% { box-shadow: 0 0 0 4px rgba(184,80,66,0.55); } }
/* Pisca o card enquanto QUALQUER indicador estiver pendente (consumo ou mensagem).
   Para sozinho quando a pendência é resolvida (a partial é re-renderizada sem `.tem-pedido`). */
.kid-tile:has(.kid-consumo-btn.tem-pedido) { animation: consumoBlink 0.9s ease-in-out infinite; border-color: var(--danger) !important; }
/* Mesmo princípio pro botão Mensagem do link mágico (destaque enquanto há não-lidas). */
.msg-botao-cell:has(button.destacado) { animation: consumoBlink 0.9s ease-in-out infinite; border-radius: 9px; }
/* Badge da sidebar "Pátio ao vivo": pisca enquanto houver pendência (some sozinho quando zera). */
.patio-alerta-blink { animation: consumoBlink 0.9s ease-in-out infinite; border-radius: 99px; }

.consumo-modal { position: fixed; inset: 0; background: rgba(20,20,20,0.5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.consumo-modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 380px; box-shadow: 0 16px 50px rgba(0,0,0,0.3); overflow: hidden; }
.consumo-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.consumo-modal-itens { padding: 12px 16px; max-height: 50vh; overflow-y: auto; }
.consumo-linha { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.consumo-q { font-weight: 700; color: var(--text-mid); font-size: 13px; min-width: 26px; }
.consumo-n { flex: 1; min-width: 0; font-size: 13px; }
.consumo-v { font-size: 13px; color: var(--text-mid); }
.consumo-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; padding-top: 10px; }
.consumo-modal-foot { padding: 14px 16px; border-top: 1px solid var(--border); }

/* ===== Bate-papo (modal do operador) — drawer público está em layouts/public_link ===== */
.chat-modal-shell { display: flex; flex-direction: column; max-height: 75vh; }
.chat-modal-shell .chat-thread { flex: 1; min-height: 220px; max-height: 50vh; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-2); }
.chat-modal-shell .chat-preview { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--bg-2); border-top: 1px solid var(--border); font-size: 11px; color: var(--text-mid); }
.chat-modal-shell .chat-preview button { background: none; border: none; cursor: pointer; color: var(--danger); padding: 0; display: inline-flex; }
.chat-modal-shell .chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface, #fff); }
.chat-modal-shell .chat-attach { background: var(--bg-2); border-radius: 8px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-mid); cursor: pointer; flex: 0 0 auto; }
.chat-modal-shell .chat-text { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 18px; padding: 8px 12px; font-size: 13px; outline: none; }
.chat-modal-shell .chat-text:focus { border-color: var(--primary); }
.chat-modal-shell .chat-send { background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }

/* Bolha do chat (compartilhada operador/público — orientação por viewer). */
.msg-bubble { max-width: 82%; padding: 8px 11px; border-radius: 14px; font-size: 13px; line-height: 1.35; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.msg-bubble .msg-text p { margin: 0 0 4px; }
.msg-bubble .msg-text p:last-child { margin: 0; }
.msg-bubble .msg-img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin-bottom: 4px; }
.msg-bubble .msg-time { font-size: 9.5px; opacity: 0.7; text-align: right; margin-top: 3px; font-family: var(--font-mono); }
.chat-thread[data-viewer="responsavel"] .msg-bubble[data-origem="responsavel"],
.chat-thread[data-viewer="operador"]   .msg-bubble[data-origem="operador"]   { align-self: flex-end;   background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-thread[data-viewer="responsavel"] .msg-bubble[data-origem="operador"],
.chat-thread[data-viewer="operador"]   .msg-bubble[data-origem="responsavel"] { align-self: flex-start; background: #fff; color: var(--text); border-bottom-left-radius: 4px; border: 1px solid var(--border); }

/* ============== Modal "São irmãos?" (irmaos-prompt) ============== */
.irmaos-modal {
  position: fixed; inset: 0;
  background: rgba(20, 25, 30, 0.55);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  animation: irmaosFade 0.15s ease-out;
}
.irmaos-modal.is-open { display: flex; }
.irmaos-modal__card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: min(440px, calc(100vw - 32px));
  padding: 28px 28px 22px;
  text-align: center;
  animation: irmaosPop 0.18s ease-out;
}
.irmaos-modal__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 32px;
}
.irmaos-modal__title {
  font-size: 18px; font-weight: 800; margin: 0 0 6px;
  letter-spacing: -0.3px; color: var(--text);
}
.irmaos-modal__body {
  font-size: 15px; line-height: 1.4; color: var(--text-mid);
  margin: 0 0 12px;
}
.irmaos-modal__body strong { color: var(--text); }
.irmaos-modal__hint {
  font-size: 12px; color: var(--text-soft);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 18px;
  line-height: 1.45;
}
.irmaos-modal__actions {
  display: flex; gap: 8px; justify-content: stretch;
}
.irmaos-modal__actions .btn {
  flex: 1; justify-content: center; padding: 11px 14px;
  font-size: 14px; font-weight: 700;
}

@keyframes irmaosFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes irmaosPop  { from { opacity: 0; transform: translateY(8px) scale(0.97); }
                        to   { opacity: 1; transform: none; } }

/* ============== Grupos de irmãos no show da família ==============
   Crianças do mesmo grupo_irmaos ficam coladas dentro de um wrapper
   com borda colorida envolvente. Solo ou grupos diferentes ganham
   gap vertical 50% maior que o card padrão (12px vs 8px). */
.kids-stack { margin-bottom: 12px; }

.kids-stack--group {
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 4px;
  background: var(--primary-soft);
  position: relative;
}
.kids-stack--group::before {
  content: "irmãos";
  position: absolute;
  top: -10px; left: 14px;
  background: var(--primary);
  color: white;
  font-size: 10px; font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.kids-stack--group .person-card {
  margin-bottom: 0;
  border-radius: 0;
  border: 1px solid var(--border);
}
.kids-stack--group .person-card + .person-card {
  border-top: none;
}
.kids-stack--group .person-card:first-child {
  border-top-left-radius: 9px; border-top-right-radius: 9px;
}
.kids-stack--group .person-card:last-child {
  border-bottom-left-radius: 9px; border-bottom-right-radius: 9px;
}

/* ============== Drag-and-drop de irmãos no perfil da família ============== */
body.dnd-dragging *, body.dnd-dragging { cursor: grabbing !important; user-select: none; }

[data-irmaos-card] { cursor: grab; transition: box-shadow 0.15s, transform 0.15s; }
[data-irmaos-card]:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }

.dnd-ghost { border-radius: var(--radius); }

.dnd-target-hot {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  transition: outline-color 0.1s;
}

.dnd-balao {
  position: fixed; z-index: 10000;
  background: var(--primary); color: white;
  font-size: 11px; font-weight: 800;
  padding: 5px 12px; border-radius: 999px;
  letter-spacing: 0.5px; text-transform: uppercase;
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}
.dnd-balao::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: inherit;
}
.dnd-balao--break { background: var(--warning); }

.kids-dropzone {
  border: 2px dashed var(--border-2);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  text-align: center;
  font-size: 12px; color: var(--text-soft);
  background: var(--surface-2);
  min-height: 132px;            /* ≈ 1.5x altura do person-card */
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.kids-dropzone i { font-size: 18px; opacity: 0.7; margin-right: 6px; }
body.dnd-dragging .kids-dropzone {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* ============== Card de criança "Brincando" no checkin ==============
   O .selectable padrão aplica opacity/grayscale no card inteiro (pra cards
   não-selecionados). Quando a criança já está no pátio, queremos:
   - card "desbotado" (avatar/nome/meta cinzas)
   - tag "BRINCANDO" colorida e em destaque
   Por isso tiramos opacity do label e aplicamos só nos filhos visuais. */
.selectable.brincando {
  opacity: 1 !important;
  filter: none !important;
  cursor: not-allowed;
}
.selectable.brincando .sel-avatar,
.selectable.brincando .sel-info .sel-name,
.selectable.brincando .sel-info .sel-meta,
.selectable.brincando .check {
  opacity: 0.45;
  filter: grayscale(1);
}
.selectable.brincando .sel-tags { opacity: 1; filter: none; }

/* ============== Seletor de unidade na topbar ============== */
.tb-unidade { position: relative; margin-left: 12px; }
.tb-unidade summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.tb-unidade summary::-webkit-details-marker { display: none; }
.tb-unidade summary:hover { background: var(--surface-warm); border-color: var(--text-soft); }
.tb-unidade summary i:first-child { color: var(--primary); font-size: 15px; }
.tb-unidade-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-unidade[open] summary {
  background: var(--surface-warm);
  border-color: var(--primary);
}

.tb-unidade-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 200;
}
.tb-unidade-empresa {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-soft);
  padding: 6px 10px 4px;
}
.tb-unidade-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: background 0.1s;
}
.tb-unidade-item:hover:not(.tb-unidade-item--ativa) { background: var(--surface-warm); }
.tb-unidade-item i { font-size: 16px; color: var(--text-soft); }
.tb-unidade-item--ativa {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  cursor: default;
}
.tb-unidade-item--ativa i { color: var(--primary); }
.tb-unidade-tag {
  margin-left: auto;
  background: var(--primary); color: white;
  font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.tb-unidade-gerenciar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  margin-top: 4px; border-top: 1px solid var(--border);
  color: var(--text-mid); text-decoration: none;
  font-size: 12px;
}
.tb-unidade-gerenciar:hover { background: var(--surface-warm); color: var(--text); }
.tb-unidade-gerenciar i { font-size: 14px; }

/* ============== Seletor de unidade in-page (gestor) ============== */
.seletor-unidade {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.seletor-unidade__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.seletor-unidade__label i { color: var(--primary); font-size: 14px; }

.seletor-unidade__pills { display: flex; gap: 6px; flex-wrap: wrap; }

.seletor-unidade__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  transition: all 0.15s;
}
.seletor-unidade__pill:hover:not(.seletor-unidade__pill--ativa) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.seletor-unidade__pill i { font-size: 14px; }
.seletor-unidade__pill--ativa {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  cursor: default;
  pointer-events: none;
}
.seletor-unidade__pill--ativa i { color: white; }
/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; outline: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
ul { margin: 0; padding: 0; list-style: none; }

/* ============== DESIGN TOKENS ============== */
:root {
  --bg: #faf6ed;
  --bg-2: #f5f0e3;
  --surface: #ffffff;
  --surface-warm: #fdfbf6;
  --surface-2: #f1ecdd;
  --border: rgba(42, 38, 32, 0.08);
  --border-2: rgba(42, 38, 32, 0.18);
  --text: #2a2620;
  --text-mid: #5a544a;
  --text-soft: #8a8378;
  --text-faint: #b8b1a3;

  --primary: #1f5240;
  --primary-dk: #173d2f;
  --primary-soft: #e8f0ec;
  --primary-mid: #c8ddd3;

  --accent: #e07856;
  --accent-dk: #c45f3e;
  --accent-soft: #fceee7;

  --success: #4a7c2e;
  --success-soft: #ecf3e0;
  --warning: #c08d28;
  --warning-soft: #fbf2d8;
  --danger: #b85042;
  --danger-soft: #f7e2dd;
  --pcd: #6e4eb8;
  --pcd-soft: #ece5f7;
  --info: #1e6091;
  --info-soft: #e0edf6;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  --shadow-1: 0 1px 2px rgba(42, 38, 32, 0.05);
  --shadow-2: 0 2px 8px rgba(42, 38, 32, 0.07);
  --shadow-3: 0 8px 24px rgba(42, 38, 32, 0.10);
  --shadow-lift: 0 4px 16px rgba(31, 82, 64, 0.12);

  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============== APP SHELL ============== */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  height: 100vh;
  overflow: hidden;
}

/* ============== TOPBAR ============== */
.topbar {
  grid-area: topbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.tb-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.tb-title .sep { color: var(--text-faint); font-weight: 400; margin: 0 8px; }
.tb-title .unit { color: var(--text-mid); font-weight: 500; }
.tb-spacer { flex: 1; }
.tb-clock { font-family: var(--font-mono); font-size: 13px; color: var(--text-mid); font-weight: 500; }
.tb-clock .date { color: var(--text-soft); margin-right: 8px; font-weight: 400; }

.tb-caixa {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; background: var(--success-soft); border-radius: 999px;
  border: 1px solid rgba(74, 124, 46, 0.2);
}
.tb-caixa .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(74, 124, 46, 0.2); }
.tb-caixa .lbl { font-size: 11px; color: var(--success); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.tb-caixa .val { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--text); }

.tb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s;
}
.tb-user:hover { background: var(--bg-2); }
.tb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.tb-user .name { font-size: 13px; font-weight: 600; }
.tb-user .role { font-size: 10px; color: var(--text-soft); }

/* ============== SIDEBAR ============== */
.sidebar {
  grid-area: sidebar;
  background: #173d2f;
  color: rgba(255,255,255,0.85);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sb-brand { padding: 4px 8px 24px; }
.sb-brand .logo { display: flex; align-items: center; gap: 10px; }
.sb-brand .mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}
.sb-brand .name { color: white; font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.sb-brand .sub { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 12px; padding-left: 4px; letter-spacing: 0.3px; }

.sb-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  padding: 16px 12px 6px;
  letter-spacing: 1.5px; text-transform: uppercase;
}

.sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 8px;
  color: rgba(255,255,255,0.8); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: all 0.15s; width: 100%; text-align: left;
}
.sb-item:hover { background: rgba(255,255,255,0.07); color: white; }
.sb-item.active { background: var(--accent); color: white; font-weight: 600; }
.sb-item i { font-size: 19px; }
.sb-item .badge-num {
  margin-left: auto;
  background: rgba(255,255,255,0.18);
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  min-width: 24px; text-align: center;
}
.sb-item.active .badge-num { background: rgba(0,0,0,0.22); }
.sb-item .badge-num.live { background: var(--success); box-shadow: 0 0 0 3px rgba(74,124,46,0.3); }
.sb-item.active .badge-num.live { background: white; color: var(--accent); }

.sb-spacer { flex: 1; }
.sb-bottom { padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ============== MAIN ============== */
.main {
  grid-area: main;
  overflow-y: auto;
  background: var(--bg);
  padding: 28px 36px 60px;
}

.view { display: none; max-width: 1200px; margin: 0 auto; }
.view.active { display: block; animation: fadeIn 0.3s ease-out; }

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

.view-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.view-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.view-subtitle { font-size: 13px; color: var(--text-mid); margin-top: 4px; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============== COMMON COMPONENTS ============== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 20px 24px;
  border: 1px solid var(--border);
}
.card-h {
  font-size: 14px; font-weight: 700;
  margin: 0 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  letter-spacing: -0.1px;
}
.card-h .rt { font-size: 11px; color: var(--text-soft); font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }

.btn {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
  color: var(--text);
}
.btn:hover { background: var(--surface-warm); border-color: var(--text-soft); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn-success { background: var(--success); border-color: var(--success); color: white; }
.btn-success:hover { background: #3a6024; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-danger:hover { background: white; color: var(--danger); }
.btn-ghost { background: transparent; border: none; padding: 9px 12px; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: var(--radius); }
.btn-xl { padding: 16px 28px; font-size: 15px; font-weight: 700; border-radius: var(--radius-lg); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  font-weight: 600;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent-dk); }
.badge-pcd { background: var(--pcd-soft); color: var(--pcd); }
.badge-mute { background: var(--bg-2); color: var(--text-mid); }
.badge-info { background: var(--info-soft); color: var(--info); }

.input {
  padding: 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px; color: var(--text);
  width: 100%;
  transition: all 0.15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--text-faint); }

.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fld label { font-size: 11px; font-weight: 600; color: var(--text-mid); letter-spacing: 0.3px; text-transform: uppercase; }
.fld .hint { font-size: 11px; color: var(--text-soft); margin-top: 2px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.row { display: flex; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ============== STAT CARD ============== */
.stat {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
}
.stat .label { font-size: 11px; color: var(--text-mid); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; line-height: 1; letter-spacing: -0.5px; }
.stat .value.mono { font-family: var(--font-mono); }
.stat .sub { font-size: 11px; color: var(--text-soft); margin-top: 6px; }
.stat .sub.up { color: var(--success); }
.stat .sub.down { color: var(--danger); }

/* ============== ABERTURA DE CAIXA ============== */
.abertura-view { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px - 100px); }
.abertura-card { max-width: 480px; width: 100%; padding: 32px 36px; box-shadow: var(--shadow-3); border-radius: var(--radius-xl); }
.abertura-greeting { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.abertura-greeting span { color: var(--accent); }
.abertura-date { font-size: 13px; color: var(--text-mid); margin-top: 4px; margin-bottom: 24px; }
.fundo-input {
  padding: 18px 20px; font-size: 24px; font-weight: 700;
  font-family: var(--font-mono);
  text-align: center; width: 100%;
  border: 2px solid var(--primary); border-radius: var(--radius-lg);
  background: var(--surface);
}
.last-shift { background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius); font-size: 12px; color: var(--text-mid); margin: 16px 0 24px; display: flex; align-items: center; gap: 10px; }
.last-shift i { color: var(--text-soft); font-size: 16px; }

/* ============== PÁTIO ============== */
.patio-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: white;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px 28px;
  align-items: center;
}
.patio-summary .ps-cell { min-width: 0; }
.patio-summary .ps-cell.last { text-align: right; }
.patio-summary .live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.patio-summary .live-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  animation: pulse 1.5s ease-in-out infinite;
}
.patio-summary .ms-big { font-size: 30px; font-weight: 800; line-height: 1; margin-top: 6px; letter-spacing: -0.5px; }
.patio-summary .ms-lbl { font-size: 11px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; }

@keyframes pulse { 50% { opacity: 0.5; } }

.patio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.kid-tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  border-top: 4px solid var(--success);
  transition: all 0.2s;
  cursor: pointer;
}
.kid-tile:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.kid-tile.warn { border-top-color: var(--warning); }
.kid-tile.danger { border-top-color: var(--danger); background: var(--danger-soft); }

.kid-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kid-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.kid-name { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; line-height: 1.2; }
.kid-meta { font-size: 11px; color: var(--text-mid); margin-top: 2px; }

.kid-timer-block { padding: 4px 0 8px; }
.kid-timer { font-family: var(--font-mono); font-size: 32px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.kid-timer.ok { color: var(--success); }
.kid-timer.warn { color: var(--warning); }
.kid-timer.danger { color: var(--danger); }
.kid-consume { font-size: 11px; color: var(--text-mid); margin-top: 6px; display: flex; justify-content: space-between; }
.kid-consume strong { color: var(--text); font-family: var(--font-mono); }

.kid-link-status { font-size: 10px; color: var(--text-soft); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kid-link-status i { font-size: 12px; }
.kid-link-status.seen { color: var(--success); }

.kid-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; margin-top: 14px; }
.kid-actions button {
  padding: 9px 6px; font-size: 11px; font-weight: 600;
  border-radius: 8px; border: 1px solid var(--border-2);
  background: var(--surface-warm); color: var(--text-mid);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.15s;
}
.kid-actions button:hover { background: var(--bg-2); }
.kid-actions .finish {
  background: var(--success); color: white; border-color: var(--success);
}
.kid-actions .finish:hover { background: #3a6024; border-color: #3a6024; }

/* ============== BUSCA ============== */
.search-hero { padding: 32px 0 16px; max-width: 720px; margin: 0 auto; }
.search-hero h1 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; letter-spacing: -0.3px; }
.search-wrap { position: relative; }
.search-wrap > i {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  font-size: 24px; color: var(--primary); pointer-events: none;
}
.search-input {
  width: 100%; padding: 22px 24px 22px 60px;
  font-size: 18px; font-weight: 500;
  background: var(--surface); border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  color: var(--text);
}
.search-input:focus { border-color: var(--primary); outline: none; }
.search-input::placeholder { color: var(--text-faint); font-weight: 400; }
.search-hints { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.search-hint { font-size: 11px; color: var(--text-mid); padding: 3px 10px; background: var(--surface-2); border-radius: 999px; font-weight: 500; }

.quick-actions { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }

.search-results { margin-top: 16px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; border: 1px solid var(--border); }
.res-count { padding: 12px 20px; font-size: 11px; color: var(--text-mid); background: var(--surface-2); display: flex; justify-content: space-between; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.res-item {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: background 0.15s;
}
.res-item:last-child { border-bottom: none; }
.res-item:hover, .res-item.hover { background: var(--primary-soft); }
.res-item mark { background: #ffe28a; color: var(--text); padding: 1px 4px; border-radius: 3px; font-weight: 700; }
.res-item .res-info { flex: 1; min-width: 0; }
.res-item .res-name { font-size: 14px; font-weight: 600; }
.res-item .res-fam { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.res-item .res-last { font-size: 11px; color: var(--text-soft); text-align: right; white-space: nowrap; }
.res-item .res-last strong { font-size: 12px; color: var(--text-mid); display: block; }

.res-new {
  padding: 16px 20px; text-align: center;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ============== CHECK-IN (P&B states) ============== */
.checkin-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
}
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.section-title h3 { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; color: var(--primary); }
.section-title .tag { font-size: 11px; color: var(--text-soft); font-weight: 500; }
.section-help { font-size: 12px; color: var(--text-mid); margin-bottom: 14px; }

.selectable {
  background: var(--surface-warm);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex; gap: 14px; align-items: flex-start;
  opacity: 0.45; filter: grayscale(1);
}
.selectable:hover { opacity: 0.7; }
.selectable.auto, .selectable.selected { opacity: 1; filter: none; }
.selectable.auto { border-color: var(--primary); background: var(--surface); }
.selectable.selected { border-color: var(--success); background: var(--surface); }
.selectable .check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.selectable .auto-tag {
  position: absolute; top: -9px; left: 14px;
  font-size: 9px; padding: 2px 8px; border-radius: 999px;
  background: var(--primary); color: white; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.sel-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  position: relative;
}
.sel-avatar.no-photo { background: var(--surface-2); color: var(--text-soft); border: 1.5px dashed var(--border-2); }
.sel-avatar .photo-pending {
  position: absolute; bottom: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--warning); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; border: 2px solid var(--surface);
}
.sel-info { flex: 1; min-width: 0; }
.sel-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.sel-name .rel { font-size: 11px; color: var(--text-soft); font-weight: 500; margin-left: 4px; }
.sel-meta { font-size: 12px; color: var(--text-mid); margin-top: 3px; }
.sel-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.sel-edit { background: transparent; border: none; color: var(--text-soft); cursor: pointer; padding: 4px; font-size: 14px; }
.sel-edit:hover { color: var(--text); }

.add-card {
  padding: 14px; border: 1.5px dashed var(--border-2);
  border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--text-mid); font-weight: 600;
  background: transparent; transition: all 0.15s;
}
.add-card:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.plan-selector {
  padding: 14px 16px; border: 2px solid var(--border-2);
  border-radius: var(--radius); background: var(--surface-warm);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; opacity: 0.5;
}
.plan-selector.selected { opacity: 1; border-color: var(--primary); background: var(--surface); }
.plan-selector .pn { font-size: 14px; font-weight: 700; }
.plan-selector .ps { font-size: 11px; color: var(--text-mid); margin-top: 2px; }

.plan-options {
  margin-top: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.plan-option {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-size: 13px; transition: background 0.15s;
}
.plan-option:last-child { border-bottom: none; }
.plan-option:hover { background: var(--surface-warm); }
.plan-option.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.plan-option.disabled:hover { background: transparent; }
.plan-option.selected { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.plan-option .po-desc { font-size: 11px; color: var(--text-soft); font-weight: 400; text-decoration: none; }
.plan-option.selected .po-desc { color: var(--primary); }

.checkin-bar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
  margin-top: 8px;
}
.checkbox {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; cursor: pointer; color: var(--text-mid);
}
.checkbox .box {
  width: 20px; height: 20px; border: 2px solid var(--border-2);
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.checkbox.on { color: var(--text); }
.checkbox.on .box { background: var(--success); border-color: var(--success); color: white; font-size: 14px; }

.btn-iniciar {
  padding: 14px 28px; font-size: 14px; font-weight: 700;
  border-radius: var(--radius); border: none;
  background: var(--surface-2); color: var(--text-soft);
  letter-spacing: 0.5px; text-transform: uppercase;
  cursor: not-allowed;
}
.btn-iniciar.ready {
  background: var(--success); color: white; cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 124, 46, 0.3);
}
.btn-iniciar.ready:hover { background: #3a6024; }

/* ============== CADASTRO ============== */
.cad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.webcam-box {
  aspect-ratio: 4/3; background: #1a1a1a;
  border-radius: var(--radius-lg);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.webcam-corner { position: absolute; width: 24px; height: 24px; border: 2px solid white; opacity: 0.6; }
.wc-tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.wc-tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.wc-bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.wc-br { bottom: 14px; right: 14px; border-left: none; border-top: none; }
.webcam-silh { font-size: 100px; color: rgba(255,255,255,0.15); }
.webcam-live {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: white; background: rgba(0,0,0,0.5);
  padding: 4px 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
}
.webcam-live .dot { width: 6px; height: 6px; background: #ef4444; border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
.webcam-help {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: rgba(255,255,255,0.7); white-space: nowrap;
}

.webcam-actions { display: flex; gap: 8px; margin-top: 10px; }

.photo-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 10px;
}
.photo-opt {
  padding: 14px 8px; border: 1.5px solid var(--border-2);
  border-radius: var(--radius); background: var(--surface);
  text-align: center; cursor: pointer; transition: all 0.15s;
}
.photo-opt:hover { background: var(--primary-soft); border-color: var(--primary); }
.photo-opt i { font-size: 22px; color: var(--primary); display: block; margin-bottom: 6px; }
.photo-opt .name { font-size: 12px; font-weight: 700; }
.photo-opt .desc { font-size: 10px; color: var(--text-soft); margin-top: 2px; }

.resp-photo-preview {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--surface-2); border: 2px dashed var(--border-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 28px; margin: 0 auto 8px;
}

.lgpd-box {
  background: var(--success-soft); border: 1px solid rgba(74, 124, 46, 0.2);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--success);
  margin-top: 16px;
}
.lgpd-box i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.lgpd-box strong { font-weight: 700; }

/* ============== CHECKOUT ============== */
.checkout-summary { padding: 0; }
.summary-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.summary-row:last-of-type { border-bottom: none; }
.summary-row .desc-main { font-weight: 600; }
.summary-row .desc-sub { font-size: 11px; color: var(--text-mid); margin-top: 2px; }
.summary-row .amt { font-family: var(--font-mono); font-weight: 600; }
.summary-row .amt.discount { color: var(--success); }
.summary-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-2);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}
.summary-total .lbl { font-size: 14px; font-weight: 700; }
.summary-total .amt { font-family: var(--font-mono); font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }

.link-status-row {
  padding: 12px 16px; background: var(--success-soft);
  border-radius: var(--radius); display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--success); margin: 16px 0;
  border: 1px solid rgba(74, 124, 46, 0.2);
}
.link-status-row .ic {
  width: 32px; height: 32px; border-radius: 50%;
  background: white; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.link-status-row .ic i { color: var(--success); font-size: 16px; }
.link-status-row strong { font-weight: 700; }

.pay-toggle {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-2); border-radius: var(--radius);
  margin-bottom: 14px;
}
.pay-toggle button {
  flex: 1; padding: 8px 12px; font-size: 12px; font-weight: 600;
  border: none; background: transparent; border-radius: 6px;
  color: var(--text-mid); cursor: pointer;
}
.pay-toggle button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.pay-method {
  padding: 14px 16px; border: 2px solid var(--border-2);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; background: var(--surface);
  transition: all 0.15s;
}
.pay-method:hover { border-color: var(--text-soft); }
.pay-method.selected { border-color: var(--primary); background: var(--primary-soft); }
.pay-method .ic {
  width: 42px; height: 42px; border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.pay-method.selected .ic { background: var(--primary); color: white; }
.pay-method .ic i { font-size: 20px; }
.pay-method .pm-name { font-weight: 700; font-size: 14px; }
.pay-method .pm-desc { font-size: 11px; color: var(--text-mid); margin-top: 2px; }
.pay-method.selected .pm-desc { color: var(--primary); }

.pix-display {
  margin-top: 14px; padding: 16px;
  background: var(--primary-soft); border-radius: var(--radius);
  text-align: center; border: 1px dashed var(--primary);
}
.pix-display .lbl { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.pix-display .val { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--primary); }
.pix-display .hint { font-size: 11px; color: var(--primary); margin-top: 6px; opacity: 0.8; }

/* ============== NOVO FLUXO DE PAGAMENTO ============== */
.pay-system-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--surface-2); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.pay-system-bar .lbl { font-size: 11px; color: var(--text-mid); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pay-system-bar select {
  flex: 1; padding: 6px 10px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border-2); border-radius: 6px;
  background: white; color: var(--text);
}

.pay-remaining {
  text-align: center; padding: 18px 16px; margin-bottom: 14px;
  background: var(--primary); color: white;
  border-radius: var(--radius);
}
.pay-remaining .rem-lbl { font-size: 11px; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.pay-remaining .rem-amt { font-family: var(--font-mono); font-size: 32px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; margin-top: 4px; }
.pay-remaining.zero { background: var(--success); }
.pay-remaining .rem-sub { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 6px; }

.pm-question { font-size: 12px; font-weight: 700; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

.pm-row {
  display: grid; grid-template-columns: 38px 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.pm-row:hover { border-color: var(--border-2); }
.pm-row .pm-ic {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
}
.pm-row .pm-ic i { font-size: 20px; }
.pm-row .pm-name { font-weight: 700; font-size: 14px; }
.pm-row .pm-name .pm-sub { font-size: 11px; color: var(--text-soft); font-weight: 500; margin-top: 2px; }

.pm-btn-total {
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  background: var(--primary); color: white;
  border: 1px solid var(--primary); border-radius: 7px;
  cursor: pointer; transition: all 0.15s;
}
.pm-btn-total:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.pm-btn-partial {
  padding: 8px 12px; font-size: 11px; font-weight: 600;
  background: transparent; color: var(--text-mid);
  border: 1px dashed var(--border-2); border-radius: 7px;
  cursor: pointer; transition: all 0.15s;
}
.pm-btn-partial:hover { border-color: var(--text-mid); color: var(--text); background: var(--surface-warm); }

/* Histórico de pagamentos já feitos (dentro do card pagamento) */
.pay-history { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.pay-history .ph-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 4px;
  background: var(--success-soft); border: 1px solid rgba(74,124,46,0.2);
  border-radius: 7px; font-size: 12px;
}
.pay-history .ph-row .ph-ic { color: var(--success); font-size: 16px; }
.pay-history .ph-row .ph-name { flex: 1; font-weight: 600; }
.pay-history .ph-row .ph-amt { font-family: var(--font-mono); font-weight: 700; color: var(--success); }

/* ============== OVERLAY DE PAGAMENTO ============== */
.pay-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,15,11,0.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.pay-overlay.show { display: flex; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pay-overlay-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 32px; max-width: 480px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.pay-overlay-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-mid);
  margin-bottom: 10px;
}
.pay-overlay-header .ic {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.pay-overlay-header .ic i { font-size: 18px; }
.pay-overlay-amount {
  font-family: var(--font-mono);
  font-size: 56px; font-weight: 800; letter-spacing: -2px;
  color: var(--text); text-align: center;
  padding: 18px 0;
}
.pay-overlay-status {
  text-align: center; font-size: 14px; color: var(--text-mid);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 18px;
}
.pay-overlay-status .spin {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid var(--border-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinOverlay 1s linear infinite;
}
@keyframes spinOverlay { to { transform: rotate(360deg); } }
.pay-overlay-countdown {
  text-align: center; font-family: var(--font-mono);
  font-size: 22px; font-weight: 700; color: var(--accent-dk);
  margin: 14px 0;
}
.pay-overlay-actions {
  display: flex; gap: 10px; margin-top: 20px;
}
.pay-overlay-actions .btn { flex: 1; justify-content: center; }

.pay-overlay-input-wrap {
  text-align: center; padding: 8px 0 18px;
}
.pay-overlay-input-wrap .currency {
  font-family: var(--font-mono); font-size: 18px; color: var(--text-soft);
  font-weight: 600; vertical-align: middle; margin-right: 4px;
}
.pay-overlay-input {
  font-family: var(--font-mono);
  font-size: 48px; font-weight: 800; letter-spacing: -1.5px;
  color: var(--text); text-align: center;
  border: none; background: transparent; outline: none;
  width: 280px; max-width: 100%;
  border-bottom: 3px dashed var(--border-2);
  padding: 0 10px;
}
.pay-overlay-input:focus { border-bottom-color: var(--primary); }

.pay-troco-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; margin-top: 16px;
  background: var(--accent-soft); border-radius: var(--radius);
  font-size: 14px;
}
.pay-troco-row .lbl { font-weight: 700; color: var(--accent-dk); }
.pay-troco-row .val { font-family: var(--font-mono); font-weight: 800; font-size: 18px; color: var(--accent-dk); }

.demo-hint {
  margin-top: 14px; padding: 10px 14px;
  background: var(--warning-soft); border-left: 3px solid var(--warning);
  border-radius: 6px; font-size: 11px; color: var(--text-mid);
  display: flex; align-items: center; gap: 8px;
}
.demo-hint i { color: var(--warning); font-size: 14px; }

/* ============== PERFIL DE CLIENTE (FAMÍLIA) ============== */
.cli-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white; border-radius: var(--radius-lg); padding: 24px 28px;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.cli-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--accent); opacity: 0.18; filter: blur(50px);
}
.cli-hero .hero-row { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; flex-wrap: wrap; }
.cli-hero .av-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 24px; flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.2);
}
.cli-hero h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.cli-hero .composition { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 2px; }
.cli-hero .tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cli-hero .h-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.18); color: white;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.cli-hero .h-tag.pcd { background: rgba(107,76,165,0.4); }
.cli-hero .h-tag.fiel { background: rgba(74,124,46,0.4); }
.cli-hero .hero-spacer { flex: 1; }
.cli-hero .quick-kpis { display: flex; gap: 24px; }
.cli-hero .qk { text-align: center; }
.cli-hero .qk .v { font-family: var(--font-mono); font-size: 22px; font-weight: 800; line-height: 1; }
.cli-hero .qk .l { font-size: 10px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* Tabs */
.cli-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border);
  margin-bottom: 20px; padding: 0 4px;
}
.cli-tabs button {
  padding: 12px 18px; font-size: 14px; font-weight: 700;
  color: var(--text-soft); background: transparent; border: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.cli-tabs button:hover { color: var(--text); }
.cli-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.cli-tabs button .badge-num {
  background: var(--accent); color: white;
  padding: 1px 7px; border-radius: 99px;
  font-size: 10px; font-weight: 700;
}

.cli-tab { display: none; }
.cli-tab.active { display: block; }

/* Seções */
.cli-section { margin-bottom: 18px; }
.cli-section-h {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-soft);
  margin-bottom: 10px; padding: 0 4px;
  display: flex; align-items: center; justify-content: space-between;
}
.cli-section-h .right { font-size: 11px; color: var(--text-mid); font-weight: 600; letter-spacing: 0; text-transform: none; }

/* Pessoas (responsáveis e crianças) */
.person-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px 18px; border: 1px solid var(--border);
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: 14px; align-items: center;
  margin-bottom: 8px;
}
.person-card .p-av {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.person-card .p-name { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.person-card .p-role {
  display: inline-block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px;
  margin-left: 6px; vertical-align: middle;
}
.person-card .p-role.titular { background: var(--primary); color: white; }
.person-card .p-role.co { background: var(--primary-soft); color: var(--primary); }
.person-card .p-role.pcd { background: var(--pcd); color: white; }
.person-card .p-meta { font-size: 12px; color: var(--text-mid); margin-top: 4px; line-height: 1.5; }
.person-card .p-meta i { font-size: 12px; vertical-align: middle; margin-right: 3px; }
.person-card .p-meta .sep { color: var(--border-2); margin: 0 6px; }
.person-card .p-actions { display: flex; gap: 4px; }
.person-card .p-actions button {
  padding: 6px 8px; font-size: 11px; color: var(--text-mid);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
}
.person-card .p-actions button:hover { background: var(--bg-2); }

/* Endereço */
.address-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; border: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
}
.address-card .addr-ic {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-dk);
  display: flex; align-items: center; justify-content: center;
}
.address-card .addr-ic i { font-size: 22px; }
.address-card .addr-line { font-weight: 700; font-size: 14px; }
.address-card .addr-sub { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.address-card .distance-pill {
  background: var(--success-soft); color: var(--success);
  padding: 8px 14px; border-radius: 99px;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}

/* Insights cards */
.insight-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px; border: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
}
.insight-card .ins-ic {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.insight-card .ins-ic i { font-size: 20px; }
.insight-card .ins-title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.insight-card .ins-sub { font-size: 12px; color: var(--text-mid); margin-top: 4px; line-height: 1.4; }
.insight-card.pattern { border-left: 3px solid var(--info); }
.insight-card.pattern .ins-ic { background: var(--info-soft); color: var(--info); }
.insight-card.opportunity { border-left: 3px solid var(--accent); }
.insight-card.opportunity .ins-ic { background: var(--accent-soft); color: var(--accent-dk); }
.insight-card.alert { border-left: 3px solid var(--warning); }
.insight-card.alert .ins-ic { background: var(--warning-soft); color: var(--warning); }
.insight-card.loyalty { border-left: 3px solid var(--success); }
.insight-card.loyalty .ins-ic { background: var(--success-soft); color: var(--success); }

/* Heatmap dia × hora */
.heatmap {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; border: 1px solid var(--border);
  overflow-x: auto;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: 60px repeat(8, 1fr);
  gap: 3px; min-width: 580px;
}
.heatmap-cell {
  height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-family: var(--font-mono); font-weight: 700;
  color: var(--text-mid); position: relative;
}
.heatmap-cell.header { background: transparent; color: var(--text-soft); font-size: 10px; }
.heatmap-cell.day { font-weight: 700; color: var(--text); justify-content: flex-start; padding-left: 4px; }
.heatmap-cell.v0 { background: var(--bg-2); }
.heatmap-cell.v1 { background: #d9e8e1; color: var(--primary); }
.heatmap-cell.v2 { background: #a8cdb9; color: var(--primary-dk); }
.heatmap-cell.v3 { background: #5a8e6f; color: white; }
.heatmap-cell.v4 { background: var(--primary); color: white; }
.heatmap-cell.peak {
  background: var(--accent); color: white;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px rgba(224,120,86,0.3);
}
.heatmap-legend {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 14px; font-size: 11px; color: var(--text-mid);
}
.heatmap-legend .scale { display: flex; gap: 2px; }
.heatmap-legend .scale span {
  width: 16px; height: 12px; border-radius: 2px;
}

/* Tipos de serviço (mix) */
.service-mix {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; border: 1px solid var(--border);
}
.service-bar {
  height: 24px; border-radius: 6px; overflow: hidden;
  display: flex; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--border);
}
.service-bar > div {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 10px; font-weight: 700;
  transition: all 0.2s;
}
.service-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.service-legend .leg-row { display: flex; align-items: center; gap: 8px; }
.service-legend .dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.service-legend .lbl { flex: 1; }
.service-legend .val { font-family: var(--font-mono); font-weight: 700; color: var(--text-mid); }

/* Histórico de visitas */
.visit-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto;
  gap: 12px; padding: 11px 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 5px; font-size: 12px;
}
.visit-row .v-date { font-family: var(--font-mono); font-weight: 700; color: var(--text); min-width: 70px; }
.visit-row .v-kid { font-size: 12px; color: var(--text-mid); }
.visit-row .v-kid strong { color: var(--text); font-weight: 700; }
.visit-row .v-time { font-family: var(--font-mono); font-weight: 600; color: var(--text-mid); font-size: 11px; }
.visit-row .v-spent { font-family: var(--font-mono); font-weight: 700; color: var(--success); }
.visit-row .v-tag { font-size: 10px; padding: 2px 7px; border-radius: 99px; font-weight: 700; }
.visit-row .v-tag.avulso { background: var(--bg-2); color: var(--text-mid); }
.visit-row .v-tag.pacote { background: var(--info-soft); color: var(--info); }
.visit-row .v-tag.promo { background: var(--accent-soft); color: var(--accent-dk); }

/* KPIs section */
.kpi-mini { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--border); }
.kpi-mini .l { font-size: 10px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-mini .v { font-family: var(--font-mono); font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -0.4px; }
.kpi-mini .s { font-size: 11px; color: var(--text-mid); margin-top: 2px; }

/* ============== HEATMAP DE RECEITA (maior) ============== */
.rev-toggle {
  display: inline-flex; background: var(--surface-2); padding: 4px;
  border-radius: 10px; border: 1px solid var(--border);
  margin-bottom: 14px;
}
.rev-toggle button {
  padding: 8px 18px; font-size: 13px; font-weight: 700;
  background: transparent; border: none; border-radius: 7px;
  color: var(--text-soft); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.rev-toggle button:hover { color: var(--text); }
.rev-toggle button.active {
  background: var(--primary); color: white;
  box-shadow: var(--shadow-1);
}

.heatmap-rev {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--border);
  overflow-x: auto;
}
.heatmap-rev-grid {
  display: grid;
  grid-template-columns: 70px repeat(8, 1fr);
  gap: 4px; min-width: 720px;
}
.heatmap-rev-cell {
  height: 58px; border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--font-mono);
  position: relative; transition: all 0.15s;
  cursor: pointer;
}
.heatmap-rev-cell .n {
  font-size: 16px; font-weight: 800;
  line-height: 1; letter-spacing: -0.5px;
}
.heatmap-rev-cell .sub {
  font-size: 9px; font-weight: 600;
  margin-top: 3px; opacity: 0.75;
}
.heatmap-rev-cell:hover { transform: scale(1.05); z-index: 2; box-shadow: var(--shadow-2); }
.heatmap-rev-cell.hdr {
  background: transparent; color: var(--text-soft);
  font-family: var(--font); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  cursor: default;
}
.heatmap-rev-cell.hdr:hover { transform: none; box-shadow: none; }
.heatmap-rev-cell.day {
  background: transparent; color: var(--text);
  font-family: var(--font); font-weight: 700;
  font-size: 13px; justify-content: flex-start; padding-left: 8px;
  align-items: flex-start; padding-top: 8px;
  cursor: default;
}
.heatmap-rev-cell.day .day-sub {
  font-size: 10px; color: var(--text-soft);
  font-weight: 500; margin-top: 2px;
}
.heatmap-rev-cell.day:hover { transform: none; box-shadow: none; }

/* Níveis de intensidade (5 níveis) */
.heatmap-rev-cell.l0 { background: var(--bg-2); color: var(--text-soft); }
.heatmap-rev-cell.l1 { background: #e8efe9; color: #3a6024; }
.heatmap-rev-cell.l2 { background: #b8d5b8; color: #1f3f15; }
.heatmap-rev-cell.l3 { background: #7ab07a; color: white; }
.heatmap-rev-cell.l4 { background: var(--success); color: white; }
.heatmap-rev-cell.l5 {
  background: var(--accent); color: white;
  box-shadow: 0 0 0 2px var(--accent-dk);
}
.heatmap-rev-cell.peak {
  animation: peak-pulse 2.4s ease-in-out infinite;
}
@keyframes peak-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent-dk), 0 0 0 6px rgba(224,120,86,0); }
  50% { box-shadow: 0 0 0 2px var(--accent-dk), 0 0 0 8px rgba(224,120,86,0.35); }
}
.heatmap-rev-cell .pin {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent-dk); color: white;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 10px;
  border: 2px solid white;
}

.heatmap-rev-legend {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-mid);
  flex-wrap: wrap;
}
.heatmap-rev-legend .scale {
  display: flex; align-items: center; gap: 8px;
}
.heatmap-rev-legend .scale-bar {
  display: flex; gap: 2px;
}
.heatmap-rev-legend .scale-bar span {
  width: 22px; height: 14px; border-radius: 3px;
}

/* Recomendações de ação */
.action-row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 6px;
}
.action-row .a-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.action-row .a-ic i { font-size: 20px; }
.action-row .a-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.action-row .a-detail { font-size: 12px; color: var(--text-mid); margin-top: 3px; line-height: 1.4; }
.action-row.opportunity .a-ic { background: var(--accent-soft); color: var(--accent-dk); }
.action-row.opportunity { border-left: 3px solid var(--accent); }
.action-row.maintenance .a-ic { background: var(--info-soft); color: var(--info); }
.action-row.maintenance { border-left: 3px solid var(--info); }
.action-row.staff .a-ic { background: var(--warning-soft); color: var(--warning); }
.action-row.staff { border-left: 3px solid var(--warning); }
.action-row.peak .a-ic { background: var(--success-soft); color: var(--success); }
.action-row.peak { border-left: 3px solid var(--success); }

/* Pills de seleção de unidade no relatório Análises de Receita. */
.unit-pills {
  display: inline-flex; gap: 4px; background: var(--surface-2);
  padding: 4px; border-radius: 10px; border: 1px solid var(--border);
}
.unit-pills button {
  padding: 7px 14px; font-size: 12px; font-weight: 700;
  background: transparent; border: none; border-radius: 7px;
  color: var(--text-soft); cursor: pointer;
}
.unit-pills button.active { background: var(--primary); color: white; box-shadow: var(--shadow-1); }

/* ============== CAIXA OPERAÇÕES ============== */
.caixa-header {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 24px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border);
}
.caixa-status-block { display: flex; align-items: center; gap: 16px; }
.caixa-bigbadge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--success-soft);
  border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--success); text-transform: uppercase; letter-spacing: 0.5px;
}
.caixa-bigbadge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.cx-info { font-size: 13px; color: var(--text-mid); }
.cx-info strong { color: var(--text); font-weight: 600; }

.movements-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.movements-table th {
  text-align: left; font-weight: 700; color: var(--text-mid);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.movements-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.movements-table tr:last-child td { border-bottom: none; }
.movements-table .amt { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.movements-table .amt.positive { color: var(--success); }
.movements-table .amt.negative { color: var(--danger); }

/* ============== PDV ============== */
.pdv-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }

.product-tile {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 10px; text-align: center; cursor: pointer;
  box-shadow: var(--shadow-1); border: 1px solid var(--border);
  transition: all 0.15s;
}
.product-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--primary-mid); }
.product-icon {
  width: 56px; height: 56px; border-radius: 12px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.product-tile .pn { font-size: 12px; font-weight: 700; line-height: 1.2; }
.product-tile .pp { font-family: var(--font-mono); font-size: 13px; color: var(--primary); margin-top: 4px; font-weight: 700; }
.product-tile .stock { font-size: 10px; color: var(--text-soft); margin-top: 2px; }

.cart-panel { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-1); border: 1px solid var(--border); height: fit-content; }
.cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cart-item:last-of-type { border-bottom: none; }
.cart-item .cart-qty {
  background: var(--surface-2); padding: 2px 8px;
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
}
.cart-item .cart-name { flex: 1; }
.cart-item .cart-amt { font-family: var(--font-mono); font-weight: 600; }
.cart-empty { padding: 40px 20px; text-align: center; color: var(--text-soft); font-size: 13px; }
.cart-empty i { font-size: 32px; display: block; margin-bottom: 8px; }

.cart-total {
  margin-top: 14px; padding-top: 14px;
  border-top: 1.5px solid var(--border-2);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 700;
}
.cart-total .amt { font-family: var(--font-mono); font-size: 22px; letter-spacing: -0.5px; }

/* ============== MENSAGENS ============== */
.msg-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }

.alerts-feed { margin-bottom: 16px; }
.alert-row {
  padding: 12px 14px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; margin-bottom: 8px;
}
.alert-row.warn { background: var(--warning-soft); color: var(--warning); }
.alert-row.danger { background: var(--danger-soft); color: var(--danger); }
.alert-row.info { background: var(--info-soft); color: var(--info); }
.alert-row i { font-size: 18px; flex-shrink: 0; }
.alert-row .alert-meta { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.alert-row strong { font-weight: 700; }
.alert-row .alert-action { margin-left: auto; }

.msg-list { background: var(--surface); border-radius: var(--radius-lg); padding: 8px; max-height: 560px; overflow-y: auto; border: 1px solid var(--border); }
.msg-search {
  padding: 8px; margin-bottom: 4px;
}
.msg-search .input { padding: 8px 12px; font-size: 13px; }

.msg-item {
  padding: 12px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s; display: flex; gap: 10px;
}
.msg-item:hover { background: var(--surface-2); }
.msg-item.active { background: var(--primary-soft); }
.msg-item .msg-av {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.msg-item .msg-content { flex: 1; min-width: 0; }
.msg-item .msg-h { display: flex; justify-content: space-between; margin-bottom: 2px; }
.msg-item .msg-n { font-weight: 700; font-size: 13px; }
.msg-item .msg-t { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.msg-item .msg-p { font-size: 12px; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.unread .msg-n::after {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%; margin-left: 6px;
}

.msg-conv {
  background: #efeae2; border-radius: var(--radius-lg);
  padding: 16px; min-height: 480px;
  display: flex; flex-direction: column;
}
.msg-conv-h {
  background: var(--surface); padding: 12px 14px;
  border-radius: var(--radius); margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.msg-conv-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.wa-bubble {
  padding: 10px 14px; border-radius: 12px;
  max-width: 70%; margin-bottom: 8px;
  font-size: 13px; line-height: 1.4;
  word-wrap: break-word;
}
.wa-in { background: white; }
.wa-out { background: #d9fdd3; margin-left: auto; }
.wa-time { font-size: 10px; color: #667; margin-top: 3px; text-align: right; }
.wa-link { color: #027eb5; word-break: break-all; }

.msg-input-bar {
  background: var(--surface); padding: 10px;
  border-radius: var(--radius); display: flex; gap: 8px; align-items: center;
  margin-top: 12px;
}
.msg-input-bar .input { flex: 1; padding: 9px 12px; }

/* ============== FECHAMENTO ============== */
.fech-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: white; padding: 24px;
  border-radius: var(--radius-lg);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-bottom: 20px;
}
.fech-summary .fs-lbl { font-size: 11px; color: rgba(255,255,255,0.7); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.fech-summary .fs-val { font-family: var(--font-mono); font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.5px; }

.cash-count {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--border);
}
.cash-input {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cash-input:last-of-type { border-bottom: none; }
.cash-input .denom { font-family: var(--font-mono); font-weight: 600; font-size: 14px; }
.cash-input .qty {
  width: 80px; padding: 6px 10px; text-align: center;
  border: 1px solid var(--border-2); border-radius: 6px;
  font-family: var(--font-mono); font-size: 14px;
}
.cash-input .subt { font-family: var(--font-mono); font-weight: 600; color: var(--text-mid); min-width: 80px; text-align: right; }

.diff-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  font-family: var(--font-mono); font-weight: 700;
}
.diff-pill.ok { background: var(--success-soft); color: var(--success); }
.diff-pill.warn { background: var(--warning-soft); color: var(--warning); }
.diff-pill.danger { background: var(--danger-soft); color: var(--danger); }

/* ============== UTILS ============== */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-mid { color: var(--text-mid); }
.text-soft { color: var(--text-soft); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

/* ============== PAGAMENTO SUCESSO ============== */
.pay-success-wrap { display: flex; justify-content: center; align-items: flex-start; padding: 40px 0; }
.pay-success-card { max-width: 560px; width: 100%; padding: 40px; text-align: center; }
.pay-check-big {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--success); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; margin: 0 auto 20px;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(74, 124, 46, 0.3);
}
@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.pay-success-title { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.pay-success-amount { font-family: var(--font-mono); font-size: 44px; font-weight: 800; color: var(--success); margin: 12px 0 4px; letter-spacing: -1px; }
.pay-success-method { font-size: 13px; color: var(--text-mid); }
.pay-success-block {
  margin: 24px 0; padding: 16px 20px;
  background: var(--surface-warm); border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px;
  text-align: left;
}
.pay-success-block i { font-size: 20px; color: var(--primary); }
.pay-receipt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.pulseira-recolher {
  margin-top: 20px; padding: 14px 16px;
  background: var(--warning-soft); border: 1px solid rgba(192,141,40,0.25);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--warning); text-align: left;
}
.pulseira-recolher i { font-size: 18px; flex-shrink: 0; }

.nps-prompt { margin-top: 20px; padding: 18px 20px; background: var(--surface-warm); border-radius: var(--radius); }
.nps-prompt .nps-label { font-size: 12px; color: var(--text-mid); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.nps-buttons { display: flex; gap: 6px; justify-content: center; }
.nps-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border-2); background: var(--surface);
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.nps-btn:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.nps-btn.detractor:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.nps-btn.promoter:hover { border-color: var(--success); background: var(--success-soft); color: var(--success); }

/* ============== CLIENTES ============== */
.clientes-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-pill {
  padding: 7px 14px; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-mid); transition: all 0.15s;
}
.filter-pill:hover { border-color: var(--text-mid); }
.filter-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

.client-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: grid; grid-template-columns: auto 1fr auto auto auto auto;
  gap: 20px; align-items: center;
  margin-bottom: 8px; transition: all 0.15s;
}
.client-row:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.client-row .c-av {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.client-row .c-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.client-row .c-fam { font-size: 12px; color: var(--text-mid); margin-top: 3px; }
.client-row .c-stat { text-align: center; min-width: 80px; }
.client-row .c-stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.client-row .c-stat .l { font-size: 10px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.3px; }
.client-row .c-actions { display: flex; gap: 4px; }
.client-row .c-actions button { padding: 7px 9px; border-radius: 6px; background: transparent; border: 1px solid var(--border); color: var(--text-mid); }
.client-row .c-actions button:hover { background: var(--surface-warm); color: var(--text); }

/* ============== ANIVERSARIANTES ============== */
.birthday-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px; border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-1);
  transition: all 0.15s;
}
.birthday-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.bd-date {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent-dk);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.bd-kid { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.bd-age { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.bd-age-lbl { font-size: 10px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.3px; }
.bd-name { font-weight: 700; font-size: 15px; }
.bd-fam { font-size: 11px; color: var(--text-mid); }
.bd-actions { display: flex; gap: 6px; margin-top: 14px; }
.bd-actions button { flex: 1; padding: 8px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-warm); color: var(--text-mid); display: flex; align-items: center; justify-content: center; gap: 4px; }
.bd-actions button.primary { background: var(--accent); color: white; border-color: var(--accent); }

/* ============== EQUIPAMENTOS ============== */
.equip-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px; border: 1px solid var(--border);
  box-shadow: var(--shadow-1); position: relative;
  transition: all 0.15s;
}
.equip-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.equip-card .e-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 14px;
}
.equip-card .e-status {
  position: absolute; top: 14px; right: 14px;
}
.equip-card .e-name { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.equip-card .e-id { font-family: var(--font-mono); font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.equip-card .e-meta { font-size: 11px; color: var(--text-mid); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.equip-card .e-meta div { display: flex; justify-content: space-between; padding: 3px 0; }
.equip-card .e-meta strong { color: var(--text); font-weight: 600; }

/* ============== MANUTENÇÃO ============== */
.os-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.os-tab {
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-mid); border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px;
}
.os-tab:hover { color: var(--text); }
.os-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.os-tab .count { background: var(--surface-2); color: var(--text-mid); padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.os-tab.active .count { background: var(--primary); color: white; }

.os-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: grid; grid-template-columns: auto auto 1fr auto auto;
  gap: 16px; align-items: center;
  margin-bottom: 8px;
}
.os-priority-bar { width: 4px; height: 40px; border-radius: 2px; }
.os-priority-bar.alta { background: var(--danger); }
.os-priority-bar.media { background: var(--warning); }
.os-priority-bar.baixa { background: var(--success); }
.os-number { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--primary); }
.os-equip { font-weight: 700; font-size: 14px; }
.os-desc { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.os-due { text-align: right; font-size: 12px; color: var(--text-mid); }
.os-due strong { font-family: var(--font-mono); display: block; color: var(--text); }
.os-due.overdue strong { color: var(--danger); }

/* ============== AGENDA ============== */
.calendar { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-month { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { padding: 6px 10px; border-radius: 6px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { padding: 8px 6px; text-align: center; font-size: 10px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-day {
  background: var(--surface-warm); border-radius: 8px;
  padding: 8px; min-height: 92px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: background 0.15s;
}
.cal-day:hover { background: var(--bg-2); }
.cal-day.other { opacity: 0.4; }
.cal-day.today { background: var(--primary-soft); border: 1.5px solid var(--primary); }
.cal-day .num { font-size: 12px; font-weight: 700; color: var(--text-mid); }
.cal-day.today .num { color: var(--primary); }
.cal-event {
  font-size: 10px; padding: 3px 6px; border-radius: 4px;
  font-weight: 600; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-event.festa { background: var(--accent-soft); color: var(--accent-dk); }
.cal-event.manut { background: var(--warning-soft); color: var(--warning); }
.cal-event.especial { background: var(--pcd-soft); color: var(--pcd); }
.cal-event.treino { background: var(--info-soft); color: var(--info); }

/* ============== RELATÓRIOS ============== */
.report-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--border);
  box-shadow: var(--shadow-1); cursor: pointer;
  transition: all 0.2s;
  display: flex; gap: 16px; align-items: flex-start;
}
.report-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--primary-mid); }
.report-card .r-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.report-card .r-title { font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.report-card .r-desc { font-size: 12px; color: var(--text-mid); margin-top: 4px; line-height: 1.4; }
.report-card .r-tags { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }

/* ============== ESTOQUE ============== */
.stock-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: grid; grid-template-columns: auto 1fr auto auto auto auto;
  gap: 16px; align-items: center;
  margin-bottom: 8px;
}
.stock-row .s-icon { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stock-row .s-name { font-weight: 700; font-size: 14px; }
.stock-row .s-cat { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.stock-row .s-bar { width: 120px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.stock-row .s-bar-fill { height: 100%; background: var(--success); }
.stock-row .s-bar-fill.low { background: var(--warning); }
.stock-row .s-bar-fill.danger { background: var(--danger); }
.stock-row .s-qty { font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-align: center; min-width: 80px; }
.stock-row .s-val { font-family: var(--font-mono); font-weight: 600; color: var(--text-mid); min-width: 80px; text-align: right; }

/* ============== DESPESAS ============== */
.expense-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto;
  gap: 16px; padding: 14px 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px;
}
.expense-row .cat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.expense-row .e-desc { font-weight: 600; font-size: 14px; }
.expense-row .e-supplier { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.expense-row .e-amt { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--danger); }

/* ============== TAREFAS ============== */
.task-group {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 24px; border: 1px solid var(--border);
  margin-bottom: 16px;
}
.task-group-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.task-group-title { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--primary); text-transform: uppercase; }
.task-group-progress { font-size: 12px; color: var(--text-mid); font-weight: 600; }

.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.task-item:last-child { border-bottom: none; }
.task-item .t-check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--border-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.task-item.done .t-check { background: var(--success); border-color: var(--success); color: white; }
.task-item .t-text { font-size: 14px; flex: 1; }
.task-item.done .t-text { color: var(--text-soft); text-decoration: line-through; }
.task-item .t-meta { font-size: 11px; color: var(--text-soft); }
.task-item .t-meta strong { color: var(--text-mid); }

/* ============== ACHADOS ============== */
.lost-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--border);
  display: grid; grid-template-columns: 80px 1fr; gap: 14px;
  align-items: flex-start;
}
.lost-thumb {
  width: 80px; height: 80px; border-radius: 8px;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.lost-info .l-name { font-weight: 700; font-size: 14px; }
.lost-info .l-desc { font-size: 12px; color: var(--text-mid); margin-top: 2px; line-height: 1.4; }
.lost-info .l-meta { font-size: 11px; color: var(--text-soft); margin-top: 6px; }
.lost-info .l-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.lost-info .l-actions .btn { padding: 5px 10px; font-size: 11px; }



/* Classes responsivas dedicadas para layouts colunados */
.cols-checkout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.cols-fechamento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Tablet largo / laptop pequeno */
@media (max-width: 1280px) {
  .fech-summary { gap: 16px; }
}

/* Tablet padrão */
@media (max-width: 1100px) {
  .app { grid-template-columns: 200px 1fr; }
  .main { padding: 20px 24px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .pdv-layout, .cad-grid, .msg-layout { grid-template-columns: 1fr; }
  .cols-checkout, .cols-fechamento { grid-template-columns: 1fr; }
  .fech-summary { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .kid-actions { grid-template-columns: 1fr 1fr 1.6fr; }
}

/* Topbar começa a compactar */
@media (max-width: 960px) {
  .tb-title { font-size: 13px; }
  .tb-title .sep, .tb-title .unit { display: none; }
  .tb-clock .date { display: none; }
  .tb-user .name, .tb-user .role { display: none; }
  .tb-caixa .lbl { display: none; }
  .topbar { gap: 12px; padding: 0 16px; }
}

/* Tablet portrait / laptop muito pequeno */
@media (max-width: 820px) {
  .app { grid-template-columns: 64px 1fr; }
  .sb-brand .name, .sb-brand .sub, .sb-item span.label-text,
  .sb-label, .sb-item .badge-num { display: none; }
  .sb-item { justify-content: center; padding: 11px 8px; }
  .sb-brand .logo { justify-content: center; }
  .main { padding: 16px; }
  .product-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fech-summary { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .fech-summary .fs-val { font-size: 20px; }
}

/* Mobile */
@media (max-width: 560px) {
  .grid-3, .grid-4, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .patio-summary { padding: 16px; }
  .patio-summary .ms-big { font-size: 24px; }
  .patio-summary .ps-cell.last { text-align: left; }
  .fech-summary { grid-template-columns: 1fr; }
  .view-title { font-size: 22px; }
  .checkin-bar, .caixa-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .checkin-bar .btn-iniciar { width: 100%; }
  .topbar { padding: 0 12px; gap: 8px; }
  .tb-user { padding: 6px; }
  .tb-caixa { padding: 6px 10px; }
  .alert-row { flex-wrap: wrap; }
  .alert-row .alert-action { margin-left: 0; margin-top: 6px; }
}

/* ============== RH (Funcionários · Escala · Folha) ============== */
/* Linhas do cadastro de funcionários. */
.emp-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto auto;
  gap: 16px; align-items: center; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--border);
  padding: 14px 18px; margin-bottom: 8px;
}
.emp-row .e-av {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.emp-row .e-av img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.emp-row .e-name { font-weight: 700; font-size: 14px; }
.emp-row .e-role { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.emp-row .e-stat { text-align: center; min-width: 80px; }
.emp-row .e-stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.emp-row .e-stat .l { font-size: 10px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.3px; }

/* Cards de KPI maiores (gestor). Coexistem com .kpi-mini do operador. */
.kpi-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 22px 24px; border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.kpi-card.featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: white; border: none;
}
.kpi-card .kpi-label {
  font-size: 11px; color: var(--text-mid); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.kpi-card.featured .kpi-label { color: rgba(255,255,255,0.7); }
.kpi-card .kpi-value {
  font-size: 22px; font-weight: 800; margin-top: 8px;
  line-height: 1; letter-spacing: -0.5px; font-family: var(--font-mono);
}
.kpi-card.featured .kpi-value { color: white; }
.kpi-card .kpi-trend {
  font-size: 11px; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600;
}
.kpi-card .kpi-trend.up   { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--danger); }
.kpi-card .kpi-trend.flat { color: var(--text-soft); }
.kpi-card.featured .kpi-trend { color: rgba(255,255,255,0.85); }

/* Calendário semanal da Escala. */
.schedule {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px; border: 1px solid var(--border); overflow-x: auto;
}
.schedule-grid {
  display: grid; grid-template-columns: 160px repeat(7, 1fr);
  gap: 4px; min-width: 880px;
}
.sch-dow-head {
  padding: 10px 8px; text-align: center; font-size: 11px;
  font-weight: 700; color: var(--text-mid);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.sch-dow-head.today { color: var(--primary); }
.sch-dow-head .d { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.sch-name-cell { padding: 16px 12px; border-right: 1px solid var(--border); }
.sch-name-cell .nm { font-weight: 700; font-size: 13px; }
.sch-name-cell .rl { font-size: 10px; color: var(--text-soft); margin-top: 2px; }
.sch-cell {
  padding: 6px; min-height: 72px; background: var(--surface-warm);
  border-radius: 6px; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: background 0.15s;
}
.sch-cell:hover { background: var(--bg-2); }
.sch-cell.today { box-shadow: inset 0 0 0 2px var(--primary-soft); }

/* Blocos de turno. A cor base vem do data-cor inline; .almoco é uma faixa
   que aparece dentro do bloco para sinalizar a pausa. */
.shift {
  padding: 6px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; gap: 2px;
  color: white; position: relative; overflow: hidden;
  text-decoration: none;
}
.shift:hover { filter: brightness(0.95); }
.shift .h { font-family: var(--font-mono); font-size: 10px; opacity: 0.9; }
.shift.folga {
  background: var(--bg-2); color: var(--text-soft);
  justify-content: center; align-items: center;
  font-weight: 500; font-style: italic;
}
.shift.overlap { box-shadow: 0 0 0 2px var(--danger); }
.shift .almoco {
  background: rgba(255,255,255,0.28); color: rgba(255,255,255,0.95);
  font-size: 9px; padding: 1px 5px; border-radius: 3px; margin-top: 3px;
  font-weight: 600; font-family: var(--font-mono);
  display: inline-flex; align-items: center; gap: 4px; width: fit-content;
}
.shift .badge-warning-pill {
  position: absolute; top: 3px; right: 3px;
  background: var(--danger); color: white; font-size: 8px;
  padding: 1px 5px; border-radius: 99px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* Tabela simples (usada na Folha e no catálogo). */
.tbl {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.tbl th, .tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.tbl thead th {
  background: var(--surface-2); color: var(--text-mid);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td.amt { font-family: var(--font-mono); text-align: right; }
.tbl td.amt.positive { color: var(--success); font-weight: 700; }
.tbl td.amt.negative { color: var(--danger); }
.tbl tr.subtotal td { background: var(--surface-2); font-weight: 700; }

/* Variante DRE: header verde escuro, grupos em soft, total-row em accent. */
.tbl.dre-table th { background: var(--primary-dk); color: white; padding: 12px 16px; font-size: 11px; }
.tbl.dre-table .group td { background: var(--primary-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; font-size: 12px; }
.tbl.dre-table .total-row td { background: var(--bg-2); font-weight: 800; font-size: 13px; border-top: 2px solid var(--primary); }
.tbl.dre-table td.nested { padding-left: 32px; color: var(--text-mid); }

/* ============== TAREFAS DO DIA ============== */
.task-group {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 24px; border: 1px solid var(--border);
  margin-bottom: 16px;
}
.task-group-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.task-group-title { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--primary); text-transform: uppercase; }
.task-group-progress { font-size: 12px; color: var(--text-mid); font-weight: 600; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-item .t-check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; cursor: pointer; padding: 0; transition: all 0.15s;
}
.task-item .t-check:hover { border-color: var(--primary-mid); background: var(--surface-warm); }
.task-item.done .t-check { background: var(--success); border-color: var(--success); color: white; }
.task-item .t-text { font-size: 14px; flex: 1; }
.task-item.done .t-text { color: var(--text-soft); text-decoration: line-through; }
.task-item .t-meta { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.task-item .t-meta strong { color: var(--text-mid); }

/* Badge laranja redondo na topbar com count de tarefas pendentes. */
.tb-tarefas-pendentes {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 800; font-size: 14px;
  border: 2px solid var(--accent-dk); box-shadow: 0 2px 6px rgba(224,120,86,0.4);
  text-decoration: none; position: relative;
  animation: tb-tarefas-pulse 2s ease-in-out infinite;
}
.tb-tarefas-pendentes:hover { transform: scale(1.06); }
.tb-tarefas-pendentes i { font-size: 16px; position: absolute; top: -8px; right: -6px;
  background: white; color: var(--accent-dk); border-radius: 50%; padding: 1px;
  width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}
@keyframes tb-tarefas-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(224,120,86,0.4); }
  50%      { box-shadow: 0 2px 14px rgba(224,120,86,0.8); }
}

/* ============== ESCALA SEMANAL DO FUNCIONÁRIO ============== */
/* Grade dias × horas. Inspirada no heatmap-rev, mas com estados toggle:
   vazio · trabalho (laranja) · almoço (verde). */
.escala-semanal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 16px; border: 1px solid var(--border);
}
.escala-grid {
  display: grid; gap: 3px;
  /* 80px pro rótulo do dia + N colunas iguais; setado inline com repeat() */
}
.escala-cell {
  background: var(--surface-warm); border-radius: 4px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text-soft);
  user-select: none; transition: all 0.12s; cursor: pointer;
}
.escala-cell:hover {
  background: var(--bg-2); transform: scale(1.04);
  box-shadow: var(--shadow-1); z-index: 2;
}
.escala-cell.hdr {
  background: transparent; color: var(--text-mid); cursor: default;
  font-family: var(--font-mono); font-size: 10px;
}
.escala-cell.hdr:hover { background: transparent; transform: none; box-shadow: none; }
.escala-cell.day {
  background: transparent; color: var(--text); font-weight: 800;
  letter-spacing: 0.4px; cursor: default;
}
.escala-cell.day:hover { background: transparent; transform: none; box-shadow: none; }
.escala-cell.trabalho {
  background: var(--accent); color: white; box-shadow: 0 0 0 1px var(--accent-dk);
}
.escala-cell.almoco {
  background: var(--success); color: white; box-shadow: 0 0 0 1px #145f43;
}

.escala-meta-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-2); border-radius: var(--radius);
  padding: 10px 14px; margin-top: 14px; font-size: 13px;
}
.escala-meta-bar .meta-label { color: var(--text-soft); text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: 0.4px; }
.escala-meta-bar .meta-counter {
  font-family: var(--font-mono); font-weight: 800; font-size: 18px;
  color: var(--text);
}
.escala-meta-bar .meta-progress-track {
  flex: 1; height: 8px; background: var(--bg-2);
  border-radius: 99px; overflow: hidden;
}
.escala-meta-bar .meta-progress-fill {
  height: 100%; transition: width 0.18s, background 0.18s; border-radius: 99px;
  background: var(--warning);
}
.escala-meta-bar .meta-progress-fill[data-state="ok"]   { background: var(--success); }
.escala-meta-bar .meta-progress-fill[data-state="over"] { background: var(--danger); }
.escala-meta-bar .meta-progress-fill[data-state="low"]  { background: var(--warning); }


/* === INTEGRAÇÕES === */
.config-section { background: var(--surface); border-radius: var(--radius-lg); padding: 24px 28px; border: 1px solid var(--border); margin-bottom: 16px; }
.config-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.config-section .desc { font-size: 12px; color: var(--text-mid); margin-bottom: 18px; }

.integration-row { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-warm, var(--bg-2)); border-radius: var(--radius); margin-bottom: 8px; border: 1px solid var(--border); }
.integration-row .i-ic { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.integration-row .i-name { font-weight: 700; font-size: 14px; }
.integration-row .i-desc { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
/*
 * 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.
 *


 */
