/* Рабочие поверхности: читаемые позиции и знакомая навигация. */
:root {
  --color-action: var(--ui-accent);
  --color-action-ink: var(--ui-on-accent);
}
.btn--primary { background: var(--color-action); color: var(--color-action-ink); border-color: transparent; box-shadow: none; }
.btn--primary:hover { background: var(--ui-accent-hover); }
.control.is-active, .stock-filter.is-active, .availability-quantity-toggle.is-active,
.pagination button[aria-current="page"] {
  color: var(--color-action-ink);
  background: var(--color-action);
  border-color: var(--color-action);
}
.control.is-active .icon, .stock-filter.is-active .icon,
.availability-quantity-toggle.is-active .icon { color: inherit; }
.bottom-nav__item--create .bottom-nav__create-icon { background: var(--color-action); color: var(--color-action-ink); box-shadow: none; }
.segmented--sliding::before { box-shadow: none; }
.seg.is-active { color: var(--color-action-ink); }
.topbar, .bottom-nav { backdrop-filter: none; }
.card { box-shadow: none; gap: 14px; border-radius: 12px; }
.card__addr { font-weight: 550; }
.card__courier-comment { padding: 0 0 0 13px; border: 0; border-left: 3px solid var(--ui-accent); border-radius: 0; background: transparent; gap: 6px; }
.card__courier-comment-label { color: var(--color-text-muted); font-size: .875rem; font-weight: 450; }
.card__courier-comment-text { font-size: 1rem; line-height: 1.5; }
.order-lines { margin: 0; padding: 0; list-style: none; white-space: normal; }
.order-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 0; color: var(--color-text); }
.order-line + .order-line { border-top: 1px solid var(--color-border); }
.order-line__name { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-line__quantity { flex: 0 0 auto; max-width: 45%; padding: 2px 7px; border-radius: 5px; background: var(--color-surface-nested); font-weight: 550; font-variant-numeric: tabular-nums; text-align: right; }
/* Компактнее только заказы: размеры интерактивных кнопок сохраняются. */
.card[data-view-key^="order:"] { gap: 8px; padding-block: 14px; }
.card[data-view-key^="order:"] .order-line { padding-block: 6px; }
.card[data-view-key^="order:"] .card__total { padding-top: 8px; }
.card[data-view-key^="order:"] .card__business-status { padding: 8px 12px; }
.more-group-title { margin: 24px 0 4px; color: var(--color-text-muted); font-size: .875rem; font-weight: 500; }
.more-list { gap: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 8px 18px; }
.more-list .more-group-title:first-child { margin-top: 10px; }
.more-list .more-item { border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
.more-list .more-item:last-child { border-bottom: 0; }
.account-device-note { color: var(--color-text-secondary); font-size: .95rem; line-height: 1.5; }
.profile-trigger { overflow: hidden; height: var(--control-height); }
.profile-trigger, .profile-option, .profile-menu-logout { transition: transform 150ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; -webkit-tap-highlight-color: transparent; }
.profile-trigger:active { transform: scale(.94); }
.profile-option:active, .profile-menu-logout:active { transform: scale(.98); }
.profile-trigger[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--ui-soft); border-color: var(--ui-accent); }
.profile-menu-logout:hover { background: var(--color-surface-nested); }
.profile-switch-cover { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: color-mix(in srgb, var(--color-bg) 94%, transparent); color: var(--color-text-muted); cursor: progress; }
.profile-switch-cover span { padding: 16px 22px; border-radius: 12px; background: var(--color-surface); }
@media (prefers-reduced-motion: reduce) {
  .profile-trigger, .profile-option, .profile-menu-logout { transition: none; }
  .profile-trigger:active, .profile-option:active, .profile-menu-logout:active { transform: none; }
}
.profile-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border-radius: 50%; background: var(--ui-surface-soft); color: var(--ui-link); font-size: .9rem; font-weight: 600; }
.profile-trigger .profile-avatar { width: 100%; height: 100%; }
.profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-popover { position: fixed; inset: 0; z-index: 45; }
.profile-popover__backdrop { position: absolute; inset: 0; background: transparent; }
.profile-popover__panel { position: absolute; top: calc(var(--topbar-height, 64px) + 8px); right: 16px; width: min(340px, calc(100% - 32px)); max-height: calc(100dvh - 100px); overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 12px; box-shadow: var(--ui-shadow-overlay); }
.profile-popover__panel h2 { font-size: 1rem; margin: 4px 10px 12px; }
.profile-option { display: flex; align-items: center; width: 100%; gap: 12px; padding: 12px; color: var(--color-text); background: transparent; border: 1px solid transparent; border-radius: 10px; text-align: left; cursor: pointer; }
.profile-option:hover { background: var(--color-surface-nested); }
.profile-option.is-current { background: var(--ui-soft); border-color: var(--ui-accent); }
.profile-option__copy { display: grid; gap: 3px; min-width: 0; }
.profile-option__copy strong { font-weight: 550; overflow-wrap: anywhere; }
.profile-option__copy > span { font-size: .85rem; color: var(--color-text-muted); }
.profile-menu-logout { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px; margin-top: 8px; border: 0; border-top: 1px solid var(--color-border); background: transparent; color: var(--color-text); cursor: pointer; }
.profile-menu-status { padding: 8px; color: var(--color-text-muted); }
.profile-photo-card { display: grid; gap: 18px; padding: 22px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); margin-bottom: 18px; }
.profile-photo-summary { display: flex; align-items: center; gap: 16px; }
.profile-photo-summary .profile-avatar { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.4rem; }
.profile-photo-summary h2 { font-size: 1.1rem; margin: 0 0 6px; }
.profile-photo-summary p { margin: 0; color: var(--color-text-muted); }
.profile-photo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.avatar-editor { display: grid; gap: 16px; }
.avatar-editor canvas { display: block; width: min(256px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: var(--color-surface-nested); outline: 2px solid var(--ui-accent); touch-action: none; cursor: grab; }
.avatar-editor label { display: grid; gap: 6px; }
.avatar-editor input[type="range"] { width: 100%; accent-color: var(--ui-link); }
.avatar-error { color: var(--color-danger); margin: 0; }
.logout-forget { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.logout-forget input { width: 20px; height: 20px; accent-color: var(--ui-link); }
.saved-profiles-login { margin-top: 20px; border-top: 1px solid var(--color-border); padding-top: 12px; }
.saved-profiles-login h2 { font-size: 1rem; }
@media (max-width: 760px) {
  .profile-popover__backdrop { background: #0005; }
  .profile-popover__panel { top: auto; bottom: 0; right: 0; width: 100%; max-height: 80dvh; border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .profile-option { min-height: 68px; }
  .profile-photo-actions > .btn { flex: 1 1 180px; }
}
@media (max-width: 760px) {
  :root { --control-height: 48px; }
  .card { padding: 18px 16px; }
  .order-line { font-size: 1rem; padding-block: 12px; }
  .card__time, .card__date { font-size: 1.12rem; font-weight: 550; }
  .card__addr { font-size: 1.2rem; line-height: 1.4; }
  .card__order-id, .card__courier, .status { font-size: .875rem; }
  .card__total { font-size: 1.25rem; font-weight: 550; }
  .btn, .control, .seg { font-size: 1rem; font-weight: 500; }
  .actions .btn { padding: 10px 8px; gap: 6px; font-size: .95rem; }
  .actions.actions--manager_delivery, .actions.actions--manager_pickup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions > .action--mobile-full-row { grid-column: 1 / -1; width: 100%; }
  .bottom-nav__item { font-size: .8rem; font-weight: 500; }
  .field label, .urow__label { font-size: .9rem; }
  .more-item { min-height: 72px; }
  .more-item__title { font-size: 1.05rem; font-weight: 500; }
  .more-item__subtitle { font-size: .875rem; }
  input, textarea, select { font-size: 1rem; }
}
