/* Shared tokens moved to /assets/css/app-tokens.css */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: radial-gradient(1200px 700px at 20% -200px, var(--surface) 0%, var(--bg) 52%);
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Nunito Sans", "Segoe UI", sans-serif;
  line-height: 1.35;
  padding: 20px 12px 28px;
}

body.has-bottom-nav {
  padding-bottom: calc(var(--ui-bottom-nav-height) + var(--ui-bottom-nav-safe-area) + 12px);
}

body.has-bottom-nav.has-quick-actions {
  padding-bottom: calc(var(--ui-bottom-nav-height) + var(--ui-bottom-nav-safe-area) + 76px);
}

body.pendulum-local-fullscreen {
  padding: 0 !important;
  overflow: hidden;
}

body.pendulum-local-fullscreen::before {
  display: none;
}

body.pendulum-local-fullscreen .app-shell {
  max-width: none;
  margin: 0;
}

body.pendulum-local-fullscreen .main-stack {
  gap: 0;
}

body.pendulum-local-fullscreen .app-top,
body.pendulum-local-fullscreen .app-quick-actions,
body.pendulum-local-fullscreen .app-bottom-nav,
body.pendulum-local-fullscreen .app-bottom-nav-more-backdrop,
body.pendulum-local-fullscreen .app-bottom-nav-more-sheet {
  display: none !important;
}

body.is-help-modal-open {
  overflow: hidden;
}

body.is-consent-modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ui-viewport-top-accent-height);
  background: var(--helper-accent);
  pointer-events: none;
  z-index: 9999;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-primary-dark);
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  max-width: 860px;
  width: min(100%, 860px);
  margin: 0 auto;
}

.app-top {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.app-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-home-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
}

.app-home-logo-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.app-home-logo-image {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  background: transparent;
}

.helper-icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  box-sizing: border-box;
  padding: 5px;
  background: transparent;
  transition: opacity 180ms ease;
}

.app-home-logo-fallback {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.app-brand {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.app-helper-title-link {
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}

.app-helper-title-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.app-brand-helper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-brand-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-brand-helper::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--helper-accent);
  flex: 0 0 12px;
}

.app-brand-home::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  flex: 0 0 10px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.header-locale-menu {
  position: relative;
}

.topbar-locale-trigger.is-open {
  color: var(--color-primary);
}

.header-primary-action {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.header-primary-action:hover {
  background: var(--ui-dropdown-hover-bg);
}

.header-primary-action[disabled],
.header-primary-action[aria-disabled="true"],
.header-primary-action[data-topbar-disabled="true"] {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.header-primary-action[disabled]:hover,
.header-primary-action[aria-disabled="true"]:hover,
.header-primary-action[data-topbar-disabled="true"]:hover {
  background: var(--surface-strong);
}

.header-primary-action:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.header-primary-action-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.header-primary-action-icon.app-inline-icon,
.header-primary-action-icon-wrap .app-inline-icon {
  width: 24px;
  height: 24px;
}

.header-primary-action-icon-wrap {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-primary-action-text {
  font-size: 0.85rem;
  font-weight: 700;
}

.header-primary-action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
}

.shopping-notification-bell-btn,
.topbar-notification-bell-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.85;
}

.shopping-notification-bell-btn[hidden],
.topbar-notification-bell-btn[hidden] {
  display: none;
}

.shopping-notification-bell-btn:focus-visible,
.topbar-notification-bell-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.shopping-notification-bell-btn:hover,
.topbar-notification-bell-btn:hover {
  opacity: 1;
}

.shopping-notification-bell-btn.is-active,
.topbar-notification-bell-btn.is-active {
  opacity: 1;
}

.shopping-notification-bell-icon,
.topbar-notification-bell-icon {
  width: 20px;
  height: 20px;
  display: block;
  transform-origin: 50% 20%;
}

.shopping-notification-bell-btn.is-ring .shopping-notification-bell-icon,
.topbar-notification-bell-btn.is-ring .topbar-notification-bell-icon {
  animation: shopping-bell-ring 620ms ease;
}

@keyframes shopping-bell-ring {
  0% { transform: rotate(0deg); }
  12% { transform: rotate(-24deg); }
  24% { transform: rotate(20deg); }
  36% { transform: rotate(-16deg); }
  48% { transform: rotate(13deg); }
  60% { transform: rotate(-10deg); }
  72% { transform: rotate(7deg); }
  84% { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

.app-helper-divider {
  border-top: 1px solid var(--helper-accent);
  margin-top: -3px;
}

.header-secondary-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 0px;
}

.header-list-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-store-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-selector-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  align-self: center;
  margin: 0 2px;
}

.header-store-menu {
  position: relative;
}

.header-store-trigger {
  min-height: var(--ui-control-height-default);
  min-width: 170px;
  width: 100%;
  max-width: 240px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.header-chip-trigger {
  gap: 10px;
  justify-content: space-between;
  appearance: none;
  min-height: 0;
  width: auto;
  min-width: 0;
  max-width: 340px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-secondary);
}

.header-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
  color: var(--muted);
  line-height: 1.05;
}

.header-chip-caret {
  color: var(--color-text);
  font-weight: 600;
  line-height: 1;
  flex: 0 0 auto;
}

.header-store-trigger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.header-list-label {
  font-size: var(--ui-micro-label-size);
  line-height: 1.05;
  font-weight: var(--ui-micro-label-weight);
  letter-spacing: 0;
  color: var(--ui-micro-label-color);
  white-space: nowrap;
  margin: 0;
}

.back-trigger {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.back-trigger:hover {
  text-decoration: none;
}

.main-menu {
  position: relative;
}

.main-menu-trigger {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.main-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(260px, 88vw);
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 45;
}

.main-menu-popover[hidden] {
  display: none;
}

.main-menu-popover.is-drop-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.main-menu-popover.is-align-right {
  left: auto;
  right: 0;
}

.main-menu-form {
  margin: 0;
}

.main-menu-link {
  width: 100%;
  min-height: var(--ui-control-height-default);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.main-menu-link:hover {
  text-decoration: none;
  background: var(--color-primary-light);
}

.main-menu-link.danger-link {
  color: var(--danger);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ui-control-height-default);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 12px;
  font-weight: 600;
}

.nav-link.is-active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.nav-logo-button {
  width: var(--ui-control-height-default);
  height: var(--ui-control-height-default);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--color-primary-dark);
}

