/* GERADO por docs/design-system/fonte/gerar.cjs a partir de frontend/src/styles/main.css,
 * components/kx/kx-campo.css e components/carregamento/carregamento.css, com o tailwind.config.js do app.
 * Só entram as classes que as páginas do artefato usam. Não edite: mude o app e gere de novo. */
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

input:where([type='text']),input:where(:not([type])),input:where([type='email']),input:where([type='url']),input:where([type='password']),input:where([type='number']),input:where([type='date']),input:where([type='datetime-local']),input:where([type='month']),input:where([type='search']),input:where([type='tel']),input:where([type='time']),input:where([type='week']),select:where([multiple]),textarea,select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: #fff;
  border-color: #6b7280;
  border-width: 1px;
  border-radius: 0px;
  padding-top: 0.5rem;
  padding-right: 0.75rem;
  padding-bottom: 0.5rem;
  padding-left: 0.75rem;
  font-size: 1rem;
  line-height: 1.5rem;
  --tw-shadow: 0 0 #0000;
}

input:where([type='text']):focus, input:where(:not([type])):focus, input:where([type='email']):focus, input:where([type='url']):focus, input:where([type='password']):focus, input:where([type='number']):focus, input:where([type='date']):focus, input:where([type='datetime-local']):focus, input:where([type='month']):focus, input:where([type='search']):focus, input:where([type='tel']):focus, input:where([type='time']):focus, input:where([type='week']):focus, select:where([multiple]):focus, textarea:focus, select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #2563eb;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  border-color: #2563eb;
}

input::-moz-placeholder, textarea::-moz-placeholder {
  color: #6b7280;
  opacity: 1;
}

input::placeholder,textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

::-webkit-date-and-time-value {
  min-height: 1.5em;
  text-align: inherit;
}

::-webkit-datetime-edit {
  display: inline-flex;
}

::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field {
  padding-top: 0;
  padding-bottom: 0;
}

select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
}

select:where([multiple]),select:where([size]:not([size="1"])) {
  background-image: initial;
  background-position: initial;
  background-repeat: unset;
  background-size: initial;
  padding-right: 0.75rem;
  -webkit-print-color-adjust: unset;
          print-color-adjust: unset;
}

input:where([type='checkbox']),input:where([type='radio']) {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 0;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
  display: inline-block;
  vertical-align: middle;
  background-origin: border-box;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-shrink: 0;
  height: 1rem;
  width: 1rem;
  color: #2563eb;
  background-color: #fff;
  border-color: #6b7280;
  border-width: 1px;
  --tw-shadow: 0 0 #0000;
}

input:where([type='checkbox']) {
  border-radius: 0px;
}

input:where([type='radio']) {
  border-radius: 100%;
}

input:where([type='checkbox']):focus,input:where([type='radio']):focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
  --tw-ring-offset-width: 2px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #2563eb;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}

