.icon-button {
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface);
  cursor: pointer;
}

.icon-button:hover { background: var(--color-surface-muted); }
.icon-button svg { width: 17px; height: 17px; }

.module-search {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
  color: var(--color-text-soft);
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.module-search:focus-within {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}
.module-search__input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: calc(11px * var(--font-scale));
}
.module-search__input::placeholder { color: var(--color-text-soft); opacity: 1; }
.module-search__input::-webkit-search-cancel-button { opacity: .55; cursor: pointer; }

.nav-link {
  position: relative;
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: center;
  color: var(--color-nav-text);
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.nav-link[aria-current="page"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-link__icon-slot {
  width: var(--sidebar-width);
  height: 38px;
  display: grid;
  place-items: center;
}

.nav-link__icon {
  width: 18px;
  height: 18px;
  color: var(--color-steel);
}

.nav-link[aria-current="page"] .nav-link__icon {
  color: var(--color-primary-strong);
}

.nav-link__label {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 0 14px 0 10px;
  overflow: hidden;
  color: currentColor;
  font-size: calc(12px * var(--font-scale));
  font-weight: 620;
  line-height: 1.2;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 120ms ease, transform 150ms ease;
  white-space: nowrap;
}

.nav-link__meta {
  color: var(--color-text-muted);
  font-size: calc(9px * var(--font-scale));
  font-weight: 560;
}

.app-shell[data-menu-open="true"] .nav-link__label {
  display: grid;
  gap: 1px;
  opacity: 1;
  transform: translateX(0);
}

.nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-width) + 8px);
  top: 50%;
  z-index: 90;
  min-width: max-content;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  font-size: calc(10px * var(--font-scale));
  font-weight: 650;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(3px, -50%);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.app-shell[data-menu-open="false"] .nav-link:hover::after,
.app-shell[data-menu-open="false"] .nav-link:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); }
.page-heading__title,
.page-heading__description { margin: 0; }
.page-heading__title { font-size: 20px; line-height: 1.2; letter-spacing: -0.025em; }
.page-heading__description { margin-top: 4px; max-width: 720px; color: var(--color-text-muted); font-size: 12px; line-height: 1.45; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid #d6e7e0;
  border-radius: 999px;
  background: var(--color-success-soft);
  color: var(--color-success);
  font-size: 10px;
  font-weight: 700;
}
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
.card__title,
.card__subtitle { margin: 0; }
.card__title { font-size: 13px; font-weight: 750; }
.card__subtitle { margin-top: 2px; color: var(--color-text-muted); font-size: 10px; line-height: 1.4; }
.card__body { padding: 12px 14px; }

.metric-card { min-height: 98px; padding: 13px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-card__icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--color-primary-softer); color: var(--color-primary-strong); }
.metric-card__icon svg { width: 15px; height: 15px; }
.metric-card__label,
.metric-card__value,
.metric-card__note { margin: 0; }
.metric-card__label { color: var(--color-text-muted); font-size: 11px; font-weight: 650; }
.metric-card__value { font-size: 24px; font-weight: 780; line-height: 1; letter-spacing: -0.04em; }
.metric-card__note { color: var(--color-text-soft); font-size: 10px; }

.empty-state { min-height: 126px; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--color-text-muted); }
.empty-state__inner { max-width: 340px; }
.empty-state__icon { width: 30px; height: 30px; margin: 0 auto 9px; color: var(--color-border-strong); }
.empty-state__title,
.empty-state__description { margin: 0; }
.empty-state__title { color: var(--color-text); font-size: 12px; font-weight: 700; }
.empty-state__description { margin-top: 4px; font-size: 11px; line-height: 1.45; }

