/* =====================================================================================================
   Gestão (/<menu>/admin), consola (/console) and parceiro (/parceiro): one design system for the three.
   Loaded after styles.css on those pages only, so the guest menu and the landing page are untouched.
   Everything is scoped to #admin / #console (the admin preview of the guest menu, #preview, sits outside).

   Warm paper tones for the chrome (espresso in dark mode), the brand serif for titles and big numbers, hairlines
   instead of shadows; one accent: the menu's own colour in gestão, the brand orange elsewhere.
   ===================================================================================================== */
@import url("/assets/fonts/fonts.css");
:is(#admin, #console) {
  --ui-bg: #ebe5dc;
  --ui-side: #ebe5dc;
  --ui-panel: #fbf8f3;
  --ui-sunken: #f2ede5;
  --ui-hover: #ece6dc;
  --ui-ink: #1f1c19;
  --ui-ink-2: #5b554e;
  --ui-ink-3: #857d72;
  --ui-line: #e2dace;
  --ui-line-2: #d3c9bb;
  --ui-serif: "Sorts Mill Goudy", "Goudy Old Style", Garamond, Georgia, serif;
  --ui-accent: var(--orange);
  --ui-accent-ink: var(--orange-ink);
  --ui-accent-soft: color-mix(in srgb, var(--ui-accent) 9%, var(--ui-panel));
  --ui-accent-line: color-mix(in srgb, var(--ui-accent) 28%, var(--ui-line));
  --ui-ring: color-mix(in srgb, var(--ui-accent) 26%, transparent);
  --ui-shadow-sm: 0 1px 1px rgba(60, 40, 20, 0.03);
  --ui-shadow: 0 1px 2px rgba(60, 40, 20, 0.04), 0 12px 28px -16px rgba(60, 40, 20, 0.16);
  --ui-shadow-lg: 0 2px 4px rgba(60, 40, 20, 0.04), 0 24px 48px -18px rgba(60, 40, 20, 0.26);
  --ui-r: 14px;
  --ui-r-sm: 9px;
  --ui-side-w: 260px;

  /* the older names the rest of the stylesheet uses, mapped onto the palette above */
  --bg: var(--ui-bg);
  --page: var(--ui-panel);
  --surface: var(--ui-panel);
  --surface-2: var(--ui-sunken);
  --ink: var(--ui-ink);
  --ink-soft: var(--ui-ink-2);
  --ink-faint: var(--ui-ink-3);
  --line: var(--ui-line);
  --line-2: var(--ui-line-2);
  --field: var(--ui-panel);
  --field-line: var(--ui-line-2);
  --orange-soft: var(--ui-accent-soft);
  --shadow: var(--ui-shadow);
  --admin-bg: var(--ui-bg);

  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font-feature-settings: "cv11", "ss01";
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(#admin, #console) {
    --ui-bg: #121110;
    --ui-side: #121110;
    --ui-panel: #1a1917;
    --ui-sunken: #201e1b;
    --ui-hover: #262320;
    --ui-ink: #f3efe8;
    --ui-ink-2: #bdb5a9;
    --ui-ink-3: #867e73;
    --ui-line: rgba(255, 236, 210, 0.075);
    --ui-line-2: rgba(255, 236, 210, 0.14);
    --ui-ring: color-mix(in srgb, var(--ui-accent) 38%, transparent);
    --ui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ui-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 20px -8px rgba(0, 0, 0, 0.6);
    --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 44px -12px rgba(0, 0, 0, 0.8);
    --field: #161513;
  }
  :root:not([data-theme="light"]) body.is-admin {
    background: #121110;
  }
}
:root[data-theme="dark"] :is(#admin, #console) {
  --ui-bg: #121110;
  --ui-side: #121110;
  --ui-panel: #1a1917;
  --ui-sunken: #201e1b;
  --ui-hover: #262320;
  --ui-ink: #f3efe8;
  --ui-ink-2: #bdb5a9;
  --ui-ink-3: #867e73;
  --ui-line: rgba(255, 236, 210, 0.075);
  --ui-line-2: rgba(255, 236, 210, 0.14);
  --ui-ring: color-mix(in srgb, var(--ui-accent) 38%, transparent);
  --ui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ui-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 20px -8px rgba(0, 0, 0, 0.6);
  --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 44px -12px rgba(0, 0, 0, 0.8);
  --field: #161513;
}
body.is-admin {
  background: #ebe5dc;
}
:root[data-theme="dark"] body.is-admin {
  background: #121110;
}
/* consola and parceiro: the Menu na Mesa orange, a shade deeper so white text reads on it */
.is-console :is(#admin, #console) {
  --ui-accent: #c2571f;
  --ui-accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root.is-console:not([data-theme="light"]) #console {
    --ui-accent: #ee8a4c;
    --ui-accent-ink: #1a0f08;
  }
}
:root.is-console[data-theme="dark"] #console {
  --ui-accent: #ee8a4c;
  --ui-accent-ink: #1a0f08;
}
:is(#admin, #console) ::selection {
  background: var(--ui-ring);
}
:is(#admin, #console) :focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

/* ---------- type ---------- */
:is(#admin, #console) .hint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ui-ink-3);
}
:is(#admin, #console) .legend,
:is(#admin, #console) .fld label,
:is(#admin, #console) .sub-form .fld > span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ui-ink-2);
}

/* ---------- buttons ---------- */
:is(#admin, #console) .btn {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--ui-r-sm);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: -0.005em;
  transition:
    background-color 0.12s,
    border-color 0.12s,
    box-shadow 0.12s,
    filter 0.12s;
}
:is(#admin, #console) .btn-sm {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.8rem;
}
:is(#admin, #console) .btn-primary {
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  border-color: transparent;
  box-shadow:
    0 1px 2px rgba(16, 16, 20, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
:is(#admin, #console) .btn-primary:not(:disabled):hover {
  filter: brightness(0.93);
}
:is(#admin, #console) .btn-primary:disabled {
  opacity: 0.4;
  box-shadow: none;
}
:is(#admin, #console) :is(.btn-line, .btn-quiet) {
  background: var(--ui-panel);
  color: var(--ui-ink);
  border-color: var(--ui-line-2);
  box-shadow: var(--ui-shadow-sm);
}
:is(#admin, #console) :is(.btn-line, .btn-quiet):not(:disabled):hover {
  background: var(--ui-hover);
}
:is(#admin, #console) .btn-danger {
  background: var(--warn);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 16, 20, 0.12);
}
:is(#admin, #console) .btn:disabled {
  cursor: not-allowed;
}
:is(#admin, #console) .icon-btn {
  border-radius: var(--ui-r-sm);
  border-color: var(--ui-line-2);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow-sm);
}
:is(#admin, #console) .icon-btn:not(:disabled):hover {
  background: var(--ui-hover);
  color: var(--ui-ink);
}
:is(#admin, #console) .toggle {
  border-color: var(--ui-line-2);
  background: var(--ui-panel);
  color: var(--ui-ink-2);
  font-weight: 600;
  padding: 5px 12px;
}
:is(#admin, #console) .toggle:not(:disabled):hover {
  background: var(--ui-hover);
}
:is(#admin, #console) .toggle[aria-pressed="true"],
:is(#admin, #console) .toggle[aria-pressed="true"]:not(:disabled):hover {
  background: var(--ui-ink);
  border-color: var(--ui-ink);
  color: var(--ui-panel);
}
:is(#admin, #console) .linkish,
:is(#admin, #console) .list-more {
  color: var(--ui-accent);
  font-weight: 600;
}

/* ---------- fields ---------- */
:is(#admin, #console) :is(.fld input:not([type=checkbox]):not([type=radio]), .fld textarea, .fld select, .inline-form input:not([type=checkbox]):not([type=radio]), .sub-form input:not([type=checkbox]):not([type=radio]), .sub-form select, .pay-form input:not([type=checkbox]):not([type=radio]), .pay-form select, .login-form input:not([type=checkbox]):not([type=radio])) {
  min-height: 38px;
  background-color: var(--field);
  border: 1px solid var(--ui-line-2);
  border-radius: var(--ui-r-sm);
  padding: 8px 11px;
  font-size: 0.92rem;
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-sm);
  outline: none;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
:is(#admin, #console) :is(.fld input:not([type=checkbox]):not([type=radio]), .fld textarea, .fld select, .inline-form input:not([type=checkbox]):not([type=radio]), .sub-form input:not([type=checkbox]):not([type=radio]), .sub-form select, .pay-form input:not([type=checkbox]):not([type=radio]), .pay-form select, .login-form input:not([type=checkbox]):not([type=radio])):hover {
  border-color: color-mix(in srgb, var(--ui-ink) 22%, var(--ui-line-2));
}
:is(#admin, #console) :is(.fld input:not([type=checkbox]):not([type=radio]), .fld textarea, .fld select, .inline-form input:not([type=checkbox]):not([type=radio]), .sub-form input:not([type=checkbox]):not([type=radio]), .sub-form select, .pay-form input:not([type=checkbox]):not([type=radio]), .pay-form select, .login-form input:not([type=checkbox]):not([type=radio])):focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-ring);
}
:is(#admin, #console) .fld textarea {
  line-height: 1.5;
}
:is(#admin, #console) .fld input.bad {
  border-color: var(--warn);
}
:is(#admin, #console) .fld input[type="checkbox"],
:is(#admin, #console) .fld input[type="radio"],
:is(#admin, #console) .fld input[type="color"],
:is(#admin, #console) .fld input[type="file"] {
  min-height: 0;
  box-shadow: none;
}
:is(#admin, #console) input[type="checkbox"],
:is(#admin, #console) input[type="radio"] {
  accent-color: var(--ui-accent);
}
:is(#admin, #console) .switch input:checked {
  background: #2f9e55;
}
:is(#admin, #console) .switch input:not(:checked) {
  background: var(--ui-line-2);
}
:is(#admin, #console) .switch .off {
  color: var(--ui-ink-3);
}

/* ---------- surfaces: cards, notes, tags ---------- */
:is(#admin, #console) .card {
  background: var(--ui-panel);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  box-shadow: var(--ui-shadow-sm);
}
:is(#admin, #console) .mgr-cat {
  padding: 20px 22px;
  gap: 14px;
}
:is(#admin, #console) .mgr-cat > h3:first-child,
:is(#admin, #console) .mgr-cat > .mgr-cat-top:first-child {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ui-line);
}
:is(#admin, #console) :is(.mgr-cat h3, .start-top h3) {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
:is(#admin, #console) .mgr-empty {
  padding: 36px 24px;
  color: var(--ui-ink-3);
  font-size: 0.9rem;
}
:is(#admin, #console) .mgr-note {
  padding: 12px 16px 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  background: var(--ui-panel);
  box-shadow:
    inset 3px 0 0 var(--ui-accent),
    var(--ui-shadow-sm);
  color: var(--ui-ink-2);
  font-size: 0.86rem;
  line-height: 1.5;
}
:is(#admin, #console) .mgr-note.warn {
  box-shadow:
    inset 3px 0 0 var(--warn),
    var(--ui-shadow-sm);
  border-color: color-mix(in srgb, var(--warn) 30%, var(--ui-line));
  background: color-mix(in srgb, var(--warn) 7%, var(--ui-panel));
  color: color-mix(in srgb, var(--warn) 80%, var(--ui-ink));
}
:is(#admin, #console) .tag {
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  letter-spacing: 0;
}
:is(#admin, #console) .st {
  font-weight: 600;
  font-size: 0.72rem;
  padding: 2px 8px 2px 7px;
}
:is(#admin, #console) .tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
:is(#admin, #console) .meter {
  height: 6px;
  background: var(--ui-sunken);
}
:is(#admin, #console) .meter i {
  background: var(--ui-accent);
}

/* ---------- the bar: top bar on phones, sidebar on computers ---------- */
.is-admin .mgr-bar {
  background: color-mix(in srgb, var(--ui-panel) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--ui-line);
  color: var(--ui-ink);
}
.is-admin .mgr-bar-in {
  padding: 12px 16px 10px;
}
.is-admin .mgr-title {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.is-admin .mgr-ava {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.is-console .mgr-ava {
  background: #17171a;
}
.is-admin .mgr-status,
.mgr-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ui-ink-3);
}
.is-admin .mgr-status.dirty {
  color: var(--ui-accent);
  font-weight: 600;
}
.is-admin .mgr-tabs {
  gap: 4px;
  padding: 0 12px 10px;
}
.is-admin .mgr-tab {
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--ui-ink-2);
  font-weight: 550;
  font-size: 0.85rem;
  border: 1px solid transparent;
}
.is-admin .mgr-tab .ico {
  width: 16px;
  height: 16px;
  opacity: 1;
  color: var(--ui-ink-3);
}
.is-admin .mgr-tab:hover {
  background: var(--ui-hover);
  color: var(--ui-ink);
}
.is-admin .mgr-tab[aria-selected="true"] {
  background: var(--ui-ink);
  color: var(--ui-panel);
  font-weight: 600;
}
.is-admin .mgr-tab[aria-selected="true"] .ico {
  color: inherit;
}
.mgr-group {
  display: none;
}
.is-admin .mgr-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.is-admin .mgr-tools .mgr-tab {
  color: var(--ui-ink-3);
}
@media (min-width: 1000px) {
  #admin:has(> .mgr-bar),
  #console:has(> .mgr-bar) {
    padding-left: var(--ui-side-w);
  }
  .is-admin .mgr-bar {
    width: var(--ui-side-w);
    background: var(--ui-side);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-right: 1px solid var(--ui-line);
  }
  .is-admin .mgr-bar-in {
    gap: 14px;
    padding: 18px 16px 16px;
    border-bottom: 0;
  }
  .is-admin .mgr-title {
    padding: 2px 2px 0;
  }
  .is-admin .mgr-acts {
    gap: 6px;
  }
  .is-admin .mgr-tabs {
    gap: 1px;
    padding: 4px 12px 12px;
  }
  .is-admin .mgr-tabs > .mgr-tab {
    padding: 7px 10px;
    border-radius: var(--ui-r-sm);
    font-size: 0.86rem;
    font-weight: 500;
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-panel);
    color: var(--ui-ink);
    font-weight: 600;
    border-color: var(--ui-line);
    box-shadow: var(--ui-shadow-sm);
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] .ico {
    color: var(--ui-accent);
  }
  .is-admin .mgr-tabs .tab-badge {
    margin-left: auto;
  }
  .mgr-group {
    display: block;
    padding: 16px 10px 6px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-ink-3);
  }
  .is-admin .mgr-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: auto -12px -12px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--ui-line);
  }
  .is-admin .mgr-tools .mgr-tab {
    padding: 6px 9px;
    border-radius: var(--ui-r-sm);
    font-size: 0.82rem;
  }
}

/* ---------- the page ---------- */
:is(#admin, #console) .mgr-main {
  max-width: 1120px;
  gap: 16px;
}
@media (min-width: 720px) {
  :is(#admin, #console) .mgr-main {
    padding: 32px 32px 80px;
    gap: 18px;
  }
  :is(#admin, #console) .mgr-notes + .mgr-main {
    padding-top: 18px;
  }
}
:is(#admin, #console) .mgr-main.mgr-notes {
  padding-bottom: 0;
}
@media (min-width: 1200px) {
  :is(#admin, #console) .mgr-main {
    padding-left: 48px;
    padding-right: 48px;
  }
}
:is(#admin, #console) .mgr-head {
  min-height: 40px;
}
:is(#admin, #console) .mgr-head h2 {
  gap: 12px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
:is(#admin, #console) .mgr-h-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ui-accent-soft);
  border: 1px solid var(--ui-accent-line);
  color: var(--ui-accent);
}
:is(#admin, #console) .mgr-h-ico .ico {
  width: 18px;
  height: 18px;
}
@media (max-width: 560px) {
  :is(#admin, #console) .mgr-head h2 {
    font-size: 1.25rem;
  }
  :is(#admin, #console) .mgr-h-ico {
    width: 30px;
    height: 30px;
  }
  :is(#admin, #console) .mgr-cat {
    padding: 16px;
  }
}

/* ---------- lists: rows joined into one panel with hairlines between them ---------- */
:is(#admin, #console) .mgr-list:has(> .mgr-item) {
  gap: 0;
}
:is(#admin, #console) .mgr-list > .mgr-item {
  border-radius: 0;
  box-shadow: none;
}
:is(#admin, #console) .mgr-list > .mgr-item + .mgr-item {
  margin-top: -1px;
}
:is(#admin, #console) .mgr-list > .mgr-item:not(.mgr-item + .mgr-item) {
  border-top-left-radius: var(--ui-r);
  border-top-right-radius: var(--ui-r);
}
:is(#admin, #console) .mgr-list > .mgr-item:not(:has(+ .mgr-item)) {
  border-bottom-left-radius: var(--ui-r);
  border-bottom-right-radius: var(--ui-r);
  box-shadow: var(--ui-shadow-sm);
}
:is(#admin, #console) .mgr-list > .mgr-item .mgr-row {
  border-radius: inherit;
}
:is(#admin, #console) .mgr-list > .mgr-item.is-open {
  position: relative;
  z-index: 1;
  margin: 10px 0;
  border-radius: var(--ui-r);
  border-color: var(--ui-line-2);
  box-shadow: var(--ui-shadow-lg);
}
:is(#admin, #console) .mgr-list > .mgr-item.is-open + .mgr-item {
  margin-top: 0;
  border-top-left-radius: var(--ui-r);
  border-top-right-radius: var(--ui-r);
}
:is(#admin, #console) .mgr-list > .mgr-item:has(+ .mgr-item.is-open) {
  border-bottom-left-radius: var(--ui-r);
  border-bottom-right-radius: var(--ui-r);
}
:is(#admin, #console) .mgr-list > :not(.mgr-item) + * {
  margin-top: 10px;
}
:is(#admin, #console) .mgr-list > .mgr-item + :not(.mgr-item) {
  margin-top: 12px;
}
:is(#admin, #console) .mgr-row {
  padding: 10px 14px;
}
:is(#admin, #console) .mgr-item:not(.is-open) .mgr-row:hover {
  background: var(--ui-hover);
}
:is(#admin, #console) .mgr-thumb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--ui-sunken);
  color: var(--ui-ink-3);
}
:is(#admin, #console) .mgr-name .t {
  font-weight: 600;
}
:is(#admin, #console) .mgr-price {
  color: var(--ui-ink);
  font-weight: 600;
  font-size: 0.88rem;
}
:is(#admin, #console) .mgr-form {
  padding: 18px;
  gap: 16px;
  background: var(--ui-panel);
}
:is(#admin, #console) .mgr-add-end {
  min-height: 48px;
  border: 1px dashed var(--ui-line-2);
  border-radius: var(--ui-r);
  color: var(--ui-ink-2);
  font-weight: 600;
}
:is(#admin, #console) .mgr-add-end:hover {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
  background: var(--ui-accent-soft);
}

/* the console's company / plan / partner rows */
#console .co-list {
  gap: 0;
  background: var(--ui-panel);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  box-shadow: var(--ui-shadow-sm);
}
#console .co-list > .co {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
#console .co-list > .co + .co {
  border-top: 1px solid var(--ui-line);
}
#console .co-list > .co:first-child,
#console .co-list > .co:first-child .co-row {
  border-top-left-radius: var(--ui-r);
  border-top-right-radius: var(--ui-r);
}
#console .co-list > .co:last-child,
#console .co-list > .co:last-child:not(.is-open) .co-row {
  border-bottom-left-radius: var(--ui-r);
  border-bottom-right-radius: var(--ui-r);
}
#console .co-list > .co.is-open {
  box-shadow: inset 3px 0 0 var(--ui-accent);
  background: var(--ui-panel);
}
#console .co-row {
  gap: 14px;
  padding: 14px 18px;
  transition: background-color 0.12s;
}
#console .co-list > .co:not(.is-open) > .co-row:hover {
  background: var(--ui-hover);
}
#console .co-dot {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
#console .co-main {
  gap: 3px;
}
#console .co-name {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.6;
}
#console .co-meta {
  font-size: 0.8rem;
  color: var(--ui-ink-3);
}
#console .co-meta a {
  color: var(--ui-ink-2);
  text-decoration: underline;
  text-decoration-color: var(--ui-line-2);
  text-underline-offset: 3px;
}
#console .co-meta a:hover {
  color: var(--ui-accent);
  text-decoration-color: currentColor;
}
/* a single strong button per row would be a column of orange: the row's main action is dark instead */
#console .co-acts .btn-primary {
  background: var(--ui-ink);
  color: var(--ui-panel);
  box-shadow: var(--ui-shadow-sm);
}
#console .co-detail {
  padding: 0 18px 8px 76px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-panel);
}
@media (max-width: 640px) {
  #console .co-row {
    padding: 14px;
  }
  #console .co-detail {
    padding: 0 14px 6px;
  }
}
#console .co-sec {
  padding: 18px 0;
  gap: 10px;
  border-bottom: 1px solid var(--ui-line);
}
#console .co-sec:last-child {
  border-bottom: 0;
}
#console .co-sec h4 {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--ui-ink-3);
}
#console .co-sec.danger h4 {
  color: var(--warn);
}
#console .new-co {
  border-color: var(--ui-accent-line);
  box-shadow:
    0 0 0 3px var(--ui-ring),
    var(--ui-shadow);
}