input:where([type='checkbox']):checked,input:where([type='radio']):checked {
  border-color: transparent;
  background-color: currentColor;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

input:where([type='checkbox']):checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

@media (forced-colors: active)  {
  input:where([type='checkbox']):checked {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}

input:where([type='radio']):checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}

@media (forced-colors: active)  {
  input:where([type='radio']):checked {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}

input:where([type='checkbox']):checked:hover,input:where([type='checkbox']):checked:focus,input:where([type='radio']):checked:hover,input:where([type='radio']):checked:focus {
  border-color: transparent;
  background-color: currentColor;
}

input:where([type='checkbox']):indeterminate {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
  border-color: transparent;
  background-color: currentColor;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

@media (forced-colors: active)  {
  input:where([type='checkbox']):indeterminate {
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
  }
}

input:where([type='checkbox']):indeterminate:hover,input:where([type='checkbox']):indeterminate:focus {
  border-color: transparent;
  background-color: currentColor;
}

input:where([type='file']) {
  background: unset;
  border-color: inherit;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-size: unset;
  line-height: inherit;
}

input:where([type='file']):focus {
  outline: 1px solid ButtonText;
  outline: 1px auto -webkit-focus-ring-color;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.625;
  color: rgb(var(--fg));
  background: rgb(var(--bg-solid));
}

/* Canvas: aurora suave sobre o fundo sólido. Nunca recebe texto denso. */

.dark body {
  background: transparent;
}

h1, h2, h3, h4 {
  color: rgb(var(--fg));
  letter-spacing: -0.015em;
}

h1 {
  font-family: "Bricolage Grotesque", Inter, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

a {
  color: rgb(var(--accent));
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Só links de texto esmaecem no hover. Antes valia para todo <a>, inclusive os com aparência de botão (129 RouterLink/<a>
     com btn-*, e o «Nova licença» dividido), que ficavam com o texto a 85 %. */

/* :where() deixa a especificidade em (0,1,1): com quatro :not() ela vencia o opacity: 1 do «Nova licença» dividido. */

a:where(:not([class*="btn-"], .rail-item, .p-item, .nav-item)):hover {
  opacity: 0.85;
}

::-moz-selection {
  background: rgba(var(--accent) / 0.22);
  color: rgb(var(--fg));
}

::selection {
  background: rgba(var(--accent) / 0.22);
  color: rgb(var(--fg));
}

hr {
  border-color: rgba(var(--border) / 0.6);
}

/* Anel de foco consistente em todo controle interativo. */

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

/* Espaçamento comum das páginas e dos blocos principais. */

.page-container {
  --page-space: 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: var(--page-space);
}

@media (max-width: 1023px) {
  .page-container {
    --page-space: 12px;
  }
}

/* ── Camada 2: superfície (cards, tabelas, formulários) ────────── */

.glass {
  border-radius: 1.125rem;
  background: rgb(var(--surface));
  border: 1px solid rgba(var(--border) / var(--border-alpha));
  box-shadow: var(--shadow-card);
}

.dark .glass {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Camada 3: vidro do shell (trilho, painel, barra de abas) ──── */

.glass-shell {
  background: var(--shell-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-color: rgba(var(--border) / var(--border-alpha));
}

.glass-panel {
  background: var(--panel-bg);
  border-color: rgba(var(--border) / var(--border-alpha));
}

/* ── Camada 3: vidro de sobreposição (paleta, inspector, gavetas) ─ */

.glass-overlay {
  border-radius: 1.125rem;
  background: var(--overlay-bg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--overlay-border);
  box-shadow: var(--shadow-lg);
}

/* Compat: `.glass-nav` era o vidro do header/sidebar antigos. */

.glass-soft {
  border-radius: 0.875rem;
  background: rgba(var(--surface-2) / 0.7);
  border: 1px solid rgba(var(--border) / 0.5);
}

.dark .glass-soft {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.glass-modal {
  border-radius: 1.125rem;
  background: rgb(var(--surface));
  border: 1px solid rgba(var(--border));
  box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.3) inset,
      0 25px 50px -12px rgba(15, 23, 42, 0.25),
      0 0 0 1px rgba(15, 23, 42, 0.02);
}

.dark .glass-modal {
  background: rgb(var(--surface-2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 25px 60px -12px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.04);
}

.modal-overlay {
  position: fixed;
  inset: 0px;
  z-index: 60;
  display: flex;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-overlay {
  animation: fade-in 0.16s ease-out;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 16, 32, 0.45);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.\!card {
  border-radius: 1.125rem;
  background: rgb(var(--surface));
  border: 1px solid rgba(var(--border) / var(--border-alpha));
  box-shadow: var(--shadow-card);
}

.dark .\!card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card {
  border-radius: 1.125rem;
  background: rgb(var(--surface));
  border: 1px solid rgba(var(--border) / var(--border-alpha));
  box-shadow: var(--shadow-card);
}

.dark .card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.surface {
  border-radius: 1.125rem;
  background: rgb(var(--surface));
  border: 1px solid rgba(var(--border) / var(--border-alpha));
  box-shadow: var(--shadow-card);
}

.dark .surface {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.display {
  font-family: "Bricolage Grotesque", Inter, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.muted   {
  color: rgb(var(--fg-muted));
}

.soft    {
  color: rgb(var(--fg-2));
}

/*
   * Botões — hierarquia (§20 COMPONENTS.md):
   *   .btn-primary   → ação principal da tela/modal. UMA por viewport.
   *                    Sólido, no roxo da marca.
   *   .btn-secondary → ações alternativas ("Cancelar", "Voltar").
   *   .btn-ghost     → ações terciárias.
   *   .btn-danger    → ações destrutivas (rosa translúcido).
   */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  min-height: 2.5rem;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  background: var(--btn-primary-bg);
  color: rgb(var(--btn-primary-ink));
  box-shadow: var(--btn-primary-shadow);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.06s ease, box-shadow 0.18s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.btn-primary:hover {
  background: linear-gradient(var(--btn-primary-hover), var(--btn-primary-hover)), var(--btn-primary-bg);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-primary:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 2px;
}

.btn-primary:disabled,
  .btn-primary[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.btn-primary-sm {
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2rem;
  border-radius: 0.5rem;
}

.btn-primary-lg {
  padding: 0.8125rem 1.375rem;
  font-size: 0.9375rem;
  min-height: 2.875rem;
  border-radius: 0.75rem;
}

.btn-primary-icon {
  padding: 0.625rem;
  aspect-ratio: 1 / 1;
  gap: 0;
}

.btn-primary-block {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-secondary {
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  border: 1px solid rgba(var(--border) / 0.9);
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  background: rgba(var(--surface-2));
}

.dark .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.btn-ghost:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  color: rgb(var(--fg-2));
}

.btn-ghost:hover {
  background: rgba(var(--surface-2));
  color: rgb(var(--fg));
}

.dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.btn-danger:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-danger {
  background: var(--bad-bg);
  color: rgb(var(--bad));
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* P0-10 (Fable 14/10): tamanho pequeno comum a todas as variantes (32 px, raio 8, 13 px). Era usado no AppShell sem
     existir. Depois das variantes: a mesma especificidade, então vence pela ordem. */

.btn-sm {
  min-height: 2rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1rem;
  gap: 0.375rem;
}

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

.input {
  width: 100%;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  min-height: 2.5rem;
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  border: 1px solid var(--border-strong);
}

.dark .input {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

/* P0 da crítica do Fable (14/10): placeholder em --fg-muted (antes slate-400/500, 2,6/3,1:1). */

.input::-moz-placeholder {
  color: rgb(var(--fg-muted));
  opacity: 1;
}

.input::placeholder {
  color: rgb(var(--fg-muted));
  opacity: 1;
}

.input:focus {
  outline: none;
  border-color: rgb(var(--accent));
  box-shadow: 0 0 0 3px rgba(var(--accent) / 0.18);
}

.input-error,
  .input.input-error {
  border-color: #F43F5E !important;
}

.input-error:focus,
  .input.input-error:focus {
  border-color: #F43F5E !important;
  box-shadow: 0 0 0 1px #F43F5E !important;
}

.form-field-error {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  line-height: 1.375;
  color: rgb(var(--bad));
  /* P0-3: antes #F43F5E, 3,5:1 */
}

.label {
  margin-bottom: 0.375rem;
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--fg-muted));
}

.chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 9999px;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

/* Tabelas — `.table-erp` é alias do `.table-kx` para alinhar com gestor-erp-app */

.table-kx,
  .table-erp {
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.table-kx th,
  .table-erp th {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--fg-muted));
  border-bottom: 1px solid rgba(var(--border) / 0.5);
  background: rgba(var(--surface-2) / 0.6);
}

.table-kx td,
  .table-erp td {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: rgb(var(--fg));
  border-bottom: 1px solid rgba(var(--border) / 0.4);
}

.dark .table-kx td,
  .dark .table-erp td {
  border-color: rgba(255, 255, 255, 0.05);
}

.dark .table-kx th,
  .dark .table-erp th {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.table-kx tr:last-child td,
  .table-erp tr:last-child td {
  border-bottom: 0;
}

.table-kx tbody tr:hover td,
  .table-erp tbody tr:hover td {
  background: var(--row-hover);
}

/* Densidade compacta (preferência do usuário em Aparência). */

.density-compacta .table-kx td,
  .density-compacta .table-erp td {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.density-compacta .table-kx th,
  .density-compacta .table-erp th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Linha selecionada (Inspector aberto) */

.table-kx tbody tr.is-selected td,
  .table-erp tbody tr.is-selected td {
  background: rgba(var(--accent) / 0.08);
}

.table-kx tbody tr.is-selected td:first-child,
  .table-erp tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 rgb(var(--accent));
}

.dark .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.router-link-active,
  .nav-item.router-link-exact-active,
  .nav-item.active {
  color: rgb(var(--accent));
  background: rgba(var(--accent) / 0.1);
  font-weight: 600;
}

.dark .nav-divider {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding-left: 0.375rem;
  padding-right: 0.375rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  min-width: 1.25rem;
  background: var(--kbd-bg);
  border: 1px solid rgba(var(--border) / 0.8);
  color: rgb(var(--fg-muted));
}

.dark .kbd {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ════════════════════════════════════════════════════════════
   * Shell e componentes Frost 2.0
   * ════════════════════════════════════════════════════════════ */

/* Trilho de módulos ------------------------------------------------ */

.rail-item {
  position: relative;
  display: flex;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 1.125rem;
  text-align: center;
  width: 60px;
  height: 58px;
  color: rgb(var(--fg-2));
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 140ms, color 140ms;
}

.rail-item:hover {
  background: var(--row-hover);
  color: rgb(var(--fg));
}

/* Alternativa A (Fable 14/10, docs/2026-10-14/design-system/critica-menu-ativo-fable.md): rótulo do ativo em --fg
     (13,1:1 claro / 12,6:1 escuro; antes --accent, 4,7 / 5,3, e o hover ficava mais legível que o ativo); o acento fica
     no ícone, na pílula (um pouco mais forte) e na barra. */

.rail-item.active {
  color: rgb(var(--fg));
  background: linear-gradient(135deg, rgba(var(--accent) / 0.2), rgba(var(--accent-2) / 0.1));
}

.rail-item.active svg {
  color: rgb(var(--accent));
}

.rail-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, rgb(var(--accent)), rgb(var(--accent-2)));
}

.rail-item.sm {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
}

.rail-label {
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Painel contextual -------------------------------------------------- */

.p-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.625rem;
  border-radius: 0.75rem;
  height: 36px;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgb(var(--fg-2));
  transition: background 120ms, color 120ms;
}

.p-item:hover {
  background: var(--row-hover);
  color: rgb(var(--fg));
}

/* Alternativa A (Fable 14/10): texto do ativo em --fg (13,0:1 claro / 10,8:1 escuro; antes --accent, 4,8 / 5,2); o
     acento vai para o ícone, para a pílula (0,14 / 0,18) e para uma barra de 3 px, como no trilho — o ativo não é
     marcado só pela cor do texto. */

.p-item.active,
  .p-item.router-link-exact-active {
  position: relative;
  background: rgba(var(--accent) / 0.14);
  color: rgb(var(--fg));
  font-weight: 600;
}

.dark .p-item.active,
  .dark .p-item.router-link-exact-active {
  background: rgba(var(--accent) / 0.18);
}

.p-item.active svg,
  .p-item.router-link-exact-active svg {
  color: rgb(var(--accent));
}

.p-item.active::before,
  .p-item.router-link-exact-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--accent));
}

.p-item .count {
  margin-left: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: rgb(var(--fg-muted));
}

/* Escopo (primeiro segmento do caminho) e busca ---------------------- */

.scope {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  font-size: 13px;
  font-weight: 600;
  height: 34px;
  padding: 0 10px 0 5px;
  border: 1px solid rgba(var(--border) / 0.9);
  background: rgb(var(--surface));
  color: rgb(var(--fg));
  box-shadow: var(--shadow-card);
  max-width: 260px;
}

.dark .scope {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.scope-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  width: 24px;
  height: 24px;
  font-size: 10px;
  background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-2)));
}

.dark .searchbar {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  width: 30px;
  height: 30px;
  font-size: 11px;
  background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-2)));
}

/* Visões (abas com contador) ---------------------------------------- */

.views {
  display: flex;
  min-width: 0px;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.views::-webkit-scrollbar {
  display: none;
}

.view {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.75rem;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--fg-2));
  border: 1px solid transparent;
  transition: background 120ms, color 120ms;
}

.view:hover {
  color: rgb(var(--fg));
  background: var(--row-hover);
}

.view.active {
  background: rgb(var(--surface));
  color: rgb(var(--accent));
  box-shadow: var(--shadow-card);
  border-color: rgba(var(--border) / 0.9);
}

.dark .view.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.view .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(var(--surface-2));
  color: rgb(var(--fg-muted));
}