.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--color-primary-dark);
  line-height: 1;
  user-select: none;
}

.help-trigger:focus {
  outline: none;
}

.help-trigger:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

.help-trigger:hover {
  color: var(--color-primary-dark);
}

.help-trigger-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.helper-icon {
  transition: filter 180ms ease, opacity 180ms ease;
}

.helper-icon.is-help-dim {
  filter: grayscale(1);
  opacity: 0.48;
}

.nav-action-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: var(--icon-stroke-width);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-session-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.topbar-session-action:focus {
  outline: none;
}

.topbar-session-action:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 10px;
}

.topbar-session-action-icon,
.topbar-session-action-icon.app-inline-icon {
  width: 28px;
  height: 28px;
  display: block;
  stroke: currentColor;
  stroke-width: var(--icon-stroke-width);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-list-menu {
  position: relative;
}

.header-list-trigger {
  min-height: 0;
  min-width: 0;
  max-width: 340px;
  width: auto;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.header-list-popover {
  position: absolute;
  left: 0;
  right: auto;
  top: 0;
  width: min(224px, 64vw);
  min-width: 224px;
  z-index: 40;
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 10px;
}

.header-store-popover {
  position: absolute;
  left: 0;
  right: auto;
  top: 0;
  width: max(134px, 60%);
  min-width: 134px;
  max-width: min(340px, 76vw);
  z-index: 40;
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 10px;
}

.header-locale-popover {
  position: absolute;
  left: 0;
  right: auto;
  top: 0;
  width: min(220px, 72vw);
  min-width: 180px;
  z-index: 40;
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 10px;
}

.header-list-popover[hidden] {
  display: none;
}

.header-store-popover[hidden] {
  display: none;
}

.header-locale-popover[hidden] {
  display: none;
}

.header-dropdown-title {
  margin: 0;
  font-size: var(--ui-micro-label-size);
  line-height: 1.1;
  font-weight: 700;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .header-chip-trigger:not(:disabled):hover {
    background: transparent;
    border-color: transparent;
    color: var(--color-primary-dark);
  }
}

.header-chip-trigger:not(:disabled):active {
  background: transparent;
  border-color: transparent;
  color: var(--color-primary-dark);
}

.header-list-popover.is-align-right,
.header-store-popover.is-align-right,
.header-locale-popover.is-align-right {
  left: auto;
  right: 0;
}

.header-list-popover.is-drop-up,
.header-store-popover.is-drop-up,
.header-locale-popover.is-drop-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.header-locale-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.header-locale-option-form {
  margin: 0;
}

.header-locale-option {
  width: 100%;
  min-height: var(--ui-control-height-default);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.header-locale-option:hover,
.header-locale-option:focus-visible {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-option-border);
}

.header-locale-option.is-active {
  border-color: var(--ui-dropdown-selected-border);
  background: var(--ui-dropdown-hover-bg);
}

.header-locale-check {
  width: 14px;
  flex: 0 0 14px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

.header-locale-label {
  min-width: 0;
}

.header-list-form {
  display: grid;
  gap: 10px;
}

.header-store-options-form {
  display: grid;
  gap: 8px;
}

.header-list-options {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.header-store-options {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.header-list-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--ui-control-radius);
}

.header-list-option:hover {
  background: var(--ui-dropdown-hover-bg);
}

.header-list-option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: var(--ui-control-height-default);
  height: var(--ui-control-height-default);
  min-width: var(--ui-control-height-default);
  min-height: var(--ui-control-height-default);
  max-width: var(--ui-control-height-default);
  max-height: var(--ui-control-height-default);
  flex: 0 0 var(--ui-control-height-default);
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.header-list-option input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 18px;
  border: solid var(--ui-dropdown-selected-border);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 120ms ease;
  margin-top: -2px;
}

.header-list-option input[type="checkbox"]:checked {
  background: var(--surface-strong);
  border-color: var(--ui-dropdown-selected-border);
}

.header-list-option input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.header-store-option {
  width: 100%;
  min-height: var(--ui-control-height-default);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.header-store-option:hover {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-option-border);
}

.header-store-option:focus-visible {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-option-border);
}

.header-store-option.is-active {
  border-color: transparent;
  background: transparent;
}

.header-store-option.is-active:hover {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-selected-border);
}

.header-store-option.is-active:focus-visible {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-selected-border);
}