.quick-actions { display: grid; gap: 7px; }
.quick-action { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); }
.quick-action:hover { border-color: var(--color-border-strong); background: var(--color-surface-muted); }
.quick-action__icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--color-primary-soft); color: var(--color-primary-strong); }
.quick-action__icon svg { width: 15px; height: 15px; }
.quick-action__copy { min-width: 0; }
.quick-action__title,
.quick-action__meta { display: block; }
.quick-action__title { font-size: 11px; font-weight: 700; }
.quick-action__meta { margin-top: 1px; color: var(--color-text-muted); font-size: 9px; }
.quick-action > svg { width: 15px; height: 15px; color: var(--color-text-soft); }

.system-list { display: grid; gap: 0; }
.system-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 36px; padding: 7px 0; border-bottom: 1px solid var(--color-border); font-size: 11px; }
.system-row:last-child { border-bottom: 0; }
.system-row__label { color: var(--color-text-muted); }
.system-row__value { text-align: right; font-weight: 650; }

.placeholder { min-height: 320px; }

@media (max-width: 520px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading__description { max-width: none; }
  .metric-card { min-height: 92px; }
}

/* Quick settings */
.quick-settings { position: relative; }
.header__settings { display: grid; color: var(--color-steel); }
.header__settings[aria-expanded="true"] { background: var(--color-primary-soft); color: var(--color-primary-strong); border-color: var(--color-border-strong); }
.quick-settings__panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  width: min(310px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.quick-settings__title,
.quick-settings__subtitle,
.quick-settings__notice { margin: 0; }
.quick-settings__title { font-size: calc(13px * var(--font-scale)); font-weight: 750; }
.quick-settings__subtitle { margin-top: 2px; color: var(--color-text-muted); font-size: calc(10px * var(--font-scale)); }
.quick-settings__section { margin-top: 12px; }
.quick-settings__label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.quick-settings__label { display: block; color: var(--color-text-muted); font-size: calc(10px * var(--font-scale)); font-weight: 700; }
.quick-settings__section > .quick-settings__label { margin-bottom: 6px; }
.quick-settings__value { color: var(--color-text-soft); font-size: calc(9px * var(--font-scale)); font-weight: 650; }

.appearance-select { position: relative; }
.appearance-select__trigger {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
  color: var(--color-text);
  font-size: calc(11px * var(--font-scale));
  cursor: pointer;
  text-align: left;
}
.appearance-select__trigger:hover,
.appearance-select__trigger[aria-expanded="true"] { border-color: var(--color-border-strong); background: var(--color-primary-softer); }
.appearance-select__trigger svg { width: 14px; height: 14px; color: var(--color-text-soft); transition: transform 140ms ease; }
.appearance-select__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.appearance-select__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 70;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.appearance-select__menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text);
  font-size: calc(11px * var(--font-scale));
  cursor: pointer;
  text-align: left;
}
.appearance-select__menu button:hover { background: var(--color-surface-muted); }
.appearance-select__radio {
  position: relative;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-surface);
}
.appearance-select__menu button[aria-checked="true"] .appearance-select__radio { border-color: var(--color-primary); }
.appearance-select__menu button[aria-checked="true"] .appearance-select__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-primary);
}

.font-slider { position: relative; height: 32px; display: flex; align-items: center; }
.font-slider__input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.font-slider__input::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: var(--color-border-strong); }
.font-slider__input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -6px;
  -webkit-appearance: none;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.font-slider__input::-moz-range-track { height: 3px; border: 0; border-radius: 999px; background: var(--color-border-strong); }