/* payments, history and the partner's lists: quiet rows instead of a grey bar down the left */
:is(#admin, #console) .pay-list {
  gap: 8px;
}
:is(#admin, #console) .pay-item {
  padding: 10px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-panel);
  align-items: center;
}
:is(#admin, #console) .pay-head strong {
  font-weight: 650;
}
:is(#admin, #console) .pay-head time {
  font-weight: 500;
}
:is(#admin, #console) .pay-meta,
:is(#admin, #console) .pay-note {
  font-size: 0.84rem;
  color: var(--ui-ink-2);
}
:is(#admin, #console) .pay-total {
  color: var(--ui-ink);
  font-weight: 650;
}
:is(#admin, #console) .hist > li {
  border-left: 2px solid var(--ui-line);
  padding-left: 14px;
}
:is(#admin, #console) .hist-meta {
  font-weight: 600;
  color: var(--ui-ink-3);
}
:is(#admin, #console) .list-scroll {
  border-color: var(--ui-line);
}

/* ---------- the partners' page ---------- */
#console .pt-stats {
  gap: 14px;
  margin-bottom: 0;
}
#console .pt-stat {
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow-sm);
}
#console .pt-stat span {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--ui-ink-3);
}
#console .pt-stat strong {
  font-size: clamp(1.05rem, 4.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
#console .pt-stat.is-main {
  background: var(--ui-ink);
  border-color: var(--ui-ink);
  color: var(--ui-panel);
}
#console .pt-stat.is-main span {
  color: color-mix(in srgb, var(--ui-panel) 65%, transparent);
}
@media (max-width: 520px) {
  #console .pt-stats {
    gap: 8px;
  }
  #console .pt-stat {
    padding: 12px;
  }
}
.pt-grid {
  display: grid;
  gap: 16px;
}
#console .pt-panel .co-detail {
  border-top: 0;
  border-radius: inherit;
  background: transparent;
  padding: 2px 20px 4px;
}
#console .pt-panel .pay-list {
  max-width: none;
}
#console .pt-panel .co-sec {
  border-bottom: 0;
}
#console .pt-how {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}
@media (min-width: 900px) {
  .pt-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-areas:
      "clients demo"
      "clients payouts"
      "how how";
    align-items: start;
  }
  .pt-demo {
    grid-area: demo;
  }
  .pt-clients {
    grid-area: clients;
  }
  .pt-payouts {
    grid-area: payouts;
  }
  .pt-how {
    grid-area: how;
  }
}
#console .guide-plan,
#console .guide-qa {
  border-color: var(--ui-line);
}
#console .guide-plan {
  border-radius: 10px;
  background: var(--ui-panel);
}
#console .guide-table thead th {
  font-weight: 650;
  color: var(--ui-ink-3);
}