.header-store-noscript-form {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.header-store-noscript-select {
  min-height: var(--ui-control-height-default);
}

.header-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-list-plus {
  width: var(--ui-control-height-default);
  height: var(--ui-control-height-default);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.header-list-plus:hover {
  text-decoration: none;
  background: var(--surface);
}

.main-stack {
  display: grid;
  gap: 12px;
}

/* Shared bottom nav moved to /assets/css/app-bottom-nav.css */
/* Shared More-sheet UI moved to /assets/css/app-more.css */

.page-heading {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.page-intro {
  display: grid;
  gap: 8px;
}

.home-widgets {
  display: grid;
  gap: 10px;
}

.home-login-cta {
  width: 100%;
}

.translations-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.translations-fallback-block {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.translations-preview {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  white-space: pre-wrap;
  word-break: break-word;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.card h2,
.card h3,
.card h4,
.card p {
  margin-top: 0;
}

.card-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--text-help);
}

.page-back-to-top-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}

.page-back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 0;
  color: var(--text-help);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.page-back-to-top:hover,
.page-back-to-top:focus-visible {
  color: var(--text);
}

.notice {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.notice-error {
  border-color: var(--danger-soft-border);
  color: var(--danger);
}

.notice-success {
  border-color: var(--success-soft-border);
  color: var(--success);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.widget-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.widget-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.widget-card-head .card-title {
  margin: 0;
}

.widget-card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border: 1px solid var(--line);
}

.widget-card-icon {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  flex: 0 0 36px;
}

.widget-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(18, 26, 47, 0.12), 0 8px 24px rgba(18, 26, 47, 0.08);
}

.widget-card-accented {
  background: var(--widget-accent);
  border-color: color-mix(in srgb, var(--widget-accent) 82%, #1c1c1c);
  color: #fff;
}

.widget-card-accented .card-title,
.widget-card-accented .muted,
.widget-card-accented .widget-preview {
  color: #fff;
}

.widget-card-accented .muted {
  opacity: 0.9;
}

.widget-card-accented .widget-preview {
  opacity: 0.92;
}

.widget-card-accented .widget-card-icon-wrap {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.widget-card-accented:hover {
  box-shadow: 0 6px 18px rgba(18, 26, 47, 0.18), 0 16px 32px rgba(18, 26, 47, 0.16);
}

.widget-card-category-planning {
  --widget-accent: var(--color-category-planning);
}

.widget-card-category-practical {
  --widget-accent: var(--color-category-practical);
}

.widget-card-category-time {
  --widget-accent: var(--color-category-time);
}

.widget-card-category-finance {
  --widget-accent: var(--color-category-finance);
}

.widget-card-category-creative {
  --widget-accent: var(--color-category-creative);
}

.widget-card-category-notes {
  --widget-accent: var(--color-category-notes);
}

.widget-card-category-sharing {
  --widget-accent: var(--color-category-sharing);
}

.widget-card-category-system {
  --widget-accent: var(--color-category-system);
}

.theme-helper-calculator {
  --helper-accent: var(--color-category-finance);
  --accent-soft: #edf0ff;
}

.theme-helper-webtjek {
  --helper-accent: var(--color-category-sharing);
  --accent-soft: #f8efec;
}

/* GrowthLog helper rules moved to /assets/css/helpers/growthlog/*.css */

.hidden {
  display: none !important;
}

.lh-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lh-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

.lh-modal-content {
  position: relative;
  z-index: 1;
}

.lh-form-group {
  display: grid;
  gap: 8px;
}

.lh-form-group > label {
  margin: 0;
}

.lh-input {
  width: 100%;
  max-width: 100%;
}

.lh-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.lh-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--color-primary-dark);
  font-size: 0.88rem;
  line-height: 1;
}

.lh-tag-chip > span {
  line-height: 1;
}

.lh-tag-remove {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 14px;
  min-width: 14px;
  width: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1;
}

.lh-tag-remove:hover {
  background: transparent;
}

.lh-tag-remove:focus-visible {
  outline-width: 1px;
  outline-offset: 1px;
}

.lh-tag-add-button {
  align-self: flex-start;
  min-height: var(--ui-control-height-compact);
  padding-inline: 12px;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 84%, white);
  border-color: color-mix(in srgb, var(--line) 88%, white);
}

.lh-modal-footer {
  margin-top: 4px;
}

.lh-tag-chip--add {
  border-style: dashed;
  cursor: pointer;
  opacity: 0.8;
}

.lh-tag-chip--add:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--surface) 88%, white);
}

.lh-tag-input {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  height: 28px;
  padding: 2px 10px;
  font-size: 0.88rem;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid var(--ui-control-border-color);
  background: white;
}

.lh-tag-input input {
  border: none;
  outline: none;
  box-shadow: none;
  font: inherit;
  line-height: 1;
  padding: 0;
  margin: 0;
  min-height: 0;
  height: auto;
  background: transparent;
}

.lh-tag-input .lh-input:focus,
.lh-tag-input .lh-input:focus-visible {
  outline: none;
  border-color: transparent;
}

.lh-input:focus,
.lh-input:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--focus-ring) 70%, white);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--focus-ring) 52%, var(--ui-control-border-color));
}

.lh-modal:not(.hidden) {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.widget-preview {
  margin: 8px 0 10px 0;
  padding-left: 18px;
  color: var(--muted);
}

.widget-preview li {
  margin: 2px 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  font-size: 0.95rem;
  color: var(--text);
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

input,
select,
textarea,
button {
  font: inherit;
}

.ui-control--compact,
.btn--compact {
  --ui-control-height: var(--ui-control-height-compact);
}

.ui-control--large,
.btn--large {
  --ui-control-height: var(--ui-control-height-large);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
select,
textarea {
  width: 100%;
  min-height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  border: 1px solid var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
  padding: 0 var(--ui-control-padding-x);
}

textarea {
  min-height: calc(var(--ui-control-height) * 2);
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ui-control-placeholder);
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 4px), calc(100% - 12px) calc(50% - 4px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: var(--ui-control-select-right-padding);
}

.ui-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

select[data-ui-dropdown].is-enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.ui-select-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  border: 1px solid var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
  padding: 0 var(--ui-control-select-right-padding) 0 var(--ui-control-padding-x);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.ui-select-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 100%;
  width: max-content;
  max-height: 260px;
  overflow: auto;
}

.ui-select-popover[hidden] {
  display: none;
}

.ui-select-popover.is-drop-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.ui-select-popover.is-align-right {
  left: auto;
  right: 0;
}

.ui-select-group-label {
  font-size: var(--ui-micro-label-size);
  color: var(--ui-micro-label-color);
  font-weight: var(--ui-micro-label-weight);
  padding: 2px 6px 0;
}

.ui-select-option {
  width: max-content;
  min-width: 100%;
  min-height: var(--ui-control-height-default);
  border: 1px solid transparent;
  border-radius: var(--ui-control-radius);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.ui-select-option:hover {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-option-border);
}

.ui-select-option:focus-visible {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-option-border);
}

.ui-select-option.is-selected {
  border-color: transparent;
  background: transparent;
}

.ui-select-option.is-selected:hover {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-selected-border);
}

.ui-select-option.is-selected:focus-visible {
  background: var(--ui-dropdown-hover-bg);
  border-color: var(--ui-dropdown-selected-border);
}

:where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  button,
  .btn,
  .ui-select-trigger,
  .header-list-trigger,
  .header-store-trigger,
  .main-menu-trigger,
  .main-menu-link,
  .header-store-option,
  .ui-select-option,
  .product-select-btn,
  .nav-link,
  .nav-logo-button,
  .header-list-plus,
  .back-trigger,
  summary
):focus {
  outline: none;
}

:where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  button,
  .btn,
  .ui-select-trigger,
  .header-list-trigger,
  .header-store-trigger,
  .main-menu-trigger,
  .main-menu-link,
  .header-store-option,
  .ui-select-option,
  .product-select-btn,
  .nav-link,
  .nav-logo-button,
  .header-list-plus,
  .back-trigger,
  summary
):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@supports not selector(:focus-visible) {
  :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
    select,
    textarea,
    button,
    .btn,
    .ui-select-trigger,
    .header-list-trigger,
    .header-store-trigger,
    .main-menu-trigger,
    .main-menu-link,
    .header-store-option,
    .ui-select-option,
    .product-select-btn,
    .nav-link,
    .nav-logo-button,
    .header-list-plus,
    .back-trigger,
    summary
  ):focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
  }
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
.btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

