.kr-scope,
.kr-scope * { box-sizing: border-box; }

.kr-scope {
  min-height: 100%;
  color: var(--kr-charcoal);
  font: 400 14px/1.5 var(--kr-font-sans);
  background: radial-gradient(circle at top right, color-mix(in srgb,var(--kr-primary) 9%,transparent), transparent 30%), linear-gradient(180deg,var(--kr-surface) 0%,var(--kr-cloud) 100%);
}

.kr-scope button,
.kr-scope input,
.kr-scope select,
.kr-scope textarea { font: inherit; }

.kr-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.kr-sidebar { height: calc(100vh - 32px); position: sticky; z-index: var(--kr-z-dropdown); top: 32px; padding: 24px 18px; border-right: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: 4px 0 14px rgba(30,39,46,.035); backdrop-filter: blur(var(--kr-glass-blur,14px)) saturate(112%); }
.kr-sidebar__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.kr-brand-logo { width: 150px; height: auto; display: block; }
.kr-brand-name { color: var(--kr-night); font-size: 22px; letter-spacing: -.04em; }
.kr-sidebar__nav { display: grid; }
.kr-sidebar__item { width: 100%; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 4px 0; padding: 10px 12px; border: 0; border-radius: var(--kr-radius); background: transparent; color: var(--kr-text-muted); font: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.kr-sidebar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-sidebar__item:hover { background: color-mix(in srgb,var(--kr-focus) 7%,var(--kr-surface)); color: var(--kr-night); }
.kr-sidebar__item.is-active { background: linear-gradient(90deg,color-mix(in srgb,var(--kr-focus) 11%,transparent),color-mix(in srgb,var(--kr-action) 5%,transparent)); color: var(--kr-night); box-shadow: inset 3px 0 0 var(--kr-focus); }
.kr-sidebar__footer { position: absolute; right: 18px; bottom: 20px; left: 18px; display: grid; gap: 4px; }
.kr-sidebar__user { width: 100%; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px 10px; color: var(--kr-text-muted); font-size: 12px; font-weight: 650; border-bottom: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); margin-bottom: 5px; }
.kr-sidebar__user span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-sidebar__utility { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: var(--kr-radius); background: transparent; color: var(--kr-text-muted); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: color var(--kr-transition), background var(--kr-transition); }
.kr-sidebar__utility:hover,
.kr-sidebar__utility.is-active { color: var(--kr-night); background: var(--kr-cloud); }
.kr-sidebar__utility:disabled { cursor: wait; opacity: .65; }
.kr-sidebar-flyout { position: relative; }
.kr-sidebar-flyout__arrow { flex: 0 0 auto; margin-left: auto; font-size: 20px; line-height: 1; }
.kr-sidebar-flyout__panel { width: 230px; max-height: min(420px,calc(100vh - 48px)); position: absolute; z-index: calc(var(--kr-z-modal) - 1); top: 0; left: calc(100% - 1px); padding: 10px; overflow-y: auto; border: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); border-radius: var(--kr-radius); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: var(--kr-shadow-md); opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(-4px); backdrop-filter: blur(var(--kr-glass-blur,14px)) saturate(112%); transition: opacity var(--kr-transition), transform var(--kr-transition), visibility 0s linear .14s; }
.kr-sidebar-flyout:hover .kr-sidebar-flyout__panel,
.kr-sidebar-flyout:focus-within .kr-sidebar-flyout__panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
.kr-sidebar-flyout__title { padding: 8px 10px; color: var(--kr-text-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kr-sidebar-flyout__item { display: block; padding: 10px 12px; border-radius: var(--kr-r-md); color: var(--kr-text-muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.kr-sidebar-flyout__item:hover,
.kr-sidebar-flyout__item:focus-visible { color: var(--kr-night); background: var(--kr-cloud); outline: none; }
.kr-sidebar-flyout__item.is-active { color: var(--kr-night); background: color-mix(in srgb,var(--kr-focus) 10%,transparent); box-shadow: inset 3px 0 0 var(--kr-focus); }
.kr-main { min-width: 0; display: flex; flex-direction: column; align-items: center; width: 100%; flex: 1; overflow-x: hidden; }
.kr-topbar { width: 100%; height: 74px; position: sticky; z-index: var(--kr-z-sticky); top: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: 0 4px 14px rgba(30,39,46,.03); backdrop-filter: blur(var(--kr-glass-blur,14px)) saturate(112%); }
.kr-topbar__module { color: var(--kr-night); font-size: 18px; font-weight: 700; }
.kr-topbar__version { display: inline-flex; margin-left: 8px; color: var(--kr-text-muted); font-size: 12px; font-weight: 700; vertical-align: middle; }
.kr-topbar__user { max-width: 180px; overflow: hidden; color: var(--kr-text-muted); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.kr-topbar__actions { display: flex; align-items: center; gap: 10px; }
:root {
  --kreto-content-max-width: 1140px;
}

@media (min-width: 1600px) {
  :root {
    --kreto-content-max-width: 1320px;
  }
}

@media (min-width: 2000px) {
  :root {
    --kreto-content-max-width: 1880px;
  }
}

.kr-content {
  width: 100%;
  max-width: var(--kreto-content-max-width);
  margin-inline: auto;
  padding: 28px;
  box-sizing: border-box;
}

.kr-grid { display: grid; gap: 18px; }
.kr-grid--2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.kr-grid--3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.kr-grid--4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.kr-card { padding: var(--kr-card-padding); border: 1px solid color-mix(in srgb,var(--kr-border) 78%,transparent); border-radius: var(--kr-radius); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: var(--kr-shadow-sm); backdrop-filter: blur(var(--kr-glass-blur,10px)) saturate(108%); transition: box-shadow var(--kr-transition), border-color var(--kr-transition); }
.kr-card:hover { box-shadow: var(--kr-shadow-md); }
.kr-card__header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.kr-card__title { margin: 0; color: var(--kr-night); font-size: 15px; font-weight: 500; }
.kr-card__description { margin: 4px 0 0; color: var(--kr-text-muted); font-size: 12px; }
.kr-heading { color: var(--kr-night); letter-spacing: -.03em; }
h1.kr-heading { margin: 0; font-size: 36px; line-height: 1.2; }
h2.kr-heading { margin: 0; font-size: 16px; }
h3.kr-heading { margin: 0; font-size: 14px; }
.kr-breadcrumbs { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--kr-text-muted); font-size: 12px; }

.kr-button,
.kr-icon-button { cursor: pointer; transition: var(--kr-transition); }
.kr-button { min-height: var(--kr-control-height); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: var(--kr-radius); font-size: 13px; font-weight: 700; }
.kr-button:hover:not(:disabled) { transform: translateY(-1px); }
.kr-button:disabled { cursor: not-allowed; opacity: .55; }
.kr-button--primary { background: var(--kr-primary); color: var(--kr-primary-text); border:1px solid color-mix(in srgb,var(--kr-primary) 84%,black); backdrop-filter:blur(var(--kr-glass-blur,12px)) saturate(115%); -webkit-backdrop-filter:blur(var(--kr-glass-blur,12px)) saturate(115%); box-shadow:0 7px 18px color-mix(in srgb,var(--kr-primary) 20%,transparent),inset 0 1px 0 rgba(255,255,255,.12); }
.kr-button--primary:hover:not(:disabled) { box-shadow:0 10px 26px color-mix(in srgb,var(--kr-primary) 30%,transparent); background:color-mix(in srgb,var(--kr-primary) 88%,white); }
.kr-button--secondary { border: 1px solid color-mix(in srgb,var(--kr-action) 48%,var(--kr-border)); background: color-mix(in srgb,var(--kr-action) 14%,var(--kr-surface)); color: color-mix(in srgb,var(--kr-action) 72%,var(--kr-text)); backdrop-filter:blur(var(--kr-glass-blur,12px)) saturate(115%); -webkit-backdrop-filter:blur(var(--kr-glass-blur,12px)) saturate(115%); box-shadow:var(--kr-shadow-sm); }
.kr-button--ghost { background: transparent; color: var(--kr-text-muted); }
.kr-button--outline { border: 1px solid color-mix(in srgb,var(--kr-primary) 42%,var(--kr-border)); background: color-mix(in srgb,var(--kr-primary) 6%,var(--kr-surface)); color: var(--kr-primary); backdrop-filter:blur(var(--kr-glass-blur,12px)); -webkit-backdrop-filter:blur(var(--kr-glass-blur,12px)); }
.kr-button--danger { border: 1px solid color-mix(in srgb,var(--kr-danger) 46%,var(--kr-border)); background: color-mix(in srgb,var(--kr-danger) 10%,var(--kr-surface)); color: var(--kr-danger); }
.kr-icon-button { 
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 0;
  appearance: none;
  text-decoration: none;
  border: 1px solid var(--kr-glass-border,var(--kr-border));
  border-radius: var(--kr-radius);
  background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity,88%),transparent);
  color: var(--kr-text);
  backdrop-filter: blur(var(--kr-glass-blur,13px)) saturate(112%);
  -webkit-backdrop-filter: blur(var(--kr-glass-blur,13px)) saturate(112%);
  box-shadow: var(--kr-glass-shadow,0 8px 24px rgba(0,0,0,.12));
  transition: var(--kr-transition);
}
.kr-icon-button--sm { width: 36px; height: 36px; }
.kr-icon-button--add,
.kr-add-button {
  color: var(--kr-primary);
  border-color: color-mix(in srgb,var(--kr-primary) 62%,var(--kr-glass-border));
  background: color-mix(in srgb,var(--kr-primary) 14%,color-mix(in srgb,var(--kr-surface) 76%,transparent));
}
.kr-icon-button--edit {
  color: var(--kr-action);
  border-color: color-mix(in srgb,var(--kr-action) 42%,var(--kr-glass-border));
  background: color-mix(in srgb,var(--kr-action) 9%,color-mix(in srgb,var(--kr-surface) 78%,transparent));
}
.kr-icon-button--delete,
.kr-icon-button--danger {
  color: var(--kr-danger);
  border-color: color-mix(in srgb,var(--kr-danger) 42%,var(--kr-glass-border));
  background: color-mix(in srgb,var(--kr-danger) 9%,color-mix(in srgb,var(--kr-surface) 78%,transparent));
}
.kr-icon-button--add:hover:not(:disabled),
.kr-add-button:hover:not(:disabled) { color: var(--kr-primary); border-color: var(--kr-primary); background: color-mix(in srgb,var(--kr-primary) 22%,var(--kr-surface)); }
.kr-icon-button--edit:hover:not(:disabled) { color: var(--kr-action); border-color: var(--kr-action); background: color-mix(in srgb,var(--kr-action) 16%,var(--kr-surface)); }
.kr-icon-button--delete:hover:not(:disabled),
.kr-icon-button--danger:hover:not(:disabled) { color: var(--kr-danger); border-color: var(--kr-danger); background: color-mix(in srgb,var(--kr-danger) 16%,var(--kr-surface)); }
.kr-icon-button:hover:not(:disabled) {
  border-color: color-mix(in srgb,var(--kr-primary) 35%,var(--kr-border));
  color: var(--kr-text);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px color-mix(in srgb,var(--kr-primary) 12%,transparent);
}
.kr-icon-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.kr-icon-button.is-disabled { cursor: wait; opacity: .55; pointer-events: none; }
.kr-button:focus-visible,
.kr-icon-button:focus-visible,
.kr-sidebar__item:focus-visible,
.kr-page:focus-visible { outline: 3px solid color-mix(in srgb,var(--kr-focus) 20%,transparent); outline-offset: 2px; }

.kr-field-group { display: grid; gap: 6px; }
.kr-label { color: var(--kr-text-muted); font-size: 12px; font-weight: 700; }
.kr-field { width: 100%; height: var(--kr-control-height); margin: 0; padding: 0 12px; border: 1px solid var(--kr-border-strong); border-radius: var(--kr-radius); outline: none; background: var(--kr-surface); color: var(--kr-night); box-shadow: none; }
.kr-field:focus { border-color: var(--kr-focus); box-shadow: 0 0 0 3px color-mix(in srgb,var(--kr-focus) 14%,transparent); }
textarea.kr-field { height: 90px; padding-top: 10px; resize: vertical; }
.kr-help { color: var(--kr-text-muted); font-size: 11px; }
.kr-choice { display: inline-flex; align-items: center; gap: 8px; color: var(--kr-text-muted); }
.kr-choice input { accent-color: var(--kr-primary); }
.kr-switch { width: 44px; height: 24px; position: relative; padding: 0; border: 0; border-radius: var(--kr-radius); background: var(--kr-border-strong); cursor: pointer; }
.kr-switch::after { content: ""; width: 18px; height: 18px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: var(--kr-surface); box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: var(--kr-transition); }
.kr-switch[aria-checked="true"] { background: var(--kr-primary); }
.kr-switch[aria-checked="true"]::after { left: 23px; }

.kr-badge,
.kr-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid; border-radius: var(--kr-radius); font-size: 12px; font-weight: 700; }
.kr-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kr-badge--success { border-color: color-mix(in srgb,var(--kr-success) 38%,var(--kr-border)); background: color-mix(in srgb,var(--kr-success) 10%,var(--kr-surface)); color: var(--kr-success); }
.kr-badge--warning { border-color: color-mix(in srgb,var(--kr-warning) 40%,var(--kr-border)); background: color-mix(in srgb,var(--kr-warning) 11%,var(--kr-surface)); color: var(--kr-warning); }
.kr-badge--error { border-color: color-mix(in srgb,var(--kr-danger) 40%,var(--kr-border)); background: color-mix(in srgb,var(--kr-danger) 10%,var(--kr-surface)); color: var(--kr-danger); }
.kr-badge--info { border-color: color-mix(in srgb,var(--kr-info) 38%,var(--kr-border)); background: color-mix(in srgb,var(--kr-info) 10%,var(--kr-surface)); color: var(--kr-info); }
.kr-badge--neutral { border-color: var(--kr-border); background: var(--kr-surface-2); color: var(--kr-text-muted); }

.kr-table-wrap { overflow: auto; border: 1px solid var(--kr-border); border-radius: var(--kr-radius); background: var(--kr-surface); }
.kr-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--kr-surface); }
.kr-table th,
.kr-table td { padding: 12px 14px; border-bottom: 1px solid var(--kr-border); font-size: 12px; text-align: left; }
.kr-table th { background: var(--kr-surface-2); color: var(--kr-text-muted); font-weight: 800; }
.kr-table td { color: var(--kr-text); }
.kr-table tr:last-child td { border-bottom: 0; }