.dark .view .n {
  background: rgba(255, 255, 255, 0.08);
}

.view.active .n {
  background: rgba(var(--accent) / 0.12);
  color: rgb(var(--accent));
}

/* Tokens de filtro (uma linha, nunca quebram) ------------------------ */

.frail {
  display: flex;
  min-width: 0px;
  align-items: center;
  gap: 0.375rem;
  overflow-x: auto;
  flex: 1 1 auto;
  scrollbar-width: none;
}

.frail::-webkit-scrollbar {
  display: none;
}

.ftk {
  display: inline-flex;
  flex-shrink: 0;
  align-items: stretch;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 0.75rem;
  height: 32px;
  border: 1px solid rgba(var(--border) / 0.9);
  background: rgb(var(--surface));
  font-size: 12.5px;
  box-shadow: var(--shadow-card);
}

.dark .ftk {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.ftk > span, .ftk > button {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  line-height: 1;
}

.ftk .k {
  color: rgb(var(--fg-muted));
  font-weight: 500;
  background: rgba(var(--surface-2));
  border-right: 1px solid rgba(var(--border) / 0.6);
}

.dark .ftk .k {
  background: rgba(255, 255, 255, 0.05);
}

.ftk .op {
  color: rgb(var(--fg-muted));
  font-weight: 500;
  padding: 0 7px;
  border-right: 1px solid rgba(var(--border) / 0.6);
}

.ftk .v {
  gap: 0.375rem;
  color: rgb(var(--accent));
  font-weight: 600;
  cursor: pointer;
}

.ftk .v:hover {
  background: rgba(var(--accent) / 0.08);
}

.ftk .x {
  color: rgb(var(--fg-muted));
  border-left: 1px solid rgba(var(--border) / 0.6);
  padding: 0 8px;
  cursor: pointer;
}

.ftk .x:hover {
  background: var(--bad-bg);
  color: rgb(var(--bad));
}

.ftk.more {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
  cursor: pointer;
}

.ftk.more > span {
  color: rgb(var(--fg-muted));
  font-weight: 600;
  padding: 0 10px;
}

/* Etiquetas de nível (Chamados) ------------------------------------- */

.tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: 0.375rem;
  text-transform: uppercase;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(var(--surface-2));
  color: rgb(var(--fg-2));
}

.dark .tag {
  background: rgba(255, 255, 255, 0.08);
}

.tag.parceiro {
  background: rgba(var(--accent) / 0.12);
  color: rgb(var(--accent));
}

.tag.kinyx {
  background: rgba(var(--accent-2) / 0.16);
  color: rgb(var(--fg));
}

.dark .lvl-ic {
  background: rgba(255, 255, 255, 0.08);
}

/* Cartões de indicador --------------------------------------------- */

.tile {
  container-type: inline-size;
}

.kpi {
  font-family: "Bricolage Grotesque", Inter, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: rgb(var(--fg));
  white-space: nowrap;
}

.spark {
  flex: 0 1 96px;
  min-width: 40px;
  height: 36px;
}

@container (max-width: 190px) {
  .spark {
    display: none;
  }
}

/* Inspector (painel lateral de detalhe rápido) ----------------------- */

.inspector {
  border-radius: 1.125rem;
  background: var(--overlay-bg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--overlay-border);
  box-shadow: var(--shadow-lg);
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(400px, calc(100vw - 24px));
  border-radius: 18px;
}