.font-slider__input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.font-slider__marks {
  position: absolute;
  z-index: 1;
  left: 7px;
  right: 7px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.font-slider__marks span {
  width: 7px;
  height: 7px;
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  background: var(--color-border-strong);
  box-shadow: 0 0 0 1px var(--color-border-strong);
}
.font-slider__marks span[data-active="true"] { background: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }

.quick-settings__divider { height: 1px; margin: 12px 0 8px; background: var(--color-border); }
.quick-settings__logout {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-size: calc(11px * var(--font-scale));
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.quick-settings__logout:hover { background: var(--color-surface-muted); }
.quick-settings__logout svg { width: 16px; height: 16px; color: var(--color-steel); }
.quick-settings__notice { margin-top: 7px; padding: 7px 8px; border-radius: 7px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: calc(9px * var(--font-scale)); line-height: 1.4; }

/* Font scale */
.page-heading__title { font-size: calc(20px * var(--font-scale)); }
.page-heading__description { font-size: calc(12px * var(--font-scale)); }
.status-badge { font-size: calc(10px * var(--font-scale)); }
.card__title { font-size: calc(13px * var(--font-scale)); }
.card__subtitle { font-size: calc(10px * var(--font-scale)); }
.metric-card__label { font-size: calc(11px * var(--font-scale)); }
.metric-card__value { font-size: calc(24px * var(--font-scale)); }
.metric-card__note { font-size: calc(10px * var(--font-scale)); }
.empty-state__title { font-size: calc(12px * var(--font-scale)); }
.empty-state__description { font-size: calc(11px * var(--font-scale)); }
.quick-action__title { font-size: calc(11px * var(--font-scale)); }
.quick-action__meta { font-size: calc(9px * var(--font-scale)); }
.system-row { font-size: calc(11px * var(--font-scale)); }

.nav-link { color: var(--color-nav-text); }
.status-badge { border-color: var(--color-success-border); }


/* Providers */
.provider-heading { position: relative; align-items: center; }
.provider-heading__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-action-wrap {
  position: relative;
  display: inline-grid;
}
.provider-action-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  min-width: max-content;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  font-size: calc(10px * var(--font-scale));
  font-weight: 650;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}
.provider-action-wrap:hover::after,
.provider-action-wrap:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.provider-action-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface);
  color: var(--color-steel);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.provider-action-button svg { width: 16px; height: 16px; }
.provider-action-button:hover,
.provider-action-button[aria-expanded="true"] {
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
}
.provider-action-button--primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.provider-action-button--primary:hover { background: var(--color-primary-strong); color: #fff; }
.provider-action-button--quiet { background: var(--color-surface-muted); }
.provider-action-button[aria-disabled="true"] { opacity: .68; cursor: not-allowed; }

.provider-filters[hidden] { display: none; }
.provider-filters {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 45;
  width: min(390px, calc(100vw - 88px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.provider-filters select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 30px 0 9px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-muted);
  color: var(--color-text);
  font: inherit;
  font-size: calc(11px * var(--font-scale));
}
.provider-filters select:focus {
  border-color: var(--color-border-strong);
  outline: 2px solid var(--color-primary-soft);
  outline-offset: 1px;
}

.button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: calc(10px * var(--font-scale));
  font-weight: 700;
  cursor: pointer;
}

.button svg { width: 14px; height: 14px; }
.button:hover:not(:disabled) { border-color: var(--color-border-strong); background: var(--color-surface-muted); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button--quiet { background: var(--color-surface-muted); }
.button--primary { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--color-primary-strong); }
.button--compact { min-height: 28px; padding: 4px 8px; font-size: calc(9px * var(--font-scale)); }

.provider-list-card { overflow: hidden; }
.provider-table-wrap { width: 100%; overflow-x: auto; }
.provider-table { width: 100%; border-collapse: collapse; font-size: calc(10.5px * var(--font-scale)); }
.provider-table th,
.provider-table td { padding: 9px 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.provider-table th { color: var(--color-text-muted); background: var(--color-surface-muted); font-size: calc(9px * var(--font-scale)); font-weight: 750; white-space: nowrap; }
.provider-table tbody tr:last-child td { border-bottom: 0; }
.provider-table tbody tr:hover { background: var(--color-primary-softer); }
.provider-table__action { text-align: right !important; }

.provider-name {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.provider-name > span { font-size: calc(11px * var(--font-scale)); font-weight: 750; }
.provider-name > small { color: var(--color-text-muted); font-size: calc(9px * var(--font-scale)); font-weight: 500; }
.provider-name:hover > span { color: var(--color-primary-strong); }

.provider-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: calc(9px * var(--font-scale));
  font-weight: 750;
  white-space: nowrap;
}
.provider-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--provider-status-color, currentColor); }