.kr-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--kr-border); }
.kr-tab { min-height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--kr-text-muted); cursor: pointer; font-weight: 700; }
.kr-tab[aria-selected="true"] { border-color: var(--kr-primary); color: var(--kr-night); }
.kr-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.kr-pagination { display: flex; align-items: center; gap: 6px; }
.kr-page { min-width: 34px; height: 34px; border: 1px solid var(--kr-border); border-radius: 8px; background: var(--kr-surface); color: var(--kr-text-muted); cursor: pointer; }
.kr-page[aria-current="page"] { border-color: var(--kr-primary); background: color-mix(in srgb,var(--kr-primary) 12%,var(--kr-surface)); color: var(--kr-primary); font-weight: 800; }
.kr-tooltip { position: relative; display: inline-flex; }
.kr-tooltip__text { position: absolute; z-index: var(--kr-z-dropdown); bottom: calc(100% + 8px); left: 50%; padding: 6px 9px; border-radius: var(--kr-radius); background: var(--kr-night); color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%,3px); transition: var(--kr-transition); white-space: nowrap; }
.kr-tooltip:hover .kr-tooltip__text,
.kr-tooltip:focus-within .kr-tooltip__text { opacity: 1; transform: translate(-50%,0); }
.kr-dropdown { position: relative; display: inline-block; }
.kr-dropdown__menu { position: fixed; z-index: calc(var(--kr-z-modal) + 1); display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); border-radius: var(--kr-radius); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: var(--kr-shadow-md); backdrop-filter: blur(var(--kr-glass-blur,14px)); font: 400 14px/1.5 var(--kr-font-sans); }
.kr-dropdown__item { flex: 0 0 auto; }
.kr-dropdown__item:hover { background: var(--kr-cloud); }
.kr-action-button { 
  width: 36px;
  height: 36px;
  border: 1px solid var(--kr-glass-border);
  border-radius: var(--kr-radius);
  background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity,88%),transparent);
  backdrop-filter: blur(var(--kr-glass-blur,13px)) saturate(112%);
  -webkit-backdrop-filter: blur(var(--kr-glass-blur,13px)) saturate(112%);
  box-shadow: var(--kr-glass-shadow,0 8px 24px rgba(0,0,0,.12));
}

