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

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

trix-toolbar * {
  box-sizing: border-box; }

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto; }

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px; }
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 1.5vw; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0; } }

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button-group-spacer {
      display: none; } }

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent; }
  trix-toolbar .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-toolbar .trix-button.trix-active {
    background: #cbeefa;
    color: black; }
  trix-toolbar .trix-button:not(:disabled) {
    cursor: pointer; }
  trix-toolbar .trix-button:disabled {
    color: rgba(0, 0, 0, 0.125); }
  @media (max-width: 768px) {
    trix-toolbar .trix-button {
      letter-spacing: -0.01em;
      padding: 0 0.3em; } }

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button--icon {
      height: 2em;
      max-width: calc(0.8em + 3.5vw); } }
  trix-toolbar .trix-button--icon::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button--icon::before {
        right: 6%;
        left: 6%; } }
  trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1; }
  trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.125; }

trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%; }

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-dialogs {
  position: relative; }

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5; }

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }
  trix-toolbar .trix-input--dialog.validate:invalid {
    box-shadow: #F00 0px 0px 1.5px 1px; }

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none; }

trix-toolbar .trix-dialog--link {
  max-width: 600px; }

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline; }
  trix-toolbar .trix-dialog__link-fields .trix-input {
    flex: 1; }
  trix-toolbar .trix-dialog__link-fields .trix-button-group {
    flex: 0 0 content;
    margin: 0; }

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

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

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

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

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

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent; }

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight; }

trix-editor .attachment {
  position: relative; }
  trix-editor .attachment:hover {
    cursor: default; }

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text; }

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in; }
  trix-editor .attachment__progress[value="100"] {
    opacity: 0; }

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center; }

trix-editor .trix-button-group {
  display: inline-flex; }

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent; }
  trix-editor .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-editor .trix-button.trix-active {
    background: #cbeefa; }
  trix-editor .trix-button:not(:disabled) {
    cursor: pointer; }

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
  trix-editor .trix-button--remove::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.7;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%; }
  trix-editor .trix-button--remove:hover {
    border-color: #333; }
    trix-editor .trix-button--remove:hover::before {
      opacity: 1; }

trix-editor .attachment__metadata-container {
  position: relative; }

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px; }
  trix-editor .attachment__metadata .attachment__name {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  trix-editor .attachment__metadata .attachment__size {
    margin-left: 0.2em;
    white-space: nowrap; }

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word; }
  .trix-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }
  .trix-content h1 {
    font-size: 1.2em;
    line-height: 1.2; }
  .trix-content blockquote {
    border: 0 solid #ccc;
    border-left-width: 0.3em;
    margin-left: 0.3em;
    padding-left: 0.6em; }
  .trix-content [dir=rtl] blockquote,
  .trix-content blockquote[dir=rtl] {
    border-width: 0;
    border-right-width: 0.3em;
    margin-right: 0.3em;
    padding-right: 0.6em; }
  .trix-content li {
    margin-left: 1em; }
  .trix-content [dir=rtl] li {
    margin-right: 1em; }
  .trix-content pre {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.5em;
    white-space: pre;
    background-color: #eee;
    overflow-x: auto; }
  .trix-content img {
    max-width: 100%;
    height: auto; }
  .trix-content .attachment {
    display: inline-block;
    position: relative;
    max-width: 100%; }
    .trix-content .attachment a {
      color: inherit;
      text-decoration: none; }
      .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
        color: inherit; }
  .trix-content .attachment__caption {
    text-align: center; }
    .trix-content .attachment__caption .attachment__name + .attachment__size::before {
      content: ' \2022 '; }
  .trix-content .attachment--preview {
    width: 100%;
    text-align: center; }
    .trix-content .attachment--preview .attachment__caption {
      color: #666;
      font-size: 0.9em;
      line-height: 1.2; }
  .trix-content .attachment--file {
    color: #333;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid #bbb;
    border-radius: 5px; }
  .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    position: relative; }
    .trix-content .attachment-gallery .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%; }
    .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
      flex-basis: 50%;
      max-width: 50%; }

/*
 * We need to override trix.css’s image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

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

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ── Brand tokens (--ek-*) — PRD-Bible §6. Only the ACCENT family is brand-variant; everything
   else is invariant. Default (no data-theme) = Enrankeo blue, so existing pages are unchanged.
   PRD-233 (D-10): el acento es una RAMPA con nombre (160 la más clara … 40 la más oscura; 80 es la
   clave). En Rektora los nueve valores son los que ya pintaba `_rektora_green_remap`; en Enrankeo,
   el azul de Tailwind. Los alias de siempre (`-accent`, `-hover`, `-subtle`, `-text`) leen la rampa. ── */
/* El alto de `#mobile-bottom-nav` (layout school_dashboard: su fila más el borde de 1 px), sin el
   área segura. UN sitio: la nav lo lee y lo leen las barras fijas que van encima de ella
   (PRD-271 `student_roster/_mobile_actionbar` y `_empty`); antes el 57 estaba escrito a mano en
   cada una y un cambio de la nav las dejaba flotando o tapándola. */
:root { --ek-mobile-bottom-nav-h: 57px; }

:root, [data-theme="enrankeo"] {
  --ek-color-accent-160: #eff6ff; --ek-color-accent-150: #dbeafe; --ek-color-accent-140: #bfdbfe;
  --ek-color-accent-130: #93c5fd; --ek-color-accent-110: #60a5fa; --ek-color-accent-80: #2563eb;
  --ek-color-accent-70: #1d4ed8; --ek-color-accent-50: #1e40af; --ek-color-accent-40: #1e3a8a;
  --ek-color-accent: #2563eb; --ek-color-accent-hover: #1d4ed8;
  --ek-color-accent-subtle: #eff6ff; --ek-color-accent-text: #2563eb; --ek-color-focus-ring: #2563eb;
}
[data-theme="rektora"] {
  --ek-color-accent-160: #EEF6F1; --ek-color-accent-150: #D9EBE1; --ek-color-accent-140: #C4DECF;
  --ek-color-accent-130: #A8CDBA; --ek-color-accent-110: #6FAE8C; --ek-color-accent-80: #2D7A4F;
  --ek-color-accent-70: #246841; --ek-color-accent-50: #1B4D33; --ek-color-accent-40: #163F2A;
  --ek-color-accent: var(--ek-color-accent-80); --ek-color-accent-hover: var(--ek-color-accent-70);
  --ek-color-accent-subtle: var(--ek-color-accent-160); --ek-color-accent-text: var(--ek-color-accent-80);
  /* PRD-233 D-2: el foco de Rektora es neutro, no el acento. */
  --ek-color-focus-ring: #242424;
  --ek-color-field-focus: #2D7A4F; --ek-color-field-focus-halo: rgb(45 122 79 / 0.18);
}
.ek-accent-bg { background-color: var(--ek-color-accent); }
.ek-accent-bg:hover { background-color: var(--ek-color-accent-hover); }
.ek-accent-subtle { background-color: var(--ek-color-accent-subtle); }
.ek-accent-text { color: var(--ek-color-accent-text); }
.ek-accent-border { border-color: var(--ek-color-accent); }
/* Coincidencia de búsqueda (Figma Tabla «Tipo · Coincidencia de búsqueda», color/highlight/match
   = yellow/100, igual en Enrankeo y Rektora). El texto no cambia de color ni de peso, y sin relleno
   lateral para que la palabra no se mueva al resaltarse. */
:root { --ek-color-highlight-match: #FEF9C3; }
mark.ek-match, .ek-match { background-color: var(--ek-color-highlight-match); color: inherit; font-weight: inherit; border-radius: 2px; padding: 0; }
.ek-focus-ring:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ek-color-focus-ring); }
/* The Tailwind `focus:ring-2` that ButtonComponent also emits fires on plain :focus (a mouse
   click, a programmatic .focus()) and paints in --tw-ring-color, whose default is Tailwind's
   blue-500. The green remap is a whitelist of `ring-blue-*` selectors and there is no such
   class to remap, so on Rektora the clicked button kept a BLUE ring (PRD-183 S3, 07-pg3b).
   Token-driven: blue on Enrankeo, green on Rektora. */
.ek-focus-ring { --tw-ring-color: var(--ek-color-focus-ring); }

/* ── Status tokens (--ek-color-status-*) — PRD-Bible §6.1. BRAND-INVARIANT and bridge-exempt
   by design: success/warning/danger/info are ROLES, identical under both brands, so they are
   defined on :root only — never override them in [data-theme="rektora"] or body.rektora-green.
   Shades match the -50/-200/-800 Tailwind ramps status components already render (bg/border/text),
   plus a strong value for icons/emphasis text, so adopting the tokens changes no pixels. ── */
:root {
  /* info — informational, system-neutral (strong · bg · border · text) */
  --ek-color-status-info: #2563EB;
  --ek-color-status-info-bg: #EFF6FF;
  --ek-color-status-info-border: #BFDBFE;
  --ek-color-status-info-text: #1E40AF;
  /* success — confirmation, paid, up to date */
  --ek-color-status-success: #047857;
  --ek-color-status-success-bg: #ECFDF5;
  --ek-color-status-success-border: #A7F3D0;
  --ek-color-status-success-text: #065F46;
  /* warning — attention, pending, due soon */
  --ek-color-status-warning: #B45309;
  --ek-color-status-warning-bg: #FFFBEB;
  --ek-color-status-warning-border: #FDE68A;
  --ek-color-status-warning-text: #92400E;
  /* danger — error, overdue, destructive */
  --ek-color-status-danger: #DC2626;
  --ek-color-status-danger-bg: #FEF2F2;
  --ek-color-status-danger-border: #FECACA;
  --ek-color-status-danger-text: #991B1B;
  /* channel identity (third-party brand) — never remapped */
  --ek-color-whatsapp: #25D366;
}

/* ── Invariant semantic tokens — PRD-Bible §6.1 (surface / text / border / radius / z).
   BRAND-INVARIANT by design: identical under both brands, so :root only — never override
   in [data-theme="rektora"] or body.rektora-green. Values mirror the Tailwind utilities
   components already render (gray-50/100/…, rounded-lg/xl), so adopting them changes no pixels.
   Elevación: la nota «FLAT per owner decision (2026-07-01)» queda SUPERADA por PRD-233 D-5:
   en Rektora hay dos sombras con nombre, `--ek-shadow-float` (menús) y `--ek-shadow-panel`
   (paneles y diálogos), y `--ek-shadow-sm` vale `0 0 #0000`. PRD-233 D-1 también lleva los
   tokens neutros de abajo a la escalera de grises de Rektora (bloque `body.rektora-green`). ── */
:root {
  /* text on accent fill (both brands ship white-on-accent) */
  --ek-color-on-accent: #FFFFFF;
  /* surfaces */
  --ek-color-surface: #FFFFFF;        /* app/card background (bg-white) */
  --ek-color-surface-muted: #F9FAFB;  /* subtle surface — rows, wells (gray-50) */
  /* text ramp */
  --ek-color-text: #111827;            /* primary (gray-900) */
  --ek-color-text-muted: #6B7280;      /* secondary (gray-500) */
  --ek-color-text-quaternary: #9CA3AF; /* metadata/timestamps (gray-400) */
  /* borders */
  --ek-color-border: #E5E7EB;        /* hairline (gray-200) */
  --ek-color-border-strong: #D1D5DB; /* inputs/emphasis (gray-300) */
  /* radius */
  --ek-radius-sm: 0.5rem;  /* rounded-lg — buttons/inputs */
  --ek-radius-lg: 0.75rem; /* rounded-xl — cards */
  /* the ONLY elevation token (flat design ceiling) — alias of Tailwind shadow-sm */
  --ek-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  /* z-layers: flyout panel and confirm modal keep today's z-50 (backdrops stay z-40);
     toast sits one layer above so a transient acknowledgement is never buried under
     an open flyout/modal. */
  --ek-z-flyout: 50;
  --ek-z-modal: 50;
  --ek-z-toast: 60;
}

/* ── Bridge the legacy `body.rektora-green` flag (set by the school dashboard on
   the Rektora domain) onto the --ek accent tokens, so token-driven components
   render brand green there too — that layout flags green via `body.rektora-green`
   rather than `data-theme="rektora"`. ── */