@media (max-width: 1023px) {
  .inspector {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 86dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
}

/* Barra de abas (celular) -------------------------------------------- */

.tab-item.active {
  color: rgb(var(--accent));
}

/* Resultado da paleta / itens de lista com destaque ----------------- */

.res {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  text-align: left;
  padding: 8px 12px;
  font-size: 13.5px;
  color: rgb(var(--fg));
}

.res:hover, .res.selected {
  background: rgba(var(--accent) / 0.1);
}

.res .ic {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(var(--surface-2));
  color: rgb(var(--fg-2));
}

.dark .res .ic {
  background: rgba(255, 255, 255, 0.08);
}

.res.selected .ic {
  background: rgb(var(--accent));
  color: rgb(var(--accent-ink));
}

/* Segmentado (período, prioridade, modo) ----------------------------- */

.seg {
  display: inline-flex;
  border-radius: 0.75rem;
  padding: 3px;
  background: rgba(var(--surface-2));
  border: 1px solid rgba(var(--border) / 0.6);
}

.dark .seg {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.seg > button {
  white-space: nowrap;
  border-radius: 0.375rem;
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgb(var(--fg-2));
}

.seg > button.on {
  background: rgb(var(--surface));
  color: rgb(var(--accent));
  box-shadow: var(--shadow-card);
}

.dark .seg > button.on {
  background: rgb(var(--surface));
}

/* P0-3: acento >= 4,5:1 (antes 3,9:1) */

/* Pílula de escolha (categoria) -------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  border-radius: 9999px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(var(--border) / 0.9);
  background: rgb(var(--surface));
  font-size: 12.5px;
  font-weight: 600;
  color: rgb(var(--fg-2));
}

.dark .pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.pill.on {
  background: rgb(var(--accent));
  color: rgb(var(--accent-ink));
  border-color: rgb(var(--accent));
}

/* Cartão de opção (rádio grande) ------------------------------------- */

.opt {
  position: relative;
  display: flex;
  cursor: pointer;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.875rem;
  padding: 12px 14px;
  border: 1px solid rgba(var(--border) / 0.9);
  background: rgb(var(--surface));
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
}

.dark .opt {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.opt:hover {
  border-color: rgba(var(--accent) / 0.5);
}

.opt.selected {
  border-color: rgb(var(--accent));
  background: rgba(var(--accent) / 0.08);
  box-shadow: 0 0 0 3px rgba(var(--accent) / 0.12);
}

.opt-ic {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  width: 36px;
  height: 36px;
  background: rgba(var(--surface-2));
  color: rgb(var(--fg-2));
}

.dark .opt-ic {
  background: rgba(255, 255, 255, 0.08);
}

.opt.selected .opt-ic {
  background: rgb(var(--accent));
  color: rgb(var(--accent-ink));
}

/* Chips de situação semânticos -------------------------------------- */

.chip-ok      {
  background: var(--ok-bg);
  color: rgb(var(--ok));
}

.chip-warn    {
  background: var(--warn-bg);
  color: rgb(var(--warn));
}

.chip-bad     {
  background: var(--bad-bg);
  color: rgb(var(--bad));
}

.chip-info    {
  background: var(--info-bg);
  color: rgb(var(--info));
}

.chip-neutral {
  background: var(--neutral-bg);
  color: rgb(var(--neutral));
}

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

.visible {
  visibility: visible;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.mb-1\.5 {
  margin-bottom: 0.375rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.inline-grid {
  display: inline-grid;
}

.hidden {
  display: none;
}

.w-full {
  width: 100%;
}

.min-w-0 {
  min-width: 0px;
}

.flex-shrink {
  flex-shrink: 1;
}

.shrink-0 {
  flex-shrink: 0;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.16s ease-out;
}

@keyframes scale-in {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(-4px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-scale-in {
  animation: scale-in 0.16s ease-out;
}

.cursor-pointer {
  cursor: pointer;
}

.items-start {
  align-items: flex-start;
}

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

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.overflow-x-auto {
  overflow-x: auto;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.rounded {
  border-radius: 0.625rem;
}

.rounded-2xl {
  border-radius: 1.125rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.75rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-xl {
  border-radius: 0.875rem;
}

.border {
  border-width: 1px;
}

.bg-emerald-500\/15 {
  background-color: rgb(16 185 129 / 0.15);
}

.bg-violet-500\/10 {
  background-color: rgb(139 92 246 / 0.1);
}

.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}

.\!p-2 {
  padding: 0.5rem !important;
}

.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.px-3\.5 {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.pl-9 {
  padding-left: 2.25rem;
}

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

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-medium {
  font-weight: 500;
}

.uppercase {
  text-transform: uppercase;
}

.ordinal {
  --tw-ordinal: ordinal;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}

.leading-snug {
  line-height: 1.375;
}

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

.text-\[Npx\] {
  color: Npx;
}

.text-amber-500 {
  --tw-text-opacity: 1;
  color: rgb(245 158 11 / var(--tw-text-opacity, 1));
}

.text-amber-600 {
  --tw-text-opacity: 1;
  color: rgb(217 119 6 / var(--tw-text-opacity, 1));
}

.text-rose-500 {
  --tw-text-opacity: 1;
  color: rgb(244 63 94 / var(--tw-text-opacity, 1));
}

.text-slate-500 {
  --tw-text-opacity: 1;
  color: rgb(100 116 139 / var(--tw-text-opacity, 1));
}

.underline {
  text-decoration-line: underline;
}

.outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.outline {
  outline-style: solid;
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

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

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* ============================================================
 * Portal SIK — Frost 2.0
 *
 * Evolução compatível do Glassmorphic "Frost" herdado do gestor-erp-app.
 * O que muda em relação ao Frost 1 (ver docs/proposta-layout-v2.md §7):
 *
 *   - Três camadas de elevação: CANVAS (aurora suave) → SUPERFÍCIE
 *     (`.glass`, agora sólida, sem desfoque — tabelas, cards, forms)
 *     → SOBREPOSIÇÃO (`.glass-shell` para trilho/painel/barra de abas e
 *     `.glass-overlay` para paleta, inspector, gavetas e folhas — com
 *     desfoque de verdade). O vidro passa a marcar o que flutua.
 *   - Acento primário = roxo do logotipo (#5844E3) no claro (6,3:1 sobre
 *     branco) e violeta 400 no escuro. `.btn-primary` fica sólido.
 *   - JetBrains Mono para identificadores (chaves, CNPJ, números).
 *
 * As variáveis e classes antigas continuam existindo (`--accent`,
 * `.glass`, `.btn-*`, `.input`, `.chip`, `.table-kx`, `.nav-item`…), de
 * modo que as telas atuais não precisam mudar. As classes novas do shell
 * (`.rail-item`, `.p-item`, `.view`, `.ftk`, `.tag`, `.lvl-*`, `.tile`)
 * vivem na seção "Shell e componentes Frost 2.0".
 * ============================================================ */

:root {
  /* Canvas + aurora */
  --bg-a:         88  68 227;
  /* aurora roxa */
  --bg-b:          6 182 212;
  /* aurora ciano */
  --bg-c:        241 245 249;
  --bg-solid:    243 242 250;
  /* #F3F2FA */
  --aurora-alpha-a: 0.15;
  --aurora-alpha-b: 0.13;
  /* Superfícies */
  --surface:      255 255 255;
  --surface-2:    245 244 251;
  --border:       226 232 240;
  --border-soft:  226 232 240;
  --border-alpha: 0.7;
  /* P0 da crítica do Fable (14/10): contorno que identifica controle (campos, caixa, rádio, interruptor), >= 3:1. */
  --border-strong: rgba(20, 18, 60, 0.5);
  /* Vidro (shell e sobreposições) */
  --shell-bg:     rgba(255, 255, 255, 0.62);
  --panel-bg:     rgba(255, 255, 255, 0.38);
  --overlay-bg:   rgba(255, 255, 255, 0.88);
  --overlay-border: rgba(20, 18, 60, 0.14);
  /* Texto */
  --fg:            20  20  51;
  /* #141433 */
  --fg-2:          61  63  92;
  /* #3D3F5C */
  --fg-muted:      95 100 128;
  /* #5F6480 · 5,8:1 sobre branco */
  /* Acentos */
  --accent:        88  68 227;
  /* roxo Kinyx #5844E3 */
  --accent-2:       6 182 212;
  /* ciano — só em gradientes */
  --accent-ink:   255 255 255;
  /* texto sobre o acento */
  /* Botão primário (item W, 14/10): as cores do «Nova licença» da Visão geral, IGUAIS nos dois temas — degradê da logo
     com texto branco (6,3:1 no início, 4,6:1 no fim). No escuro o --accent é o violeta 400 e o --accent-ink escuro;
     o botão não usa mais esse par. O hover escurece (12 % do fundo escuro): clarear derrubava o fim para 3,9–4,3:1. */
  --btn-primary-bg: linear-gradient(135deg, #5844E3, #6D5BFF);
  --btn-primary-ink: 255 255 255;
  --btn-primary-shadow: 0 10px 24px -12px rgba(88, 68, 227, 0.8);
  --btn-primary-hover: rgba(11, 16, 32, 0.12);
  /* Situação (texto) e fundos translúcidos */
  --ok:             4 120  87;
  --ok-bg:   rgba(16, 185, 129, 0.14);
  --warn:         146  64  14;
  --warn-bg: rgba(245, 158, 11, 0.16);
  /* amber-800: chip-warn >= 4,5:1 (P0-3) */
  --bad:          190  18  60;
  --bad-bg:  rgba(244, 63, 94, 0.12);
  --info:          79  62 214;
  --info-bg: rgba(88, 68, 227, 0.12);
  --neutral:       71  85 105;
  --neutral-bg: rgba(100, 116, 139, 0.13);
  /* Sombras e miscelânea */
  --shadow-card:  0 1px 2px rgba(20, 18, 60, 0.04), 0 10px 28px -14px rgba(20, 18, 60, 0.14);
  --shadow-lg:    0 28px 72px -20px rgba(20, 18, 60, 0.32);
  --kbd-bg:       rgba(20, 18, 60, 0.05);
  --row-hover:    rgba(20, 18, 60, 0.03);
  --grid-line:    rgba(20, 18, 60, 0.09);
  /* Séries de gráfico (validadas contra daltonismo — ver proposta §5.3) */
  --serie-1:      #5844E3;
  --serie-2:      #0891B2;
  --ord-1:        #A78BFA;
  --ord-2:        #7C5CF0;
  --ord-3:        #5844E3;
  --spark-dim:    #B4B9CC;
}

.dark {
  --bg-a:         124  58 237;
  --bg-b:           6 182 212;
  --bg-c:           2   6  23;
  --bg-solid:      11  16  32;
  /* #0B1020 */
  --aurora-alpha-a: 0.30;
  --aurora-alpha-b: 0.16;
  --surface:       18  23  46;
  --surface-2:     30  36  64;
  --border:        51  65  85;
  --border-strong: rgba(255, 255, 255, 0.38);
  --border-soft:   30  41  59;
  --border-alpha: 0.6;
  --shell-bg:     rgba(9, 13, 28, 0.62);
  --panel-bg:     rgba(255, 255, 255, 0.025);
  --overlay-bg:   rgba(18, 23, 46, 0.90);
  --overlay-border: rgba(255, 255, 255, 0.14);
  --fg:           241 242 250;
  --fg-2:         199 203 224;
  --fg-muted:     152 160 188;
  --accent:       167 139 250;
  /* violeta 400 */
  --accent-2:      34 211 238;
  --accent-ink:    11  16  32;
  --ok:           110 231 183;
  --ok-bg:   rgba(16, 185, 129, 0.18);
  --warn:         252 211  77;
  --warn-bg: rgba(245, 158, 11, 0.18);
  --bad:          253 164 175;
  --bad-bg:  rgba(244, 63, 94, 0.18);
  --info:         196 181 253;
  --info-bg: rgba(139, 92, 246, 0.22);
  --neutral:      203 213 225;
  --neutral-bg: rgba(148, 163, 184, 0.16);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg:    0 28px 72px -20px rgba(0, 0, 0, 0.75);
  --kbd-bg:       rgba(255, 255, 255, 0.06);
  --row-hover:    rgba(255, 255, 255, 0.04);
  --grid-line:    rgba(255, 255, 255, 0.09);
  --serie-1:      #8B5CF6;
  --serie-2:      #0891B2;
  --ord-1:        #C4B5FD;
  --ord-2:        #A78BFA;
  --ord-3:        #7C5CF0;
  --spark-dim:    #4B5170;
}

/* Barra de rolagem padrão do layout v2 (COMPONENTS.md §28): só o indicador, fino e
   arredondado, sem trilho nem setas; engrossa e escurece sob o ponteiro. A cor vem
   do texto secundário e por isso acompanha o tema. */

.scrollbar-thin::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.scrollbar-thin::-webkit-scrollbar-track,
.scrollbar-thin::-webkit-scrollbar-corner {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  min-height: 32px;
  min-width: 32px;
  border: 3px solid transparent;
  border-radius: 999px;
  background-color: rgba(var(--fg-muted) / 0.35);
  background-clip: padding-box;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover,
.scrollbar-thin::-webkit-scrollbar-thumb:active {
  border-width: 2px;
  background-color: rgba(var(--fg-muted) / 0.6);
}

/* O Firefox não tem os pseudo-elementos acima e usa as propriedades padrão. No Chrome
   elas trariam de volta a barra do sistema, com setas, e por isso ficam só aqui. */

@supports not selector(::-webkit-scrollbar) {
  .scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--fg-muted) / 0.45) transparent;
  }
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: rgb(var(--fg));
  -webkit-transition: background-color 9999s ease-in-out 0s;
  transition: background-color 9999s ease-in-out 0s;
}

/* Spinners nativos de <input type="number"> — escondemos globalmente. */

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
          appearance: textfield;
}

/* Checkbox e Radio nativos — estilo Frost. */

input[type="checkbox"]:not(.kx-native),
input[type="radio"]:not(.kx-native) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin: 0;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  vertical-align: middle;
  background: rgba(var(--surface) / 0.5);
  border: 1.5px solid var(--border-strong);
  /* P0-2: antes 1,2/1,6:1 */
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease;
}

.dark input[type="checkbox"]:not(.kx-native),
.dark input[type="radio"]:not(.kx-native) {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

input[type="checkbox"]:not(.kx-native) {
  border-radius: 0.3125rem;
}

input[type="radio"]:not(.kx-native)    {
  border-radius: 9999px;
}

input[type="checkbox"]:not(.kx-native):not(:checked):not(:indeterminate):hover:not(:disabled),
input[type="radio"]:not(.kx-native):not(:checked):hover:not(:disabled) {
  border-color: rgba(var(--accent) / 0.7);
  background: rgba(var(--accent) / 0.08);
}

input[type="checkbox"]:not(.kx-native):focus-visible,
input[type="radio"]:not(.kx-native):focus-visible {
  outline: 0;
  border-color: rgb(var(--accent));
  box-shadow: 0 0 0 3px rgba(var(--accent) / 0.25);
}

input[type="checkbox"]:not(.kx-native):checked,
input[type="radio"]:not(.kx-native):checked {
  background-color: rgb(var(--accent));
  border-color: rgb(var(--accent));
  box-shadow: 0 2px 6px -2px rgba(var(--accent) / 0.5);
}

input[type="checkbox"]:not(.kx-native):checked {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem 0.75rem;
}

input[type="checkbox"]:not(.kx-native):indeterminate {
  background-color: rgb(var(--accent));
  border-color: rgb(var(--accent));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'><line x1='5' y1='12' x2='19' y2='12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem 0.75rem;
}

/* P0 da crítica do Fable (14/10): no escuro o acento é claro: marca escura (--accent-ink) no lugar do branco, 2,7:1. */

.dark input[type="checkbox"]:not(.kx-native):checked {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1020' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

.dark input[type="checkbox"]:not(.kx-native):indeterminate {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1020' stroke-width='3.2' stroke-linecap='round'><line x1='5' y1='12' x2='19' y2='12'/></svg>");
}

.dark input[type="radio"]:not(.kx-native):checked {
  background-image: radial-gradient(circle, rgb(var(--accent-ink)) 0%, rgb(var(--accent-ink)) 38%, transparent 42%);
}

input[type="radio"]:not(.kx-native):checked {
  background-image: radial-gradient(
    circle,
    #fff 0%,
    #fff 38%,
    transparent 42%
  );
}

input[type="checkbox"]:not(.kx-native):checked:hover:not(:disabled),
input[type="checkbox"]:not(.kx-native):indeterminate:hover:not(:disabled),
input[type="radio"]:not(.kx-native):checked:hover:not(:disabled) {
  box-shadow:
    0 4px 12px -2px rgba(var(--accent) / 0.6),
    0 0 0 3px rgba(var(--accent) / 0.18);
}

input[type="checkbox"]:not(.kx-native):active,
input[type="radio"]:not(.kx-native):active {
  transform: scale(0.94);
}

input[type="checkbox"]:not(.kx-native):disabled,
input[type="radio"]:not(.kx-native):disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* vue-sonner */

[data-sonner-toaster] {
  --normal-bg: var(--overlay-bg);
  --normal-border: var(--overlay-border);
  --normal-text: rgb(var(--fg));
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.4);
  --success-text: #10B981;
  --error-bg: rgba(244, 63, 94, 0.15);
  --error-border: rgba(244, 63, 94, 0.4);
  --error-text: #F43F5E;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dark [data-sonner-toaster] {
  --success-bg: rgba(16, 185, 129, 0.2);
  --error-bg: rgba(244, 63, 94, 0.2);
}

/* P0 da crítica do Fable (14/10): os avisos usam as «richColors» do vue-sonner (4,3/4,4:1),
   que ganhavam das variáveis acima. Definidas no próprio aviso, valem as cores do tema (>= 4,5:1). */

[data-sonner-toaster] [data-sonner-toast] {
  --success-bg: color-mix(in srgb, rgb(var(--ok)) 9%, rgb(var(--surface)));
  --success-border: rgba(var(--ok) / 0.35);
  --success-text: rgb(var(--ok));
  --error-bg: color-mix(in srgb, rgb(var(--bad)) 8%, rgb(var(--surface)));
  --error-border: rgba(var(--bad) / 0.35);
  --error-text: rgb(var(--bad));
  --warning-bg: color-mix(in srgb, rgb(var(--warn)) 9%, rgb(var(--surface)));
  --warning-border: rgba(var(--warn) / 0.35);
  --warning-text: rgb(var(--warn));
  --info-bg: color-mix(in srgb, rgb(var(--accent)) 8%, rgb(var(--surface)));
  --info-border: rgba(var(--accent) / 0.35);
  --info-text: rgb(var(--accent));
}

[data-sonner-toast] {
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 12px !important;
  box-shadow: 0 10px 32px -10px rgba(15, 23, 42, 0.25) !important;
}

/* ============================================================
 * Filtros canônicos de listagem — chips ativos + painel avançado
 * (mantidos para as telas que ainda usam o padrão do ERP; as
 * listagens novas usam `.ftk` — tokens de uma linha)
 * ============================================================ */

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.filter-chip strong {
  font-weight: 600;
}

.filter-chip--primario {
  background: rgba(var(--accent) / 0.14);
  color: rgb(var(--accent));
  border-color: rgba(var(--accent) / 0.28);
}

.filter-chip--primario:hover {
  border-color: rgba(var(--accent) / 0.55);
}

.filter-chip--avancado {
  background: rgba(148, 163, 184, 0.14);
  color: rgb(var(--fg-2));
  border-color: rgba(148, 163, 184, 0.28);
}

.filter-chip--avancado:hover {
  border-color: rgba(148, 163, 184, 0.55);
}

.filter-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: transparent;
  border: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.12s ease, background 0.12s ease;
  color: currentColor;
}

.filter-chip-x:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.15);
}

.dark .filter-chip-x:hover {
  background: rgba(255, 255, 255, 0.15);
}

.advanced-panel {
  margin-top: 0.75rem;
  border: 1px solid rgba(var(--accent) / 0.18);
  border-radius: 0.875rem;
  background: rgba(var(--accent) / 0.04);
  overflow: hidden;
}

.dark .advanced-panel {
  background: rgba(var(--accent) / 0.06);
  border-color: rgba(var(--accent) / 0.22);
}

.advanced-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(var(--accent) / 0.16);
  background: rgba(var(--accent) / 0.04);
}

.dark .advanced-panel__header {
  background: rgba(var(--accent) / 0.09);
  border-bottom-color: rgba(var(--accent) / 0.2);
}

.advanced-panel__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.advanced-panel__dates {
  border-radius: 0.625rem;
  background: rgba(0, 0, 0, 0.025);
  padding: 0.75rem;
}

.dark .advanced-panel__dates {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Trilho de filtros: esmaece nas bordas quando rola ─────────── */

.frail-fade {
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
  padding: 2px 0;
}

/* ── Linha focada por teclado na tabela ─────────────────────────── */

.table-kx tbody tr.is-focused td,
.table-erp tbody tr.is-focused td {
  background: rgba(var(--accent) / 0.08);
}

.table-kx tbody tr.is-focused td:first-child,
.table-erp tbody tr.is-focused td:first-child {
  box-shadow: inset 3px 0 0 rgb(var(--accent));
  /* P0-1: barra a 100 % (antes 45 %, ~2,1:1) */
}

.table-kx tbody tr.is-selected.is-focused td:first-child,
.table-erp tbody tr.is-selected.is-focused td:first-child {
  box-shadow: inset 3px 0 0 rgb(var(--accent));
}

.dt-keyboard:focus-visible {
  outline: none;
}

/* P0-9 (Fable 14/10): com o foco na tabela e nenhuma linha focada ainda (antes da primeira seta), o contorno mostra onde
   o teclado está; com uma linha focada, a barra dela basta. */

.dt-keyboard:focus-visible:not(:has(tr.is-focused)) {
  outline: 2px solid rgb(var(--accent));
  outline-offset: -2px;
}

.dt-keyboard:focus-visible tbody tr.is-focused td {
  background: rgba(var(--accent) / 0.08);
}

/* P0-1: igual à regra acima (antes 0,06) */

/* ── Cartões de linha (celular) ─────────────────────────────────── */

.dt-card {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(var(--border) / 0.5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.dt-card:last-child {
  border-bottom: 0;
}

.dt-card.is-selected {
  background: rgba(var(--accent) / 0.08);
  box-shadow: inset 3px 0 0 rgb(var(--accent));
}

.dt-card .dt-card-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--fg-muted));
  font-weight: 600;
  margin-bottom: 1px;
}

.dt-card .dt-card-v {
  font-size: 13.5px;
}

.dt-card .dt-card-full {
  grid-column: 1 / -1;
}

/* ── components/kx/kx-campo.css ── */

/*
 * Campo fechado e painel de opções do `KxSelect` e do `KxLookup` (layout v2).
 *
 * - Classes `kx-*`, sem escopo: o painel é teleportado (para o `body` ou para o
 *   diálogo do Modal) e não herda nada da página.
 * - Só tokens globais de `styles/main.css`. Os apelidos `--kx-*` repetem os dos
 *   módulos v2 (`--u-*`, `--p-*`, `--vd-*`, `--pc-*`), que não existem fora do
 *   escopo de cada módulo.
 * - O campo fechado é o `.us-campo` de `components/usuarios/usuarios.css`; o
 *   painel segue a receita dos popovers v2 (`.us-pop`).
 * - Altura e raio saem por `--kx-campo-h` e `--kx-campo-raio` (36, 38, 44 px),
 *   definidas por quem usa.
 */

.kx-campo,
.kx-painel {
  --kx-surface: rgb(var(--surface));
  --kx-surface-2: rgb(var(--surface-2));
  --kx-border: rgba(20, 18, 60, 0.08);
  --kx-border-2: var(--overlay-border);
  --kx-brand: rgb(var(--accent));
  --kx-brand-soft: rgba(var(--accent) / 0.10);
  --kx-fg: rgb(var(--fg));
  --kx-fg-2: rgb(var(--fg-2));
  --kx-muted: rgb(var(--fg-muted));
}

.dark .kx-campo,
.dark .kx-painel {
  --kx-surface: rgba(255, 255, 255, 0.045);
  --kx-surface-2: rgba(255, 255, 255, 0.075);
  --kx-border: rgba(255, 255, 255, 0.08);
  --kx-brand-soft: rgba(var(--accent) / 0.14);
}

/* ── Campo fechado ──────────────────────────────────────────────── */

/* Especificidade zero: utilitários e CSS de quem usa vencem em qualquer ordem de carga. */

:where(.kx-campo) {
  width: 100%;
  min-width: 0;
}

.kx-campo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--kx-campo-h, 40px);
  padding: 0 12px;
  border-radius: var(--kx-campo-raio, 10px);
  background: var(--kx-surface);
  border: 1px solid var(--border-strong);
  /* contorno de controle (>= 3:1); antes --kx-border-2 */
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--kx-fg);
  box-sizing: border-box;
  transition: border-color 120ms, box-shadow 120ms;
}

.kx-campo.kx-select {
  cursor: pointer;
}

.kx-campo.kx-lookup {
  cursor: text;
}

.kx-campo.kx-sm {
  --kx-campo-h: 32px;
  --kx-campo-raio: 9px;
  padding: 0 10px;
  font-size: 12.5px;
}

.kx-campo:focus-within,
.kx-campo.is-open {
  border-color: var(--kx-brand);
  box-shadow: 0 0 0 3px var(--kx-brand-soft);
}

/* Depois do foco: o erro continua visível com o campo focado. */

.kx-campo.is-invalid {
  border-color: rgb(var(--bad));
  box-shadow: 0 0 0 3px var(--bad-bg);
}

/* Sem opacidade: é o «Escolha a empresa primeiro» das pranchas. As duas regras ficam separadas porque um
   navegador sem `:has()` descartaria a lista inteira; o `:has()` cobre o `fieldset[disabled]`. */

.kx-campo.is-disabled {
  background: var(--kx-surface-2);
  color: var(--kx-fg-2);
  cursor: default;
}

.kx-campo:has(:disabled) {
  background: var(--kx-surface-2);
  color: var(--kx-fg-2);
  cursor: default;
}

/* O gatilho e a entrada não têm borda, anel nem fundo próprios: o anel fica no invólucro (nunca o anel azul do
   plugin de formulários nem o outline global de `:focus-visible`). */

.kx-campo .kx-gatilho,
.kx-campo .kx-entrada {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  font: inherit;
  color: inherit;
  outline: none;
  box-shadow: none;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  text-align: left;
}

.kx-campo .kx-gatilho:focus,
.kx-campo .kx-gatilho:focus-visible,
.kx-campo .kx-entrada:focus,
.kx-campo .kx-entrada:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
}