/* ---------- gestão: dashboard and summary card ---------- */
:is(#admin, #console) .mgr-ov {
  padding: 22px;
}
#admin .mgr-ov-logo {
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* ---------- sign-in and messages ---------- */
:is(#admin, #console) .login {
  background:
    radial-gradient(900px 420px at 50% -10%, var(--ui-accent-soft), transparent 70%),
    var(--ui-bg);
}
:is(#admin, #console) .login-card {
  background: var(--ui-panel);
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  box-shadow: var(--ui-shadow-lg);
}
:is(#admin, #console) .login-card h1 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
}
:is(#admin, #console) :is(.fld select, .sub-form select, .pay-form select) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2385858f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
/* touch screens keep :hover on the last tapped spot, which would light up whatever tab slides under the finger */
@media (hover: none) {
  .is-admin .mgr-tab:not([aria-selected="true"]):hover {
    background: transparent;
    color: var(--ui-ink-2);
  }
}

/* ---------- phones: the tabs in a bar fixed at the bottom, like an app (M.bottomNav in core.js) ---------- */
.bnav {
  display: none;
}
@media (max-width: 999px) {
  .is-admin .mgr-bar .mgr-tabs {
    display: none;
  }
  .is-admin .mgr-bar-in {
    padding-bottom: 12px;
  }
  :is(#admin, #console):has(> .bnav) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  body.is-admin .toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .bnav {
    display: block;
  }
  .bnav-bar {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--ui-panel) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--ui-line);
  }
  .is-admin .bnav-bar .mgr-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 6px 2px 4px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--ui-ink-3);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .is-admin .bnav-bar .mgr-tab > span:not(.tab-badge):not(.bnav-dot) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .is-admin .bnav-bar .mgr-tab .ico {
    width: 22px;
    height: 22px;
    color: inherit;
    transition: transform 0.15s;
  }
  .is-admin .bnav-bar .mgr-tab[aria-selected="true"] {
    background: none;
    color: var(--ui-accent);
  }
  /* the open tab's icon on a soft pill, as in the phone's own apps */
  .is-admin .bnav-bar .mgr-tab[aria-selected="true"] .ico {
    box-sizing: content-box;
    padding: 3px 14px;
    margin: -3px 0;
    border-radius: 999px;
    background: var(--ui-accent-soft);
  }
  .is-admin .bnav-bar .mgr-tab:active .ico {
    transform: scale(0.92);
  }
  .bnav-bar .tab-badge,
  .bnav-dot {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    margin: 0;
  }
  .bnav-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e5484d;
    box-shadow: 0 0 0 2px var(--ui-panel);
  }
  /* "Mais": the other tabs and the tools in a sheet just above the bar */
  .bnav-scrim {
    position: fixed;
    inset: 0;
    z-index: 28;
    background: rgba(10, 10, 12, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
  }
  .bnav.is-open .bnav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  .bnav-sheet {
    position: fixed;
    z-index: 29;
    left: 8px;
    right: 8px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 10px;
    background: var(--ui-panel);
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    box-shadow: var(--ui-shadow-lg);
    animation: bnav-up 0.18s ease-out;
  }
  @keyframes bnav-up {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
  .bnav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .is-admin .bnav-grid .mgr-tab {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 74px;
    padding: 10px 4px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-sunken);
    color: var(--ui-ink);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }
  .is-admin .bnav-grid .mgr-tab .ico {
    width: 22px;
    height: 22px;
    color: var(--ui-ink-2);
  }
  .is-admin .bnav-grid .mgr-tab[aria-selected="true"] {
    background: var(--ui-accent-soft);
    border-color: var(--ui-accent-line);
    color: var(--ui-ink);
  }
  .is-admin .bnav-grid .mgr-tab[aria-selected="true"] .ico {
    color: var(--ui-accent);
  }
  .bnav-grid .tab-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
  }
  .bnav-grid .mgr-group {
    display: none;
  }
  .bnav-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ui-line);
  }
  .bnav-grid:empty + .bnav-tools,
  .bnav-sheet > .bnav-tools:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .is-admin .bnav-tools .mgr-tab {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-panel);
    color: var(--ui-ink);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
  }
}
@media (max-width: 999px) and (prefers-reduced-motion: reduce) {
  .bnav-sheet {
    animation: none;
  }
}
.bnav-instant .bnav-sheet {
  animation: none;
}

/* gestão "Eventos e promoções": one block per happy hour or event inside its card */
.hh-ed {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin: 0 0 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-panel);
}
.hh-ed .mgr-cat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hh-ed h4 {
  margin: 0;
  flex: 1 1 auto;
  font-size: 1rem;
}
.hh-ed .fld,
.tr-fld {
  display: grid;
  gap: 4px;
}
.hh-ed .fld > span,
.tr-fld > span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.hh-ed .mgr-actions select {
  max-width: 100%;
  min-height: 36px;
}
.hh-ed .legend {
  margin-top: 2px;
}

/* gestão "Tradução": each field with its original underneath */
.tr-fld {
  margin: 0 0 10px;
}
.tr-orig {
  font-size: 0.8rem;
  color: var(--ink-faint);
  white-space: pre-line;
}
.tr-item {
  padding: 10px 0 0;
  border-top: 1px dashed var(--ui-line);
}
.tr-item h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