body.rektora-green {
  --ek-color-accent-160: #EEF6F1; --ek-color-accent-150: #D9EBE1; --ek-color-accent-140: #C4DECF;
  --ek-color-accent-130: #A8CDBA; --ek-color-accent-110: #6FAE8C; --ek-color-accent-80: #2D7A4F;
  --ek-color-accent-70: #246841; --ek-color-accent-50: #1B4D33; --ek-color-accent-40: #163F2A;
  --ek-color-accent: var(--ek-color-accent-80); --ek-color-accent-hover: var(--ek-color-accent-70);
  --ek-color-accent-subtle: var(--ek-color-accent-160); --ek-color-accent-text: var(--ek-color-accent-80);
  --ek-color-focus-ring: #242424;
  --ek-color-field-focus: #2D7A4F; --ek-color-field-focus-halo: rgb(45 122 79 / 0.18);
}

/* ── D-6 (13-nov-2026): los tokens que la biblioteca de Figma ya usa con nombre de código
   («Enrankeo, Rektora y Móvil», colección Semántico/Espacio, codeSyntax WEB) y que el CSS no
   tenía. Se DECLARAN aquí con los mismos valores que Figma para que el nombre exista en los dos
   lados; ninguna vista los lee todavía, así que no cambia un píxel. Adoptarlos en una vista es
   trabajo aparte, vista por vista. Los valores del modo Móvil viven en el sistema pa-* (apps de
   Padres y Maestros), no aquí. ── */
:root {
  --space-0: 0px; --space-0-5: 2px; --space-1: 4px; --space-1-5: 6px; --space-2: 8px;
  --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --space-10: 40px; --space-12: 48px; --space-16: 64px;
  --ek-color-page: #F9FAFB;
  --ek-color-hover: #F3F4F6;
  --ek-color-text-strong: #374151;
  --ek-color-border-subtle: #F3F4F6;
  --ek-color-whatsapp-hover: #1DA851;
  --ek-radius-badge: 4px;
  --ek-radius-full: 9999px;
  --ek-control-h: 36px;
  --ek-row-h: 44px;
}
body.rektora-green, [data-theme="rektora"] {
  --ek-color-page: #F0F0F0;
  --ek-color-hover: #F5F5F5;
  --ek-color-text-strong: #424242;
  --ek-color-border-subtle: #F0F0F0;
  --ek-row-h: 40px;
}

/* ══════════════════════════════════════════════════════════════════════════════════════════
   PRD-233 — EL ACABADO DE REKTORA (F0: US-374, US-375, US-376; trazo de US-379).
   Todo lo de aquí abajo vale SOLO bajo `body.rektora-green` (D-1): `:root` lleva los valores
   de Tailwind para que Enrankeo no cambie un píxel (AC-1). Las vistas no se tocan: cambian
   los tokens que leen.
   ══════════════════════════════════════════════════════════════════════════════════════════ */

/* Grises (canales RGB para `rgb(var(--ek-gray-N) / <alpha-value>)`, config/tailwind.config.js),
   sombras de las utilidades `shadow*` y peso de la escala `label-*` (E-9). En :root, Tailwind. */
:root {
  --ek-gray-50: 249 250 251;  --ek-gray-100: 243 244 246; --ek-gray-200: 229 231 235;
  --ek-gray-300: 209 213 219; --ek-gray-400: 156 163 175; --ek-gray-500: 107 114 128;
  --ek-gray-600: 75 85 99;    --ek-gray-700: 55 65 81;    --ek-gray-800: 31 41 55;
  --ek-gray-900: 17 24 39;    --ek-gray-950: 3 7 18;
  --ek-tw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --ek-tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --ek-tw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --ek-tw-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ek-tw-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --ek-tw-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --ek-weight-label: 500;
  /* Marco (barra superior y lateral): blanco en Enrankeo, gris neutro en Rektora. */
  --ek-color-chrome: #FFFFFF;
}

body.rektora-green {
  /* §5 — grises neutros de Fluent (sin el tinte azul de Tailwind): 3 de texto, 3 de borde. */
  --ek-gray-50: 250 250 250;  --ek-gray-100: 245 245 245; --ek-gray-200: 224 224 224;
  --ek-gray-300: 209 209 209; --ek-gray-400: 112 112 112; --ek-gray-500: 97 97 97;
  --ek-gray-600: 66 66 66;    --ek-gray-700: 66 66 66;    --ek-gray-800: 36 36 36;
  --ek-gray-900: 36 36 36;    --ek-gray-950: 20 20 20;
  /* Las tres superficies (D-1): marco gris, hoja blanca insertada, tarjetas blancas con borde. */
  --ek-color-chrome: #f0f0f0;
  /* Dos sombras con nombre, solo para lo que flota (D-5): menús y paneles/diálogos. */
  --ek-shadow-float: 0 0 2px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .14);
  --ek-shadow-panel: 0 0 8px rgba(0, 0, 0, .12), 0 14px 28px rgba(0, 0, 0, .14);
  --ek-tw-shadow-sm: 0 0 #0000;
  --ek-tw-shadow: var(--ek-shadow-float);
  --ek-tw-shadow-md: var(--ek-shadow-float);
  --ek-tw-shadow-lg: var(--ek-shadow-float);
  --ek-tw-shadow-xl: var(--ek-shadow-panel);
  --ek-tw-shadow-2xl: var(--ek-shadow-panel);
  --ek-shadow-sm: 0 0 #0000;
  /* Dos pesos (D-3): la escala `label-*` pasa a regular. */
  --ek-weight-label: 400;
  /* Los tokens semánticos neutros siguen a la escalera de grises de Rektora (§6.1 de la BIBLE). */
  --ek-color-surface-muted: #fafafa;
  --ek-color-text: #242424;
  --ek-color-text-muted: #616161;
  --ek-color-text-quaternary: #707070;
  --ek-color-border: #e0e0e0;
  --ek-color-border-strong: #d1d1d1;
}

/* ── Las tres superficies (US-374, AC-2; layouts school_dashboard y caja_focus). Marco gris
   (`--ek-color-chrome`) en <body>, barra superior y navegación; el trabajo en una hoja blanca.
   En escritorio la ÚNICA línea es la de 1 px #e0e0e0 que corre fija sobre el riel y el panel
   (PRD-229 v1.8), la que separa riel y panel, y el borde de la hoja (arriba y a la izquierda, con
   la esquina de 12 px): la barra superior no lleva línea propia para que no salga doble sobre la
   hoja, y el panel y la barra lateral no llevan línea derecha porque ahí ya está el borde de la
   hoja. Bajo 1024 px no hay riel ni hoja insertada: la línea vuelve a ser el borde de la barra. ── */
/* ── PRD-267 §9 (O-27) — el morado del asistente. Solo en el símbolo del asistente, la fila
   Preguntar marcada, la burbuja de la pregunta y la cabecera del panel; cifras, tablas, enlaces
   y botones siguen en los colores de Rektora. Hueco del sistema: Figma no tiene `color/ai/*`
   todavía (anotado para diseño). ── */
body.rektora-green {
  --ek-color-ai: #6941C6;      /* el símbolo y el borde de la fila marcada */
  --ek-color-ai-soft: #F4EBFF; /* el fondo de la fila Preguntar marcada y de la burbuja */
  --ek-color-ai-text: #53389E; /* texto sobre el fondo suave */
}

/* ── PRD-267 §6.3 punto 8 (O-39) — un solo HTML para la paleta, el panel y la hoja. El
   servidor nunca ramifica por ancho: el cliente inserta la conversación en un anfitrión con
   `data-surface` (`paleta` desde 1024 px, `paleta-angosta` de 768 a 1023 px, `hoja` por
   debajo de 768 px, `panel`) y estas tres reglas deciden:
     1. «Seguir en el panel» (`data-as-accion="panel"`) solo se ve con `data-surface="paleta"`;
     2. y 3. la `tabla` lleva sus dos formas (`data-ab-forma="tabla"` y `"lista"`): con
        `data-surface="hoja"` se ve la lista; en las demás, la tabla.
   Especificidad (0,3,1) en las tres: ganan a la utilidad de `display` (0,1,0) del botón o del bloque. ── */
body.rektora-green [data-as-accion="panel"]:not([data-surface="paleta"] *) { display: none; }
body.rektora-green [data-ab-forma="lista"]:not([data-surface="hoja"] *) { display: none; }
body.rektora-green [data-surface="hoja"] [data-ab-forma="tabla"] { display: none; }

/* ── PRD-267 §6.3 (D-2, O-39) — el casco de la conversación y el panel. El casco
   (`AssistantPanelComponent`: anfitrión con `data-surface`, campo «Pregunta algo más…»,
   Detener y `.as-status`) es el mismo en la paleta, la paleta angosta, la hoja y el panel;
   el contenido de la conversación lo pinta el servidor. Medidas de los marcos C4, C6, C16 y
   C20: campo de 36 px, borde #D0D5DD, apagado en #F2F4F7 (la burbuja y los pasos los pinta
   `rektora/assistant_conversations` con sus utilidades); la línea de estado como `#cp-status` (12 px), en rojo con el 422 (C19). Las
   reglas cuelgan de `.rektora-green` (no de `body`) para que la ficha del catálogo
   (/design-system/c/assistant_panel) las pinte dentro de su caja. ── */