button,
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  border: 1px solid var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
  padding: 0 var(--ui-control-padding-x);
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--helper-accent);
  color: #fff;
  border-color: var(--helper-accent);
}

.btn-secondary {
  border-color: var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
}

.btn-chip {
  gap: 6px;
  min-height: 36px;
  max-width: 100%;
  padding: 0 12px;
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--color-text-heading);
  font-size: var(--font-label);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-chip:hover,
.btn-chip:focus-visible {
  color: var(--color-text);
  text-decoration: none;
}

.btn-chip > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(0.5px);
}

.btn-chip--compact {
  min-height: 32px;
  padding-inline: 10px;
}

.btn-chip .app-inline-icon,
.btn-chip-icon {
  --icon-stroke-width: 1.2;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.btn-toggle {
  border-color: var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
}

.btn-toggle[aria-pressed="true"] {
  border-color: var(--helper-accent);
  background: var(--accent-soft);
  color: var(--helper-accent);
}

.btn-switch {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.btn-switch-track {
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line-strong) 72%, white);
  transition:
    background-color var(--ui-state-transition-fast),
    border-color var(--ui-state-transition-fast);
}

.btn-switch:hover .btn-switch-track,
.btn-switch:focus-visible .btn-switch-track {
  background: color-mix(in srgb, var(--line-strong) 82%, white);
}

.btn-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 26, 47, 0.10);
  transform: translateX(0);
  transition: transform var(--ui-state-transition-fast);
}

.btn-switch[aria-pressed="true"] {
  background: transparent;
}

.btn-switch[aria-pressed="true"] .btn-switch-track {
  background: color-mix(in srgb, var(--color-primary) 88%, white);
}

.btn-switch[aria-pressed="true"]:hover .btn-switch-track,
.btn-switch[aria-pressed="true"]:focus-visible .btn-switch-track {
  background: var(--color-primary);
}

.btn-switch[aria-pressed="true"] .btn-switch-thumb {
  transform: translateX(16px);
}

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

.webtjek-push-inline-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.webtjek-push-copy {
  display: grid;
  gap: 8px;
}

.webtjek-push-copy > .muted,
.webtjek-push-copy > .notice {
  margin: 0;
}

.btn-danger {
  border-color: var(--danger-soft-border);
  background: var(--danger-soft-bg);
  color: var(--danger);
}

.btn:not(.btn-primary):not(.btn-secondary):not(.btn-toggle):not(.btn-danger):not(.btn-save),
.btn-soft {
  border-color: var(--helper-accent);
  background: var(--helper-accent);
  color: #fff;
}

.btn-save {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.ui-icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--ui-control-border-color);
  background: var(--ui-control-bg);
  color: var(--ui-control-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ui-icon-button .app-inline-icon,
.ui-icon-button-icon {
  width: 19px;
  height: 19px;
}

.ui-icon-button[aria-pressed="true"],
.ui-icon-button.is-active {
  border-color: var(--helper-accent);
  background: var(--accent-soft);
  color: var(--helper-accent);
}

/* UI state matrix: consistent hover/focus/active feedback */
:where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  button,
  .btn,
  .ui-select-trigger,
  .header-list-trigger,
  .header-store-trigger,
  .main-menu-trigger,
  .main-menu-link,
  .header-store-option,
  .ui-select-option,
  .product-select-btn,
  .nav-link,
  .nav-logo-button,
  .header-list-plus,
  .back-trigger
) {
  transition:
    background-color var(--ui-state-transition-fast),
    border-color var(--ui-state-transition-fast),
    box-shadow var(--ui-state-transition-fast),
    color var(--ui-state-transition-fast),
    filter var(--ui-state-transition-fast);
}

@media (hover: hover) and (pointer: fine) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not(:disabled):not([readonly]):hover,
  select:not(:disabled):hover,
  textarea:not(:disabled):not([readonly]):hover {
    background: var(--ui-input-hover-bg);
    border-color: var(--ui-input-hover-border);
  }

  :where(
    button:not(.btn-primary):not(.btn-danger):not(.btn-soft):not(.btn-save):not(.btn-toggle):not(:disabled),
    .ui-select-trigger:not(:disabled),
    .header-list-trigger:not(:disabled),
    .header-store-trigger:not(:disabled),
    .main-menu-trigger:not(:disabled),
    .main-menu-link,
    .header-store-option:not(:disabled),
    .ui-select-option:not(:disabled),
    .product-select-btn:not(:disabled),
    .nav-link,
    .nav-logo-button,
    .header-list-plus,
    .back-trigger
  ):hover {
    background: var(--ui-control-hover-bg);
    border-color: var(--ui-control-hover-border);
  }

  .btn-primary:not(:disabled):hover,
  .btn:not(.btn-danger):not(.btn-save):not(.btn-secondary):not(.btn-toggle):not(:disabled):hover,
  .btn-soft:not(:disabled):hover,
  .btn-save:not(:disabled):hover,
  .btn-danger:not(:disabled):hover {
    filter: brightness(0.97);
  }
}

:where(
  button:not(.btn-primary):not(.btn-danger):not(.btn-soft):not(.btn-save):not(.btn-toggle):not(:disabled),
  .ui-select-trigger:not(:disabled),
  .header-list-trigger:not(:disabled),
  .header-store-trigger:not(:disabled),
  .main-menu-trigger:not(:disabled),
  .main-menu-link,
  .header-store-option:not(:disabled),
  .ui-select-option:not(:disabled),
  .product-select-btn:not(:disabled),
  .nav-link,
  .nav-logo-button,
  .header-list-plus,
  .back-trigger
):active {
  background: var(--ui-control-active-bg);
  border-color: var(--ui-control-active-border);
}

.btn-primary:not(:disabled):active,
.btn:not(.btn-danger):not(.btn-save):not(.btn-secondary):not(.btn-toggle):not(:disabled):active,
.btn-soft:not(:disabled):active,
.btn-save:not(:disabled):active,
.btn-danger:not(:disabled):active {
  filter: brightness(0.94);
}

.header-store-option.is-active:hover,
.ui-select-option.is-selected:hover {
  border-color: var(--ui-dropdown-selected-border);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-stack {
  display: grid;
  gap: 10px;
}

.inline-stack {
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
}

.list-management-stack {
  display: grid;
  gap: 12px;
}

.list-management-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface);
}