/* Dashboard: Instagram story image and PDF menu */
.story-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
#story-canvas {
  width: 160px;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  border: 1px solid var(--ui-line);
  background: var(--surface-2);
}
.story-side {
  flex: 1 1 200px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.story-side .fld {
  display: grid;
  gap: 4px;
}
.story-side .fld > span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.story-side select {
  max-width: 100%;
}
.home-pdf .sub-check {
  margin: 0;
}
/* the PDF's first page at a quarter of its size (A4 at 96 dpi is 794 x 1123 px) */
.pdf-prev {
  flex: 0 0 auto;
  width: 199px;
  aspect-ratio: 210 / 297;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--ui-line);
  background: var(--surface-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
}
.pdf-prev iframe {
  display: block;
  width: 794px;
  height: 1123px;
  border: 0;
  transform: scale(0.25);
  transform-origin: 0 0;
  pointer-events: none;
}

/* console "Saúde dos clientes" */
.health-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.health-row {
  padding: 14px 16px;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.health-row .co-main {
  flex: 1 1 260px;
  min-width: 0;
}
.health-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ---------- installed on the Home Screen: pull down to refresh (M.pullRefresh in core.js) ---------- */
.ptr {
  position: fixed;
  z-index: 40;
  top: calc(env(safe-area-inset-top, 0px) - 44px);
  left: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft, var(--ink));
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px -6px rgba(16, 16, 20, 0.28);
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
}
.ptr.ptr-anim {
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.ptr-ico {
  display: grid;
  place-items: center;
}
.ptr.is-ready,
.ptr.is-busy {
  color: var(--orange);
}
.ptr.is-busy .ptr-ico {
  animation: ptr-spin 0.8s linear infinite;
}
@keyframes ptr-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ptr.is-busy .ptr-ico {
    animation-duration: 2.4s;
  }
}

/* ---------- gestão > Chamadas: floor plan (Planta da sala) ---------- */
#admin {
  --fl-waiter: #d9601f;
  --fl-bill: #2e8b57;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #admin {
    --fl-waiter: #f08a4b;
    --fl-bill: #4cc184;
  }
}
:root[data-theme="dark"] #admin {
  --fl-waiter: #f08a4b;
  --fl-bill: #4cc184;
}
#admin .call-row.is-bill {
  border-left-color: var(--fl-bill);
}
#admin .floor-card {
  display: grid;
  gap: 12px;
}
#admin .floor-card > * {
  margin: 0;
  min-width: 0; /* the room scrolls inside its box on a phone, the card keeps the screen's width */
}
#admin .floor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#admin .floor-head h3 {
  margin: 0;
}
#admin .floor-zone-title {
  margin: 6px 0 -4px;
  font-size: 0.95rem;
  color: var(--ui-ink-2);
}
/* the Calls screen shows the whole room; while editing on a phone it keeps a size fingers can drag and scrolls sideways */
#admin .floor-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ui-r);
}
#admin .floor-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: inherit;
  user-select: none;
  -webkit-user-select: none;
}
#admin .floor-svg.is-edit {
  min-width: 600px;
}
#admin .fl-room {
  fill: var(--ui-sunken);
  stroke: var(--ui-line-2);
  stroke-width: 3;
}
#admin .floor-svg.is-edit .fl-room {
  stroke-dasharray: 10 8;
}
#admin .fl-top {
  fill: var(--ui-panel);
  stroke: var(--ui-ink-3);
  stroke-width: 3;
}
#admin .fl-bar .fl-top {
  fill: var(--ui-hover);
  stroke: var(--ui-line-2);
}
#admin .fl-chair {
  fill: var(--ui-line-2);
}
#admin .fl-num {
  fill: var(--ui-ink);
  font-weight: 700;
  text-anchor: middle;
}
#admin .fl-bar .fl-num {
  fill: var(--ui-ink-2);
  font-weight: 600;
}
#admin .floor-svg.is-edit .fl-item {
  cursor: grab;
  touch-action: none;
}
#admin .floor-svg.is-edit .fl-item:active {
  cursor: grabbing;
}
#admin .fl-item.is-sel .fl-top {
  stroke: var(--ui-accent);
  stroke-width: 6;
}
#admin .fl-item.is-bad .fl-top {
  stroke: #d33;
  stroke-width: 6;
}
/* a table that is calling: filled in its colour, a pulsing ring and how long it has waited */
#admin .fl-item.is-waiter,
#admin .fl-item.is-bill {
  --fl-c: var(--fl-waiter);
  cursor: pointer;
}
#admin .fl-item.is-bill {
  --fl-c: var(--fl-bill);
}
#admin :is(.is-waiter, .is-bill) .fl-top {
  fill: var(--fl-c);
  stroke: var(--fl-c);
}
#admin :is(.is-waiter, .is-bill) .fl-chair {
  fill: color-mix(in srgb, var(--fl-c) 45%, var(--ui-panel));
}
#admin :is(.is-waiter, .is-bill) .fl-num {
  fill: #fff;
}
#admin .fl-ring {
  fill: none;
  stroke: var(--fl-c);
  stroke-width: 6;
  transform-box: fill-box;
  transform-origin: center;
  animation: fl-pulse 1.4s ease-out infinite;
}
#admin .fl-pill rect {
  fill: var(--fl-c);
}
#admin .fl-pill text {
  fill: #fff;
  font-size: 22px;
  font-weight: 700;
  text-anchor: middle;
}
#admin .fl-item[aria-disabled="true"] {
  opacity: 0.5;
}
@keyframes fl-pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  #admin .fl-ring {
    animation: none;
    opacity: 0.6;
  }
}
#admin .floor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
#admin .floor-row .fld {
  flex: 1 1 200px;
  margin: 0;
}
#admin .floor-sel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ui-accent-line);
  border-radius: var(--ui-r);
  background: var(--ui-accent-soft);
}
#admin .floor-sel .fld {
  margin: 0;
  max-width: 320px;
}
#admin .floor-msg {
  margin: 0;
  color: #d33;
}
/* the corner handle of the selected item: drag it to resize */
#admin .fl-handle {
  fill: var(--ui-accent);
  stroke: var(--ui-panel);
  stroke-width: 5;
  cursor: nwse-resize;
  touch-action: none;
}
#admin .floor-sel .floor-seats {
  max-width: 140px;
}
/* the room's outline (walls) drawn corner by corner; outside it the room's box fades away */
#admin .floor-svg.has-walls .fl-room {
  fill: none;
  stroke: none;
}
#admin .floor-svg.is-edit.has-walls .fl-room {
  stroke: var(--ui-line-2);
  stroke-width: 2;
}
#admin .fl-wall {
  fill: var(--ui-sunken);
  stroke: var(--ui-ink-2);
  stroke-width: 8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
#admin .fl-wall.is-open {
  fill: none;
}
#admin .floor-svg.is-walls {
  cursor: crosshair;
}
#admin .fl-item.is-guide {
  opacity: 0.4;
  pointer-events: none;
}
#admin .fl-vertex {
  fill: var(--ui-panel);
  stroke: var(--ui-accent);
  stroke-width: 5;
  cursor: move;
  touch-action: none;
}
#admin .fl-vertex.is-last {
  fill: var(--ui-accent);
}
/* the floor plan on the whole screen (a TV or a tablet at the counter): every area fits, nothing scrolls */
#admin .floor-card.is-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0;
  border: 0;
  border-radius: 0;
  max-width: none;
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: var(--ui-bg);
  display: flex;
  flex-direction: column;
}
#admin .floor-card.is-full .floor-head h3 {
  font-size: 1.4rem;
}
#admin .floor-card.is-full #calls-floor {
  flex: 1 1 0;
  min-height: 0;
  gap: 12px 24px;
}
#admin .floor-card.is-full .floor-zone {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}
#admin .floor-card.is-full .floor-zone > .floor-wrap:only-child {
  grid-row: 1 / -1;
}
#admin .floor-card.is-full .floor-wrap {
  min-height: 0;
  overflow: hidden;
}
#admin .floor-card.is-full .floor-svg {
  width: 100%;
  height: 100%;
}
#admin .floor-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#admin .floor-filter .tab-badge {
  margin-left: 4px;
}
#admin #calls-filter:empty {
  display: none;
}
#admin .floor-zone {
  display: grid;
  gap: 8px;
  min-width: 0;
}
#admin #calls-floor {
  display: grid;
  gap: 12px;
}
#admin .floor-card.is-full .floor-zone-title {
  margin: 0;
}

/* =====================================================================================================
   Refinement: an editorial, hospitality feel. The brand serif (Sorts Mill Goudy, as in the logo) for page titles,
   card titles, names and big numbers; hairlines instead of shadows; quieter buttons and tags; one marker of colour
   on the open tab. Kept last so it settles the details above.
   ===================================================================================================== */
:is(#admin, #console) :is(.mgr-head h2, .mgr-cat h3, .start-top h3, .mgr-ov-top h2, .login-card h1, .pt-stat strong) {
  font-family: var(--ui-serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  font-feature-settings: "liga", "kern";
}
:is(#admin, #console) .mgr-head h2 {
  font-size: 2rem;
  line-height: 1.1;
}
:is(#admin, #console) .mgr-h-ico {
  display: none;
}
:is(#admin, #console) :is(.mgr-cat h3, .start-top h3) {
  font-size: 1.28rem;
  line-height: 1.25;
}
#admin .mgr-ov-top h2 {
  font-size: 1.85rem;
}
:is(#admin, #console) .login-card h1 {
  font-size: 2rem;
}
@media (max-width: 560px) {
  :is(#admin, #console) .mgr-head h2 {
    font-size: 1.65rem;
  }
  :is(#admin, #console) :is(.mgr-cat h3, .start-top h3) {
    font-size: 1.18rem;
  }
}
/* the venue / Consola / Parceiros name at the top of the bar */
.is-admin .mgr-title-name {
  font-family: var(--ui-serif);
  font-weight: 400;
  font-size: 1.22rem;
  letter-spacing: 0;
  line-height: 1.15;
}
.is-admin .mgr-ava {
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  font-family: var(--ui-serif);
  font-weight: 400;
  font-size: 1.15rem;
}
.is-console .mgr-ava {
  background: #1f1c19;
}