.kx-campo .kx-entrada::-moz-placeholder {
  color: var(--kx-muted);
  opacity: 1;
}

.kx-campo .kx-entrada::placeholder {
  color: var(--kx-muted);
  opacity: 1;
}

.kx-campo .kx-entrada {
  text-overflow: ellipsis;
}

.kx-campo .kx-entrada:disabled {
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}

.kx-campo .kx-entrada:disabled::-moz-placeholder {
  -webkit-text-fill-color: var(--kx-muted);
}

.kx-campo .kx-entrada:disabled::placeholder {
  -webkit-text-fill-color: var(--kx-muted);
}

.kx-campo .kx-gatilho {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.kx-campo .kx-gatilho:disabled {
  cursor: default;
}

.kx-valor,
.kx-placeholder {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.kx-bolinha {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.kx-icone,
.kx-lupa {
  flex-shrink: 0;
  color: var(--kx-muted);
}

/* Seta: um `<svg>` irmão do gatilho no Select (o clique nela cai no campo); um botão de 24 px no Lookup. */

.kx-seta {
  flex-shrink: 0;
  color: var(--kx-muted);
  transition: transform 150ms;
}

.kx-select > .kx-seta {
  pointer-events: none;
}

.kx-campo.is-open .kx-seta {
  transform: rotate(180deg);
}

.kx-seta-botao,
.kx-limpar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--kx-muted);
  cursor: pointer;
}

/* A seta de 14 px fica onde fica a do Select, e «limpar» encosta nela. */

.kx-seta-botao {
  margin-right: -5px;
}

.kx-limpar {
  margin-right: -6px;
}

.kx-limpar:hover {
  background: var(--row-hover);
}

.kx-campo .kx-seta-botao:focus-visible,
.kx-campo .kx-limpar:focus-visible {
  outline: none;
}

.kx-seta-botao:disabled,
.kx-limpar:disabled {
  cursor: default;
}

.kx-spinner {
  flex-shrink: 0;
  animation: kx-gira 0.9s linear infinite;
}

.kx-campo > .kx-spinner {
  color: var(--kx-muted);
}

/* ── Painel ─────────────────────────────────────────────────────── */

.kx-painel {
  position: fixed;
  z-index: 80;
  padding: 6px;
  border-radius: 12px;
  background: var(--overlay-bg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--overlay-border);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: rgb(var(--fg));
  text-align: left;
  animation: kx-entra 120ms ease-out;
}

.kx-lista {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 120ms;
}

.kx-lista.is-pendente {
  opacity: 0.55;
}

.kx-opcao {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.kx-opcao-texto {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* O rótulo quebra linha: numa lista de escolha, reticências esconderiam justamente o que diferencia as opções. */

.kx-opcao-rotulo {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.kx-opcao-desc {
  margin-top: 1px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--kx-muted);
  overflow-wrap: anywhere;
}

.kx-opcao-meta {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--kx-muted);
  white-space: nowrap;
}

.kx-opcao.is-active {
  background: rgba(var(--accent) / 0.10);
}

.dark .kx-opcao.is-active {
  background: rgba(var(--accent) / 0.14);
}

/* O foco real fica no controle: este anel é o «foco visível» da lista quando a navegação é por teclado. Alfa 0,75:
   ≥ 3:1 contra o fundo da ativa nos dois temas (com os 0,45 da prancha, ~2:1). */

.kx-painel.is-teclado .kx-opcao.is-active {
  box-shadow: inset 0 0 0 2px rgba(var(--accent) / 0.75);
}

/* Selecionada: sem fundo, só o check; nas demais a coluna do check fica reservada. `kx-opcao-check`, não
   `kx-check`: esse nome já é de uma caixa de seleção do app, que esta regra sem escopo esconderia. */

.kx-opcao-check {
  flex-shrink: 0;
  margin-left: auto;
  color: rgb(var(--accent));
  visibility: hidden;
}

.kx-opcao.is-selected .kx-opcao-check {
  visibility: visible;
}

.kx-opcao.is-selected .kx-opcao-rotulo {
  font-weight: 600;
}

.kx-opcao.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.kx-estado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  padding: 14px 10px;
  font-size: 12.5px;
  color: var(--kx-muted);
  text-align: center;
}

.kx-tentar {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: rgb(var(--accent));
  cursor: pointer;
}

.kx-tentar:hover {
  text-decoration: underline;
}

.kx-nota {
  margin-top: 6px;
  padding: 6px 10px 2px;
  border-top: 1px solid var(--kx-border);
  font-size: 11.5px;
  color: var(--kx-muted);
}

@keyframes kx-entra {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes kx-gira {
  to {
    transform: rotate(360deg);
  }
}

/* ── Celular: alvos de toque ────────────────────────────────────── */

@media (max-width: 639.98px) {
  .kx-opcao {
    min-height: 44px;
  }

  /* 44 px de altura útil sem mudar o desenho de 24 px. */

  .kx-seta-botao::after,
  .kx-limpar::after {
    content: '';
    position: absolute;
    inset: -10px 0;
  }
}

@media (forced-colors: active) {
  .kx-campo:focus-within {
    outline: 2px solid Highlight;
  }

  .kx-opcao.is-active {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* Busca dentro do painel (KxSelect `searchable`, 14/10, modelo do SelectField do Kinyx ERP). A entrada não tem borda,
   anel nem fundo próprios (nunca o anel azul do plugin de formulários): o anel fica na caixa. */

.kx-painel-topo {
  flex-shrink: 0;
  padding: 0 0 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--overlay-border);
}

.kx-busca {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--kx-surface);
  border: 1px solid var(--border-strong);
  transition: border-color 120ms, box-shadow 120ms;
}

.kx-busca:focus-within {
  border-color: var(--kx-brand);
  box-shadow: 0 0 0 3px var(--kx-brand-soft);
}

.kx-busca .kx-busca-entrada {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--kx-fg);
  outline: none;
  box-shadow: none;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
}

.kx-busca .kx-busca-entrada:focus,
.kx-busca .kx-busca-entrada:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
}