.list-management-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.list-management-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.list-meta-text {
  margin: 4px 0 0;
}

.list-members {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.list-members-title {
  font-size: 1rem;
  margin-bottom: 8px;
}

.list-member-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.list-member-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.list-member-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.list-member-role-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.list-member-role-form select,
.list-member-role-form .ui-select {
  min-height: var(--ui-control-height-default);
  min-width: 128px;
}

.list-member-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-form {
  margin: 0;
}

.webtjek-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.webtjek-switcher-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.webtjek-switcher-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.webtjek-meta-row {
  margin-top: 10px;
}

.webtjek-switcher-field {
  display: grid;
  min-width: 0;
}

.webtjek-switcher-field select,
.webtjek-switcher-field .ui-select {
  width: 100%;
}

.webtjek-new-button {
  gap: 8px;
  white-space: nowrap;
}

.webtjek-new-button .webtjek-new-button-plus {
  color: inherit;
}

.webtjek-new-button-plus {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.webtjek-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.webtjek-stats span {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-control-height-compact);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
}

.webtjek-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.webtjek-alert-list,
.webtjek-monitor-list,
.webtjek-field-list {
  display: grid;
  gap: 12px;
}

.webtjek-field-list {
  margin-top: 10px;
}

.webtjek-alert-card,
.webtjek-monitor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px;
}

.webtjek-alert-card.is-unread {
  border-color: var(--helper-accent);
  box-shadow: inset 3px 0 0 var(--helper-accent);
}

.webtjek-alert-head,
.webtjek-monitor-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.webtjek-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.webtjek-monitor-body {
  display: grid;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.webtjek-monitor-actions {
  justify-content: flex-end;
  align-items: flex-start;
  flex: 0 0 auto;
}

.webtjek-object-title {
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2rem);
  line-height: 1.05;
}

.webtjek-section-title {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 780;
  line-height: 1.18;
}

.webtjek-field-label {
  color: var(--text-help);
  font-size: 0.93rem;
  font-weight: 680;
}

.webtjek-value-label {
  margin: 0;
  color: var(--text-help);
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
}

.webtjek-meta {
  margin: 0;
  font-size: var(--ui-micro-label-size);
  color: var(--text-help);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.webtjek-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.webtjek-detail-item {
  display: grid;
  gap: 2px;
  margin: 0;
  min-width: 0;
}

.webtjek-detail-item dt {
  margin: 0 0 4px;
  color: var(--text-help);
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
}

.webtjek-detail-item dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.webtjek-static-field {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: var(--ui-control-height-default);
  padding: 2px 0;
}

.webtjek-static-field-value {
  color: var(--text);
  font-weight: 700;
}

.webtjek-static-field-note {
  color: var(--text-help);
  font-size: var(--ui-micro-label-size);
}

.webtjek-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-size: var(--ui-micro-label-size);
  font-weight: 800;
  white-space: nowrap;
}

.webtjek-pill[data-status="ok"] {
  border-color: var(--success-soft-border);
  background: #eff9f4;
  color: var(--success);
}

.webtjek-pill[data-status="changed"] {
  border-color: var(--helper-accent);
  background: var(--accent-soft);
  color: var(--helper-accent);
}

.webtjek-pill[data-status="error"] {
  border-color: var(--danger-soft-border);
  background: var(--danger-soft-bg);
  color: var(--danger);
}

.webtjek-pill[data-status="paused"],
.webtjek-pill[data-status="needs-fields"],
.webtjek-pill[data-status="never"] {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--text-help);
}

.webtjek-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.webtjek-value {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.webtjek-field-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.webtjek-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) auto;
  gap: 10px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding: 14px 0 0 14px;
  border-left: 2px solid color-mix(in srgb, var(--line) 86%, white);
}

.webtjek-field-row:first-child {
  border-top: 0;
  padding-top: 4px;
}

.webtjek-field-row .webtjek-value {
  padding: 8px 0 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  font-weight: 520;
}

.webtjek-add-field {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: 12px;
}

.webtjek-monitor-body > .item-meta,
.webtjek-section-head > div,
.webtjek-monitor-head > div,
.webtjek-field-row > div {
  min-width: 0;
}

.webtjek-monitor-body > .item-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.webtjek-field-row > .inline-form {
  justify-self: end;
  align-self: start;
}

.webtjek-row-remove {
  padding-inline: 12px;
  min-width: 0;
  border-color: color-mix(in srgb, var(--danger-soft-border) 72%, white);
  background: transparent;
  color: color-mix(in srgb, var(--danger) 88%, white);
  box-shadow: none;
}

.webtjek-row-remove:not(:disabled):hover,
.webtjek-row-remove:not(:disabled):focus-visible {
  border-color: var(--danger-soft-border);
  background: color-mix(in srgb, var(--danger-soft-bg) 55%, white);
}

.webtjek-edit-field-form {
  display: grid;
  gap: 12px;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--line) 86%, white);
  border-radius: 0;
  background: transparent;
}

.webtjek-edit-field-list {
  margin-top: 10px;
}