.provider-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--color-text-muted);
  text-align: left;
}
.provider-state__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--color-surface-muted);
  color: var(--color-steel);
}
.provider-state__icon svg { width: 18px; height: 18px; }
.provider-state__title,
.provider-state__description { margin: 0; }
.provider-state__title { color: var(--color-text); font-size: calc(12px * var(--font-scale)); font-weight: 750; }
.provider-state__description { max-width: 620px; margin-top: 4px; font-size: calc(10.5px * var(--font-scale)); line-height: 1.5; }
.provider-state--notice { background: linear-gradient(180deg, var(--color-primary-softer), transparent); }
.provider-state--error .provider-state__icon { background: #fff0f0; color: #8a3f3f; }
.provider-state__action { margin-top: 9px; }

.provider-loading {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: provider-spin .8s linear infinite;
}
@keyframes provider-spin { to { transform: rotate(360deg); } }

.provider-detail { margin: 12px; box-shadow: none; }
.provider-detail__close { display: grid; font-size: 20px; line-height: 1; }
.provider-detail__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.provider-detail__grid > div { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--color-border); }
.provider-detail__grid > div:last-child { border-right: 0; }
.provider-detail__grid span,
.provider-detail__grid strong { display: block; }
.provider-detail__grid span { color: var(--color-text-muted); font-size: calc(9px * var(--font-scale)); }
.provider-detail__grid strong { margin-top: 3px; overflow-wrap: anywhere; font-size: calc(10.5px * var(--font-scale)); font-weight: 700; }

@media (max-width: 900px) {
  .provider-detail__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-detail__grid > div { border-bottom: 1px solid var(--color-border); }
  .provider-detail__grid > div:nth-child(even) { border-right: 0; }
  .provider-detail__grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 680px) {
  .provider-filters { width: min(330px, calc(100vw - 82px)); grid-template-columns: minmax(0, 1fr) 34px; }
  .provider-filters select:first-of-type { grid-column: 1 / -1; }
  .provider-table-wrap { overflow: visible; padding: 8px; }
  .provider-table,
  .provider-table tbody,
  .provider-table tr,
  .provider-table td { display: block; width: 100%; }
  .provider-table thead { display: none; }
  .provider-table tbody { display: grid; gap: 8px; }
  .provider-table tbody tr { overflow: hidden; border: 1px solid var(--color-border); border-radius: 9px; background: var(--color-surface); }
  .provider-table td { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-bottom: 1px solid var(--color-border); text-align: right; }
  .provider-table td::before { content: attr(data-label); color: var(--color-text-muted); font-size: calc(9px * var(--font-scale)); font-weight: 700; text-align: left; }
  .provider-table td:first-child { display: block; text-align: left; }
  .provider-table td:first-child::before { display: block; margin-bottom: 5px; }
  .provider-table td:last-child { border-bottom: 0; }
  .provider-table__action { text-align: right !important; }
  .provider-state { align-items: flex-start; padding: 18px 14px; }
}

@media (max-width: 440px) {
  .provider-detail__grid { grid-template-columns: 1fr; }
  .provider-detail__grid > div { border-right: 0; }
}