/* small capitals for labels: lighter, wider, smaller */
:is(.mgr-group, #console .co-sec h4, #console .pt-stat span, .mgr-ov-tile small) {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* surfaces: hairlines only, more air */
:is(#admin, #console) :is(.card, .mgr-note, #console .co-list, #console .pt-stat, .pay-item) {
  box-shadow: none;
}
:is(#admin, #console) .mgr-cat {
  padding: 24px 26px;
}
:is(#admin, #console) .mgr-cat > h3:first-child,
:is(#admin, #console) .mgr-cat > .mgr-cat-top:first-child {
  padding-bottom: 16px;
}
:is(#admin, #console) .mgr-note {
  box-shadow: inset 2px 0 0 var(--ui-accent);
  border-color: var(--ui-line);
  background: color-mix(in srgb, var(--ui-accent) 4%, var(--ui-panel));
}
:is(#admin, #console) .mgr-note.warn {
  box-shadow: inset 2px 0 0 var(--warn);
}
:is(#admin, #console) .mgr-list > .mgr-item:not(:has(+ .mgr-item)) {
  box-shadow: none;
}
#admin .mgr-ov-tile {
  background: var(--ui-sunken);
  border-color: transparent;
}
@media (min-width: 720px) {
  :is(#admin, #console) .mgr-main {
    padding-top: 44px;
    gap: 22px;
  }
}

/* buttons: the strong one stays in the accent; the others are outlines without shadow */
:is(#admin, #console) .btn-primary {
  box-shadow: none;
}
:is(#admin, #console) :is(.btn-line, .btn-quiet, .icon-btn) {
  box-shadow: none;
  background: transparent;
}
:is(#admin, #console) :is(.fld input:not([type=checkbox]):not([type=radio]), .fld textarea, .fld select, .inline-form input:not([type=checkbox]):not([type=radio]), .sub-form input:not([type=checkbox]):not([type=radio]), .sub-form select, .pay-form input:not([type=checkbox]):not([type=radio]), .pay-form select, .login-form input:not([type=checkbox]):not([type=radio])) {
  box-shadow: none;
}

/* tags as fine pills with a hairline; the plans told apart by tone, not by a block of colour */
:is(#admin, #console) :is(.tag, .st) {
  border-radius: 999px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent);
}
/* pills keep the sans-serif even inside a serif name */
:is(#admin, #console) :is(.tag, .st, .live-pill, .tab-badge, .mgr-status) {
  font-family: var(--sans);
}
#console .plan-tag {
  background: transparent;
  color: var(--ui-ink-2);
}
#console .plan-tag.plan-completo {
  background: var(--ui-sunken);
  color: var(--ui-ink);
}
#console .plan-tag.plan-premium {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}

/* sidebar: the same paper as the page; the open tab a soft tint with a thin mark of the accent */
@media (min-width: 1000px) {
  .is-admin .mgr-bar {
    background: var(--ui-side);
  }
  .is-admin .mgr-tabs > .mgr-tab {
    position: relative;
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: color-mix(in srgb, var(--ui-ink) 5.5%, transparent);
    border-color: transparent;
    box-shadow: none;
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"]::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--ui-accent);
  }
  .mgr-group {
    padding-top: 22px;
  }
}

/* console company rows: one outlined button, the rest as quiet text, so the list reads as names, not buttons */
#console .co-acts .btn-primary {
  background: transparent;
  color: var(--ui-ink);
  border-color: var(--ui-line-2);
  box-shadow: none;
}
#console .co-acts .btn-primary:not(:disabled):hover {
  filter: none;
  background: var(--ui-hover);
}
#console .co-acts :is(.btn-line, .btn-quiet) {
  border-color: transparent;
  color: var(--ui-ink-2);
}
#console .co-acts :is(.btn-line, .btn-quiet):not(:disabled):hover {
  color: var(--ui-ink);
}
#console .co-name {
  font-family: var(--ui-serif);
  font-weight: 400;
  font-size: 1.16rem;
  letter-spacing: 0;
}
#console .co-dot {
  border-radius: 50%;
  font-family: var(--ui-serif);
  font-weight: 400;
  font-size: 1.1rem;
}
#console .co-row {
  padding: 16px 20px;
}

/* partner totals: the first one in a soft accent instead of a solid block */
#console .pt-stat {
  padding: 20px 22px;
}
#console .pt-stat strong {
  font-size: clamp(1.35rem, 5vw, 2.2rem);
  letter-spacing: 0;
}
#console .pt-stat.is-main {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent-line);
  color: var(--ui-ink);
}
#console .pt-stat.is-main span {
  color: var(--ui-accent);
}

/* phones: the bottom bar on the same paper */
@media (max-width: 999px) {
  .bnav-bar {
    background: color-mix(in srgb, var(--ui-bg) 88%, transparent);
  }
  .is-admin .mgr-bar {
    background: color-mix(in srgb, var(--ui-bg) 88%, transparent);
  }
}
#console .pt-stat span {
  letter-spacing: 0.08em;
}
/* the partner's demo menu and clients: names in the serif */
#console .pt-panel .pay-head strong {
  font-family: var(--ui-serif);
  font-weight: 400;
  font-size: 1.14rem;
}

/* console > Emails: one card per email the app sends, a preview of it and the log of what was sent */
#console .em-group {
  margin: 26px 0 10px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-ink-3);
}
#console .em-card {
  margin-bottom: 12px;
  padding: 20px 22px;
}
#console .em-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
#console .em-head h3 {
  margin: 0;
  font-family: var(--ui-serif);
  font-size: 1.2rem;
  font-weight: 500;
}
#console .em-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0 0 10px;
  font-size: 0.9rem;
}
#console .em-dl dt {
  color: var(--ui-ink-3);
}
#console .em-dl dd {
  margin: 0;
  color: var(--ui-ink);
  overflow-wrap: anywhere;
}
#console .em-more {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--ui-ink-2);
}
#console .em-more summary {
  cursor: pointer;
  color: var(--ui-ink);
  font-weight: 600;
}
#console .em-more ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
#console .em-card .mgr-actions {
  flex-wrap: wrap;
  align-items: center;
}
#console .em-trial {
  margin: 0 0 0 4px;
  font-size: 0.86rem;
}
#console .em-msg {
  margin: 10px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}
#console .em-msg.ok {
  color: var(--ok);
}
#console .em-msg.err {
  color: var(--warn);
}
#console .em-prev {
  margin-top: 12px;
}
#console .em-prev iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-sm);
  background: #efe4d8;
}
#console .em-filter {
  margin-bottom: 10px;
}
#console .em-filter select {
  max-width: 320px;
}
@media (max-width: 640px) {
  #console .em-card {
    padding: 16px;
  }
  #console .em-dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  #console .em-dl dd {
    margin-bottom: 6px;
  }
  #console .em-prev iframe {
    height: 520px;
  }
}

/* =====================================================================================================
   Computers (≥ 1000px): a narrow rail of icons on the left with the tab names underneath, and a fixed header across
   the top with the name and the main buttons (Publicar, Nova empresa…). Phones keep the bottom tab bar.
   ===================================================================================================== */
@media (min-width: 1000px) {
  :is(#admin, #console):has(> .mgr-bar) {
    --ui-rail-w: 92px;
    --ui-head-h: 68px;
    padding-left: var(--ui-rail-w);
    padding-top: var(--ui-head-h);
  }
  .is-admin .mgr-bar {
    width: var(--ui-rail-w, 92px);
    padding-top: var(--ui-head-h, 68px);
    scrollbar-width: none;
  }
  /* the header: the bar's top part, taken out across the page */
  .is-admin .mgr-bar-in {
    position: fixed;
    z-index: 25;
    top: calc(var(--env-h, 0px) + env(safe-area-inset-top, 0px)); /* below the test-site strip of config.js, if any */
    left: 0;
    right: 0;
    height: var(--ui-head-h, 68px);
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 0 28px 0 22px;
    background: color-mix(in srgb, var(--ui-panel) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--ui-line);
  }
  .is-admin .mgr-title {
    min-width: 0;
  }
  .is-admin .mgr-acts {
    display: flex;
    gap: 8px;
    margin-left: auto;
  }
  .is-admin .mgr-acts > *,
  .is-admin .mgr-acts > .btn-primary,
  .is-admin .mgr-acts > .confirm {
    flex: none;
    flex-basis: auto;
  }
  /* the rail */
  .mgr-group {
    display: none;
  }
  .is-admin .mgr-tabs {
    gap: 4px;
    padding: 14px 10px;
  }
  .is-admin .mgr-tabs > .mgr-tab {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 62px;
    padding: 9px 2px 8px;
    border: 0;
    border-radius: 14px;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }
  .is-admin .mgr-tabs > .mgr-tab .ico {
    flex: none;
    width: 22px;
    height: 22px;
  }
  .is-admin .mgr-tabs > .mgr-tab > span:not(.tab-badge) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    box-shadow: none;
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] .ico {
    color: var(--ui-accent);
  }
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"]::before {
    display: none;
  }
  .is-admin .mgr-tabs > .mgr-tab .tab-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    margin: 0;
  }
  .is-admin .mgr-tools {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: auto -10px -14px;
    padding: 10px 6px 12px;
  }
  .is-admin .mgr-tools .mgr-tab {
    justify-content: center;
    width: 100%;
    font-size: 0.74rem;
  }

  /* consola > Empresas: the companies as cards, three or four to a row; an open one takes the whole row */
  #console .co-list:has(> .co > .co-row > .co-dot) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    background: none;
    border: 0;
    box-shadow: none;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) > .co {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-r);
    background: var(--ui-panel);
  }
  #console .co-list:has(> .co > .co-row > .co-dot) > .co > .co-row {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px;
    border-radius: inherit;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) .co-dot {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) .co-main {
    flex: none;
    width: 100%;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) .co-name {
    line-height: 1.35;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) .co-acts {
    flex-wrap: nowrap;
    gap: 2px;
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ui-line);
  }
  #console .co-list:has(> .co > .co-row > .co-dot) > .co.is-open {
    grid-column: 1 / -1;
  }
  #console .co-list:has(> .co > .co-row > .co-dot) > .co.is-open > .co-row {
    flex: none;
  }
  /* panels that stay in view while scrolling (Estilo preview, Itens categories) stop below the header */
  #admin :is(.style-prev, .cat-rail),
  html.has-env-strip #admin :is(.style-prev, .cat-rail) {
    top: calc(var(--env-h, 0px) + var(--ui-head-h, 68px) + 16px);
  }
}