.webtjek-edit-field-form + .webtjek-edit-field-form {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.webtjek-edit-field-head {
  display: grid;
  gap: 4px;
}

.webtjek-edit-field-head > .webtjek-field-label,
.webtjek-edit-field-head > .webtjek-meta {
  margin: 0;
}

.webtjek-edit-field-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.webtjek-analyzer-card {
  display: grid;
  gap: 12px;
}

.webtjek-json-finder-card {
  display: grid;
  gap: 12px;
}

.webtjek-analysis-result {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.webtjek-json-result {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.webtjek-json-builder {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.webtjek-json-builder .webtjek-form-grid {
  grid-template-columns: 1fr;
}

.webtjek-analysis-chip-list,
.webtjek-analysis-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.webtjek-analysis-chip,
.webtjek-analysis-list-item {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-size: var(--ui-micro-label-size);
  word-break: break-word;
}

.webtjek-analysis-preview {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.webtjek-pill[data-status="json"],
.webtjek-pill[data-status="html"] {
  border-color: var(--success-soft-border);
  background: #eff9f4;
  color: var(--success);
}

.webtjek-pill[data-status="client-rendered"],
.webtjek-pill[data-status="info"] {
  border-color: var(--helper-accent);
  background: var(--accent-soft);
  color: var(--helper-accent);
}

.webtjek-pill[data-status="blocked"] {
  border-color: var(--danger-soft-border);
  background: var(--danger-soft-bg);
  color: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.shopping-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.list-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-control-height-default);
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.shopping-screen {
  --shopping-section-divider: #6ba368;
  display: grid;
  gap: 12px;
}

.shopping-search-panel,
.shopping-list-simple {
  padding-top: 0;
}

.search-top-row {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 240px);
  gap: 10px;
  align-items: end;
}

.search-top-row.is-single {
  grid-template-columns: 1fr;
}

.search-input-wrap,
.target-list-wrap {
  display: grid;
  gap: 6px;
}

.product-dropdown {
  margin-top: var(--shopping-search-dropdown-margin-top);
  border: 1px solid var(--ui-dropdown-panel-border);
  border-radius: var(--ui-dropdown-radius);
  background: var(--ui-dropdown-panel-bg);
  box-shadow: var(--ui-dropdown-panel-shadow);
  overflow: hidden;
}

.product-dropdown[hidden] {
  display: none;
}

.product-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--shopping-search-item-gap);
  border-top: 1px solid var(--ui-dropdown-item-divider);
  padding: var(--shopping-search-item-padding-y) var(--shopping-search-item-padding-x);
}

.product-dropdown-item:hover,
.product-dropdown-item.is-active,
.product-dropdown-item:focus-within {
  background: var(--ui-dropdown-hover-bg);
}

/* iOS/touch can keep sticky :hover on tapped rows; disable row highlight on touch */
@media (hover: none), (pointer: coarse) {
  .product-dropdown-item:hover,
  .product-dropdown-item.is-active,
  .product-dropdown-item:focus-within {
    background: transparent;
  }
}

.product-dropdown-item:first-child {
  border-top: 0;
}

.product-select-btn {
  flex: 1;
  min-height: var(--ui-control-height-compact);
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.product-select-name {
  font-weight: 700;
  color: var(--text);
}

.product-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: var(--shopping-search-actions-min-width);
}

.product-comment-input {
  min-height: var(--ui-control-height-compact);
  width: var(--shopping-search-comment-width);
}

.custom-add-form[hidden] {
  display: none;
}

.custom-add-form {
  margin-top: 20px;
}

.custom-add-hint {
  margin: 0 0 10px;
}

.custom-add-denied {
  margin: -4px 0 0;
}

.icon-btn {
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 1.55rem;
}

.section-divider {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.shopping-list-simple {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 0 0;
}

.shopping-recent-panel {
  padding-top: 0;
}

.shopping-live-panel {
  display: grid;
  gap: 8px;
}

.shopping-live-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shopping-live-bar[hidden] {
  display: none;
}

.shopping-live-bar-notify {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.shopping-live-bar-updates {
  border-color: var(--line-strong);
}

.shopping-notification-feedback {
  margin: 0;
  font-size: var(--ui-micro-label-size);
  color: var(--ui-micro-label-color);
}

.shopping-notification-feedback.is-error {
  color: var(--danger);
}

.shopping-live-text {
  font-size: var(--ui-micro-label-size);
  color: var(--ui-micro-label-color);
}

.shopping-live-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shopping-live-bar-push {
  flex-wrap: wrap;
}

.shopping-list-notify-row {
  margin: 0;
  color: var(--ui-micro-label-color);
  font-size: var(--ui-micro-label-size);
}

.shopping-list-notify-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.shopping-notify-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.shopping-notify-modal[hidden] {
  display: none;
}

.shopping-notify-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 26, 39, 0.34);
}

.shopping-notify-dialog {
  position: relative;
  width: min(420px, 96vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--ui-dropdown-panel-shadow);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.shopping-notify-copy {
  margin: 0;
}

.shopping-notify-error {
  margin: 0;
}

.shopping-notify-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ui-disclosure > summary {
  cursor: pointer;
  font-size: var(--ui-micro-label-size);
  font-weight: var(--ui-micro-label-weight);
  color: var(--ui-micro-label-color);
  list-style: none;
}

.ui-disclosure > summary::-webkit-details-marker {
  display: none;
}

.ui-disclosure > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 120ms ease;
}

.ui-disclosure[open] > summary::before {
  transform: rotate(90deg);
}

.recent-change-list {
  margin-top: 8px;
  border-top: 0;
  font-size: 0.9rem;
}

.recent-change-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 0;
  padding: 1px 0;
}

.recent-change-action {
  width: 18px;
  font-weight: 800;
  text-align: center;
  margin-top: 2px;
}

.recent-change-action.is-add {
  color: var(--success);
}

.recent-change-action.is-remove {
  color: var(--danger);
}

.recent-change-main {
  min-width: 0;
}

.recent-change-link {
  appearance: none;
  border: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--color-primary-dark);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

.recent-change-link:hover {
  color: var(--color-primary);
}

.recent-change-name {
  font-weight: 700;
}

.recent-change-meta {
  margin: 2px 0 0;
}

.simple-category-label {
  margin: var(--shopping-category-label-margin-top) 0 var(--shopping-category-label-margin-bottom);
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
  color: var(--muted);
}

.simple-item-group {
  border-top: 0;
}

.simple-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--shopping-item-row-gap);
  border-bottom: 1px solid var(--line);
  padding: var(--shopping-item-row-padding-y) 0;
  transition: background-color 180ms ease, transform 150ms ease, max-height 220ms ease, opacity 220ms ease, padding 220ms ease, border-color 220ms ease;
  touch-action: pan-y;
  will-change: transform;
  overflow: hidden;
}

.simple-item-row.is-swiping {
  transition: background-color 180ms ease;
}

.simple-item-row.is-swipe-removing {
  transform: translateX(-120%);
  opacity: 0;
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

.simple-item-main {
  min-width: 0;
  flex: 1;
  padding-left: var(--shopping-item-main-padding-left);
}

.simple-item-name {
  margin: 0;
  font-size: var(--shopping-item-name-font-size);
  font-weight: 800;
  color: var(--text);
}

.simple-item-meta {
  margin: var(--shopping-item-meta-margin-top) 0 0;
  font-size: var(--shopping-item-meta-font-size);
  color: var(--muted);
}

.simple-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--shopping-item-actions-gap);
  min-width: var(--shopping-item-actions-min-width);
}

.item-icon-btn {
  min-height: var(--ui-control-height-compact);
  min-width: var(--ui-control-height-compact);
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--color-primary-dark);
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .item-icon-btn:not(:disabled):hover {
    background: var(--ui-control-hover-bg);
    border-color: var(--ui-control-hover-border);
  }
}