.kr-add-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.kr-add-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--kr-text-muted);
  border-color: var(--kr-border);
  background: color-mix(in srgb,var(--kr-surface) 70%,transparent);
}
.kr-shell-alert { position: fixed; z-index: var(--kr-z-modal); right: 20px; bottom: 20px; max-width: 360px; padding: 12px 14px; border: 1px solid rgba(214,48,49,.3); border-radius: var(--kr-radius); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); color: var(--kr-danger); box-shadow: var(--kr-shadow-md); backdrop-filter: blur(var(--kr-glass-blur,14px)); }

.kr-modal-backdrop { position: fixed; z-index: var(--kr-z-modal); inset: 0; display: flex; align-items: stretch; justify-content: flex-end; background: rgba(30,39,46,.34); animation: kr-backdrop-in 180ms ease-out both; }
.kr-modal-backdrop.is-closing { animation: kr-backdrop-out 180ms ease-in both; }
.kr-modal { width: min(560px,calc(100vw - 24px)); height: 100%; padding: 24px; overflow-y: auto; border: 0; border-left: 1px solid color-mix(in srgb,var(--kr-border) 72%,transparent); border-radius: var(--kr-radius) 0 0 var(--kr-radius); background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); box-shadow: -14px 0 36px rgba(30,39,46,.14); backdrop-filter: blur(var(--kr-glass-blur,16px)) saturate(112%); animation: kr-drawer-in 180ms ease-out both; }
.kr-modal.is-closing { animation: kr-drawer-out 180ms ease-in both; }
.kr-modal h2 { margin: 0; font-size: 14px; }
.kr-modal p { color: var(--kr-text-muted); font-size: 13px; line-height: 1.5; }
.kr-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.kr-notification { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid color-mix(in srgb,var(--kr-info) 30%,var(--kr-border)); border-radius: var(--kr-radius); background: color-mix(in srgb,var(--kr-info) 9%,var(--kr-surface)); color: var(--kr-info); box-shadow: var(--kr-shadow-sm); backdrop-filter: blur(var(--kr-glass-blur,12px)); }
.kr-empty { display: grid; justify-items: center; gap: 8px; padding: 32px 20px; color: var(--kr-text-muted); text-align: center; }
.kr-empty__icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--kr-border); border-radius: var(--kr-radius); background: var(--kr-cloud); color: var(--kr-action); font-size: 20px; }
.kr-loading { display: grid; gap: 10px; }
.kr-skeleton { height: 14px; border-radius: var(--kr-radius); background: linear-gradient(90deg,var(--kr-surface-2) 25%,var(--kr-surface) 45%,var(--kr-surface-2) 65%); background-size: 220% 100%; animation: kr-shimmer 1.2s infinite linear; }
.kr-skeleton--90 { width: 90%; }
.kr-skeleton--72 { width: 72%; }
.kr-skeleton--82 { width: 82%; }
@keyframes kr-shimmer { to { background-position: -220% 0; } }
@keyframes kr-backdrop-in { from { background: rgba(30,39,46,0); } }
@keyframes kr-backdrop-out { to { background: rgba(30,39,46,0); } }
@keyframes kr-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes kr-drawer-out { from { transform: translateX(0); } to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .kr-modal-backdrop,
  .kr-modal { animation-duration: 1ms; }
}