/* ---------- consola > Utilizadores, and "Ver como" (a person's admin area seen by the platform admin, read only) ---------- */
#console .us-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
#console .us-tools .fld {
  margin: 0;
}
#console .us-tools .us-q {
  flex: 1 1 240px;
  min-width: 0;
}
#console .us-tools .us-f {
  flex: 0 1 220px;
}
#console .us-venues {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
#console .us-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
#console .us-del {
  margin-top: 10px;
}
#console .us-del.mgr-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
#console .us-del .confirm {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
#console .link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
#console .us-card .co-name a {
  color: inherit;
  word-break: break-all;
}
#admin .view-as {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
#admin .view-as > span {
  flex: 1 1 240px;
}

/* ---------- dish form: folding Etiquetas / Alergénios ---------- */
#admin .pick-sec {
  border: 1px solid var(--ui-line-2);
  border-radius: var(--ui-r-sm);
  background: var(--ui-panel);
  overflow: hidden;
}
#admin .pick-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ui-ink);
  cursor: pointer;
}
#admin .pick-head:hover {
  background: var(--ui-hover);
}
#admin .pick-head .legend {
  flex: none;
  min-width: 84px;
}
#admin .pick-sum {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ui-ink-2);
}
#admin .pick-sum .tag {
  margin: 0;
}
#admin .pick-head > svg {
  flex: none;
  color: var(--ui-ink-3);
  transition: transform 0.15s;
}
#admin .pick-sec.is-open .pick-head > svg {
  transform: rotate(180deg);
}
#admin .pick-none {
  color: var(--ui-ink-3);
}
#admin .pick-warn {
  color: var(--warn);
  font-weight: 600;
}
#admin .pick-ok {
  color: var(--ok);
  font-weight: 600;
}
#admin .pick-alg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ui-sunken);
  color: var(--ui-ink);
  font-weight: 600;
  white-space: nowrap;
}
#admin .pick-alg svg,
#admin .pick-opt > svg:not(.pick-box) {
  width: 14px;
  height: 14px;
  flex: none;
}
#admin .pick-body {
  display: grid;
  gap: 8px;
  padding: 10px 8px 12px;
  border-top: 1px solid var(--ui-line);
}
#admin .pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 6px;
}
@media (min-width: 700px) {
  #admin .pick-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}
#admin .pick-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--ui-r-sm);
  background: none;
  color: var(--ui-ink);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
#admin .pick-opt:hover {
  background: var(--ui-hover);
}
#admin .pick-opt > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
#admin .pick-opt .tag {
  margin: 0;
}
#admin .pick-box {
  flex: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  padding: 1px;
  border: 1.5px solid var(--ui-line-2);
  border-radius: 5px;
  color: transparent;
}
#admin .pick-opt[aria-pressed="true"] {
  border-color: var(--ui-accent-line);
  background: var(--ui-accent-soft);
}
#admin .pick-opt[aria-pressed="true"] .pick-box {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
}
#admin .pick-wide {
  font-weight: 600;
  border-color: var(--ui-line-2);
}
#admin .pick-body .hint {
  margin: 2px 0 0;
}

/* =====================================================================================================
   Light mode, mixed: the bars (top bar and bottom tab bar on phones; header and icon rail on computers) in espresso,
   the page in warm sand with cream cards, so it is not all white. The bars just get the dark palette's values;
   dark mode is untouched.
   ===================================================================================================== */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) :is(.is-admin .mgr-bar, .is-admin .bnav-bar) {
    --ui-bg: #221d19;
    --ui-side: #221d19;
    --ui-panel: #29231e;
    --ui-sunken: #302924;
    --ui-hover: #352d27;
    --ui-ink: #f6f0e7;
    --ui-ink-2: #d2c8bb;
    --ui-ink-3: #a39889;
    --ui-line: rgba(255, 236, 210, 0.09);
    --ui-line-2: rgba(255, 236, 210, 0.2);
    --ui-tab-on: color-mix(in srgb, var(--ui-accent) 45%, #fff);
    --ui-tab-on-bg: color-mix(in srgb, var(--ui-accent) 32%, rgba(255, 255, 255, 0.06));
    --field: #1c1814;
  }
}
:root[data-theme="light"] :is(.is-admin .mgr-bar, .is-admin .bnav-bar) {
  --ui-bg: #221d19;
  --ui-side: #221d19;
  --ui-panel: #29231e;
  --ui-sunken: #302924;
  --ui-hover: #352d27;
  --ui-ink: #f6f0e7;
  --ui-ink-2: #d2c8bb;
  --ui-ink-3: #a39889;
  --ui-line: rgba(255, 236, 210, 0.09);
  --ui-line-2: rgba(255, 236, 210, 0.2);
  --ui-tab-on: color-mix(in srgb, var(--ui-accent) 45%, #fff);
  --ui-tab-on-bg: color-mix(in srgb, var(--ui-accent) 32%, rgba(255, 255, 255, 0.06));
  --field: #1c1814;
}
/* the open tab: the accent lightened, so a dark menu colour still shows on the espresso */
.is-admin :is(.mgr-bar, .bnav-bar) .mgr-tab[aria-selected="true"] {
  color: var(--ui-tab-on, var(--ui-accent));
}
.is-admin :is(.mgr-bar, .bnav-bar) .mgr-tab[aria-selected="true"] .ico {
  color: var(--ui-tab-on, var(--ui-accent));
}
@media (min-width: 1000px) {
  .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-tab-on-bg, var(--ui-accent-soft));
  }
}
@media (max-width: 999px) {
  .is-admin .bnav-bar .mgr-tab[aria-selected="true"] .ico {
    background: var(--ui-tab-on-bg, var(--ui-accent-soft));
  }
  .is-admin .mgr-bar .mgr-tab[aria-selected="true"] {
    background: var(--ui-tab-on-bg, var(--ui-ink));
    color: var(--ui-tab-on, var(--ui-panel));
  }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .is-admin .mgr-bar .mgr-ava {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  }
  :root:not([data-theme="dark"]) .is-console .mgr-bar .mgr-ava {
    background: var(--ui-accent);
  }
}
:root[data-theme="light"] .is-admin .mgr-bar .mgr-ava {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
:root[data-theme="light"] .is-console .mgr-bar .mgr-ava {
  background: var(--ui-accent);
}
/* the espresso bars nearly solid, so the page doesn't show through them */
@media (max-width: 999px) and (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .is-admin :is(.mgr-bar, .bnav-bar) {
    background: color-mix(in srgb, var(--ui-bg) 97%, transparent);
  }
}
@media (max-width: 999px) {
  :root[data-theme="light"] .is-admin :is(.mgr-bar, .bnav-bar) {
    background: color-mix(in srgb, var(--ui-bg) 97%, transparent);
  }
}

/* =====================================================================================================
   "Aspeto": the look each person picks for gestão, consola and parceiro (Look in core.js sets <html data-ui>).
   Clássico is everything above (no attribute). Estúdio, Bento and Ardósia restyle on top of it: mostly the --ui-*
   tokens, plus their own shapes. The tokens go on the page, the bars and the body together (an id inside :is()
   so they win over the light/dark and espresso-bar blocks above). Ardósia is always dark (data-theme="dark").
   ===================================================================================================== */

/* ---------- the picker ---------- */
.mgr-look .ico {
  flex: none;
}
@media (min-width: 1000px) {
  .is-admin .mgr-tools .mgr-look > span {
    display: none;
  }
}
.look-pop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.look-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 10, 0.45);
}
.look-box {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  background: var(--ui-panel);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-lg);
}
.look-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.look-head h3 {
  margin: 0;
  font-family: var(--ui-serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.look-sub {
  margin: 6px 0 16px;
  color: var(--ui-ink-2);
  font-size: 0.9rem;
}
.look-list {
  display: grid;
  gap: 8px;
}
.look-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-sm);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.look-opt:hover {
  background: var(--ui-hover);
}
.look-opt[aria-pressed="true"] {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 1px var(--ui-accent);
}
/* a tiny drawing of the look: page colour, the bar on the left, a card with a spot of the accent */
.look-prev {
  position: relative;
  flex: none;
  width: 64px;
  height: 44px;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.look-prev i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.08);
}
.look-prev b {
  position: absolute;
  top: 8px;
  left: 21px;
  right: 7px;
  bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.look-prev u {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 14px;
  height: 5px;
  border-radius: 3px;
}
.look-txt {
  display: grid;
  gap: 2px;
}
.look-txt strong {
  font-size: 0.98rem;
}
.look-txt small {
  color: var(--ui-ink-3);
  font-size: 0.82rem;
}
/* Ardósia has no light mode: no switch */
:root[data-ui="ardosia"] .mgr-mode {
  display: none;
}

/* ---------- Estúdio: clean and modern, white and cool grey, sans-serif throughout, a wide side menu with names ---------- */
:root[data-ui="estudio"] :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
  --ui-bg: #f6f6f7;
  --ui-side: #fbfbfb;
  --ui-panel: #ffffff;
  --ui-sunken: #f3f3f5;
  --ui-hover: #efeff2;
  --ui-ink: #17171a;
  --ui-ink-2: #4f4f58;
  --ui-ink-3: #8b8b94;
  --ui-line: #e7e7eb;
  --ui-line-2: #d6d6dc;
  --ui-serif: var(--sans);
  --ui-r: 10px;
  --ui-r-sm: 7px;
  --ui-accent-soft: color-mix(in srgb, var(--ui-accent) 8%, var(--ui-panel));
  --ui-tab-on: var(--ui-ink);
  --ui-tab-on-bg: var(--ui-panel);
  --ui-shadow-lg: 0 2px 4px rgba(16, 16, 20, 0.04), 0 24px 48px -18px rgba(16, 16, 20, 0.22);
  --field: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root[data-ui="estudio"]:not([data-theme="light"]) :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
    --ui-bg: #101012;
    --ui-side: #131316;
    --ui-panel: #17171a;
    --ui-sunken: #1d1d21;
    --ui-hover: #222227;
    --ui-ink: #ededf0;
    --ui-ink-2: #a3a3ad;
    --ui-ink-3: #6f6f79;
    --ui-line: rgba(255, 255, 255, 0.075);
    --ui-line-2: rgba(255, 255, 255, 0.14);
    --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.8);
    --field: #131316;
  }
}
:root[data-ui="estudio"][data-theme="dark"] :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
  --ui-bg: #101012;
  --ui-side: #131316;
  --ui-panel: #17171a;
  --ui-sunken: #1d1d21;
  --ui-hover: #222227;
  --ui-ink: #ededf0;
  --ui-ink-2: #a3a3ad;
  --ui-ink-3: #6f6f79;
  --ui-line: rgba(255, 255, 255, 0.075);
  --ui-line-2: rgba(255, 255, 255, 0.14);
  --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  --field: #131316;
}
:root[data-ui="estudio"] body.is-admin {
  background: var(--ui-bg);
}
:root[data-ui="estudio"] :is(#admin, #console) :is(.mgr-head h2, .mgr-cat h3, .start-top h3, .mgr-ov-top h2, .pt-stat strong, .co-name, .look-head h3),
:root[data-ui="estudio"] .is-admin .mgr-title-name {
  font-weight: 650;
  letter-spacing: -0.02em;
}
:root[data-ui="estudio"] :is(#admin, #console) .mgr-head h2 {
  font-size: 1.6rem;
}
:root[data-ui="estudio"] :is(#admin, #console) :is(.card, .mgr-note, .pt-stat, .pt-panel, .pay-item) {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r);
  box-shadow: 0 1px 2px rgba(16, 16, 20, 0.04);
}
:root[data-ui="estudio"] :is(#admin, #console) .btn {
  border-radius: 8px;
  font-weight: 550;
}
:root[data-ui="estudio"] :is(#admin, #console) :is(.btn-primary, .co-acts .btn-primary) {
  border-color: var(--ui-ink);
  background: var(--ui-ink);
  color: var(--ui-bg);
}
:root[data-ui="estudio"] :is(#admin, #console) :is(.btn-line, .btn-quiet) {
  border: 1px solid var(--ui-line-2);
  background: var(--ui-panel);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}
:root[data-ui="estudio"] .is-admin .mgr-bar-in {
  background: var(--ui-panel);
  border-bottom: 1px solid var(--ui-line);
}
:root[data-ui="estudio"] .is-admin .mgr-ava {
  border-radius: 8px;
}
@media (min-width: 1000px) {
  :root[data-ui="estudio"] :is(#admin, #console):has(> .mgr-bar) {
    --ui-rail-w: 236px;
    --ui-head-h: 60px;
  }
  :root[data-ui="estudio"] .is-admin .mgr-bar {
    background: var(--ui-side);
    border-right: 1px solid var(--ui-line);
  }
  :root[data-ui="estudio"] .mgr-group {
    display: block;
    margin: 18px 12px 6px;
    color: var(--ui-ink-3);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs {
    gap: 1px;
    padding: 10px 12px;
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--ui-ink-2);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab .ico {
    width: 18px;
    height: 18px;
    color: var(--ui-ink-3);
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab:hover {
    background: var(--ui-hover);
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-panel);
    color: var(--ui-ink);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(0, 0, 0, 0.05);
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] .ico {
    color: var(--ui-accent);
  }
  :root[data-ui="estudio"] .is-admin .mgr-tabs > .mgr-tab .tab-badge {
    position: static;
    margin-left: auto;
  }
  :root[data-ui="estudio"] .is-admin .mgr-tools {
    flex-direction: row;
    justify-content: flex-start;
    margin: auto -12px -10px;
    padding: 10px 14px;
    border-top: 1px solid var(--ui-line);
  }
  :root[data-ui="estudio"] .is-admin .mgr-tools .mgr-tab {
    width: auto;
  }
  /* consola > Empresas: one compact list instead of cards */
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) {
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-r);
    background: var(--ui-panel);
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) > .co {
    border: 0;
    border-bottom: 1px solid var(--ui-line);
    border-radius: 0;
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) > .co:last-child {
    border-bottom: 0;
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) > .co > .co-row {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) .co-dot {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1rem;
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) .co-main {
    flex: 1;
    width: auto;
  }
  :root[data-ui="estudio"] #console .co-list:has(> .co > .co-row > .co-dot) .co-acts {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }
}
@media (max-width: 999px) {
  :root[data-ui="estudio"] .is-admin .mgr-bar {
    background: var(--ui-panel);
    border-bottom: 1px solid var(--ui-line);
  }
  :root[data-ui="estudio"] .is-admin .bnav-bar {
    background: color-mix(in srgb, var(--ui-panel) 96%, transparent);
    border-top: 1px solid var(--ui-line);
  }
  :root[data-ui="estudio"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] {
    color: var(--ui-ink);
  }
  :root[data-ui="estudio"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] .ico {
    background: var(--ui-sunken);
    color: var(--ui-accent);
  }
}