.item-icon-btn:not(:disabled):active {
  background: var(--ui-control-active-bg);
  border-color: var(--ui-control-active-border);
}

.item-remove-btn {
  min-width: 42px;
}

.simple-item-row.is-remove-pending {
  background: var(--danger-soft-bg);
  animation: removePendingFade var(--shopping-remove-pending-duration) ease-in forwards;
}

.simple-item-row.is-swipe-pending {
  background: var(--danger-soft-bg);
  border-color: var(--danger-soft-border);
}

.simple-item-row.is-new-since-seen {
  background: #eef6f8;
  border-color: #bfdde3;
}

.remove-hint-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 16px;
}

.remove-hint-modal[hidden] {
  display: none;
}

/* Shared help modal moved to /assets/css/app-help.css */

.remove-hint-dialog {
  width: min(460px, 94vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 14px;
}

.item-edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 85;
  padding: 16px;
}

.item-edit-modal[hidden] {
  display: none;
}

.item-edit-dialog {
  width: min(560px, 96vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 14px;
}

.item-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0px 0 0 12px;
  margin-bottom: 12px;
}

.item-edit-close {
  min-width: var(--ui-control-height-default);
  min-height: var(--ui-control-height-default);
  padding: 0;
  line-height: 1;
  font-size: 1.3rem;
}

.item-edit-product-name {
  margin: 0;
  font-size: 1.2rem;
  text-align: left;
  flex: 1 1 auto;
}

.item-edit-qty-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) var(--item-edit-unit-width, 128px);
  align-items: center;
}

.item-edit-qty-row .ui-select {
  width: var(--item-edit-unit-width, 128px);
}

.item-edit-qty-row .ui-select-trigger {
  min-height: var(--ui-control-height-default);
  width: 100%;
}

.item-edit-more {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.item-edit-more > summary {
  color: var(--ui-micro-label-color);
}

.item-edit-labeled-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.item-edit-labeled-row > label {
  margin: 0;
  font-size: var(--ui-micro-label-size);
  font-weight: var(--ui-micro-label-weight);
  color: var(--ui-micro-label-color);
}

.item-edit-nutrition {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-help);
}

.item-edit-nutrition strong {
  color: var(--text);
  font-weight: 700;
}

.item-edit-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .item-edit-labeled-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

.item-edit-dialog input.is-dirty-field,
.item-edit-dialog .ui-select-trigger.is-dirty-field {
  border-color: var(--danger-soft-border);
  background: var(--danger-soft-bg);
}

.item-edit-error {
  margin: 6px 0 0;
}

@keyframes removePendingFade {
  0% {
    background-color: var(--danger-soft-bg);
    border-color: var(--danger-soft-border);
  }

  100% {
    background-color: var(--bg);
    border-color: var(--line);
  }
}

.shopping-group {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}

.shopping-group:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.group-title {
  margin: 0;
  font-size: var(--ui-micro-label-size);
  font-weight: var(--ui-micro-label-weight);
  color: var(--ui-micro-label-color);
}

.group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-expand {
  margin-top: 8px;
}

.group-expand summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--accent);
}

.group-expand summary::-webkit-details-marker {
  display: none;
}

.group-expand summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
}

.group-expand[open] summary::before {
  transform: rotate(90deg);
}

.group-expand[open] + .group-flat {
  display: none;
}

.category-block {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.category-title {
  margin: 0 0 6px;
  font-size: var(--ui-micro-label-size);
  font-weight: 700;
  color: var(--muted);
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.item-row:first-child {
  border-top: 0;
}

.item-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.item-name.is-checked {
  text-decoration: line-through;
  opacity: 0.65;
}

.item-meta {
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--muted);
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-actions .btn {
  min-height: var(--ui-control-height-default);
  min-width: var(--ui-control-height-default);
  padding: 0 10px;
}

.products-filter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.products-edit-list {
  display: grid;
  gap: 0;
}

.products-edit-row {
  align-items: flex-start;
  gap: 8px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.products-actions-row {
  margin-bottom: 10px;
}

.products-save-all.is-ready {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft-bg);
}

.products-edit-row.is-dirty {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  padding-left: 10px;
}

.products-edit-row.is-delete-pending {
  background: var(--danger-soft-bg);
  border-left: 3px solid var(--danger);
  padding-left: 10px;
}

.products-edit-form {
  flex: 1;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) auto;
  align-items: center;
}

.products-edit-form [data-product-name].is-dirty-field,
.products-edit-form [data-product-category].is-dirty-field,
.products-edit-form .ui-select-trigger.is-dirty-field {
  border-color: var(--danger);
  background: var(--danger-soft-bg);
}

.category-create-grid {
  display: grid;
  gap: 12px;
}

.category-editor-board {
  display: grid;
  gap: 10px;
}

.category-editor-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: 10px;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.category-editor-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: default;
}

.category-editor-group-head .group-title {
  margin: 0;
}

.category-editor-category-list {
  display: grid;
  gap: 6px;
  min-height: 16px;
}

.category-editor-category {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: default;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.category-drag-handle {
  color: var(--muted);
  font-weight: 700;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.category-drag-handle:active {
  cursor: grabbing;
}

.category-editor-group.is-dragging,
.category-editor-category.is-dragging {
  opacity: 0.55;
}

.category-drag-ghost {
  position: fixed;
  top: -10000px;
  left: -10000px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.72;
  transform: scale(0.98);
  box-shadow: 0 10px 22px rgba(18, 26, 47, 0.22);
}

.category-drop-gap {
  border: 1px dashed var(--danger-soft-border);
  border-radius: var(--radius-sm);
  background: transparent;
  min-height: 16px;
  pointer-events: none;
}

.category-drop-gap.is-group {
  margin: 4px 0;
}

.category-editor-group.is-drop-before {
  box-shadow: inset 0 3px 0 0 var(--danger);
}

.category-editor-group.is-drop-after {
  box-shadow: inset 0 -3px 0 0 var(--danger);
}

.category-editor-group.is-drop-neighbor-before {
  box-shadow: inset 0 2px 0 0 var(--danger);
}

.category-editor-group.is-drop-neighbor-after {
  box-shadow: inset 0 -2px 0 0 var(--danger);
}

.category-editor-category.is-drop-before {
  box-shadow: inset 0 3px 0 0 var(--danger);
}

.category-editor-category.is-drop-after {
  box-shadow: inset 0 -3px 0 0 var(--danger);
}

.category-editor-category.is-drop-neighbor-before {
  box-shadow: inset 0 2px 0 0 var(--danger);
}

.category-editor-category.is-drop-neighbor-after {
  box-shadow: inset 0 -2px 0 0 var(--danger);
}

.category-editor-category-list.is-drop-end {
  box-shadow: inset 0 -3px 0 0 var(--danger);
}

.category-order-controls {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
}

.category-order-btn {
  min-height: 30px;
  min-width: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--color-primary-dark);
  font-weight: 700;
  line-height: 1;
}

.cookie-settings-button {
  position: fixed;
  right: 12px;
  bottom: 14px;
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.14);
}