@media (max-width:1100px) {
  .kr-shell { grid-template-columns: 220px 1fr; }
  .kr-sidebar { padding: 18px 12px; }
  .kr-brand-logo { width: 125px; }
  .kr-sidebar__footer { right: 12px; left: 12px; }
  .kr-grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width:782px) {
  .kr-sidebar { height: calc(100vh - 46px); top: 46px; }
  .kr-topbar { top: 46px; }
}

@media (max-width:760px) {
  .kr-shell { display: block; }
  .kr-sidebar { display: none; }
  .kr-topbar { padding: 0 16px; }
  .kr-content { width: 100%; padding: 18px; box-sizing: border-box; }
  .kr-grid--2,
  .kr-grid--3,
  .kr-grid--4 { grid-template-columns: 1fr; }
}

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

/* KreTo dark theme */
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-scope {
  color: var(--kr-text);
  background: radial-gradient(circle at top right,color-mix(in srgb,var(--kr-primary) 10%,transparent),transparent 32%),linear-gradient(180deg,var(--kr-cloud) 0%,var(--kr-surface) 100%);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-topbar,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-main,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-card,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-flyout__panel,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-dropdown__menu,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-modal,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-login-card { background: color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar { box-shadow: 4px 0 18px rgba(0,0,0,.20); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-topbar { box-shadow: 0 4px 18px rgba(0,0,0,.18); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__item,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__utility,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-flyout__item,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-tab,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table td { color: var(--kr-text-muted); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__item:hover,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__item.is-active,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__utility:hover,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__utility.is-active,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-flyout__item:hover,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-flyout__item.is-active { color: var(--kr-night); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__utility:hover,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar__utility.is-active,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-flyout__item:hover { background: var(--kr-surface-3); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-field,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table-wrap,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-page { background: var(--kr-surface-2); color: var(--kr-text); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-field::placeholder { color: color-mix(in srgb,var(--kr-text-muted) 70%,transparent); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-icon-button { background: color-mix(in srgb,var(--kr-surface) calc(var(--kr-glass-opacity) - 20%),transparent); border-color: var(--kr-glass-border); backdrop-filter:blur(calc(var(--kr-glass-blur,12px) + 2px)) saturate(120%); -webkit-backdrop-filter:blur(calc(var(--kr-glass-blur,12px) + 2px)) saturate(120%); box-shadow:var(--kr-glass-shadow,0 8px 24px rgba(0,0,0,.12)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-button--secondary { background: color-mix(in srgb,var(--kr-action) 18%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-action) 46%,var(--kr-border)); color: color-mix(in srgb,var(--kr-action) 72%,white); box-shadow:0 6px 18px color-mix(in srgb,var(--kr-action) 10%,transparent); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-button--secondary:hover:not(:disabled) { background: color-mix(in srgb,var(--kr-action) 26%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-action) 64%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-button--outline { background: color-mix(in srgb,var(--kr-primary) 8%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-primary) 40%,var(--kr-border)); color: color-mix(in srgb,var(--kr-primary) 72%,white); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-button--danger { background: color-mix(in srgb,var(--kr-danger) 10%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-danger) 30%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table th { background: var(--kr-surface-3); color: var(--kr-text-muted); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table th,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-table td { border-color: var(--kr-border); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-badge--neutral { border-color: var(--kr-border); background: var(--kr-surface-3); color: var(--kr-text-muted); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-badge--success { background: color-mix(in srgb,var(--kr-success) 10%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-success) 30%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-badge--warning { background: color-mix(in srgb,var(--kr-warning) 10%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-warning) 30%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-badge--error { background: color-mix(in srgb,var(--kr-danger) 10%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-danger) 30%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-badge--info { background: color-mix(in srgb,var(--kr-info) 10%,var(--kr-surface)); border-color: color-mix(in srgb,var(--kr-info) 30%,var(--kr-border)); }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-skeleton { background: linear-gradient(90deg,var(--kr-surface-2) 25%,var(--kr-surface-3) 45%,var(--kr-surface-2) 65%); background-size:220% 100%; }
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-tooltip__text { background:var(--kr-text); color:var(--kr-surface); }

/* Icon-only action standard: textual action buttons are rendered as compact icons. */
.kr-button-icon-only { width: 42px !important; min-width: 42px !important; height: 42px; padding: 0 !important; justify-content: center; }


/* Theme palette editor 1.14.1 */
.kr-theme-settings__heading{display:grid;gap:2px;margin-top:6px;padding-top:14px;border-top:1px solid var(--kr-border)}
.kr-theme-settings__heading:first-child{margin-top:0;padding-top:0;border-top:0}
.kr-theme-settings__heading strong{font-size:12px;color:var(--kr-text)}
.kr-theme-settings__heading small{font-size:10px;line-height:1.45;color:var(--kr-text-muted)}

/* Theme picker: Light / Dark / Crimson / Abyss */
.kr-theme-picker{position:relative;display:inline-flex}
.kr-theme-picker__menu{position:absolute;right:0;top:calc(100% + 8px);z-index:calc(var(--kr-z-modal) + 1);width:246px;padding:8px;border:1px solid color-mix(in srgb,var(--kr-border) 72%,transparent);border-radius:10px;background:color-mix(in srgb,var(--kr-surface) var(--kr-glass-opacity),transparent);box-shadow:var(--kr-shadow-md);backdrop-filter:blur(var(--kr-glass-blur,14px)) saturate(118%);-webkit-backdrop-filter:blur(var(--kr-glass-blur,14px)) saturate(118%)}
.kr-theme-picker__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.kr-theme-picker__option{display:grid;grid-template-columns:1fr auto;grid-template-areas:"name check" "swatches swatches";gap:7px 8px;min-width:0;padding:10px;border:1px solid var(--kr-border);border-radius:8px;background:color-mix(in srgb,var(--kr-surface-2) 78%,transparent);color:var(--kr-text);text-align:left;cursor:pointer;transition:border-color var(--kr-transition),background var(--kr-transition),transform var(--kr-transition)}
.kr-theme-picker__option:hover{border-color:color-mix(in srgb,var(--kr-primary) 58%,var(--kr-border));background:color-mix(in srgb,var(--kr-primary) 8%,var(--kr-surface-2));transform:translateY(-1px)}
.kr-theme-picker__option.is-active{border-color:var(--kr-primary);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--kr-primary) 38%,transparent)}
.kr-theme-picker__name{grid-area:name;font:700 11px/1.2 var(--kr-font-sans)}
.kr-theme-picker__check{grid-area:check;display:grid;place-items:center;width:16px;height:16px;color:var(--kr-primary)}
.kr-theme-picker__swatches{grid-area:swatches;display:flex;gap:4px}
.kr-theme-picker__swatch{width:18px;height:8px;border:1px solid color-mix(in srgb,var(--kr-border) 65%,transparent);border-radius:999px;box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
@media(max-width:680px){.kr-theme-picker__menu{right:-42px;width:224px}}


/* KreTo DS 1.14.7 — quieter shell hierarchy inspired by dense SaaS dashboards. */
.kr-sidebar {
  border-right-color: color-mix(in srgb,var(--kr-border) 52%,transparent);
  background: color-mix(in srgb,var(--kr-surface) 96%,transparent);
  box-shadow: 2px 0 14px rgba(15,23,42,.025);
}
.kr-sidebar__item {
  margin: 2px 0;
  padding: 9px 11px;
  font-size: 14px;
  font-weight: 600;
}
.kr-sidebar__item:hover {
  background: color-mix(in srgb,var(--kr-primary) 7%,var(--kr-surface));
  color: var(--kr-text);
}
.kr-sidebar__item.is-active {
  background: color-mix(in srgb,var(--kr-primary) 10%,var(--kr-surface));
  color: var(--kr-text);
  box-shadow: none;
}
.kr-sidebar-flyout__item.is-active {
  background: color-mix(in srgb,var(--kr-primary) 10%,var(--kr-surface));
  color: var(--kr-text);
  box-shadow: none;
}
.kr-topbar {
  height: 64px;
  border-bottom-color: color-mix(in srgb,var(--kr-border) 50%,transparent);
  background: color-mix(in srgb,var(--kr-surface) 94%,transparent);
  box-shadow: 0 1px 0 color-mix(in srgb,var(--kr-border) 20%,transparent);
}
.kr-topbar__module { font-size: 16px; font-weight: 700; }
.kr-topbar__version { font-size: 11px; font-weight: 650; }
.kr-content { padding: 26px 28px 32px; }
.kr-grid { gap: 16px; }
.kr-card {
  border-color: color-mix(in srgb,var(--kr-border) 52%,transparent);
  background: color-mix(in srgb,var(--kr-surface) 96%,transparent);
  box-shadow: 0 1px 2px rgba(15,23,42,.035), 0 7px 18px rgba(15,23,42,.035);
}
.kr-card:hover {
  border-color: color-mix(in srgb,var(--kr-primary) 18%,var(--kr-border));
  box-shadow: 0 1px 2px rgba(15,23,42,.045), 0 10px 24px rgba(15,23,42,.055);
}
.kr-card__title { font-size: 15px; font-weight: 500; }
.kr-card__description { font-size: 11px; line-height: 1.5; }

html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar {
  background: color-mix(in srgb,var(--kr-surface) 96%,transparent);
  box-shadow: 2px 0 16px rgba(0,0,0,.12);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-topbar {
  background: color-mix(in srgb,var(--kr-surface) 94%,transparent);
  box-shadow: 0 1px 0 color-mix(in srgb,var(--kr-border) 30%,transparent);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-card {
  background: color-mix(in srgb,var(--kr-surface) 96%,transparent);
  box-shadow: 0 1px 2px rgba(0,0,0,.16), 0 8px 20px rgba(0,0,0,.10);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-card:hover {
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 12px 26px rgba(0,0,0,.14);
}

/* KreTo DS 1.14.8 — inline accordion sidebar hierarchy. */
.kr-sidebar__nav { gap: 2px; }
.kr-sidebar__item {
  min-height: 40px;
  gap: 11px;
  position: relative;
}
.kr-sidebar__icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: grid;
  place-items: center;
  color: currentColor;
  opacity: .82;
}
.kr-sidebar__item.is-active .kr-sidebar__icon { opacity: 1; color: var(--kr-primary); }
.kr-sidebar-group { min-width: 0; }
.kr-sidebar-group__parent {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.kr-sidebar-group__parent .kr-sidebar__item--parent {
  flex: 1 1 auto;
  padding-right: 42px;
}
.kr-sidebar-group__toggle {
  width: 38px;
  height: 38px;
  position: absolute;
  z-index: 1;
  top: 3px;
  right: 2px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: calc(var(--kr-radius) - 2px);
  background: transparent;
  color: var(--kr-text-muted);
  cursor: pointer;
  transition: color var(--kr-transition), background var(--kr-transition), transform var(--kr-transition);
}
.kr-sidebar-group__toggle:hover,
.kr-sidebar-group__toggle:focus-visible {
  color: var(--kr-primary);
  background: color-mix(in srgb,var(--kr-primary) 9%,transparent);
  outline: none;
}
.kr-sidebar-group.is-active .kr-sidebar-group__toggle { color: var(--kr-primary); }
.kr-sidebar-submenu {
  position: relative;
  display: grid;
  gap: 3px;
  margin: 1px 0 7px 18px;
  padding: 2px 0 2px 14px;
}
.kr-sidebar-submenu[hidden] { display: none !important; }
.kr-sidebar-submenu__rail {
  width: 1px;
  position: absolute;
  top: 0;
  bottom: 12px;
  left: 3px;
  background: color-mix(in srgb,var(--kr-border) 82%,transparent);
}
.kr-sidebar-submenu__item {
  min-width: 0;
  min-height: 37px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 11px 8px 13px;
  border-radius: var(--kr-radius);
  color: var(--kr-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--kr-transition), background var(--kr-transition);
}
.kr-sidebar-submenu__branch {
  width: 11px;
  height: 13px;
  position: absolute;
  left: -11px;
  top: 0;
  border-left: 1px solid color-mix(in srgb,var(--kr-border) 82%,transparent);
  border-bottom: 1px solid color-mix(in srgb,var(--kr-border) 82%,transparent);
  border-bottom-left-radius: 1px;
  pointer-events: none;
}
.kr-sidebar-submenu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kr-sidebar-submenu__item:hover,
.kr-sidebar-submenu__item:focus-visible {
  color: var(--kr-text);
  background: color-mix(in srgb,var(--kr-primary) 7%,transparent);
  outline: none;
}
.kr-sidebar-submenu__item.is-active {
  color: var(--kr-primary);
  background: color-mix(in srgb,var(--kr-primary) 14%,var(--kr-surface));
  font-weight: 700;
  box-shadow: none;
}
.kr-sidebar-submenu__item.is-active .kr-sidebar-submenu__branch {
  border-color: color-mix(in srgb,var(--kr-primary) 64%,var(--kr-border));
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-submenu__rail,
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-submenu__branch {
  border-color: color-mix(in srgb,var(--kr-border) 74%,transparent);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-submenu__rail {
  background: color-mix(in srgb,var(--kr-border) 74%,transparent);
}
html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-sidebar-submenu__item.is-active {
  color: var(--kr-primary);
  background: color-mix(in srgb,var(--kr-primary) 15%,var(--kr-surface));
}
@media (max-width: 1200px) {
  .kr-sidebar-submenu { margin-left: 15px; padding-left: 12px; }
}

/* KreTo DS 1.14.18 — mobile foundation. Desktop/tablet remain unchanged above 760px. */
@media (max-width:760px) {
  .kr-scope {
    width:100%;
    min-width:0;
    overflow-x:hidden;
    font-size:15px;
  }

  .kr-shell,
  .kr-main,
  .kr-content,
  .kr-card,
  .kr-card__header,
  .kr-field-group,
  .kr-filters,
  .kr-tabs,
  .kr-table-wrap {
    min-width:0;
    max-width:100%;
  }

  .kr-shell { display:block; width:100%; }
  .kr-sidebar { display:none; }
  .kr-main { width:100%; overflow-x:hidden; }

  .kr-topbar {
    width:100%;
    height:auto;
    min-height:64px;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:10px;
    padding:10px 14px;
  }
  .kr-topbar__module {
    min-width:0;
    flex:1 1 100%;
    font-size:18px;
    line-height:1.25;
    overflow-wrap:anywhere;
  }
  .kr-topbar__version { margin-left:6px; font-size:11px; }
  .kr-topbar__actions { width:100%; min-width:0; flex-wrap:wrap; }

  .kr-content {
    width:100%;
    max-width:none;
    padding:14px;
  }

  .kr-grid { gap:12px; }
  .kr-grid--2,
  .kr-grid--3,
  .kr-grid--4 { grid-template-columns:minmax(0,1fr); }

  .kr-card { padding:16px; }
  .kr-card__header {
    align-items:flex-start;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:14px;
  }
  .kr-card__header > :first-child { min-width:0; flex:1 1 180px; }
  .kr-card__title { font-size:16px; line-height:1.3; }
  .kr-card__description { font-size:13px; line-height:1.5; }

  h1.kr-heading { font-size:26px; line-height:1.2; }
  h2.kr-heading { font-size:18px; }
  h3.kr-heading { font-size:16px; }
  .kr-breadcrumbs { overflow-x:auto; padding-bottom:2px; white-space:nowrap; }

  .kr-field,
  .kr-scope input:not([type="checkbox"]):not([type="radio"]),
  .kr-scope select,
  .kr-scope textarea {
    min-width:0;
    max-width:100%;
    font-size:16px;
  }
  .kr-field,
  .kr-scope input:not([type="checkbox"]):not([type="radio"]),
  .kr-scope select { min-height:44px; }
  .kr-scope textarea { min-height:112px; }
  .kr-label { font-size:12px; }
  .kr-help { font-size:12px; line-height:1.45; }

  .kr-button { min-height:44px; }
  .kr-icon-button,
  .kr-button-icon-only,
  .kr-action-button,
  .kr-add-button {
    width:44px !important;
    min-width:44px !important;
    height:44px;
  }
  .kr-icon-button--sm { width:40px !important; min-width:40px !important; height:40px; }

  .kr-filters {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    gap:10px;
  }
  .kr-filters > * { min-width:0; max-width:100%; }

  .kr-tabs {
    width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }
  .kr-tab {
    min-height:44px;
    flex:0 0 auto;
    padding-inline:13px;
    white-space:nowrap;
  }

  .kr-table-wrap {
    width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
  }
  .kr-table { min-width:640px; }
  .kr-table th,
  .kr-table td { padding:11px 12px; font-size:13px; }

  .kr-modal-backdrop {
    align-items:stretch;
    justify-content:stretch;
    padding:0;
  }
  .kr-modal {
    width:100vw;
    max-width:none;
    height:100dvh;
    padding:16px 14px 18px;
    border-left:0;
    border-radius:0;
    box-shadow:none;
    overscroll-behavior:contain;
  }
  .kr-modal h2 { font-size:18px; line-height:1.3; }
  .kr-modal p { font-size:14px; }
  .kr-modal__actions {
    flex-wrap:wrap;
    gap:8px;
    margin-top:18px;
    padding-bottom:max(0px,env(safe-area-inset-bottom));
  }
  .kr-modal__actions > * { flex:0 0 auto; }

  .kr-notification {
    align-items:flex-start;
    gap:12px;
    font-size:14px;
  }
  .kr-shell-alert {
    right:14px;
    left:14px;
    bottom:14px;
    max-width:none;
  }

  .kr-dropdown__menu {
    max-width:calc(100vw - 28px);
  }
}

/* KreTo DS 1.14.20 — compact mobile navigation drawer enabled by default. */
.kr-mobile-topbar__brand,
.kr-mobile-menu-trigger,
.kr-mobile-nav-layer {
  display:none;
}

@keyframes kr-mobile-nav-drawer-in {
  from { opacity:.72; transform:translateX(-18px); }
  to { opacity:1; transform:translateX(0); }
}

@keyframes kr-mobile-nav-backdrop-in {
  from { opacity:0; }
  to { opacity:1; }
}

@media (max-width:760px) {
  .kr-topbar--mobile-drawer {
    height:64px;
    min-height:64px;
    flex-wrap:nowrap;
    align-items:center;
    gap:8px;
    padding:0 14px;
  }

  .kr-topbar--mobile-drawer .kr-topbar__module {
    display:none;
  }

  .kr-mobile-topbar__brand {
    min-width:0;
    flex:1 1 auto;
    display:flex;
    align-items:center;
  }

  .kr-mobile-topbar__brand img {
    display:block;
    width:auto;
    max-width:112px;
    max-height:38px;
    object-fit:contain;
  }

  .kr-mobile-topbar__brand strong {
    min-width:0;
    overflow:hidden;
    color:var(--kr-text);
    font-size:17px;
    font-weight:750;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .kr-topbar--mobile-drawer .kr-app-topbar__actions {
    width:auto;
    min-width:0;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    flex-wrap:nowrap;
    gap:6px;
    margin-left:auto;
  }

  .kr-topbar--mobile-drawer .kr-app-mobile-nav {
    display:none !important;
  }

  .kr-mobile-menu-trigger {
    display:grid;
    place-items:center;
    padding:0 !important;
    line-height:0;
    text-align:center;
  }

  .kr-mobile-menu-trigger svg {
    display:block;
    margin:auto;
  }

  .kr-topbar--mobile-drawer .kr-icon-button,
  .kr-topbar--mobile-drawer .kr-button-icon-only,
  .kr-topbar--mobile-drawer .kr-action-button {
    width:42px !important;
    min-width:42px !important;
    height:42px;
  }

  .kr-mobile-nav-layer {
    position:fixed;
    z-index:calc(var(--kr-z-modal) + 10);
    inset:0;
    display:block;
  }

  .kr-mobile-nav-backdrop {
    width:100%;
    height:100%;
    position:absolute;
    inset:0;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(8,15,24,.54);
    cursor:pointer;
    animation:kr-mobile-nav-backdrop-in 150ms ease-out both;
    -webkit-tap-highlight-color:transparent;
  }

  .kr-mobile-nav-drawer {
    width:min(86vw,320px);
    height:100dvh;
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border-right:1px solid color-mix(in srgb,var(--kr-border) 72%,transparent);
    background:color-mix(in srgb,var(--kr-surface) 97%,transparent);
    box-shadow:12px 0 34px rgba(15,23,42,.18);
    backdrop-filter:blur(var(--kr-glass-blur,14px)) saturate(112%);
    -webkit-backdrop-filter:blur(var(--kr-glass-blur,14px)) saturate(112%);
    animation:kr-mobile-nav-drawer-in 180ms cubic-bezier(.2,.8,.2,1) both;
  }

  .kr-mobile-nav-drawer__header {
    min-height:64px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:10px 12px 10px 16px;
    border-bottom:1px solid color-mix(in srgb,var(--kr-border) 62%,transparent);
  }

  .kr-mobile-nav-drawer__brand {
    min-width:0;
    display:flex;
    align-items:center;
  }

  .kr-mobile-nav-drawer__brand img {
    display:block;
    width:auto;
    max-width:142px;
    max-height:40px;
    object-fit:contain;
  }

  .kr-mobile-nav-drawer__brand strong {
    overflow:hidden;
    color:var(--kr-text);
    font-size:18px;
    font-weight:750;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .kr-mobile-nav-drawer__close {
    width:42px !important;
    min-width:42px !important;
    height:42px;
    flex:0 0 42px;
  }

  .kr-mobile-nav-drawer__body {
    min-height:0;
    flex:1 1 auto;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:8px 8px 12px;
    -webkit-overflow-scrolling:touch;
  }

  .kr-mobile-nav-drawer__nav {
    gap:0;
  }

  .kr-mobile-nav-drawer .kr-sidebar__item {
    min-height:38px;
    margin:0;
    padding:6px 10px;
    font-size:14px;
    line-height:1.15;
  }

  .kr-mobile-nav-drawer .kr-sidebar-group__toggle {
    width:36px;
    height:36px;
    top:1px;
  }

  .kr-mobile-nav-drawer .kr-sidebar-group__parent .kr-sidebar__item--parent {
    padding-right:40px;
  }

  .kr-mobile-nav-drawer .kr-sidebar-submenu {
    margin:0 0 4px 18px;
    padding-left:12px;
  }

  .kr-mobile-nav-drawer .kr-sidebar-submenu__item {
    min-height:36px;
    padding:6px 10px 6px 12px;
    font-size:14px;
    line-height:1.15;
  }

  .kr-mobile-nav-drawer__footer {
    flex:0 0 auto;
    display:grid;
    gap:4px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top:1px solid color-mix(in srgb,var(--kr-border) 62%,transparent);
  }

  .kr-mobile-nav-drawer__footer .kr-sidebar__user,
  .kr-mobile-nav-drawer__footer .kr-sidebar__utility {
    min-height:42px;
    margin:0;
  }

  html:is([data-kreto-theme="dark"],[data-kreto-theme="crimson"],[data-kreto-theme="abyss"]) .kr-mobile-nav-drawer {
    background:color-mix(in srgb,var(--kr-surface) 97%,transparent);
    box-shadow:12px 0 36px rgba(0,0,0,.34);
  }
}

@media (max-width:360px) {
  .kr-topbar--mobile-drawer {
    padding-inline:10px;
  }
  .kr-mobile-topbar__brand img {
    max-width:92px;
  }
  .kr-topbar--mobile-drawer .kr-app-topbar__actions {
    gap:4px;
  }
  .kr-topbar--mobile-drawer .kr-icon-button,
  .kr-topbar--mobile-drawer .kr-button-icon-only,
  .kr-topbar--mobile-drawer .kr-action-button {
    width:40px !important;
    min-width:40px !important;
    height:40px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .kr-mobile-nav-backdrop,
  .kr-mobile-nav-drawer {
    animation:none !important;
  }
}

/* Kreto DS 1.14.26 — tabelas de dados viram cards no mobile.
   Navegações horizontais continuam independentes; esta regra elimina scroll lateral de listas/tabelas. */
@media (max-width:760px) {
  .kr-table-wrap {
    max-width:100%;
    overflow:visible !important;
    border:0;
    background:transparent;
  }

  .kr-table {
    display:block;
    width:100%;
    min-width:0 !important;
    border:0;
    background:transparent;
  }

  .kr-table thead {
    display:none;
  }

  .kr-table tbody {
    display:grid;
    width:100%;
    gap:10px;
  }

  .kr-table tbody tr {
    display:grid;
    width:100%;
    min-width:0;
    height:auto !important;
    padding:11px 13px;
    border:1px solid var(--kr-border);
    border-radius:var(--kr-radius);
    background:var(--kr-surface);
  }

  .kr-table tbody td {
    display:grid;
    grid-template-columns:minmax(88px,.4fr) minmax(0,1fr);
    align-items:center;
    gap:8px 10px;
    width:100%;
    min-width:0;
    min-height:0 !important;
    padding:6px 0 !important;
    border:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere;
  }

  .kr-table tbody td::before {
    content:attr(data-label);
    min-width:0;
    color:var(--kr-text-muted);
    font-size:10px;
    font-weight:750;
    line-height:1.25;
    letter-spacing:.045em;
    text-transform:uppercase;
  }

  .kr-table tbody td[data-label=""],
  .kr-table tbody td.kr-table__actions-cell {
    grid-template-columns:1fr;
    justify-items:end;
    padding-top:9px !important;
  }

  .kr-table tbody td[data-label=""]::before,
  .kr-table tbody td.kr-table__actions-cell::before {
    display:none;
  }

  .kr-table tbody td .kr-row-actions,
  .kr-table tbody td .kp-list-actions {
    width:100%;
    justify-content:flex-end;
    flex-wrap:wrap;
  }
}