.rektora-green .as-conv { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; background: #fff; }
.rektora-green .as-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; }
.rektora-green .as-host { display: grid; gap: 12px; align-content: start; min-width: 0; font-size: 13.5px; color: #101828; }
.rektora-green .as-net:empty { display: none; }
.rektora-green .as-input { flex: none; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid #EAECF0; background: #fff; }
.rektora-green .as-field { flex: 1 1 auto; min-width: 0; height: 36px; border: 1px solid #D0D5DD; border-radius: 8px; padding: 0 10px; font-size: 13.5px; color: #101828; background: #fff; outline: none; box-shadow: none; }
.rektora-green .as-field::placeholder { color: #98A2B3; }
.rektora-green .as-field:disabled { background: #F2F4F7; cursor: default; }
.rektora-green .as-stop[hidden] { display: none; }
.rektora-green .as-status { flex: none; padding: 2px 12px 8px; min-height: 16px; font-size: 12px; line-height: 16px; color: #344054; background: #fff; }
.rektora-green .as-status.err { color: #B42318; }
.rektora-green .as-ai-ic { width: 16px; height: 16px; flex: none; color: var(--ek-color-ai, #6941C6); }
/* El teléfono no amplía el campo al enfocarlo con 16 px (iOS amplía por debajo). */
.rektora-green [data-surface="hoja"] .as-field { font-size: 16px; }

/* El panel: no existe por debajo de 1024 px; de 1024 a 1279 px va encima del contenido,
   pegado a la derecha, con la sombra de panel y sin velo (C20); desde 1280 px es una columna
   del layout y el contenido se encoge (C6). `--as-top` lo pone el layout (la barra superior,
   más alta con la barra de plataforma). */
.rektora-green .as-panel { display: none; }
@media (min-width: 1024px) {
  .rektora-green .as-panel:not([hidden]) {
    display: flex; flex-direction: column; width: 400px; flex: none; background: #fff;
    border-left: 1px solid #EAECF0; position: fixed; right: 0; top: var(--as-top, 3.5rem); bottom: 0;
    z-index: 35; box-shadow: var(--ek-shadow-panel);
  }
}
@media (min-width: 1280px) {
  .rektora-green .as-panel:not([hidden]) {
    position: sticky; top: var(--as-top, 3.5rem); bottom: auto; align-self: flex-start;
    height: calc(100vh - var(--as-top, 3.5rem)); box-shadow: none;
  }
}
.rektora-green .as-pnh { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; border-bottom: 1px solid #EAECF0; }
.rektora-green .as-ttl { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; color: #101828; }
.rektora-green .as-ttl-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rektora-green .as-ttl-txt[hidden] { display: none; }
.rektora-green .as-ibtn { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #475467; background: transparent; border: 0; cursor: pointer; }
.rektora-green .as-ibtn:hover { background: #F2F4F7; }
.rektora-green .as-ibtn[hidden] { display: none; }
.rektora-green .as-ibtn svg { width: 16px; height: 16px; }
.rektora-green .as-pn-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.rektora-green .as-pn-list[hidden],
.rektora-green .as-panel .as-conv[hidden] { display: none; }

body.rektora-green { background-color: var(--ek-color-chrome); }
body.rektora-green #dashboard-topbar,
body.rektora-green #dashboard-sidebar { background-color: var(--ek-color-chrome); }
body.rektora-green #contenido { background-color: #fff; }
@media (min-width: 1024px) {
  body.rektora-green #dashboard-topbar { border-bottom-color: transparent; }
  body.rektora-green #module-nav,
  body.rektora-green #dashboard-sidebar { border-top: 1px solid #e0e0e0; }
  body.rektora-green #dashboard-sidebar { border-right-color: transparent; }
  /* El riel lleva la línea hacia el panel; si no hay panel al lado (módulo de una sola
     pantalla, panel plegado) esa línea la pone la hoja. */
  body.rektora-green #module-rail:last-child { border-right-color: transparent; }
  /* PRD-229 D-24 — los iconos de línea del riel a trazo 1,5 (Fluent «regular»); el activo va
     relleno (PRD-233 D-7) y los puntos de «Más» son círculos rellenos: ninguno lleva trazo. */
  body.rektora-green #module-rail svg[stroke] path,
  body.rektora-green #module-rail-more-menu svg[stroke] path { stroke-width: 1.5; }
  body.rektora-green #contenido {
    border-top: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    border-top-left-radius: 12px;
  }
}

/* La barra lateral de hoy (solo bajo 1024 px con el riel; en escritorio para quien no lo
   tiene): la fila encendida en semibold (D-3), sin cambio de qué fila se enciende. */
body.rektora-green #dashboard-sidebar .sidebar-link-active { font-weight: 600; }

/* ── Foco neutro (D-2, US-375). Un solo anillo en toda Rektora: 2 px #242424 con 2 px blancos
   por dentro (15,5:1 sobre blanco, 13,6:1 sobre el marco, 3,0:1 contra el primario verde).
   Sale solo con teclado (`:focus-visible`); el clic no deja anillo.
   - La regla base pisa el `box-shadow` del elemento enfocado: así el anillo de color que pinte
     una utilidad (`focus:ring-blue-500`, `focus:ring-green-500`, `ek-focus-ring`…) no se suma.
   - El `focus:ring-*` que dispara con el ratón (`:focus` sin `:focus-visible`) se apaga fijando
     `--tw-ring-shadow` y `--tw-ring-offset-shadow` (L338: `focus:ring-2` sin color pinta azul).
   - Se exceptúan los contenedores con `tabindex="-1"` (el <main>, un panel que recibe el foco
     por script) y los campos que piden `ring-0` porque su contenedor muestra el foco.
   - El anillo que una utilidad pinta en OTRO elemento (`peer-focus:`, `focus-within:`) no lo
     alcanza la regla base: se queda, pero en el color neutro. ── */
body.rektora-green :focus-visible:not([tabindex="-1"]):not([class*="ring-0"]) {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ek-color-focus-ring);
}
body.rektora-green :focus:not(:focus-visible) {
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
}
body.rektora-green .peer:focus ~ [class*="peer-focus:ring"],
body.rektora-green .peer:focus-visible ~ [class*="peer-focus-visible:ring"],
body.rektora-green [class*="focus-within:ring"]:focus-within,
body.rektora-green [class*="group-focus:ring"],
body.rektora-green .ek-focus-ring {
  --tw-ring-color: var(--ek-color-focus-ring);
  --tw-ring-offset-color: #fff;
}
/* Campos enfocados en verde (decisión del fundador, 14-nov-2026; enmienda a D-2): un campo
   de texto, buscador o desplegable enfocado pinta su borde verde de marca con un halo verde
   suave de 3 px, sin el anillo blanco+oscuro. Botones, enlaces, casillas y filas conservan el
   anillo neutro de teclado. Vale con clic y con teclado: un campo de texto siempre casa
   `:focus-visible`. */
body.rektora-green :is(input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="file"]):not([type="color"]), textarea, select, .select-dropdown-trigger, [id$="-trigger"][aria-haspopup]):focus-visible:not([tabindex="-1"]):not([class*="ring-0"]) {
  outline: 2px solid transparent;
  border-color: var(--ek-color-field-focus);
  box-shadow: 0 0 0 3px var(--ek-color-field-focus-halo);
}
/* Dentro de un contenedor que recorta (el riel de módulos, de borde a borde), el anillo va por
   dentro: el mismo trazo oscuro con el blanco hacia el centro. */
body.rektora-green #module-rail :focus-visible {
  box-shadow: inset 0 0 0 2px var(--ek-color-focus-ring), inset 0 0 0 4px #fff;
}
/* E-6 — sobre la barra verde oscuro del personal el anillo se invierte: blanco por fuera,
   oscuro por dentro. */
body.rektora-green #staff-context-bar :focus-visible {
  box-shadow: 0 0 0 2px var(--ek-color-focus-ring), 0 0 0 4px #fff;
}

/* ── D-9 (13-nov-2026): dos pesos en Rektora, por PAPEL y no por barrido. Rektora usa Regular
   (400) y Semibold (600), como Fluent/Teams. Lo que queda escrito `font-medium` (≈200 usos en
   vistas, parciales y componentes que pinta Rektora) es énfasis → 600; `font-bold` (≈70, sobre
   todo cifras y títulos) → 600, el peso más alto de la escala. Dos papeles que NO son énfasis
   bajan a 400: la etiqueta de un campo (la Biblia y CLAUDE.md: «Label … peso regular») y la
   cabecera de tabla (igual que `.ek-table`). Solo bajo `body.rektora-green`: Enrankeo conserva
   su 500. Las vistas no se tocan; si una necesita otro peso, se escribe el que corresponde
   (`font-semibold` / `font-normal`), nunca `font-medium`. ── */
body.rektora-green .font-medium,
body.rektora-green .font-bold { font-weight: 600; }
body.rektora-green label.font-medium,
body.rektora-green th.font-medium { font-weight: 400; }

/* ── Sombras (US-376): tarjetas y botones sin sombra (`shadow-sm` → `0 0 #0000` por variable);
   el velo de paneles y diálogos al 40 %. ── */
body.rektora-green [id$="-backdrop"].fixed,
body.rektora-green .confirm-modal-backdrop {
  background-color: rgb(0 0 0 / 0.4);
}

/* ── Iconos (US-379, D-7, D-12): trazo 1,5 en los Heroicons en línea. El atributo
   `stroke-width="2"` no se toca (Enrankeo lo sigue leyendo); la propiedad CSS gana al
   atributo de presentación. Cubre el atributo en el <svg> y en sus formas hijas (path,
   circle, line, polyline, rect) de los iconos de 24 × 24. Los de 1,7 a 2,6 entran en la misma
   regla: el barrido de F2 igualó los atributos de `app/views/rektora`, pero los componentes
   que solo pinta Rektora (la tarjeta «Cómo se usa esta sección», el riel y el panel de
   PRD-229, la fila de ayuda) y las vistas que viven fuera de esa carpeta (Personal, la paleta
   de comandos, la barra lateral) escriben 1,8, 2,4 o 2,5 y salían con ese trazo (recorrido de
   verificación, AC-8). Quedan fuera el 3 y el 4: el 4 es el aro de los indicadores de carga
   (`animate-spin`), y el 3 son glifos de 10 px sobre un círculo de color, donde 1,5 no se ve. ── */
body.rektora-green svg:is([stroke-width="1.7"], [stroke-width="1.8"], [stroke-width="1.9"], [stroke-width="2"],
                          [stroke-width="2.2"], [stroke-width="2.4"], [stroke-width="2.5"], [stroke-width="2.6"]),
body.rektora-green svg[viewBox="0 0 24 24"] :is([stroke-width="1.7"], [stroke-width="1.8"], [stroke-width="1.9"],
                          [stroke-width="2"], [stroke-width="2.2"], [stroke-width="2.4"], [stroke-width="2.5"], [stroke-width="2.6"]) {
  stroke-width: 1.5;
}

/* ── Clases semánticas que emiten los componentes compartidos con Enrankeo (R1). Las clases
   de Tailwind del componente no se editan: se repintan aquí, solo en Rektora. ── */
/* ButtonComponent: `ek-btn-<variante>`. 36 px (las tallas sm/lg conservan su escala),
   semibold, sin sombra (sin `none`: el anillo vive en la misma lista), foco neutro. */
body.rektora-green :is(.ek-btn-primary, .ek-btn-secondary, .ek-btn-ghost, .ek-btn-danger, .ek-btn-danger_ghost, .ek-btn-whatsapp) {
  font-weight: 600;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-ring-color: var(--ek-color-focus-ring);
}
body.rektora-green :is(.ek-btn-primary, .ek-btn-secondary, .ek-btn-ghost, .ek-btn-danger, .ek-btn-danger_ghost, .ek-btn-whatsapp):not(.h-8):not(.h-10) {
  height: 2.25rem;
}
/* Paridad con el componente «Botón · Escritorio» de Figma (biblioteca Rektora, nodo 3:159, 14-nov-2026).
   Rellenos (primario, peligro, WhatsApp): sin borde; el hover solo cambia el relleno.
   Secundario: texto --ek-color-text, hover = fondo --ek-color-hover con el borde intacto.
   Ghost: texto --ek-color-text-strong (neutro), hover = fondo --ek-color-hover.
   Peligro ghost: texto --ek-color-status-danger-text, hover = --ek-color-status-danger-bg.
   El foco (D-2: anillo de 2 px con 2 px blancos) no se toca. */
body.rektora-green :is(.ek-btn-primary, .ek-btn-danger, .ek-btn-whatsapp) { border-color: transparent; }
body.rektora-green .ek-btn-danger:not(:disabled):hover { background-color: var(--ek-color-status-danger-text); }
body.rektora-green .ek-btn-whatsapp { color: var(--ek-color-on-accent, #fff); }
body.rektora-green .ek-btn-whatsapp:not(:disabled):hover { background-color: var(--ek-color-whatsapp-hover); }
body.rektora-green .ek-btn-secondary { color: var(--ek-color-text); border-color: var(--ek-color-border-strong); }
body.rektora-green .ek-btn-secondary:not(:disabled):hover { background-color: var(--ek-color-hover); border-color: var(--ek-color-border-strong); }
body.rektora-green .ek-btn-ghost { color: var(--ek-color-text-strong); }
body.rektora-green .ek-btn-ghost:not(:disabled):hover { background-color: var(--ek-color-hover); }
body.rektora-green .ek-btn-danger_ghost { color: var(--ek-color-status-danger-text); }
body.rektora-green .ek-btn-danger_ghost:not(:disabled):hover { background-color: var(--ek-color-status-danger-bg); }
/* BadgeComponent y los badges a mano: colores intactos (D-9 retirada), peso semibold (D-3). */
body.rektora-green .ek-badge { font-weight: 600; }

/* Lista reordenable en Rektora: asa y hueco con los tokens neutros del sistema. */
body.rektora-green .ek-reorder-handle { color: var(--ek-color-text-muted, #6b7280); }
body.rektora-green .ek-reorder-handle:hover { color: var(--ek-color-text, #242424); }
body.rektora-green .ek-reorder-placeholder { background-color: var(--ek-color-hover, #f5f5f5) !important; border-color: var(--ek-color-border-strong, #d1d1d1) !important; }
body.rektora-green .ek-reorder-lifted { box-shadow: var(--ek-shadow-float); }
/* AlertComponent: el título en semibold (hoy `font-medium`); el texto, regular. */
body.rektora-green .ek-alert .ek-alert-title,
body.rektora-green .ek-alert .font-medium { font-weight: 600; }
/* CardComponent: `ek-card` (PRD-257, docs/design-system/TARJETAS.md; Figma «Tarjeta» 367:2405).
   Borde 1 px border/default, radio 12 desde 640 px y 16 por debajo (AC-21), sin sombra; la línea
   del encabezado y del pie en border/subtle (#f0f0f0, un paso más clara que gray-100 de Rektora);
   la que se pulsa: borde fuerte + fondo hover (#f5f5f5) al pasar el puntero, en 150 ms. */
body.rektora-green .ek-card {
  border-color: var(--ek-color-border);
  border-radius: 1rem;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
}
@media (min-width: 640px) {
  body.rektora-green .ek-card { border-radius: var(--ek-radius-lg); }
}
body.rektora-green .ek-card :is(.ek-card-header, .ek-card-footer) { border-color: #f0f0f0; }
body.rektora-green a.ek-card:hover { border-color: var(--ek-color-border-strong); background-color: #f5f5f5; }

/* ── PRD-263 §9 (O-4) — la píldora de alerta del perfil (`ProfileAlertComponent`). Los tonos leen
   los tokens de estado, NUNCA utilidades `*-blue-*`: `_rektora_green_remap.html.erb` volvería verde
   el Aviso en silencio. Medidas de Figma «Píldora de alerta» (556:3123, biblioteca Rektora):
   alto 26, relleno 4 · 10 · 4 · 8, separación 6, icono 14, texto 12/16 semibold; en escritorio el
   texto se corta con «…» a 360 px y el completo va en `title`; bajo 640 px envuelve a 2 líneas
   (marco G). La «Nota personal» va en gris (§9 de PRD-263; Figma la dibuja con borde punteado,
   ver «Diferencias con Figma» en §9 del PRD). ── */
.ek-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px 4px 8px;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  transition: filter 150ms ease;
}
.ek-alert-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
button.ek-alert-pill, a.ek-alert-pill { cursor: pointer; }
button.ek-alert-pill:hover, a.ek-alert-pill:hover { filter: brightness(0.97); }
.ek-alert-pill--aviso {
  background-color: var(--ek-color-status-info-bg);
  color: var(--ek-color-status-info-text);
  border-color: var(--ek-color-status-info-border);
}
.ek-alert-pill--importante {
  background-color: var(--ek-color-status-warning-bg);
  color: var(--ek-color-status-warning-text);
  border-color: var(--ek-color-status-warning-border);
}
.ek-alert-pill--critico {
  background-color: var(--ek-color-status-danger-bg);
  color: var(--ek-color-status-danger-text);
  border-color: var(--ek-color-status-danger-border);
}
.ek-alert-pill--personal {
  background-color: #F3F4F6;
  color: #4B5563;
  border-color: #E5E7EB;
}
/* «+N» (Figma 556:3124): superficie blanca, borde fuerte, texto fuerte. */
.ek-alert-pill--more {
  background-color: var(--ek-color-surface);
  color: var(--ek-color-text-strong);
  border-color: var(--ek-color-border-strong);
  padding: 4px 10px;
}
/* El texto: el marcado lleva `line-clamp-2 break-words` (teléfono, marco G); desde 640 px una
   línea con «…» a 360 px. El selector doble gana a la utilidad, que va en la capa posterior. */
.ek-alert-pill .ek-alert-pill__text { min-width: 0; overflow-wrap: break-word; word-break: normal; }
@media (min-width: 640px) {
  .ek-alert-pill .ek-alert-pill__text {
    display: block;
    max-width: 360px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: none;
  }
  /* En la lista completa del «+N» (marco F) se lee todo: el texto envuelve, sin «…» ni tope. */
  [data-profile-alert-list-item] .ek-alert-pill .ek-alert-pill__text {
    display: block;
    max-width: none;
    overflow: visible;
    white-space: normal;
  }
}

/* ── Keyboard roving-focus row highlight (keyboard.js: j/k · ↑/↓ · Enter).
   Treatment "A": left accent rail + subtle tint + inset ring, driven by the --ek
   accent tokens (blue on Enrankeo, green on Rektora). Applies to every
   [data-kbd-list] table and replaces the old hardcoded focus:outline-blue-*
   utilities. border-collapse-safe: reserved transparent left border for the rail
   (no layout shift) + outline for the ring — no box-shadow. ── */
tr[data-kbd-row] { outline: none; }
tr[data-kbd-row] > td { transition: background-color .12s ease, border-color .12s ease; }
tr[data-kbd-row] > td:first-child { border-left: 3px solid transparent; }
tr[data-kbd-row]:focus > td { background-color: var(--ek-color-accent-subtle); }
tr[data-kbd-row]:focus > td:first-child { border-left-color: var(--ek-color-accent); }
tr[data-kbd-row]:focus {
  outline: 2px solid color-mix(in srgb, var(--ek-color-focus-ring) 32%, transparent);
  outline-offset: -2px;
}
/* PRD-233 E-5 — en Rektora la fila con teclado es fondo #f5f5f5 + anillo neutro, sin la barra
   verde a la izquierda (se confundía con «seleccionada»). */
body.rektora-green tr[data-kbd-row]:focus > td { background-color: #f5f5f5; }
body.rektora-green tr[data-kbd-row]:focus > td:first-child { border-left-color: transparent; }
/* `:focus` repetido sube la especificidad por encima de la regla base de `:focus-visible`
   (el `<tr>` activo lleva tabindex="0"): en una tabla con bordes colapsados el anillo es el
   `outline` hacia dentro, no un `box-shadow`. */
body.rektora-green tr[data-kbd-row]:focus:focus:focus {
  outline: 2px solid var(--ek-color-focus-ring);
  outline-offset: -2px;
  box-shadow: none;
}
/* Design-system docs only: static demo of the focused-row state (no real :focus,
   so it renders under both data-theme previews). Mirrors the rule above. */
tr.ds-kbd-focus-demo > td { background-color: var(--ek-color-accent-subtle); }
tr.ds-kbd-focus-demo > td:first-child { border-left: 3px solid var(--ek-color-accent); }
tr.ds-kbd-focus-demo {
  outline: 2px solid color-mix(in srgb, var(--ek-color-focus-ring) 32%, transparent);
  outline-offset: -2px;
}

@layer base {
  /* Apply Inter font family globally */
  html {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  /* Tighten letter-spacing on headings for a polished look */
  h1 {
    letter-spacing: -0.025em;
  }

  h2 {
    letter-spacing: -0.02em;
  }

  h3, h4 {
    letter-spacing: -0.015em;
  }

  h5, h6 {
    letter-spacing: -0.01em;
  }

  /* Large text sizes also benefit from tighter tracking */
  .text-4xl, .text-5xl, .text-6xl, .text-7xl, .text-8xl, .text-9xl {
    letter-spacing: -0.025em;
  }

  .text-3xl {
    letter-spacing: -0.02em;
  }

  .text-2xl {
    letter-spacing: -0.015em;
  }

  .text-xl {
    letter-spacing: -0.01em;
  }

  /* Small text (labels, badges) - slightly wider for readability */
  .text-xs {
    letter-spacing: 0.01em;
  }
}

@layer components {
  /* Disparador del menú «Más acciones». Antes eran tres puntos gris-400 sueltos (~2.5:1 sobre
     blanco, bajo el 3:1 de WCAG 1.4.11) y en un colegio no los veían.
     .ek-more-btn  — encabezado de ficha: botón secundario con texto «Más» y flecha.
     .ek-more-icon — fila de tabla o tarjeta: tres puntos gris-600 con borde, 36px de área. */
  .ek-more-btn {
    @apply inline-flex items-center justify-center gap-1.5 h-9 px-3 text-sm font-semibold rounded-lg whitespace-nowrap
           bg-white border border-gray-300 text-gray-700 shadow-sm hover:bg-gray-50 hover:border-gray-400
           transition-colors cursor-pointer;
  }
  .ek-more-icon {
    @apply inline-flex items-center justify-center w-9 h-9 shrink-0 rounded-lg
           bg-white border border-gray-300 text-gray-600 hover:text-gray-900 hover:bg-gray-50 hover:border-gray-400
           transition-colors cursor-pointer;
  }
  .ek-more-btn:focus-visible, .ek-more-icon:focus-visible {
    outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ek-color-focus-ring);
  }
  .ek-more-btn[aria-expanded="true"], .ek-more-icon[aria-expanded="true"] { @apply bg-gray-100 border-gray-400; }

  /* Lista reordenable (docs/design-system/LISTA-REORDENABLE.md; módulo app/javascript/reorderable_list.js).
     Clases propias y no utilidades azules sueltas: el remapeo verde de Rektora es una lista blanca
     de selectores compilados (CLAUDE.md), y un `bg-blue-*` dentro de un selector de SortableJS se
     quedaría azul en silencio.
       .ek-reorder-handle      — el asa: botón de 24 px con zona de agarre de 32 px de ancho y todo el alto de la fila.
       .ek-reorder-placeholder — el HUECO donde caerá la fila: misma altura y ancho que la fila, fondo gris y borde punteado,
                                 contenido invisible. La fila no se encoge ni se recoloca: el hueco se ve.
       .ek-reorder-lifted      — la copia que sigue al puntero: misma x y mismo ancho que la lista (el módulo fija la x y
                                 limita el recorrido al contenedor), blanca, elevación del sistema, sin rotar ni escalar.
       .ek-reorder-flash       — destello de «guardado»: aparece al instante y se apaga en 400 ms (tope de CLAUDE.md). */
  .ek-reorder-handle {
    @apply relative inline-flex items-center justify-center w-6 h-6 shrink-0 rounded text-gray-400 cursor-grab
           hover:text-gray-600 transition-colors;
    touch-action: none;
  }
  .ek-reorder-handle::after { content: ""; position: absolute; top: -12px; bottom: -12px; left: -4px; right: -4px; }
  .ek-reorder-handle:active { cursor: grabbing; }
  .ek-reorder-handle:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ek-color-focus-ring); }
  .ek-reorder-handle[aria-pressed="true"] { @apply bg-gray-100 text-gray-700; }
  /* `!important`: la fila lleva `bg-white` y `border-gray-*` como utilidades, que ganan a una clase de componente. */
  .ek-reorder-placeholder {
    background-color: #f3f4f6 !important;
    border-style: dashed !important;
    border-color: #d1d5db !important;
    box-shadow: none;
  }
  .ek-reorder-placeholder > * { visibility: hidden; }
  .ek-reorder-lifted {
    @apply bg-white border-gray-200 rounded-lg cursor-grabbing;
    box-shadow: var(--ek-shadow-float, 0 4px 8px rgba(0, 0, 0, .14));
    opacity: 1 !important;
    margin: 0 !important;
    transform-origin: top left;
  }
  .ek-reorder-lifted [data-reorder-handle] { @apply cursor-grabbing; }
  .ek-reorder[data-reorder-variant="grid"] .ek-reorder-placeholder { opacity: .4; background-color: transparent !important; border-style: solid !important; }
  .ek-reorder[data-reorder-variant="grid"] .ek-reorder-placeholder > * { visibility: visible; }
  .ek-reorder-flash { animation: ek-reorder-flash 400ms ease-out; }
  @keyframes ek-reorder-flash { from { background-color: var(--ek-color-hover, #f5f5f5); } to { background-color: #fff; } }
  .ek-reorder[data-reorder-disabled] [data-reorder-handle],
  .ek-reorder[data-reorder-disabled] [data-reorder-move],
  .ek-reorder[data-reorder-disabled] [data-reorder-menu] { display: none; }
  html.ek-reorder-dragging, html.ek-reorder-dragging * { cursor: grabbing !important; user-select: none; }
  /* En el teléfono no se arrastra (E-9): la fila que ya tiene su ··· pierde el asa y reordena con «Mover»;
     la que no lo tiene deja el asa, que ahí es el botón del menú «Mover». */
  @media (max-width: 640px) {
    .ek-reorder-item [data-reorder-handle]:not([data-reorder-menu-trigger]) { display: none; }
    .ek-reorder-handle { @apply w-11 h-11 text-gray-500; }
  }
  /* El texto del hueco de una sección vacía dice «arrastra» solo donde se arrastra. */
  .ek-reorder-narrow-only { display: none; }
  @media (max-width: 640px) {
    .ek-reorder-wide-only { display: none; }
    .ek-reorder-narrow-only { display: inline; }
  }
  @media (prefers-reduced-motion: reduce) { .ek-reorder-flash { animation: none; } }

  /* PRD-233 US-378 (D-4, D-6, D-14) — la tabla tranquila de Rektora. Solo la llevan vistas
     del dominio Rektora (las rutas viven bajo REKTORA_CONSTRAINT), así que Enrankeo no la ve.
     Cabecera de 13 px en peso normal y sin mayúsculas sobre blanco, fila de 40 px (44 bajo
     1024 px), línea entre filas #f0f0f0 y fondo #f5f5f5 bajo el ratón. Una celda de dos
     líneas lleva el dato principal arriba y su compañero debajo en `.sub` (12 px, gris). */
  .ek-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
  .ek-table thead th {
    height: 40px; padding: 0 12px; background-color: #fff; border-bottom: 1px solid #e0e0e0;
    font-size: 13px; line-height: 16px; font-weight: 400; color: #616161;
    text-align: left; text-transform: none; letter-spacing: normal; white-space: nowrap; vertical-align: middle;
  }
  .ek-table tbody td { height: 40px; padding: 6px 12px; vertical-align: middle; }
  .ek-table tbody tr + tr > td { border-top: 1px solid #f0f0f0; }
  .ek-table tbody tr:hover { background-color: #f5f5f5; }
  .ek-table tfoot td { padding: 8px 12px; border-top: 1px solid #e0e0e0; }
  .ek-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ek-table .sub { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 400; color: #616161; }
  /* Cuentas por cobrar: la línea de los hijos bajo la familia se corta con puntos suspensivos
     (el `title` lleva el texto completo) para que no empuje los tramos de 30/60/90 fuera de
     la pantalla. Más ancha cuanto más sitio hay. */
  .ek-table .ek-hijos { max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (min-width: 1280px) { .ek-table .ek-hijos { max-width: 7rem; } }
  @media (min-width: 1536px) { .ek-table .ek-hijos { max-width: 16rem; } }
  @media (max-width: 1023.98px) {
    .ek-table tbody td { height: 44px; }
  }
  /* Las acciones de la fila se ven al pasar el ratón o con el foco dentro de la fila (también
     la fila con teclado, `tr[data-kbd-row]:focus`), y siempre en una pantalla táctil. Un menú
     abierto desde la fila (`aria-expanded`, o el panel flotante `fixed` ya sin `hidden`) las
     deja puestas aunque el ratón salga de la fila. */
  @media (hover: hover) {
    .ek-table .ek-row-actions { opacity: 0; transition: opacity .15s ease; }
    .ek-table tr:hover .ek-row-actions,
    .ek-table tr:focus .ek-row-actions,
    .ek-table tr:focus-within .ek-row-actions { opacity: 1; }
    /* Aparte: un navegador sin `:has()` descarta la regla entera, y la de arriba no debe caer. */
    .ek-table .ek-row-actions:has([aria-expanded="true"], .fixed:not(.hidden)) { opacity: 1; }
    /* Con ratón, la columna de acciones mide lo que mide el chevron: los botones de texto de
       la fila («Registrar pago», «Enviar») no se ven en reposo, así que no reservan ancho.
       Flotan a la izquierda del chevron al aparecer, con el fondo de la fila debajo. Si
       reservaran su ancho, la tabla automática se lo quitaba a la única columna que puede
       doblarse —la familia—: a 1366 px quedaba en 107 px y la fila de estrés medía 163. En
       táctil (sin esta media) siguen en su sitio, siempre visibles. La celda lleva
       `.ek-acciones` y los botones van en `.ek-row-actions-extra`, antes del chevron. */
    .ek-table td.ek-acciones { background-color: inherit; }
    .ek-table td.ek-acciones .ek-row-actions {
      position: relative; width: max-content; margin-left: auto; background-color: inherit;
    }
    .ek-table .ek-row-actions-extra {
      position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
      display: flex; align-items: center; gap: 4px; padding: 0 4px 0 8px; background-color: inherit;
    }
    /* El borde izquierdo se funde con la fila: lo que queda debajo (el estado) se apaga en
       vez de cortarse a media letra. */
    .ek-table .ek-row-actions-extra::before {
      content: ""; position: absolute; right: 100%; top: 0; bottom: 0; width: 24px; background-color: inherit;
      -webkit-mask-image: linear-gradient(to right, transparent, #000); mask-image: linear-gradient(to right, transparent, #000);
    }
  }
  .ek-table tr.ek-ghost + tr.ek-ghost > td { border-top-style: dashed; }
  /* PRD-271 §9.1 (hueco declarado: Figma solo tiene «Encabezado de sección · Móvil») — el
     subencabezado de grupo DENTRO de una `.ek-table` de escritorio: una fila
     `tr.ek-group-row` con `<th scope="rowgroup" colspan>` (el grado del Directorio y su cupo,
     marco S1). 34 px, fondo #FAFAFA, la línea de arriba un tono más oscura que entre filas, y
     sin el gris del ratón: no navega. `--sub` es el escalón de debajo (la tanda de PRD-151). */
  .ek-table tbody tr.ek-group-row > th,
  .ek-table tbody tr.ek-group-row > td {
    height: 34px; padding: 6px 12px; background-color: #fafafa; border-top: 1px solid #ececec;
    font-size: 13px; line-height: 20px; font-weight: 400; text-align: left; vertical-align: middle;
  }
  .ek-table tbody tr.ek-group-row:first-child > th { border-top: 0; }
  .ek-table tbody tr.ek-group-row:hover { background-color: transparent; }
  .ek-table tbody tr.ek-group-row--sub > td { height: 28px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
  /* D-14 — la tabla responde a SU ancho, no al de la ventana: se compacta igual con el panel
     del módulo abierto, plegado o con otro panel al lado. Bajo 1.000 px de tabla el estado
     baja bajo el balance (se pinta dos veces en el HTML y aquí se muestra uno; el lector de
     pantalla lee solo el visible) y las celdas pasan a 10 px a los lados. La misma pareja,
     con nombre genérico (`.ek-col-compacta` / `.ek-sub-compacta`), para el dato de otra tabla
     que baja bajo su dueño solo cuando no cabe (el contacto de Cobros, bajo la familia). */
  .ek-table-wrap { container-type: inline-size; }
  .ek-table .ek-sub-estado, .ek-table .ek-sub-compacta { display: none; }
  @container (max-width: 999px) {
    .ek-table .ek-col-estado, .ek-table .ek-col-compacta { display: none; }
    .ek-table .ek-sub-estado, .ek-table .ek-sub-compacta { display: block; }
    .ek-table thead th, .ek-table tbody td, .ek-table tfoot td { padding-left: 10px; padding-right: 10px; }
  }
  /* Una tabla de muchas columnas de monto (Cobros: seis tramos de seis cifras) da el primer
     paso de la cascada antes, bajo 1.100 px de tabla: celdas de 10 px a los lados. Ocho
     columnas por 4 px devuelven 32 px a la única que puede doblarse —la familia—, que a
     1366 px se quedaba en 122 px y partía «María Martínez» en dos. Bajar el contacto
     bajo la familia tan pronto costaba una línea más en TODAS las filas. */
  @container (max-width: 1099px) {
    .ek-table.ek-compacta-ancha thead th, .ek-table.ek-compacta-ancha tbody td, .ek-table.ek-compacta-ancha tfoot td {
      padding-left: 10px; padding-right: 10px;
    }
  }
  /* Segundo paso, bajo 1.050 px de tabla: 8 px a los lados. Con una barra de desplazamiento
     que ocupa sitio (Windows, y Chrome en Linux) Cobros mide unos 1.012 px a 1366 y 886 px a
     1024: con 10 px la familia quedaba en 135 px y la tabla se pasaba 15 px de su caja. */
  @container (max-width: 1049px) {
    .ek-table.ek-compacta-ancha thead th, .ek-table.ek-compacta-ancha tbody td, .ek-table.ek-compacta-ancha tfoot td {
      padding-left: 8px; padding-right: 8px;
    }
  }

  /* SelectDropdownComponent styles */
  /* El panel NO hereda el ancho del disparador: con `right-0` un disparador
     angosto (p. ej. el «# de pagos» de una fila de opciones) partia cada opcion
     en dos lineas y cortaba la nota. Crece con su contenido, nunca es mas
     angosto que el disparador, y tiene tope para no invadir la pantalla. */
  .select-dropdown {
    @apply absolute top-full left-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg z-50 max-h-60 overflow-y-auto;
    min-width: 100%;
    width: max-content;
    max-width: min(24rem, 90vw);
  }

  .select-dropdown.hidden {
    display: none !important;
  }

  .select-dropdown-searchable {
    @apply overflow-hidden flex flex-col;
  }

  .select-dropdown-search {
    @apply w-full px-4 py-2.5 text-sm border-0 border-b border-gray-200 outline-none;
    flex-shrink: 0;
  }

  .select-dropdown-search:focus {
    @apply ring-0;
  }

  .select-dropdown-options {
    @apply overflow-y-auto flex-1;
    max-height: 200px;
  }

  .select-dropdown-item {
    @apply w-full px-4 py-2.5 text-sm text-left text-gray-700 cursor-pointer border-none bg-transparent;
    white-space: nowrap;
  }

  .select-dropdown-item:hover {
    @apply bg-gray-100;
  }

  /* Selected option follows the brand accent tokens (blue on Enrankeo, green on
     Rektora) instead of hardcoding blue — PRD-Bible §6.2 mapping rule. */
  .select-dropdown-item.selected,
  .select-dropdown-item[aria-selected="true"] {
    background-color: var(--ek-color-accent-subtle);
    color: var(--ek-color-accent-text);
  }

  .select-dropdown-item.hidden {
    display: none !important;
  }

  /* PRD-121 P0b (D-P9): encabezado de grupo dentro del desplegable («Tus proveedores»,
     «Padrón de la DGII»). Es texto, no una opción. */
  .select-dropdown-group {
    @apply px-4 pt-2 pb-1 text-xs font-semibold text-gray-500 bg-gray-50 border-b border-gray-100;
  }

  /* Badge styles using the new typography system */
  .badge {
    @apply inline-flex items-center justify-center px-2 py-0.5 rounded-full text-label-xs;
  }

  .badge-sm {
    @apply inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-label-2xs;
  }

  .badge-blue {
    @apply bg-blue-50 text-blue-600;
  }

  .badge-green {
    @apply bg-green-50 text-green-600;
  }

  .badge-red {
    @apply bg-red-50 text-red-600;
  }

  .badge-gray {
    @apply bg-gray-100 text-gray-600;
  }

  .badge-amber {
    @apply bg-amber-50 text-amber-600;
  }

  /* Uppercase badge variant */
  .badge-uppercase {
    @apply uppercase tracking-wider-2;
  }

  /* AlignUI Datepicker Styles */
  .flatpickr-calendar {
    @apply bg-white rounded-2xl border border-gray-200 shadow-lg p-4 !important;
    width: 320px !important;
    font-family: inherit !important;
  }

  .flatpickr-calendar.arrowTop:before,
  .flatpickr-calendar.arrowTop:after,
  .flatpickr-calendar.arrowBottom:before,
  .flatpickr-calendar.arrowBottom:after {
    display: none !important;
  }

  .flatpickr-months {
    @apply mb-4 flex items-center;
  }

  .flatpickr-months .flatpickr-month {
    @apply h-auto flex-1 min-w-0 flex items-center justify-center;
  }

  /* Month + year on ONE centered line, vertically aligned with the nav arrows —
     the static/auto-width reset alone lets the year input wrap under the month. */
  .flatpickr-current-month {
    @apply text-gray-900 font-semibold text-base static pt-0 flex items-center justify-center whitespace-nowrap;
    width: auto !important;
    left: 0 !important;
    padding: 0 !important;
  }

  .flatpickr-current-month .cur-month {
    @apply m-0;
  }

  .flatpickr-current-month .flatpickr-monthDropdown-months,
  .flatpickr-current-month input.cur-year {
    @apply font-semibold text-gray-900;
  }

  .flatpickr-current-month input.cur-year {
    width: 4.5ch !important;
    padding: 0 0 0 0.35ch !important;
  }

  .flatpickr-current-month .flatpickr-monthDropdown-months {
    @apply appearance-none bg-transparent border-0 cursor-pointer;
  }

  .flatpickr-current-month .numInputWrapper {
    @apply w-auto;
  }

  .flatpickr-current-month .numInputWrapper span {
    display: none !important;
  }

  .flatpickr-months .flatpickr-prev-month,
  .flatpickr-months .flatpickr-next-month {
    @apply relative top-0 h-8 w-8 flex items-center justify-center rounded-lg border border-gray-200 text-gray-600 hover:bg-gray-50 hover:border-gray-300 transition-colors;
    padding: 0 !important;
    fill: currentColor !important;
  }

  .flatpickr-months .flatpickr-prev-month svg,
  .flatpickr-months .flatpickr-next-month svg {
    @apply w-4 h-4;
    fill: currentColor !important;
  }

  .flatpickr-months .flatpickr-prev-month:hover svg,
  .flatpickr-months .flatpickr-next-month:hover svg {
    fill: currentColor !important;
  }

  .flatpickr-innerContainer {
    @apply block;
  }

  .flatpickr-weekdays {
    @apply mb-2;
  }

  .flatpickr-weekday {
    @apply text-xs font-medium text-gray-400 uppercase tracking-wider;
  }

  .flatpickr-days {
    width: 100% !important;
  }

  .dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .flatpickr-day {
    @apply h-10 w-10 flex items-center justify-center text-sm font-normal text-gray-900 rounded-lg hover:bg-gray-100 transition-colors border-0;
    max-width: none !important;
    line-height: 40px !important;
  }

  .flatpickr-day.today {
    @apply font-semibold text-blue-600 bg-transparent border-0;
  }

  .flatpickr-day.today:hover {
    @apply bg-blue-50;
  }

  .flatpickr-day.selected,
  .flatpickr-day.selected:hover {
    @apply bg-blue-600 text-white font-medium border-0;
  }

  .flatpickr-day.prevMonthDay,
  .flatpickr-day.nextMonthDay {
    @apply text-gray-300;
  }

  .flatpickr-day.flatpickr-disabled,
  .flatpickr-day.flatpickr-disabled:hover {
    @apply text-gray-300 cursor-not-allowed bg-transparent;
  }

  .flatpickr-day.inRange {
    @apply bg-blue-50 text-blue-900 rounded-none border-0 shadow-none;
  }

  .flatpickr-day.startRange,
  .flatpickr-day.endRange {
    @apply bg-blue-600 text-white rounded-lg;
  }

  /* Time picker styles */
  .flatpickr-time {
    @apply border-t border-gray-200 mt-4 pt-4;
  }

  .flatpickr-time .numInputWrapper {
    @apply h-10;
  }

  .flatpickr-time input {
    @apply text-center text-lg font-medium text-gray-900 bg-gray-50 rounded-lg border border-gray-200 focus:outline-none focus:ring-2 focus:ring-[var(--ek-color-focus-ring)] focus:border-transparent;
  }

  .flatpickr-time .flatpickr-time-separator {
    @apply text-gray-400 font-medium text-lg;
  }

  .flatpickr-time .flatpickr-am-pm {
    @apply text-sm font-medium text-gray-600 bg-gray-100 rounded-lg px-3 hover:bg-gray-200 transition-colors;
  }

  .flatpickr-time .numInputWrapper span {
    @apply border-0 bg-transparent;
  }

  .flatpickr-time .numInputWrapper span.arrowUp {
    @apply top-0;
  }

  .flatpickr-time .numInputWrapper span.arrowDown {
    @apply bottom-0;
  }

  /* Time-only picker (TimePickerComponent: noCalendar + enableTime).
     The rules above assume a calendar sits on top; without one the forced 320px
     width and the border-t/mt-4/pt-4 on .flatpickr-time collide with flatpickr's
     40px max-height and render as oversized clipped boxes. */
  .flatpickr-calendar.noCalendar.hasTime {
    width: auto !important;
    padding: 0.5rem !important;
  }

  .flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
    @apply border-t-0 mt-0 pt-0;
    display: flex;
    align-items: center;
    height: 2.5rem;
    max-height: 2.5rem;
  }

  .flatpickr-calendar.noCalendar.hasTime .flatpickr-time .numInputWrapper {
    flex: none;
    width: 3.5rem;
    height: 2.5rem;
  }

  .flatpickr-calendar.noCalendar.hasTime .flatpickr-time input {
    @apply text-sm;
    height: 2.5rem;
  }

  .flatpickr-calendar.noCalendar.hasTime .flatpickr-time .flatpickr-time-separator {
    @apply text-sm;
    flex: none;
    width: 1rem;
    height: 2.5rem;
    line-height: 2.5rem;
  }

  .flatpickr-calendar.noCalendar.hasTime .flatpickr-time .flatpickr-am-pm {
    @apply text-xs;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 2.5rem;
    padding: 0;
    margin-left: 0.5rem;
  }

  /* Confirmation buttons (for approval mode if needed) */
  .flatpickr-confirm {
    @apply flex gap-3 mt-4 pt-4 border-t border-gray-200;
  }

  .flatpickr-confirm button {
    @apply flex-1 py-2 px-4 text-sm font-medium rounded-lg transition-colors;
  }

  .flatpickr-confirm button.flatpickr-cancel {
    @apply bg-white border border-gray-300 text-gray-700 hover:bg-gray-50;
  }

  .flatpickr-confirm button.flatpickr-apply {
    @apply bg-blue-600 text-white hover:bg-blue-700;
  }

  /* Input styling for datepicker trigger */
  input.flatpickr-input {
    @apply cursor-pointer;
  }

  .flatpickr-input.active {
    @apply ring-2 ring-blue-500 border-transparent;
  }

  /* Trix Editor Styling - Match input field appearance */
  trix-editor {
    @apply border-0 px-3 py-2 text-sm text-gray-900;
    min-height: 200px;
  }

  trix-editor:focus {
    @apply outline-none;
  }

  trix-editor.trix-content {
    @apply text-sm;
  }

  trix-editor[placeholder]:empty:not(:focus)::before {
    @apply text-gray-500;
  }

  trix-toolbar {
    @apply border-b border-gray-200 bg-gray-50 rounded-t-md px-2 py-1;
  }

  trix-toolbar .trix-button-row {
    @apply gap-1;
  }

  trix-toolbar .trix-button-group {
    @apply border-0 bg-transparent mb-0 rounded;
  }

  trix-toolbar .trix-button-group:not(:first-child) {
    @apply ml-2;
  }

  trix-toolbar .trix-button {
    @apply border-0 rounded text-gray-600 hover:bg-gray-200 hover:text-gray-900;
  }

  trix-toolbar .trix-button.trix-active {
    @apply bg-blue-100 text-blue-700;
  }
}
/* Rektora mobile app design system — shared by BOTH apps (Padres and Maestros).
   Source of truth: docs/design-system/MOBILE-V2-AMPLIADO.html (the `.pro` phone frames).
   V2 palette + component metrics migrated from V1-CONSOLIDADO (jul 2026).
   Color budget (V2 note 4): green = THE action + active tab + confirmed delivery ·
   amber = pending-on-user · red = only custody/absence/rejection · resolved = gray.
   Button: radius 12, solid green, no pill, no shadow; copy one line, verb-first. */

.parent-app {
  /* V2 `.pro` palette */
  --pa-green: #2D7A4F;
  --pa-green-deep: #1F5C3B;
  --pa-green-soft: #EDF4EF;   /* V2 --tint */
  --pa-tint: #EDF4EF;
  --pa-ink: #141A17;
  --pa-ink2: #3F4945;
  --pa-mut: #79837D;
  --pa-faint: #A9B2AC;
  --pa-hair: #F0F2F0;
  --pa-fill: #F5F7F6;
  --pa-amber: #A5690F;
  --pa-amber-bg: #FBF3E2;     /* V2 --amber-tint */
  --pa-red: #C03D3D;
  --pa-red-bg: #FAEFEF;       /* V2 --red-tint */
  --pa-em: #2D7A4F;           /* confirmed/resolved-good = the brand green (V2) */

  /* Shared app-column width. Phones (< 448px) render edge-to-edge; from tablet up the
     column caps here and centers. The desktop backdrop/frame lands only at ≥1024px. */
  --pa-colw: 448px;

  background: #fff;
  color: var(--pa-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* App column: full width on phones, centered app-width column from tablet up.
   The column caps + centers at every width (never stretches); the tinted backdrop and
   the lifted "app on desktop" frame engage only at ≥1024px. Below that — and inside the
   Hotwire Native shell, which always runs at phone width — the column reads edge-to-edge. */
.pa-shell { max-width: var(--pa-colw); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }

/* Desktop: deliberate premium mobile-app-on-desktop (centered column over a quiet
   brand-tinted neutral backdrop, lifted with a soft green-tinted shadow). */
@media (min-width: 1024px) {
  body.parent-app { background: #E8EEEB; }
  .pa-shell { box-shadow: 0 0 0 1px rgba(20, 26, 23, 0.05), 0 18px 50px -20px rgba(31, 92, 59, 0.22); }
}

/* Top padding folds in the notch inset: with the native nav bar hidden on tab roots
   (path-config nav_bar:hidden) the web page owns the full viewport height. */
.pa-main { flex: 1; padding: calc(14px + env(safe-area-inset-top)) 16px calc(88px + env(safe-area-inset-bottom)); }

/* Large title (R3) — V2 .lt / .lt-t */
.pa-date { font-size: 12px; font-weight: 600; color: var(--pa-mut); text-transform: uppercase; letter-spacing: .04em; }
.pa-lt { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pa-lt h1 { font-size: 27px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; margin: 0; color: var(--pa-ink); }
.pa-lt-sub { font-size: 13px; color: var(--pa-mut); margin-top: 2px; }

/* Round header icon button (V2 .lt-ic — notifications entry, etc.) */
.pa-lt-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--pa-fill); display: flex; align-items: center; justify-content: center; color: var(--pa-ink2); position: relative; flex: none; margin-top: 4px; text-decoration: none; }
.pa-lt-ic svg { width: 17px; height: 17px; }
.pa-lt-ic .dotb { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--pa-red); border: 1.5px solid #fff; }

/* Balanced detail navbar (V2 .navd) — back chevron · centered title · equal spacer */
.pa-navd { display: flex; align-items: center; padding: 2px 0 8px; }
.pa-navd .back, .pa-navd .sp { width: 26px; flex: none; color: var(--pa-ink2); display: flex; align-items: center; }
.pa-navd .navd-t { flex: 1; text-align: center; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--pa-ink); }

/* Native login form (§1.2): grow to fill the column so the inner flex spacer pins the
   CTA to the bottom (thumb zone). Scoped to the native branch only. */
.parent-app .pa-login-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* Filled look for the shared DatePickerComponent trigger inside the parent app (§1.2/§2.2:
   the gray surface IS the field; border only on focus). Scoped under .parent-app so desktop
   uses of the component are untouched. */
.parent-app .date-picker-wrapper input[type="text"] {
  background: var(--pa-fill); border: 1.6px solid transparent; border-radius: 12px;
  padding: 13px 40px 13px 14px; font-size: 15px; color: var(--pa-ink);
}
.parent-app .date-picker-wrapper input[type="text"]:focus { background: #fff; border-color: var(--pa-green); }

/* Section header (R3: sentence case, no uppercase) — V2 .sech */
.pa-sech { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; color: var(--pa-ink); margin: 22px 0 4px; display: flex; align-items: baseline; justify-content: space-between; }
.pa-sech i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--pa-mut); }
.pa-sech a, .pa-sech .pa-sech-link { font-size: 12px; font-weight: 650; color: var(--pa-green-deep); text-decoration: none; }

/* Avatar chips — child switcher (V2 .chipav) */
.pa-chips { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.pa-chipav { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 7px; border-radius: 999px; background: var(--pa-fill); font-size: 13px; font-weight: 600; color: var(--pa-ink2); text-decoration: none; border: 0; }
.pa-chipav .pa-av { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--pa-green-deep); display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 700; }
.pa-chipav.on { background: var(--pa-tint); color: var(--pa-green-deep); }
.pa-chipav.on .pa-av { background: var(--pa-green); color: #fff; }

/* Status sentence — the answer, not an inventory (R5) — V2 .status */
.pa-status { margin: 16px 0 4px; }
.pa-status-t { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; color: var(--pa-ink); display: flex; align-items: center; gap: 8px; }
.pa-status-t .pa-okdot { width: 9px; height: 9px; border-radius: 50%; background: var(--pa-green); flex: none; }
.pa-status-t .pa-okdot.warn { background: var(--pa-amber); }
.pa-status-t .pa-okdot.off { background: var(--pa-faint); }
.pa-status-s { font-size: 13px; color: var(--pa-mut); margin-top: 3px; }

/* The ONE tinted contextual/critical card per screen (R1: fill, no border) — V2 .alertc */
.pa-alertc { display: flex; align-items: center; justify-content: space-between; gap: 11px; background: var(--pa-red-bg); border-radius: 16px; padding: 12px 15px; margin: 12px 0; text-decoration: none; }
.pa-alertc .t { font-size: 13.5px; font-weight: 650; color: var(--pa-ink); }
.pa-alertc .s { font-size: 12px; color: var(--pa-ink2); opacity: 0.75; }
.pa-alertc .go { font-size: 12.5px; font-weight: 700; color: var(--pa-red); white-space: nowrap; margin-left: auto; }
.pa-alertc.amber { background: var(--pa-amber-bg); }
.pa-alertc.amber .go { color: var(--pa-amber); }
.pa-alertc.green { background: var(--pa-tint); }
.pa-alertc.green .t { color: var(--pa-green-deep); }
.pa-alertc.green .s { color: var(--pa-green-deep); }
.pa-alertc.green .go { color: var(--pa-green-deep); }

/* Contextual GREEN action card with round icon (V2 .ctx) */
.pa-ctx { display: flex; align-items: center; gap: 11px; background: var(--pa-tint); border-radius: 16px; padding: 13px 15px; margin: 12px 0; text-decoration: none; }
.pa-ctx .ricx { width: 36px; height: 36px; border-radius: 50%; background: var(--pa-green); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.pa-ctx .ricx svg { width: 17px; height: 17px; }
.pa-ctx .t { font-size: 13.5px; font-weight: 650; color: var(--pa-green-deep); }
.pa-ctx .s { font-size: 12px; color: var(--pa-green-deep); opacity: 0.7; }
.pa-ctx .go { margin-left: auto; color: var(--pa-green-deep); flex: none; }

/* Full-bleed rows with hairline (R2) — V2 .rowp; 36px circular tinted icon */
.pa-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 10px 0; border-bottom: 1px solid var(--pa-hair); text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; text-align: left; }
.pa-row:last-child { border-bottom: 0; }
.pa-ric { width: 36px; height: 36px; border-radius: 50%; background: var(--pa-fill); color: var(--pa-ink2); display: flex; align-items: center; justify-content: center; flex: none; }
.pa-ric svg { width: 17px; height: 17px; }
.pa-ric.red { background: var(--pa-red-bg); color: var(--pa-red); }
.pa-ric.amber { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-ric.green { background: var(--pa-tint); color: var(--pa-green); }
.pa-rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pa-rt { font-size: 13.5px; font-weight: 600; color: var(--pa-ink); line-height: 1.3; }
.pa-rs { font-size: 12px; color: var(--pa-mut); line-height: 1.35; }
.pa-rs.rs1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-rval { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.pa-rval b { display: block; font-size: 14px; font-weight: 700; color: var(--pa-ink); letter-spacing: -.01em; }
.pa-rval .warn { font-size: 11.5px; color: var(--pa-amber); font-weight: 600; }
.pa-rval .mut { font-size: 11.5px; color: var(--pa-mut); }
.pa-rval .good { font-size: 11.5px; color: var(--pa-green); font-weight: 600; }
.pa-rval b.paid { font-weight: 600; color: var(--pa-mut); }
.pa-chev { width: 14px; height: 14px; color: var(--pa-faint); flex: none; }

/* Trailing status text inside a row (V2 .stline) */
.pa-stline { font-size: 12.5px; font-weight: 650; white-space: nowrap; flex: none; }
.pa-stline.g { color: var(--pa-green); }
.pa-stline.a { color: var(--pa-amber); }
.pa-stline.r { color: var(--pa-red); }
.pa-stline.m { color: var(--pa-mut); font-weight: 500; }

/* Key-value rows (line items) — V2 .kvp */
.pa-kvp { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pa-hair); font-size: 13px; color: var(--pa-ink2); text-decoration: none; }
.pa-kvp:last-child { border-bottom: 0; }
.pa-kvp b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pa-ink); white-space: nowrap; }
.pa-kvp.tot { font-weight: 700; color: var(--pa-ink); }

/* Hero numeral (R3: directly on page) — V2 .heroN (money 38px, grade/pct 44px) */
.pa-hero { margin: 18px 0 6px; }
.pa-hero .k { font-size: 12.5px; font-weight: 600; color: var(--pa-mut); }
.pa-hero .v { font-size: 38px; font-weight: 750; letter-spacing: -0.03em; color: var(--pa-ink); font-variant-numeric: tabular-nums; line-height: 1.05; }
.pa-hero .v.ok { color: var(--pa-em); }
.pa-hero .v.big { font-size: 44px; letter-spacing: -0.035em; }
.pa-hero .v small { font-size: 20px; font-weight: 650; color: var(--pa-faint); letter-spacing: -0.01em; }
.pa-hero .d { font-size: 12.5px; color: var(--pa-mut); margin-top: 3px; }
.pa-hero .d b { color: var(--pa-green); font-weight: 650; }
.pa-hero .d .warnb { color: var(--pa-amber); font-weight: 650; }
.pa-hero .d b.up { color: var(--pa-green); font-weight: 650; }
.pa-hero .d b.down { color: var(--pa-amber); font-weight: 650; }

/* Position numerals side-by-side (V2 .pos) */
.pa-pos { display: flex; gap: 24px; padding: 16px 0 0; }
.pa-pos .k { font-size: 12px; color: var(--pa-mut); font-weight: 600; }
.pa-pos .v { font-size: 38px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pa-pos .v small { font-size: 16px; color: var(--pa-faint); font-weight: 650; }

/* Inline stats (attendance) */
.pa-stats { display: flex; gap: 22px; padding: 10px 0 2px; }
.pa-stats > div { text-align: left; }
.pa-stats .n { font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--pa-ink); }
.pa-stats .l { font-size: 11px; color: var(--pa-mut); margin-top: 1px; }

/* Period selector pills */
.pa-pills { display: inline-flex; gap: 2px; background: var(--pa-fill); border-radius: 9px; padding: 2px; }
.pa-pills a { padding: 4px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--pa-mut); text-decoration: none; white-space: nowrap; }
.pa-pills a.on { background: #fff; color: var(--pa-ink); }

/* Buttons — V2 .btnp / .btnsec / .btnq; radius 12, solid, no shadow; copy one line */
.pa-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: none; padding: 11px 14px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 650; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap; text-decoration: none; }
.pa-btn.pri { background: var(--pa-green); color: #fff; }
.pa-btn.pri:active { background: var(--pa-green-deep); }        /* pressed (componentes §3) */
.pa-btn.sec { background: var(--pa-fill); color: var(--pa-ink); }
.pa-btn.quiet { background: none; color: var(--pa-ink2); font-size: 13px; font-weight: 600; }
.pa-btn:disabled { background: #E9EDEA; color: var(--pa-faint); cursor: default; }
.pa-btn svg { width: 16px; height: 16px; color: inherit; }
.pa-btn .bsub { display: block; font-size: 11px; font-weight: 500; opacity: .75; margin-top: 1px; letter-spacing: 0; }

/* Action bar — solid white, no border, pinned above tabbar. Fixed + centered on the
   app column at every width (translateX centering caps at --pa-colw). */
.pa-actionbar { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--pa-colw); bottom: calc(56px + env(safe-area-inset-bottom)); background: #fff; padding: 10px 16px; z-index: 30; display: flex; flex-direction: column; gap: 8px; }

/* Tab bar — same fixed/centered column treatment (V2 .tabbar). */
.pa-tabbar { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--pa-colw); bottom: 0; background: #fff; border-top: 1px solid var(--pa-hair); display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 40; }

/* Desktop: pinned bars carry the same hairline side-frame as the column so the seam is
   invisible where they overlap the shell's shadow. */
@media (min-width: 1024px) {
  .pa-actionbar, .pa-tabbar { box-shadow: 1px 0 0 rgba(20, 26, 23, 0.05), -1px 0 0 rgba(20, 26, 23, 0.05); }
}
.pa-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; font-size: 9.5px; font-weight: 600; color: var(--pa-faint); text-decoration: none; }
.pa-tabbar a svg { width: 22px; height: 22px; }
.pa-tabbar a.on { color: var(--pa-green-deep); }

/* System notices (RBAC / config) — tinted, no border (R1) */
.pa-note { background: var(--pa-fill); border-radius: 12px; padding: 11px 13px; margin: 10px 0; font-size: 12.5px; color: var(--pa-ink2); }
.pa-note b { color: var(--pa-ink); }
.pa-note.warn { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-note.warn b { color: var(--pa-amber); }
/* Plain informational note — gray text, no fill (V2 .note; "info, not action") */
.pa-note.plain { background: none; padding: 8px 0; color: var(--pa-mut); line-height: 1.5; }

/* Full-width tinted banner (V2 .banner) — amber = pending, red = problem, green = good */
.pa-banner { border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; font-size: 12.5px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.pa-banner.amber { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-banner.red { background: var(--pa-red-bg); color: var(--pa-red); }
.pa-banner.green { background: var(--pa-tint); color: var(--pa-green-deep); }
.pa-banner svg { width: 16px; height: 16px; flex: none; }

/* Fill card — quiet tinted block for a single message (V2 .fillcard) */
.pa-fillcard { background: var(--pa-fill); border-radius: 16px; padding: 13px 15px; margin: 12px 0 0; }
.pa-fillcard.tint { background: var(--pa-tint); }
.pa-fillcard.red { background: var(--pa-red-bg); }
.pa-fillcard .fc-t { font-size: 13px; font-weight: 650; color: var(--pa-ink); }
.pa-fillcard.red .fc-t { color: var(--pa-red); }
.pa-fillcard .fc-s { font-size: 12px; color: var(--pa-ink2); margin-top: 4px; line-height: 1.45; }

/* Flash (layout-owned) */
.pa-flash-overlay { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.pa-flash-overlay .pa-flash { margin: 0; pointer-events: auto; box-shadow: 0 8px 24px rgba(20,26,23,.16); transition: opacity .3s; }
.pa-flash { border-radius: 12px; padding: 11px 13px; margin: 0 0 12px; font-size: 12.5px; font-weight: 600; }
.pa-flash.notice { background: var(--pa-tint); color: var(--pa-green-deep); }
.pa-flash.alert { background: var(--pa-red-bg); color: var(--pa-red); }

/* Filled inputs (§1.2 login — the gray surface IS the field; border only on focus/error) */
.pa-inpl { display: block; font-size: 12.5px; font-weight: 650; color: var(--pa-ink); margin: 14px 0 5px; }
.pa-inp { display: block; width: 100%; background: var(--pa-fill); border: 1.6px solid transparent; border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 15px; color: var(--pa-ink); -webkit-appearance: none; }
.pa-inp::placeholder { color: var(--pa-faint); }
.pa-inp:focus { outline: none; border-color: var(--pa-green); background: #fff; }

/* Teacher app (§6.0/6.1) — attendance roster + timeline */
.pa-cnt { display: flex; gap: 14px; font-size: 12px; color: var(--pa-ink2); margin: 12px 0 0; flex-wrap: wrap; }
.pa-cnt i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.pa-cnt .b { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pa-avp { width: 36px; height: 36px; border-radius: 50%; background: var(--pa-fill); color: var(--pa-ink2); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; }
.pa-avp.t { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-avp.a { background: var(--pa-red-bg); color: var(--pa-red); }
/* P/T/A chip: present = silent ghost (default-present model); color = exception only */
.pa-stchip { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 750; flex: none; background: none; color: var(--pa-faint); }
.pa-stchip.t { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-stchip.a { background: var(--pa-red-bg); color: var(--pa-red); }
.pa-datel { width: 46px; flex: none; display: flex; flex-direction: column; }
.pa-datel b { font-size: 16px; font-weight: 750; color: var(--pa-ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1; }
.pa-datel span { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pa-mut); }

/* Sparkline (§2.0b) — 4 bars tell the year's story */
.pa-spark { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 18px; }
.pa-spark i { width: 4px; border-radius: 2px; background: #DCE3DF; display: block; }
.pa-spark i.hi { background: var(--pa-green); }
.pa-spark i.lo { background: var(--pa-red); }

/* Grade numeral in a row (§2.0b) */
.pa-gnum { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; min-width: 30px; text-align: right; flex: none; color: var(--pa-ink); }
.pa-gnum.warn { color: var(--pa-amber); }
.pa-gnum.bad { color: var(--pa-red); }

/* Attendance dot calendar (§2.0c) — the month is SEEN */
.pa-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; padding: 12px 0 2px; }
.pa-dots .dot { aspect-ratio: 1; border-radius: 7px; background: var(--pa-tint); display: flex; align-items: center; justify-content: center; font-size: 8.5px; font-weight: 700; color: var(--pa-green-deep); }
.pa-dots .dot.off { background: var(--pa-fill); color: var(--pa-faint); }
.pa-dots .dot.tar { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-dots .dot.aus { background: var(--pa-red-bg); color: var(--pa-red); }
.pa-legend { display: flex; gap: 14px; padding: 10px 0 0; font-size: 11.5px; color: var(--pa-mut); }
.pa-legend i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }
.pa-legend .b { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

/* Text action inside a row (§2.0c «Justificar») */
.pa-txtbtn { font-size: 12.5px; font-weight: 700; white-space: nowrap; text-decoration: none; flex: none; }
.pa-txtbtn.red { color: var(--pa-red); }

/* Empty state (ghost continuity) */
.pa-empty { text-align: center; padding: 26px 10px; }
.pa-empty .t { font-size: 14px; font-weight: 700; color: var(--pa-ink); }
.pa-empty .s { font-size: 12.5px; color: var(--pa-mut); margin-top: 3px; }
.pa-ghost { display: flex; gap: 9px; align-items: center; border: 1px dashed var(--pa-hair); border-radius: 11px; padding: 11px 12px; margin-bottom: 12px; }
.pa-ghost i { height: 10px; border-radius: 5px; background: var(--pa-fill); display: block; }

/* Full-screen system state — healthy empty / offline / error (V2 §10.2/10.3/10.5) */
.pa-statex { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 26px; }
.pa-state-ic { width: 54px; height: 54px; border-radius: 18px; background: var(--pa-fill); color: var(--pa-ink2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pa-state-ic svg { width: 25px; height: 25px; }
.pa-state-ic.green { background: var(--pa-tint); color: var(--pa-green); }
.pa-state-ic.amber { background: var(--pa-amber-bg); color: var(--pa-amber); }
.pa-state-t { font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: var(--pa-ink); }
.pa-state-s { font-size: 13px; color: var(--pa-mut); max-width: 250px; margin-top: 7px; }
.pa-state-a { margin-top: 18px; min-width: 158px; width: auto; padding-left: 20px; padding-right: 20px; }

/* Milestone page — the once-a-month relief moment (V2 .mile) */
.pa-mile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 30px 22px; }
.pa-mile .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--pa-tint); color: var(--pa-green); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pa-mile .ok svg { width: 30px; height: 30px; }
.pa-mile h5 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.2; color: var(--pa-ink); }
.pa-mile p { font-size: 13px; color: var(--pa-mut); margin: 0; }
.pa-mile p b { color: var(--pa-ink); }

/* Process stepper (V2 .steps) — pagar ② → ③ → ④ */
.pa-steps { display: flex; align-items: flex-start; padding: 8px 0 12px; }
.pa-step { flex: none; width: 78px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--pa-mut); }
.pa-step .sdot { width: 10px; height: 10px; border-radius: 50%; background: #E2E6E3; margin: 0 auto 5px; }
.pa-step.done { color: var(--pa-green-deep); }
.pa-step.done .sdot { background: var(--pa-green); }
.pa-step.now { color: var(--pa-green-deep); }
.pa-step.now .sdot { background: var(--pa-green); box-shadow: 0 0 0 4px var(--pa-tint); }
.pa-sline { flex: 1; height: 2px; background: #E2E6E3; margin-top: 4px; }
.pa-sline.done { background: var(--pa-green); }

/* Profile hero + settings rows + group spacers (V2 §10.6) */
.pa-profilehero { display: flex; align-items: center; gap: 13px; padding: 16px 0 12px; }
.pa-profilehero .bigav { width: 54px; height: 54px; border-radius: 50%; background: var(--pa-tint); color: var(--pa-green-deep); display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 16px; flex: none; }
.pa-profilehero .name { font-size: 19px; font-weight: 750; letter-spacing: -.02em; color: var(--pa-ink); }
.pa-profilehero .meta2 { font-size: 12.5px; color: var(--pa-mut); }
.pa-groupspace { height: 9px; background: var(--pa-fill); margin: 12px -16px; }
.pa-settingrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 0; border-bottom: 1px solid var(--pa-hair); text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; text-align: left; }
.pa-settingrow:last-child { border-bottom: 0; }
.pa-settingrow .label { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--pa-ink); }
.pa-settingrow .value { font-size: 12px; color: var(--pa-mut); }
.pa-switchx { width: 38px; height: 22px; border-radius: 999px; background: var(--pa-green); padding: 2px; display: flex; justify-content: flex-end; flex: none; }
.pa-switchx i { width: 18px; height: 18px; border-radius: 50%; background: #fff; display: block; }

/* Adjuntar archivo — patrón moderno (tarjeta tocable, no el input nativo).
   Reusable: envolver un input[type=file] oculto en <label class="pa-file"> con
   .pa-file-empty (estado vacío) y .pa-file-picked (seleccionado, oculto hasta elegir). */
.pa-file { display: block; cursor: pointer; }
.pa-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pa-file-empty { display: flex; align-items: center; gap: 11px; border: 1.6px dashed #D5DBD7; border-radius: 12px; padding: 14px; background: #FAFBFA; }
.pa-file-empty:active { background: #F1F5F3; }
.pa-file-empty svg { width: 22px; height: 22px; color: var(--pa-green-deep); flex: none; }
.pa-file-empty .t { font-size: 14px; font-weight: 600; color: var(--pa-ink); }
.pa-file-empty .s { font-size: 12px; color: var(--pa-mut); margin-top: 1px; }
.pa-file-picked { display: none; align-items: center; gap: 11px; border-radius: 12px; padding: 13px 14px; background: var(--pa-tint); }
.pa-file-picked svg { width: 20px; height: 20px; color: var(--pa-green-deep); flex: none; }
.pa-file-picked .fn { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--pa-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-file-picked .fs { font-size: 12px; color: var(--pa-mut); flex: none; }
.pa-file-picked .fx { flex: none; background: none; border: 0; padding: 4px; color: var(--pa-mut); cursor: pointer; font-size: 16px; line-height: 1; }
.pa-file.has-file .pa-file-empty { display: none; }
.pa-file.has-file .pa-file-picked { display: flex; }
/* Rechazo del archivo (PRD-134 marcos E1/E2) — rojo porque es un rechazo, el único
   uso que el presupuesto de color le concede. La tarjeta dice QUÉ archivo falló y
   qué se acepta; el pie de abajo dice la salida. */
.pa-file.has-error .pa-file-empty { border-color: #E3C4C4; border-style: solid; background: var(--pa-red-bg); }
.pa-file.has-error .pa-file-empty svg,
.pa-file.has-error .pa-file-empty .t,
.pa-file.has-error .pa-file-empty .s { color: var(--pa-red); }
/* La regla se enseña en gris ANTES del error y se vuelve la salida en rojo después:
   un renglón, no dos que compiten. */
.pa-filehint { font-size: 12px; color: var(--pa-mut); margin: 6px 0 0; }
.pa-filehint.bad { color: var(--pa-red); }

/* ── Bottom sheet family (consolidado §2.2/§6.2 — scrim + grab; ONE sheet system for both apps) ── */
.pa-scrim { position: fixed; inset: 0; background: rgba(17, 26, 21, 0.42); display: flex; flex-direction: column; justify-content: flex-end; z-index: 60; }
.pa-scrim.hidden { display: none; }
.pa-sheet { background: #fff; border-radius: 20px 20px 0 0; padding: 2px 20px calc(18px + env(safe-area-inset-bottom)); max-width: var(--pa-colw); width: 100%; margin: 0 auto; max-height: 86vh; overflow-y: auto; }
.pa-grab { width: 36px; height: 4px; border-radius: 2px; background: #E2E6E3; margin: 8px auto 12px; }
.pa-sheett { font-size: 17px; font-weight: 750; letter-spacing: -0.015em; color: var(--pa-ink); }
.pa-sheets { font-size: 12.5px; color: var(--pa-mut); margin-top: 2px; }

/* Selection chips (§6.2 — the selector is a CONTROL: one control color, semantics live in the roster) */
.pa-rchips { display: flex; flex-wrap: wrap; gap: 7px; }
.pa-rchip { display: inline-flex; padding: 7px 13px; border-radius: 999px; background: var(--pa-fill); font-size: 12.5px; font-weight: 600; color: var(--pa-ink2); border: 0; font-family: inherit; cursor: pointer; }
.pa-rchip.on { background: var(--pa-green); color: #fff; }

/* Dot-calendar month grid (§6.3 — dot = day with records) */
.pa-cal { margin-top: 10px; }
.pa-calh { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 650; color: var(--pa-ink); padding: 2px 4px 10px; }
.pa-calh button { background: none; border: 0; padding: 6px 10px; color: var(--pa-ink2); font-size: 16px; cursor: pointer; }
.pa-calg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.pa-calg .dow { font-size: 11px; font-weight: 600; color: var(--pa-faint); padding: 4px 0; }
.pa-cald { position: relative; border: 0; background: none; font-family: inherit; font-size: 13px; color: var(--pa-ink); padding: 9px 0 13px; border-radius: 10px; cursor: pointer; }
.pa-cald:disabled { color: var(--pa-faint); cursor: default; }
.pa-cald.sel { background: var(--pa-green); color: #fff; font-weight: 650; }
.pa-cald .dot { position: absolute; left: 50%; transform: translateX(-50%); bottom: 4px; width: 4px; height: 4px; border-radius: 2px; background: var(--pa-green); }
.pa-cald.sel .dot { background: #fff; }

/* Maestros §6.4-6.7 */

/* §6.4 — editable numeric grade cell (tabular, right-aligned, borderless). */
.pa-grade-input { width: 46px; flex: none; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 750; letter-spacing: -0.01em; color: var(--pa-ink); border: 0; background: none; font-family: inherit; padding: 4px 2px; border-radius: 6px; }
.pa-grade-input::placeholder { color: var(--pa-faint); font-weight: 600; }
.pa-grade-input:focus { outline: none; background: var(--pa-fill); }
.pa-grade-input.bad { color: var(--pa-red); }
.pa-grade-input.err { color: var(--pa-red); box-shadow: inset 0 -2px 0 var(--pa-red); border-radius: 4px 4px 0 0; }

/* §6.7 — mediated thread separator: quiet centered line, never a tinted card. */
.pa-threadnote { text-align: center; font-size: 11.5px; color: var(--pa-mut); padding: 4px 26px 16px; line-height: 1.4; }

/* Chat bubbles, borderless/filled (V2 §4.2 / §6.7 — one system for both apps). */
.pa-daysep { align-self: center; font-size: 10.5px; font-weight: 600; color: var(--pa-mut); background: var(--pa-fill); border-radius: 999px; padding: 3px 10px; margin: 8px 0; }
.pa-chatcol { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.pa-bub { max-width: 78%; padding: 9px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.42; }
.pa-bub .tm { display: block; font-size: 9.5px; margin-top: 3px; opacity: 0.6; text-align: right; }
.pa-bub.them { align-self: flex-start; background: var(--pa-fill); color: var(--pa-ink); border-bottom-left-radius: 4px; }
.pa-bub.me { align-self: flex-end; background: var(--pa-green); color: #fff; border-bottom-right-radius: 4px; }
.pa-bub.me .tm { color: rgba(255, 255, 255, 0.75); }

/* §6.6/6.7 — composer: filled input + round send button, pinned in the actionbar. */
.pa-composer { display: flex; align-items: center; gap: 8px; }
.pa-composer .pa-inp { flex: 1; margin: 0; border-radius: 999px; padding: 11px 14px; font-size: 13.5px; }
.pa-composer button { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pa-green); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pa-composer button svg { width: 18px; height: 18px; }
.pa-composer button:disabled { opacity: 0.5; }
/*
 * 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.
 *


 */

/* Global form select styling */
select {
  background-color: #ffffff;
}

select option {
  background-color: #ffffff;
  color: #111827;
}

 .search-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  font-size: 16px;
  color: #333;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" stroke="%23663126" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6-6 6 6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px; 
}

.search-select option {
  background-color: white;
  color: #333;
  padding: 10px;
  display: flex;
  align-items: center;
}

.search-select option img {
  border-radius: 50%;
  margin-right: 10px;
}

.search-select option.selected {
  font-weight: bold;
  color: #4A5568; /* Tailwind's gray-700 */
}

.search-select option.selected::after {
  /* content: '✔'; */
  color: #6366F1; /* Tailwind's indigo-500 */
  margin-left: auto;
}