/* ---------- Bento: soft and friendly, a sage page, very round cards with a soft shadow, the bars floating ---------- */
:root[data-ui="bento"] :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-bg: #e8ede6;
  --ui-side: #e8ede6;
  --ui-panel: #ffffff;
  --ui-sunken: #f1f4ef;
  --ui-hover: #eef2ec;
  --ui-ink: #1f2a22;
  --ui-ink-2: #4c5a50;
  --ui-ink-3: #859287;
  --ui-line: #e3e9e1;
  --ui-line-2: #cfd9cc;
  --ui-serif: "Nunito", system-ui, sans-serif;
  --ui-r: 24px;
  --ui-r-sm: 16px;
  --ui-accent-soft: color-mix(in srgb, var(--ui-accent) 12%, var(--ui-panel));
  --ui-tab-on: var(--ui-accent-ink);
  --ui-tab-on-bg: var(--ui-accent);
  --ui-float: 0 1px 2px rgba(30, 50, 35, 0.04), 0 10px 30px -12px rgba(30, 60, 40, 0.2);
  --ui-shadow-lg: 0 2px 4px rgba(30, 50, 35, 0.04), 0 24px 48px -18px rgba(30, 60, 40, 0.3);
  --field: #f6f8f5;
}
@media (prefers-color-scheme: dark) {
  :root[data-ui="bento"]:not([data-theme="light"]) :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
    --ui-bg: #121613;
    --ui-side: #121613;
    --ui-panel: #1c221e;
    --ui-sunken: #232a25;
    --ui-hover: #29312b;
    --ui-ink: #eef3ee;
    --ui-ink-2: #b3bfb5;
    --ui-ink-3: #7c887e;
    --ui-line: rgba(220, 255, 225, 0.07);
    --ui-line-2: rgba(220, 255, 225, 0.14);
    --ui-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 30px -14px rgba(0, 0, 0, 0.75);
    --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.85);
    --field: #171c18;
  }
}
:root[data-ui="bento"][data-theme="dark"] :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
  --ui-bg: #121613;
  --ui-side: #121613;
  --ui-panel: #1c221e;
  --ui-sunken: #232a25;
  --ui-hover: #29312b;
  --ui-ink: #eef3ee;
  --ui-ink-2: #b3bfb5;
  --ui-ink-3: #7c887e;
  --ui-line: rgba(220, 255, 225, 0.07);
  --ui-line-2: rgba(220, 255, 225, 0.14);
  --ui-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 30px -14px rgba(0, 0, 0, 0.75);
  --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.85);
  --field: #171c18;
}
:root[data-ui="bento"] body.is-admin {
  background: var(--ui-bg);
}
:root[data-ui="bento"] :is(#admin, #console) :is(.mgr-head h2, .mgr-cat h3, .start-top h3, .mgr-ov-top h2, .pt-stat strong, .co-name, .look-head h3),
:root[data-ui="bento"] .is-admin .mgr-title-name {
  font-weight: 800;
  letter-spacing: -0.015em;
}
:root[data-ui="bento"] :is(#admin, #console) .mgr-head h2 {
  font-size: 2rem;
}
:root[data-ui="bento"] :is(#admin, #console) :is(.card, .mgr-note, .pt-stat, .pt-panel, .pay-item) {
  border: 0;
  border-radius: var(--ui-r);
  box-shadow: var(--ui-float);
}
:root[data-ui="bento"] :is(#admin, #console) .pt-stat:first-child {
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
}
:root[data-ui="bento"] :is(#admin, #console) .pt-stat:first-child * {
  color: inherit;
}
:root[data-ui="bento"] :is(#admin, #console) .btn {
  border-radius: 999px;
  font-weight: 700;
}
:root[data-ui="bento"] :is(#admin, #console) :is(.btn-line, .btn-quiet) {
  border: 0;
  background: var(--ui-sunken);
}
:root[data-ui="bento"] .is-admin .mgr-ava {
  border-radius: 16px;
}
:root[data-ui="bento"] #console .co-dot {
  border-radius: 18px;
}
@media (min-width: 1000px) {
  :root[data-ui="bento"] :is(#admin, #console):has(> .mgr-bar) {
    --ui-rail-w: 112px;
    --ui-head-h: 88px;
  }
  :root[data-ui="bento"] .is-admin .mgr-bar {
    padding: 96px 12px 16px 16px;
    border: 0;
    background: transparent;
  }
  :root[data-ui="bento"] .is-admin .mgr-bar-in {
    top: calc(var(--env-h, 0px) + env(safe-area-inset-top, 0px) + 14px);
    left: 16px;
    right: 16px;
    height: 64px;
    border: 0;
    border-radius: 22px;
    background: var(--ui-panel);
    box-shadow: var(--ui-float);
  }
  :root[data-ui="bento"] .is-admin .mgr-tabs {
    gap: 6px;
    padding: 12px 8px;
    border-radius: 28px;
    background: var(--ui-panel);
    box-shadow: var(--ui-float);
  }
  :root[data-ui="bento"] .is-admin .mgr-tabs > .mgr-tab {
    border-radius: 18px;
    color: var(--ui-ink-2);
    font-weight: 700;
  }
  :root[data-ui="bento"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-accent);
    color: var(--ui-accent-ink);
    box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--ui-accent) 70%, transparent);
  }
  :root[data-ui="bento"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] .ico {
    color: var(--ui-accent-ink);
  }
  :root[data-ui="bento"] .is-admin .mgr-tools {
    margin: 14px 0 0;
    padding: 10px 4px;
    border: 0;
    border-radius: 24px;
    background: var(--ui-panel);
    box-shadow: var(--ui-float);
  }
  :root[data-ui="bento"] #console .co-list:has(> .co > .co-row > .co-dot) {
    gap: 20px;
  }
  :root[data-ui="bento"] #console .co-list:has(> .co > .co-row > .co-dot) > .co {
    border: 0;
    border-radius: 26px;
    box-shadow: var(--ui-float);
  }
  :root[data-ui="bento"] #console .co-list:has(> .co > .co-row > .co-dot) .co-acts {
    border-top: 0;
  }
  :root[data-ui="bento"] #admin :is(.style-prev, .cat-rail) {
    top: calc(var(--env-h, 0px) + 104px);
  }
}
@media (max-width: 999px) {
  :root[data-ui="bento"] .is-admin .mgr-bar {
    border: 0;
    background: var(--ui-bg);
  }
  :root[data-ui="bento"] .is-admin .mgr-bar-in {
    margin: 10px 12px 0;
    padding: 10px 12px;
    border-radius: 22px;
    background: var(--ui-panel);
    box-shadow: var(--ui-float);
  }
  :root[data-ui="bento"] .is-admin .bnav-bar {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 6px;
    border: 0;
    border-radius: 26px;
    background: var(--ui-panel);
    box-shadow: 0 14px 34px -12px rgba(20, 40, 25, 0.35);
  }
  :root[data-ui="bento"] :is(#admin, #console):has(> .bnav) {
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }
  :root[data-ui="bento"] .is-admin .bnav-bar .mgr-tab {
    border-radius: 20px;
  }
  :root[data-ui="bento"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] {
    background: var(--ui-accent);
    color: var(--ui-accent-ink);
  }
  :root[data-ui="bento"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] .ico {
    background: none;
    color: inherit;
  }
}