.kx-busca .kx-busca-entrada::-moz-placeholder {
  color: var(--kx-muted);
  opacity: 1;
}

.kx-busca .kx-busca-entrada::placeholder {
  color: var(--kx-muted);
  opacity: 1;
}

/* ── components/carregamento/carregamento.css ── */

/*
 * Carregamento das listas — as peças visuais do padrão das pranchas `Carregamento*` (layout v2), prefixo `kc-`.
 * Fonte: `docs/design/layout-v2/carregamento/carregamento.css` (`.sk`, `.lin-in`, `.velha`, `.progresso`,
 * `.view[aria-disabled]`, a regra de `prefers-reduced-motion`) e o `.faixa` de `cadastros/base.css`.
 *
 * Carga: os componentes de `components/carregamento/` importam este arquivo; quem usa só as classes
 * (`kc-entra`, `kc-velha`) importa também (`import '@/components/carregamento/carregamento.css';`).
 *
 * Tokens (nos dois temas; `.dark` no `<html>`)
 * - `--kc-sk`: a barra em repouso. `--kc-sk-hi`: a luz que passa por ela — no claro quase branca com um toque
 *   violeta da marca, no escuro mais clara que a barra.
 * - Progresso e faixa usam os do app: `--accent`, `--accent-2`, `--info`, `--info-bg`, `--bad`, `--bad-bg`.
 *
 * A luz é uma só para o card inteiro: o gradiente é fixo na janela (`background-attachment: fixed`), então toda
 * barra mostra o mesmo trecho dele e a varredura passa por todas de uma vez, em diagonal, a cada 1,7 s.
 *
 * Diferença declarada em relação à prancha (`.sk`: imagem de 200vw, de -130vw a 30vw): lá a imagem não cobre a janela
 * inteira em parte do ciclo e a barra sai com duas cores (uma «emenda» que anda — a conferência do papel T mostrou na
 * coluna Contato). Aqui a imagem tem 400vw e anda de -230vw a -70vw: a faixa clara tem a mesma largura (56vw: 43% → 57%
 * de 400vw), o centro dela percorre o mesmo caminho (de -30vw a 130vw) e a imagem cobre a janela o tempo todo.
 */