body.has-bottom-nav .cookie-settings-button {
  bottom: calc(var(--ui-bottom-nav-height) + var(--ui-bottom-nav-safe-area) + 14px);
}

.consent-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1100;
  padding: 16px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
  pointer-events: none;
}

.consent-banner-card {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 18px;
  display: grid;
  gap: 16px;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.consent-banner-copy {
  display: grid;
  gap: 10px;
}

.consent-banner-title,
.consent-modal-title,
.legal-section-title {
  margin: 0;
  color: var(--color-heading-default, var(--text));
}

.consent-banner-text,
.consent-banner-links {
  margin: 0;
}

.consent-banner-actions,
.consent-modal-actions,
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.consent-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}

.consent-modal-dialog {
  position: relative;
  width: min(100% - 24px, 640px);
  margin: min(10vh, 72px) auto 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  outline: none;
}

.consent-modal-head,
.consent-modal-body {
  padding: 20px 20px 0;
}

.consent-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.consent-modal-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.consent-modal-body {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
}

.consent-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.consent-setting-copy {
  min-width: 0;
}

.consent-setting-copy > p,
.consent-settings-note,
.legal-section > p {
  margin: 0;
}

.consent-setting-copy > p + p,
.legal-section > p + p {
  margin-top: 6px;
}

.consent-setting-title {
  font-weight: 700;
  color: var(--color-heading-default, var(--text));
}

.consent-setting-fixed {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--color-primary-dark);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.consent-settings-note {
  color: var(--muted);
}

.consent-modal-actions {
  padding: 0 20px 20px;
}

.legal-card {
  display: grid;
  gap: 18px;
}

.legal-section {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

@media (min-width: 760px) {
  body {
    padding: 28px;
  }

  body.has-bottom-nav {
    padding-bottom: calc(var(--ui-bottom-nav-height) + var(--ui-bottom-nav-safe-area) + 12px);
  }

  .app-title-row {
    margin-bottom: 8px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-home-logo-image,
  .app-home-logo-fallback,
  .header-primary-action {
    width: 44px;
    height: 44px;
  }

  .app-brand {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .consent-banner-card,
  .consent-modal-dialog {
    border-radius: 20px;
  }

  .consent-setting-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .consent-setting-fixed,
  .consent-setting-row .btn-switch {
    align-self: flex-end;
  }

  .cookie-settings-button {
    right: 10px;
    left: 10px;
    width: auto;
    justify-content: center;
  }

  .header-title-wrap {
    gap: 8px;
  }

  .webtjek-switcher-row,
  .webtjek-switcher-bar,
  .webtjek-section-head,
  .webtjek-monitor-head,
  .webtjek-monitor-title-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .webtjek-stats {
    justify-content: flex-start;
  }

  .webtjek-stats span {
    min-height: 36px;
    padding: 0 10px;
  }

  .webtjek-form-grid,
  .webtjek-change-grid,
  .webtjek-field-section,
  .webtjek-field-row {
    grid-template-columns: 1fr;
  }

  .webtjek-detail-list {
    grid-template-columns: 1fr;
  }

  .webtjek-detail-item {
    gap: 2px;
  }

  .webtjek-detail-item dd {
    font-size: 0.95rem;
  }

  .webtjek-monitor-actions {
    justify-content: flex-start;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .webtjek-monitor-actions > * {
    width: 100%;
  }

  .webtjek-monitor-actions .btn,
  .webtjek-monitor-actions button,
  .webtjek-field-row .btn,
  .webtjek-field-row button {
    width: 100%;
    justify-content: center;
  }

  .webtjek-new-button {
    width: 100%;
    justify-content: center;
  }

  .webtjek-monitor-body > .item-meta,
  .webtjek-monitor-body > .notice,
  .webtjek-monitor-body > .webtjek-meta {
    font-size: 0.95rem;
  }

  .webtjek-value {
    padding: 9px 10px;
    font-size: 0.95rem;
  }

  .webtjek-field-row > .inline-form {
    justify-self: stretch;
  }

  .webtjek-field-row .webtjek-value {
    padding: 6px 0 0;
  }

  .webtjek-field-row .webtjek-row-remove {
    width: auto;
    justify-self: start;
  }

  .webtjek-static-field {
    min-height: 0;
    padding: 2px 0 4px;
  }

  .webtjek-edit-field-form {
    padding-left: 0;
    border-left: 0;
  }

  .inline-stack {
    grid-template-columns: 1fr;
  }

  .list-member-row {
    grid-template-columns: 1fr;
  }

  .list-member-role-form {
    width: 100%;
  }

  .search-top-row {
    grid-template-columns: 1fr;
  }

  .header-secondary-row {
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .header-list-row {
    width: auto;
    min-width: 0;
  }

  .header-selector-divider {
    height: 14px;
    margin: 0;
  }

  .header-list-trigger {
    max-width: 180px;
  }

  .header-store-row {
    min-width: 0;
  }

  .header-store-trigger {
    max-width: 160px;
  }

  .header-store-popover {
    width: max(128px, 60%);
    min-width: 128px;
    max-width: 76vw;
  }

  .products-filter-grid {
    grid-template-columns: 1fr;
  }

  .translations-form-grid {
    grid-template-columns: 1fr;
  }

  .products-edit-row {
    flex-direction: column;
    align-items: stretch;
  }

  .products-edit-form {
    grid-template-columns: 1fr;
  }

  .simple-item-actions {
    min-width: var(--shopping-item-actions-min-width-mobile);
  }

  .product-dropdown-actions {
    min-width: 56px;
  }

  .product-comment-input {
    width: var(--shopping-search-comment-width-mobile);
  }

  .shopping-live-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shopping-live-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