/* ---------- Ardósia: always dark, graphite with an amber accent, DM Sans, big glowing numbers ---------- */
:root[data-ui="ardosia"] {
  color-scheme: dark;
}
:root[data-ui="ardosia"] :is(body.is-admin, #admin, #console, .mgr-bar, .bnav-bar) {
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-bg: #0e1014;
  --ui-side: #0b0d10;
  --ui-panel: #161920;
  --ui-sunken: #1c2029;
  --ui-hover: #20252f;
  --ui-ink: #eceef3;
  --ui-ink-2: #a9b0bd;
  --ui-ink-3: #6c7482;
  --ui-line: rgba(255, 255, 255, 0.07);
  --ui-line-2: rgba(255, 255, 255, 0.14);
  --ui-serif: "DM Sans", system-ui, sans-serif;
  --ui-r: 14px;
  --ui-r-sm: 9px;
  --ui-accent: #f2a33a;
  --ui-accent-ink: #1a1206;
  --orange: #f2a33a;
  --orange-ink: #1a1206;
  --ui-accent-soft: rgba(242, 163, 58, 0.12);
  --ui-accent-line: rgba(242, 163, 58, 0.4);
  --ui-ring: rgba(242, 163, 58, 0.35);
  --ui-tab-on: #f2a33a;
  --ui-tab-on-bg: rgba(242, 163, 58, 0.12);
  --ui-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px -16px rgba(0, 0, 0, 0.9);
  --field: #11141a;
}
:root[data-ui="ardosia"] body.is-admin {
  background: var(--ui-bg);
}
:root[data-ui="ardosia"] :is(#admin, #console) :is(.mgr-head h2, .mgr-cat h3, .start-top h3, .mgr-ov-top h2, .pt-stat strong, .co-name, .look-head h3),
:root[data-ui="ardosia"] .is-admin .mgr-title-name {
  font-weight: 600;
  letter-spacing: -0.02em;
}
:root[data-ui="ardosia"] :is(#admin, #console) .pt-stat strong {
  font-variant-numeric: tabular-nums;
}
@media (min-width: 720px) {
  :root[data-ui="ardosia"] :is(#admin, #console) .pt-stat strong {
    font-size: 2.4rem;
  }
}
:root[data-ui="ardosia"] :is(#admin, #console) .pt-stat:first-child strong {
  color: var(--ui-accent);
  text-shadow: 0 0 24px rgba(242, 163, 58, 0.35);
}
:root[data-ui="ardosia"] :is(#admin, #console) :is(.card, .mgr-note, .pt-stat, .pt-panel, .pay-item),
:root[data-ui="ardosia"] .look-box {
  border: 1px solid var(--ui-line);
  background: linear-gradient(180deg, #191d25, #14171d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}
:root[data-ui="ardosia"] :is(#admin, #console) :is(.btn-primary, .co-acts .btn-primary) {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  box-shadow: 0 0 0 1px rgba(242, 163, 58, 0.4), 0 8px 24px -10px rgba(242, 163, 58, 0.6);
}
:root[data-ui="ardosia"] :is(#admin, #console) :is(.btn-line, .btn-quiet) {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #dfe3ea;
}
/* DM Sans runs wider: the three buttons of a company card still fit on one row */
:root[data-ui="ardosia"] #console .co-list .co-acts .btn {
  padding-left: 9px;
  padding-right: 9px;
  font-size: 0.8rem;
}
:root[data-ui="ardosia"] #console .co-list .co-acts :is(.btn-line, .btn-quiet) {
  border-color: transparent;
  background: none;
  color: var(--ui-ink-2);
}
:root[data-ui="ardosia"] .is-admin .mgr-bar-in {
  background: rgba(11, 13, 16, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 1000px) {
  :root[data-ui="ardosia"] .is-admin .mgr-bar {
    background: var(--ui-side);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
  }
  :root[data-ui="ardosia"] .is-admin .mgr-tabs > .mgr-tab {
    color: #7d8594;
  }
  :root[data-ui="ardosia"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"] {
    background: var(--ui-tab-on-bg);
    color: var(--ui-accent);
  }
  /* the open tab: a thin glowing amber line on the rail's edge */
  :root[data-ui="ardosia"] .is-admin .mgr-tabs > .mgr-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: -10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--ui-accent);
    box-shadow: 0 0 12px var(--ui-accent);
  }
  :root[data-ui="ardosia"] #console .co-list:has(> .co > .co-row > .co-dot) > .co {
    border: 1px solid var(--ui-line);
    background: linear-gradient(180deg, #191d25, #14171d);
  }
  :root[data-ui="ardosia"] #console .co-list:has(> .co > .co-row > .co-dot) .co-acts {
    border-top-color: var(--ui-line);
  }
}
@media (max-width: 999px) {
  :root[data-ui="ardosia"] .is-admin .mgr-bar {
    background: var(--ui-side);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  :root[data-ui="ardosia"] .is-admin .bnav-bar {
    background: rgba(11, 13, 16, 0.96);
    border-top: 1px solid var(--ui-line);
  }
  :root[data-ui="ardosia"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] {
    color: var(--ui-accent);
  }
  :root[data-ui="ardosia"] .is-admin .bnav-bar .mgr-tab[aria-selected="true"] .ico {
    background: rgba(242, 163, 58, 0.14);
    color: var(--ui-accent);
  }
}
:root.is-console[data-ui="ardosia"] #console {
  --ui-accent: #f2a33a;
  --ui-accent-ink: #1a1206;
}

/* gestão on phones: the name gets the whole width (the "Administração" tag beside it, the status underneath) and
   the buttons (Pré-visualizar, Publicar…) a row of their own, so nothing overlaps on narrow screens */
@media (max-width: 640px) {
  #admin .mgr-bar-in {
    row-gap: 10px;
  }
  #admin .mgr-title {
    flex: 1 1 100%;
    min-width: 0;
    align-items: center;
  }
  #admin .mgr-title-t {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
  }
  #admin .mgr-title-name {
    flex: 0 1 auto;
    min-width: 0;
  }
  #admin .mgr-title-t > .role-pill {
    flex: none;
    white-space: nowrap;
  }
  #admin .mgr-title-t > .mgr-status {
    flex: 1 1 100%;
  }
  #admin .mgr-acts {
    flex: 1 1 100%;
    margin-left: 0;
    flex-wrap: nowrap;
  }
  #admin .mgr-acts > .btn {
    flex: 1 1 0;
    min-width: 0;
  }
  #admin .mgr-acts > .role-pill {
    flex: none;
  }
}

/* Itens: a dish with many labels wraps them onto more lines instead of running over the price, star and switch */
:is(#admin, #console) .mgr-name .flags {
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}
:is(#admin, #console) .mgr-name .flags .tag {
  margin-left: 0;
  white-space: nowrap;
}
:is(#admin, #console) .mgr-name .t {
  flex: 0 1 auto;
  min-width: min(9em, 45%);
}
@media (max-width: 560px) {
  :is(#admin, #console) .mgr-name .t {
    min-width: 0;
    max-width: 100%;
  }
}
:is(#admin, #console) .mgr-name .flags .tag-more {
  display: none;
  background: var(--ui-sunken);
  color: var(--ui-ink-2);
}
@media (max-width: 560px) {
  :is(#admin, #console) .mgr-name .flags > .tag:nth-child(n + 3):not(.tag-more) {
    display: none;
  }
  :is(#admin, #console) .mgr-name .flags .tag-more {
    display: inline-flex;
  }
}
/* the QR code design is picked from a list, as wide as one of the fields under it */
#admin .qr-style-fld {
  width: min(100%, 340px);
}
/* palette and lettering are picked from a list, with the current choice shown beside it */
#admin .pick-fld {
  width: min(100%, 380px);
}
#admin .pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#admin .pick-row select {
  flex: 1;
  min-width: 0;
}
#admin .pick-row.is-locked {
  opacity: 0.5;
}
#admin .pick-prev {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--ui-line-2);
  border-radius: var(--ui-r-sm);
  background: var(--field);
}
#admin .pick-prev.dots i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--field);
  margin-left: -5px;
}
#admin .pick-prev.dots i:first-child {
  margin-left: 0;
}
/* a label's icon, drawn bigger than on the menu's filter button so it reads in the box */
#admin .tag-ico-prev {
  color: var(--ui-ink);
}
#admin .tag-ico-prev svg {
  width: 20px;
  height: 20px;
}
#admin .pick-font {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ui-ink);
}