:root {
  --kc-sk: rgba(20, 18, 60, 0.085);
  --kc-sk-hi: rgba(88, 68, 227, 0.03);
  --kc-progresso-trilho: rgba(var(--accent) / 0.1);
}

.dark {
  --kc-sk: rgba(255, 255, 255, 0.08);
  --kc-sk-hi: rgba(255, 255, 255, 0.18);
  --kc-progresso-trilho: rgba(var(--accent) / 0.14);
}

/* ── Barras do esqueleto (`.sk`) ──────────────────────────────────── */

.kc-barra {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
  border-radius: 6px;
  background-color: var(--kc-sk);
  background-image: linear-gradient(100deg, var(--kc-sk) 43%, var(--kc-sk-hi) 50%, var(--kc-sk) 57%);
  background-size: 400vw 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  animation: kc-varre 1.7s linear infinite;
}

@keyframes kc-varre {
  from {
    background-position: -230vw 0;
  }

  to {
    background-position: -70vw 0;
  }
}

/* Barras empilhadas na célula: 7 px entre o texto principal e o secundário. */

.kc-pilha {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.kc-pilha > .kc-barra + .kc-barra {
  margin-top: 7px;
}

.kc-celula {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kc-celula.kc-fim {
  justify-content: flex-end;
}

.kc-celula.kc-fim > .kc-pilha {
  align-items: flex-end;
}

.kc-celula.kc-centro {
  justify-content: center;
}

.kc-celula.kc-centro > .kc-pilha {
  align-items: center;
}

/* Barra que ocupa a pílula da contagem de uma visão (a contagem ainda não chegou: nunca «0»). */

.kc-barra.kc-barra-contagem {
  display: inline-block;
  width: 14px;
  height: 8px;
  border-radius: 4px;
  vertical-align: middle;
}

/* ── Esqueleto: linhas e cartões ──────────────────────────────────── */

.kc-esqueleto {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kc-cartoes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kc-cartao-corpo {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kc-cartao-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ── Cascata na chegada (`.lin-in`): 45 ms entre linhas, 360 ms cada, subindo 6 px ── */

.kc-entra {
  animation: kc-entra 0.36s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes kc-entra {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Refinando (`.tr.lin.velha`): o resultado de antes fica, esmaecido e sem clique ── */

.kc-velha {
  opacity: 0.42;
  filter: saturate(0.7);
  pointer-events: none;
}

/* ── Linha de progresso no topo do card (indeterminada, na cor da marca) ── */

/* Quem a recebe precisa de `position: relative` (`kc-com-progresso`); com `overflow: hidden`, ela segue o raio. */

.kc-com-progresso {
  position: relative;
}

.kc-progresso {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  overflow: hidden;
  background: var(--kc-progresso-trilho);
  z-index: 2;
  pointer-events: none;
}

.kc-progresso > span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-2)));
  animation: kc-progresso 1.25s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes kc-progresso {
  from {
    left: -40%;
  }

  to {
    left: 100%;
  }
}

/* ── Giro do rodapé ───────────────────────────────────────────────── */

.kc-giro {
  flex-shrink: 0;
  color: rgb(var(--accent));
  animation: kc-gira 0.9s linear infinite;
}

@keyframes kc-gira {
  to {
    transform: rotate(360deg);
  }
}

/* ── Visão (ou item) que ainda não pode ser escolhido: a contagem não chegou ── */

.kc-desligada[aria-disabled='true'] {
  opacity: 0.6;
  cursor: default;
}

/* ── Faixa de demora (`.faixa` informativa, com o relógio) ────────── */

.kc-faixa {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  color: rgb(var(--fg));
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
  flex-shrink: 0;
}

.kc-faixa-ic {
  flex-shrink: 0;
  color: rgb(var(--info));
}

.kc-faixa-texto {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 599.98px) {
  .kc-faixa {
    flex-wrap: wrap;
  }

  .kc-faixa-texto {
    flex-basis: calc(100% - 30px);
  }

  .kc-faixa > .kc-btn {
    margin-left: 30px;
  }
}

/* ── Botão pequeno (`.mini`: 32 px) ───────────────────────────────── */

.kc-btn.kc-btn-mini {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.kc-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Aviso de falha: o card vira o aviso ──────────────────────────── */

.kc-falha {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 24px;
  border-top: 1px solid var(--kc-borda, rgba(20, 18, 60, 0.08));
  text-align: center;
  box-sizing: border-box;
}

.dark .kc-falha {
  --kc-borda: rgba(255, 255, 255, 0.08);
}

.kc-falha.kc-sem-borda {
  border-top: 0;
}

.kc-falha-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--bad-bg);
  color: rgb(var(--bad));
  flex-shrink: 0;
}

/* Tom do ícone pela situação (padrão de falhas): sem acesso neutro, dados que mudaram em atenção. */

.kc-falha-ic.kc-neutro {
  background: var(--neutral-bg);
  color: rgb(var(--neutral));
}

.kc-falha-ic.kc-aviso {
  background: var(--warn-bg);
  color: rgb(var(--warn));
}

.kc-falha-titulo {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: rgb(var(--fg));
}

.kc-falha-texto {
  margin: 0;
  max-width: 460px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgb(var(--fg-muted));
  overflow-wrap: anywhere;
}

.kc-falha-acao {
  margin-top: 10px;
}

.kc-falha-nota {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgb(var(--fg-muted));
}

/* ── Só para o leitor de tela ─────────────────────────────────────── */

.kc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Menos movimento (preferência do sistema): nada se move ───────── */

/* Barras paradas e sem a luz, linhas sem cascata, giro parado, progresso numa faixa fixa. */

@media (prefers-reduced-motion: reduce) {
  .kc-barra,
  .kc-entra,
  .kc-giro,
  .kc-progresso > span {
    animation: none !important;
  }

  .kc-barra {
    background-image: none;
  }

  .kc-entra {
    opacity: 1;
    transform: none;
  }

  .kc-progresso > span {
    left: 0;
    width: 100%;
    opacity: 0.6;
  }
}

.hover\:bg-violet-500\/10:hover {
  background-color: rgb(139 92 246 / 0.1);
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

.dark\:text-amber-400:is(.dark *) {
  --tw-text-opacity: 1;
  color: rgb(251 191 36 / var(--tw-text-opacity, 1));
}

.dark\:text-emerald-300:is(.dark *) {
  --tw-text-opacity: 1;
  color: rgb(110 231 183 / var(--tw-text-opacity, 1));
}

/* ── Ponte de tema do artefato (gerada) ── */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  --bg-a: 124 58 237;
  --bg-b: 6 182 212;
  --bg-c: 2 6 23;
  --bg-solid: 11 16 32;
  --aurora-alpha-a: 0.30;
  --aurora-alpha-b: 0.16;
  --surface: 18 23 46;
  --surface-2: 30 36 64;
  --border: 51 65 85;
  --border-soft: 30 41 59;
  --border-alpha: 0.6;
  --border-strong: rgba(255, 255, 255, 0.38);
  --shell-bg: rgba(9, 13, 28, 0.62);
  --panel-bg: rgba(255, 255, 255, 0.025);
  --overlay-bg: rgba(18, 23, 46, 0.90);
  --overlay-border: rgba(255, 255, 255, 0.14);
  --fg: 241 242 250;
  --fg-2: 199 203 224;
  --fg-muted: 152 160 188;
  --accent: 167 139 250;
  --accent-2: 34 211 238;
  --accent-ink: 11 16 32;
  --ok: 110 231 183;
  --ok-bg: rgba(16, 185, 129, 0.18);
  --warn: 252 211 77;
  --warn-bg: rgba(245, 158, 11, 0.18);
  --bad: 253 164 175;
  --bad-bg: rgba(244, 63, 94, 0.18);
  --info: 196 181 253;
  --info-bg: rgba(139, 92, 246, 0.22);
  --neutral: 203 213 225;
  --neutral-bg: rgba(148, 163, 184, 0.16);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 72px -20px rgba(0, 0, 0, 0.75);
  --kbd-bg: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.09);
  --serie-1: #8B5CF6;
  --serie-2: #0891B2;
  --ord-1: #C4B5FD;
  --ord-2: #A78BFA;
  --ord-3: #7C5CF0;
  --spark-dim: #4B5170;
  color-scheme: dark;
}
}
:root[data-theme="dark"] {
  --bg-a: 124 58 237;
  --bg-b: 6 182 212;
  --bg-c: 2 6 23;
  --bg-solid: 11 16 32;
  --aurora-alpha-a: 0.30;
  --aurora-alpha-b: 0.16;
  --surface: 18 23 46;
  --surface-2: 30 36 64;
  --border: 51 65 85;
  --border-soft: 30 41 59;
  --border-alpha: 0.6;
  --border-strong: rgba(255, 255, 255, 0.38);
  --shell-bg: rgba(9, 13, 28, 0.62);
  --panel-bg: rgba(255, 255, 255, 0.025);
  --overlay-bg: rgba(18, 23, 46, 0.90);
  --overlay-border: rgba(255, 255, 255, 0.14);
  --fg: 241 242 250;
  --fg-2: 199 203 224;
  --fg-muted: 152 160 188;
  --accent: 167 139 250;
  --accent-2: 34 211 238;
  --accent-ink: 11 16 32;
  --ok: 110 231 183;
  --ok-bg: rgba(16, 185, 129, 0.18);
  --warn: 252 211 77;
  --warn-bg: rgba(245, 158, 11, 0.18);
  --bad: 253 164 175;
  --bad-bg: rgba(244, 63, 94, 0.18);
  --info: 196 181 253;
  --info-bg: rgba(139, 92, 246, 0.22);
  --neutral: 203 213 225;
  --neutral-bg: rgba(148, 163, 184, 0.16);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 72px -20px rgba(0, 0, 0, 0.75);
  --kbd-bg: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.09);
  --serie-1: #8B5CF6;
  --serie-2: #0891B2;
  --ord-1: #C4B5FD;
  --ord-2: #A78BFA;
  --ord-3: #7C5CF0;
  --spark-dim: #4B5170;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