/* Parameters */
.parameters-layout { display: grid; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); gap: 12px; align-items: start; }
.parameter-catalogs { padding: 8px; }
.parameter-catalog-group + .parameter-catalog-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.parameter-catalog-group__label { margin: 0 8px 5px; color: var(--color-text-soft); font-size: calc(8.5px * var(--font-scale)); font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.parameter-catalog-button { width: 100%; display: grid; gap: 1px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.parameter-catalog-button:hover, .parameter-catalog-button:focus-visible { background: var(--color-surface-muted); outline: none; }
.parameter-catalog-button[aria-pressed="true"] { background: var(--color-primary-soft); color: var(--color-primary-strong); }
.parameter-catalog-button span { font-size: calc(10.5px * var(--font-scale)); font-weight: 680; }
.parameter-catalog-button small { color: var(--color-text-muted); font-size: calc(8.5px * var(--font-scale)); }
.parameter-future-note { padding: 7px 9px; color: var(--color-text-muted); font-size: calc(9px * var(--font-scale)); line-height: 1.4; }
.parameter-detail-card { overflow: hidden; }
.parameter-detail-header { align-items: center; }
.parameter-warning { margin: 10px 12px 0; padding: 8px 10px; border: 1px solid #ead9b5; border-radius: 8px; background: var(--color-warning-soft); color: var(--color-warning); font-size: calc(9.5px * var(--font-scale)); line-height: 1.4; }
.parameter-contract { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--color-border); }
.parameter-contract code { padding: 3px 6px; border-radius: 5px; background: var(--color-surface-muted); color: var(--color-text-muted); font-size: calc(8.5px * var(--font-scale)); }
.parameter-state { min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; color: var(--color-text-muted); }
.parameter-state__icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: var(--color-surface-muted); color: var(--color-steel); }
.parameter-state__icon svg { width: 17px; height: 17px; }
.parameter-state__title, .parameter-state__description { margin: 0; }
.parameter-state__title { color: var(--color-text); font-size: calc(11.5px * var(--font-scale)); font-weight: 750; }
.parameter-state__description { max-width: 680px; margin-top: 4px; font-size: calc(9.5px * var(--font-scale)); line-height: 1.5; }
.parameter-table-wrap { width: 100%; overflow-x: auto; }
.parameter-table { width: 100%; border-collapse: collapse; font-size: calc(10px * var(--font-scale)); }
.parameter-table th, .parameter-table td { padding: 8px 10px; border-bottom: 1px solid var(--color-border); text-align: left; }
.parameter-table th { background: var(--color-surface-muted); color: var(--color-text-muted); font-size: calc(8.5px * var(--font-scale)); white-space: nowrap; }
.parameter-color::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--parameter-color); }
@media (max-width: 760px) { .parameters-layout { grid-template-columns: 1fr; } .parameter-catalogs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .parameter-catalog-group + .parameter-catalog-group { margin: 0; padding: 0; border-top: 0; } }
@media (max-width: 440px) { .parameter-catalogs { grid-template-columns: 1fr; } .parameter-detail-header { align-items: flex-start; } .parameter-state { align-items: flex-start; padding: 16px 12px; } }


/* Initial data entry */
.parameter-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-entry-panel {
  margin: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.provider-create-panel {
  margin: 0;
}

.data-entry-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.data-entry-panel__title,
.data-entry-panel__description {
  margin: 0;
}

.data-entry-panel__title {
  color: var(--color-text);
  font-size: calc(12px * var(--font-scale));
  font-weight: 750;
}

.data-entry-panel__description {
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: calc(9.5px * var(--font-scale));
  line-height: 1.45;
}

.data-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.data-entry-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--color-text);
  font-size: calc(9.5px * var(--font-scale));
  font-weight: 680;
}

.data-entry-field--wide {
  grid-column: 1 / -1;
}

.data-entry-field input,
.data-entry-field select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: calc(10.5px * var(--font-scale));
}

.data-entry-field input:focus-visible,
.data-entry-field select:focus-visible {
  outline: 2px solid var(--color-primary-soft);
  outline-offset: 1px;
  border-color: var(--color-primary);
}

.data-entry-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-size: calc(10px * var(--font-scale));
  font-weight: 650;
}

.data-entry-check input {
  width: 15px;
  height: 15px;
}

.data-entry-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.data-entry-error {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: calc(9.5px * var(--font-scale));
  line-height: 1.4;
}

@media (max-width: 620px) {
  .parameter-detail-actions { align-items: flex-end; }
  .data-entry-form { grid-template-columns: 1fr; }
  .data-entry-field--wide { grid-column: auto; }
  .data-entry-form__actions { grid-column: auto; }
}
