:root {
  --bg-deep: #06172d;
  --bg-navy: #092445;
  --bg-card: rgba(255, 255, 255, 0.96);
  --text-main: #0b1733;
  --text-muted: #66728a;
  --text-white: #ffffff;
  --primary: #06285a;
  --primary-2: #031d43;
  --primary-hover: #0a3470;
  --accent: #21c7b8;
  --accent-2: #0ea89c;
  --border: #d8deea;
  --danger: #e04f5f;
  --warning: #f3a83b;
  --success: #13b59f;
  --shadow-card: 0 18px 45px rgba(2, 16, 43, 0.32);
  --shadow-soft: 0 8px 24px rgba(11, 23, 51, 0.12);
  --shadow-button: 0 12px 26px rgba(3, 29, 67, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(33, 199, 184, 0.13), transparent 28%),
    radial-gradient(circle at 90% 24%, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #061b36 0%, #082446 42%, #05162d 100%);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 20, 45, 0.52), rgba(5, 20, 45, 0.88)),
    url("/static/images/bg-villa.svg"),
    url("/static/images/bg-office-towers.svg"),
    url("/static/images/bg-warehouse-shelves.svg");
  background-repeat: no-repeat;
  background-position:
    center,
    left 88px,
    right 70px,
    right bottom;
  background-size:
    cover,
    230px auto,
    250px auto,
    300px auto;
  opacity: .82;
  pointer-events: none;
}

.app-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1.6px);
  background-size: 18px 18px;
  opacity: 0.08;
  mask-image: linear-gradient(180deg, transparent 0%, black 26%, transparent 92%);
  pointer-events: none;
}

.screen-content {
  position: relative;
  z-index: 1;
  color: var(--text-main);
}

.screen-enter {
  animation: screenFadeUp 420ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes screenFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.tap {
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.tap:active {
  transform: scale(0.975);
}

.status-bar {
  height: 44px;
  padding: 12px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-bars {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
}

.signal-bars i {
  width: 2px;
  display: block;
  background: #fff;
  border-radius: 2px;
}

.signal-bars i:nth-child(1) { height: 5px; opacity: .72; }
.signal-bars i:nth-child(2) { height: 7px; opacity: .82; }
.signal-bars i:nth-child(3) { height: 10px; opacity: .9; }
.signal-bars i:nth-child(4) { height: 12px; }

.wifi-icon {
  width: 14px;
  height: 10px;
  border: 2px solid #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom: 0;
  opacity: .95;
}

.battery-icon {
  width: 24px;
  height: 11px;
  border: 1.5px solid #fff;
  border-radius: 3px;
  padding: 1px;
  position: relative;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: #fff;
  border-radius: 1px;
}

.battery-icon span {
  display: block;
  height: 100%;
  width: 72%;
  background: #fff;
  border-radius: 2px;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
}

.login-hero {
  text-align: center;
  padding: 44px 24px 16px;
}

.app-logo-large {
  width: 86px;
  height: 86px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(6, 40, 90, 0.98), rgba(3, 23, 54, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo-large img,
.app-logo-small img {
  width: 70%;
  height: 70%;
}

.login-title {
  margin: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 800;
}

.login-subtitle {
  margin-top: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 17px;
}

.login-card {
  margin: 8px 24px 0;
  padding: 24px 20px 22px;
  border-radius: 28px;
}

.login-card-title {
  text-align: center;
  margin: 0;
  font-size: 30px;
  font-weight: 800;
}

.login-card-subtitle {
  text-align: center;
  margin: 7px 0 18px;
  color: var(--text-muted);
}

.language-segment {
  width: 100%;
  max-width: 272px;
  height: 52px;
  margin: 0 auto 20px;
  padding: 5px;
  border-radius: 999px;
  background: #eef1f6;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.lang-chip {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #25314b;
  font-size: 15px;
  font-weight: 700;
}

.lang-chip.active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 34, 64, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.form-label {
  display: block;
  margin: 14px 0 7px;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 700;
}

.input-wrap {
  height: 54px;
  border: 1.2px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
}

.input-wrap:focus-within {
  border-color: rgba(33, 199, 184, 0.75);
  box-shadow: 0 0 0 4px rgba(33, 199, 184, .13);
  background: #fff;
}

.input-wrap input,
.input-wrap select {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.input-wrap input::placeholder {
  color: #9aa4b7;
}

.input-icon {
  color: #748096;
}

.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  color: #38445c;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.remember-checkbox {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.remember-row .checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.2px solid #cfd8e6;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.remember-checkbox:checked + .checkbox {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 5px 12px rgba(33, 199, 184, .28);
}

.remember-checkbox:not(:checked) + .checkbox {
  color: transparent;
}

.primary-button {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-button);
}

.primary-button:hover {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
}

.primary-button:disabled {
  opacity: .55;
  box-shadow: none;
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 17px;
  border: 0;
  background: none;
  width: 100%;
  cursor: pointer;
  color: #07316b;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.secure-pill {
  margin: 18px auto 0;
  width: fit-content;
  min-width: 190px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(4, 27, 60, .48);
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.help-row {
  margin: 24px 24px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.help-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.help-title {
  font-size: 16px;
  font-weight: 800;
}

.help-link {
  font-size: 15px;
  color: var(--accent);
  font-weight: 700;
}

.help-chevron {
  margin-left: auto;
  font-size: 22px;
}

.version-footer {
  margin: 18px 0 18px;
  text-align: center;
  color: rgba(255, 255, 255, .48);
  font-size: 15px;
  font-weight: 600;
}

.dashboard-header {
  padding: 30px 24px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo-small {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(6, 40, 90, 0.98), rgba(3, 23, 54, 0.98));
  box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-title {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.dashboard-subtitle {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.avatar-button {
  border: 0;
  background: transparent;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d7dce5;
  border: 2px solid rgba(255, 255, 255, .65);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .24);
}

.avatar-menu {
  position: absolute;
  top: 52px;
  right: 0;
  min-width: 164px;
  border-radius: 12px;
  padding: 6px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #d8deea;
  box-shadow: 0 16px 30px rgba(3, 29, 67, .24);
  z-index: 30;
}

.avatar-menu-item {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1d2a44;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 0 10px;
}

.avatar-menu-item:active,
.avatar-menu-item:hover {
  background: #f2f6fb;
}

.avatar-menu-item.danger {
  color: #b73747;
}

.settings-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dashboard-card {
  border-radius: 20px;
  padding: 16px;
  margin: 12px 8px;
}

.search-card {
  position: relative;
  z-index: 40;
  overflow: visible;
}

.main-actions-card {
  position: relative;
  z-index: 1;
}

.search-dropdown-anchor {
  position: relative;
}

.search-dropdown-anchor .instance-search-results {
  position: absolute;
  left: -4px;
  right: -4px;
  top: calc(100% + 4px);
  margin-top: 0;
  z-index: 5000;
  box-shadow: 0 16px 40px rgba(8, 22, 48, 0.22);
  width: auto;
}

.instance-search-results.autocomplete-popup {
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.instance-search-row {
  width: 100%;
  min-height: 0;
  border: none;
  background: #fff;
  border-radius: 11px;
  border: 1px solid #e8edf4;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  padding: 7px 9px;
  box-sizing: border-box;
}

.instance-search-row:active,
.instance-search-row:hover {
  background: rgba(33, 199, 184, 0.07);
  border-color: rgba(33, 199, 184, 0.35);
}

.instance-search-thumb {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  background: #edf1f6;
  margin-top: 1px;
}

.instance-search-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.instance-search-dot {
  opacity: 0.55;
}

.location-body {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 56px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.location-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f2f7f8;
  border: 1px solid #dcebed;
  color: #087a78;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-path {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 750;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-path .highlight {
  color: #064caa;
}

.location-prefix {
  margin-top: 5px;
  color: #4f5b71;
  font-size: 13px;
  font-weight: 700;
}

.chevron {
  color: #0b1733;
  font-size: 20px;
}

.location-choose-link {
  text-decoration: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f4f8fc;
  border: 1px solid #dbe4ef;
}

.active-task-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 17px;
  background: linear-gradient(180deg, #f2fbfa, #eef8f7);
  border: 1px solid #cfe9e7;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
}

.task-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #cfe9e7;
  display: flex;
  justify-content: center;
  align-items: center;
}

.task-title {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.28;
}

.task-meta {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.task-meta-row {
  color: #4f5b71;
  font-size: 13px;
  font-weight: 600;
}

.status-pill-active {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.task-buttons {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.task-primary,
.task-secondary,
.find-button {
  height: 46px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
}

.task-secondary,
.find-button {
  background: #fff;
  color: #334059;
  border: 1px solid #cfd6e3;
}

.task-link-list {
  margin-top: 12px;
  border: 1px solid #dde4ef;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.task-link-row {
  min-height: 58px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 40px 1fr 18px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1f7;
  color: var(--text-main);
  text-decoration: none;
}

.task-link-row:last-child {
  border-bottom: none;
}

.completed-capitalizations-card .dashboard-section-hint {
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted, #5c6b82);
}

.last-month-cap-details {
  margin: 0;
}

.last-month-cap-details > summary {
  list-style: none;
  cursor: pointer;
}

.last-month-cap-details > summary::-webkit-details-marker {
  display: none;
}

.last-month-cap-summary {
  min-height: 52px;
  padding: 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.last-month-cap-summary-text {
  flex: 1;
  min-width: 0;
}

.last-month-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  font-size: 22px;
  color: #8a97ad;
}

.last-month-cap-details[open] .last-month-chevron {
  transform: rotate(90deg);
}

.last-month-cap-body {
  margin-top: 4px;
}

.last-month-all-locations {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f7fc;
  border: 1px solid #e2e8f2;
  cursor: pointer;
  user-select: none;
}

.last-month-all-locations-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.last-month-check-ui {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #b8c4d6;
  background: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.last-month-check-ui::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -3px;
  transition: transform 0.12s ease;
}

.last-month-all-locations-input:checked + .last-month-check-ui {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 10px rgba(30, 58, 95, 0.22);
}

.last-month-all-locations-input:checked + .last-month-check-ui::after {
  transform: rotate(45deg) scale(1);
}

.last-month-all-locations-input:focus-visible + .last-month-check-ui {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.last-month-all-locations-label {
  font-size: 15px;
  font-weight: 600;
  color: #334059;
  line-height: 1.3;
}

.last-month-cap-details:not(.show-all-locations) .last-month-row-other {
  display: none !important;
}

.completed-cap-text {
  min-width: 0;
  overflow: hidden;
}

.task-link-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-link-meta {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted, #5c6b82);
}

.task-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #f1f7f8;
  color: #087a78;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.inventory-search-input {
  height: 48px;
  border-radius: 12px;
  border: 1.2px solid #cfd8e6;
  background: #fff;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-search-input input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 16px;
  background: transparent;
}

.instance-search-scope {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cfd6e3;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #4f5b71;
  cursor: pointer;
}

.scope-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scope-chip:has(input:checked) {
  border-color: rgba(33, 199, 184, 0.75);
  background: #eefaf8;
  color: #0b5f57;
}

.instance-search-results {
  margin-top: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.instance-search-title {
  display: block;
  font-weight: 800;
  color: var(--text-main);
}

.instance-search-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #5c6880;
  font-weight: 600;
}

.instance-search-results mark,
.autocomplete-popup mark {
  background: rgba(33, 199, 184, 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* iOS Safari: inputs below 16px zoom the page on focus */
.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.app-shell textarea,
.app-shell select {
  font-size: 16px;
}

.scan-button {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 10px 22px rgba(3, 29, 67, .25);
}

.find-button {
  margin-top: 10px;
  width: 100%;
}

.search-helper {
  margin-top: 12px;
  color: #4f5b71;
  font-size: 13px;
  font-weight: 600;
}

.actions-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.action-tile {
  min-height: 82px;
  border-radius: 14px;
  border: 1px solid #d9e1ec;
  background: #fff;
  padding: 10px 8px;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.action-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #087a78, #075b62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info-card {
  border-radius: 16px;
  padding: 14px 17px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 14px;
  align-items: center;
}

.info-divider {
  width: 1px;
  height: 42px;
  background: #d9e0ec;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-label {
  color: #657086;
  font-size: 12px;
  font-weight: 700;
}

.info-value {
  margin-top: 2px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 850;
}

.protected-session {
  margin-top: 18px;
}

.logout-form {
  margin: 12px 24px 24px;
}

.settings-content {
  padding: 30px 0 104px;
}

.settings-lang {
  margin-left: 0;
}

.location-select {
  width: 100%;
  margin: 10px 0;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 10px;
}

.settings-back {
  margin-top: 10px;
}

.location-tree-list,
.location-tree-root,
.location-tree-children {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.location-tree-row-wrap {
  margin: 0;
}

.location-tree-row {
  width: 100%;
  border: 1px solid #d9e1ec;
  background: #fff;
  min-height: 44px;
  border-radius: 10px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  text-align: left;
}

.location-tree-row.active {
  border-color: #0ea89c;
  box-shadow: 0 0 0 3px rgba(33, 199, 184, .12);
}

.tree-indent {
  display: inline-block;
  width: calc(var(--depth) * 16px);
  min-width: calc(var(--depth) * 16px);
}

.tree-node-name {
  font-weight: 700;
  color: #1d2a44;
}

.tree-node-meta {
  color: #647089;
  font-size: 12px;
  font-weight: 700;
}

.scanner-modal[hidden] {
  display: none;
}

.scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.scanner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 32, 0.7);
}

.scanner-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 20px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.scanner-title {
  font-weight: 800;
  color: #122240;
  margin-bottom: 8px;
}

#scanner-video {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  object-fit: cover;
  background: #0b1733;
}

.scanner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.scanner-file-btn {
  position: relative;
  overflow: hidden;
}

.receiving-screen {
  padding-bottom: 24px;
}

.receiving-header {
  padding: 22px 18px 14px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
}

.receiving-main-card {
  margin: 10px 0 0;
  padding: 18px 14px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .94));
  box-shadow: 0 24px 60px rgba(0, 10, 32, .38), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.receiving-title {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  line-height: 1.16;
  font-weight: 850;
}

.receiving-subtitle {
  margin: 8px 0 18px;
  color: #59667e;
  font-size: 15px;
  line-height: 1.45;
}

.prefix-strip {
  height: 38px;
  border-radius: 10px;
  border: 1px solid #d8deea;
  background: rgba(255, 255, 255, .7);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  margin-bottom: 18px;
  color: #59667e;
  font-size: 13px;
  font-weight: 650;
}

.prefix-strip b {
  color: var(--accent-2);
}

.prefix-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.7px solid var(--accent-2);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
}

.compact-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.compact-search-row {
  display: grid;
  grid-template-columns: 42px 42px 1fr;
  gap: 8px;
  align-items: center;
}

.compact-search-input {
  height: 48px;
  border: 1.2px solid #cfd8e6;
  border-radius: 13px;
  background: rgba(255, 255, 255, .86);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.compact-search-input.active,
.compact-search-input:focus-within {
  border-color: rgba(6, 40, 90, .95);
  box-shadow: 0 0 0 3px rgba(6, 40, 90, .10), 0 10px 24px rgba(11, 23, 51, .10);
  background: #fff;
}

.compact-search-input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 650;
}

.compact-search-input input::placeholder {
  color: #9aa4b7;
}

.clear-search {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #536077;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-square-button {
  width: 42px;
  height: 48px;
  border-radius: 12px;
  border: 1.2px solid #cfd8e6;
  background: rgba(255, 255, 255, .92);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-square-button .svg-icon {
  width: 18px;
  height: 18px;
}

.icon-square-button:active {
  transform: scale(0.94);
  background: #f3f8fb;
  border-color: rgba(33, 199, 184, .55);
  box-shadow: 0 8px 18px rgba(11, 23, 51, .10);
}

.autocomplete-popup {
  position: absolute;
  top: 54px;
  left: 100px;
  width: calc(100% - 100px);
  z-index: 20;
  padding: 8px 0;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(216, 222, 234, .95);
  border-top: none;
  box-shadow: 0 18px 36px rgba(11, 23, 51, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.autocomplete-row {
  width: 100%;
  min-height: 42px;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}

.autocomplete-row:active,
.autocomplete-row:hover {
  background: rgba(33, 199, 184, .08);
}

.autocomplete-row mark {
  background: transparent;
  color: var(--accent-dark);
  font-weight: 900;
}

.picker-modal[hidden] {
  display: none;
}

.picker-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 32, .72);
}

.picker-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  max-height: 72vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 12px;
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.picker-tree-group {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f7fc;
  font-size: 12px;
  color: #51607a;
  font-weight: 700;
}

.nom-group-row,
.nom-item-row {
  width: 100%;
  border: 1px solid #dce3ee;
  background: #fff;
  border-radius: 10px;
  padding: 9px 10px;
  margin-top: 6px;
  text-align: left;
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #162642;
  font-weight: 700;
}

.nom-group-row {
  padding-left: calc(10px + (var(--level, 0) * 12px));
}

.nom-item-row {
  grid-template-columns: 40px 1fr auto;
  padding-left: calc(12px + (var(--level, 1) * 12px));
}

.nom-tree-children {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height .2s ease, opacity .2s ease;
}

.nom-tree-children.collapsed {
  max-height: 0;
  opacity: .1;
  pointer-events: none;
}

.nom-item-row.pending {
  border-color: rgba(6, 40, 90, .38);
  box-shadow: 0 6px 14px rgba(11, 23, 51, .08);
}

.virtual-add-row {
  background: #f6fbff;
  border-style: dashed;
}

.add-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.nom-item-thumb {
  width: 40px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  background: #ecf1f7;
}

.nom-item-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nom-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nom-item-price {
  color: #58647b;
  font-size: 11px;
  font-weight: 650;
}

.nom-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-select-button,
.mini-edit-button {
  height: 24px;
  min-width: 56px;
  border-radius: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.mini-select-button {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.mini-edit-button {
  background: linear-gradient(180deg, #d14f5d, #bb3040);
}

.mini-select-button[hidden],
.mini-edit-button[hidden] {
  display: none !important;
}

.group-add-button {
  height: 24px;
  min-width: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nomenclature-modal-screen {
  padding-bottom: 22px;
}

.nomenclature-modal {
  margin: 8px 18px 28px;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(255,255,255,0.95));
  box-shadow: 0 24px 60px rgba(0,10,32,0.42), inset 0 1px 0 rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.72);
  animation: modalPop 340ms cubic-bezier(.2,.8,.2,1);
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-title {
  margin: 0;
  color: var(--text-main);
  font-size: 27px;
  line-height: 1.05;
  font-weight: 900;
}

.modal-subtitle {
  margin: 8px 0 0;
  color: #5c6880;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 550;
}

.modal-close {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  border: 1.3px solid #ccd5e5;
  background: rgba(255,255,255,0.82);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nomenclature-photo-wrap {
  width: 100%;
  height: 250px;
  border-radius: 18px;
  overflow: hidden;
  background: #edf1f6;
  box-shadow: 0 12px 26px rgba(11,23,51,0.12), inset 0 1px 0 rgba(255,255,255,0.7);
  margin-bottom: 18px;
}

.nomenclature-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nomenclature-name-row {
  display: grid;
  grid-template-columns: 1fr 78px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.nomenclature-name {
  margin: 0;
  color: var(--text-main);
  font-size: 27px;
  line-height: 1.12;
  font-weight: 900;
}

.alt-names {
  margin-top: 8px;
  color: #52617b;
  font-size: 13.8px;
  line-height: 1.35;
  font-weight: 550;
}

.language-toggle {
  height: 44px;
  border-radius: 13px;
  border: 1.2px solid #cfd8e6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--primary);
  box-shadow: 0 5px 14px rgba(11,23,51,0.06);
}

.language-toggle .flag {
  font-size: 21px;
}

.ean-section {
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(246,252,252,0.98), rgba(250,253,255,0.96));
  border: 1px solid #dbe5ef;
  box-shadow: 0 6px 16px rgba(11,23,51,0.055);
  margin-bottom: 16px;
}

.ean-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 13px;
}

.ean-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ean-title {
  color: var(--text-main);
  font-size: 15.5px;
  font-weight: 900;
}

.ean-count {
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 850;
}

.ean-helper {
  margin-top: 7px;
  color: #5d6a82;
  font-size: 13.5px;
  font-weight: 600;
}

.ean-icon-actions { display: flex; gap: 9px; }

.ean-icon-button {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  border: 1.2px solid rgba(33,199,184,0.42);
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ean-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ean-chip {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.2px solid rgba(33,199,184,0.55);
  background: #fff;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 750;
}

.add-ean-chip {
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1.2px dashed rgba(33,199,184,0.62);
  background: rgba(255,255,255,0.86);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}

.category-strip {
  min-height: 54px;
  border-radius: 15px 15px 0 0;
  border: 1px solid #dbe5ef;
  border-bottom: none;
  background: rgba(247,250,253,0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
}

.category-left {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 750;
}

.category-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.readonly-badge {
  height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  background: #edf5ff;
  color: #0754bb;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 850;
}

.characteristics-card {
  border: 1px solid #dbe5ef;
  border-top: none;
  border-radius: 0 0 15px 15px;
  background: rgba(255,255,255,0.92);
  padding: 10px 14px 14px;
}

.characteristic-row {
  display: grid;
  grid-template-columns: 38% 62%;
  gap: 12px;
  min-height: 40px;
  align-items: center;
  border-bottom: 1px solid #e5ebf3;
}

.characteristic-row:last-child { border-bottom: none; }

.char-name {
  color: #65728c;
  font-size: 14px;
  font-weight: 650;
}

.char-value {
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 800;
}

.picker-item {
  width: 100%;
  border: 1px solid #dce3ee;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
  text-align: left;
  font-size: 14px;
  color: #162642;
  font-weight: 700;
}

.section-title {
  margin: 2px 0 8px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 850;
}

.receiving-list {
  display: grid;
  gap: 8px;
}

.receiving-item {
  min-height: 76px;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 126px;
  gap: 10px;
  align-items: center;
  padding: 6px 7px;
  box-shadow: 0 5px 14px rgba(11, 23, 51, .055);
}

.receiving-item.created {
  animation: createdPulse 420ms ease;
}

.receiving-item.pending-edit {
  border-color: rgba(168, 128, 54, .72);
  background: linear-gradient(180deg, rgba(255, 250, 238, .98), rgba(255, 254, 246, .96));
  box-shadow:
    0 0 0 3px rgba(194, 157, 84, .26),
    0 12px 24px rgba(138, 103, 38, .18);
}

@keyframes createdPulse {
  0% { box-shadow: 0 0 0 0 rgba(33, 199, 184, 0); }
  45% { box-shadow: 0 0 0 5px rgba(33, 199, 184, .14); }
  100% { box-shadow: 0 5px 14px rgba(11, 23, 51, .055); }
}

.receiving-item.error {
  border-color: rgba(224, 79, 95, .45);
  background: rgba(255, 245, 246, .92);
}

.item-thumb {
  width: 64px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  background: #edf1f6;
}

.item-title {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 850;
  white-space: normal;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-category {
  margin-top: 4px;
  color: #4f5b71;
  font-size: 11px;
  font-weight: 650;
  white-space: normal;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-note {
  margin-top: 3px;
  color: #69758d;
  font-size: 10px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.15;
}

.item-note span {
  color: #064caa;
  font-weight: 800;
}

.item-action {
  height: 36px;
  border-radius: 10px;
  border: none;
  font-size: 11px;
  font-weight: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
  padding: 0 7px;
}

.item-action.add {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(3, 29, 67, .22);
  width: 100%;
}

.item-action.print {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(33, 199, 184, .28);
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 16px;
  margin-left: 6px;
}

.item-action.edit {
  background: linear-gradient(180deg, #c79b42, #9f6f20);
  color: #fffdf8;
  box-shadow: 0 8px 18px rgba(126, 87, 24, .28);
  min-width: 74px;
  margin-right: 6px;
}

.item-action.edit[hidden] {
  display: inline-flex !important;
  visibility: hidden;
  pointer-events: none;
}

.item-action.print .svg-icon {
  width: 18px;
  height: 18px;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 126px;
  min-width: 126px;
  gap: 10px;
}

.receiving-info {
  margin-top: 16px;
  padding: 14px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(236, 252, 250, .98), rgba(243, 255, 254, .96));
  border: 1px solid rgba(33, 199, 184, .25);
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.receiving-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 850;
}

.receiving-info-title {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 850;
}

.receiving-info-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: #58647b;
  font-weight: 600;
}

.receiving-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1.42fr;
  gap: 12px;
}

.empty-receiving-list {
  min-height: 160px;
  border: 1.5px dashed #cfd8e6;
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  color: #66728a;
  padding: 16px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

@media (max-width: 390px) {
  .receiving-item {
    grid-template-columns: 62px minmax(0, 1fr) 122px;
    gap: 8px;
  }
  .item-thumb {
    width: 62px;
    height: 48px;
  }
  .item-action {
    min-width: 78px;
    font-size: 11px;
  }
  .item-actions {
    width: 122px;
    min-width: 122px;
    gap: 8px;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.location-screen {
  padding-bottom: 22px;
}

.location-header {
  padding: 22px 18px 14px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
}

.back-button {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
}

.location-main-card {
  margin: 10px 8px 0;
  padding: 24px 20px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .94));
  box-shadow: 0 24px 60px rgba(0, 10, 32, .38), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.location-title {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  line-height: 1.16;
  font-weight: 850;
}

.location-subtitle {
  margin: 8px 0 18px;
  color: #59667e;
  font-size: 15px;
  line-height: 1.35;
}

.selected-path {
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid #d8deea;
  background: rgba(255, 255, 255, .78);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 14px;
}

.selected-path-icon {
  width: 28px;
  height: 28px;
  color: #087a78;
  display: flex;
  align-items: center;
  justify-content: center;
}

.path-text {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 750;
}

.path-muted {
  color: var(--text-muted, #5c6b82);
  font-weight: 600;
}

.path-separator {
  color: #7e8aa3;
  font-weight: 800;
}

.path-current {
  color: var(--accent-2);
}

.location-search {
  height: 52px;
  border: 1.2px solid #cfd8e6;
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 20px;
}

.location-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.location-tree {
  position: relative;
}

.location-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height .2s ease, opacity .2s ease;
}

.location-tree-children.collapsed {
  max-height: 0;
  opacity: .1;
  pointer-events: none;
}

.location-node-wrap {
  list-style: none;
  margin: 0;
  padding: 0;
}

.location-tree-branch {
  position: relative;
}

.location-tree-branch::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 52px;
  bottom: 10px;
  border-left: 1px dashed #cbd4e3;
  opacity: .85;
}

.location-row-shell {
  position: relative;
  width: calc(100% - (var(--level, 0) * 12px));
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid #dce3ee;
  background: rgba(255, 255, 255, .92);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 8px;
  margin-left: calc(var(--level, 0) * 12px);
  box-shadow: 0 4px 12px rgba(11, 23, 51, .04);
}

.location-row-main {
  display: grid;
  grid-template-columns: 16px 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  min-width: 0;
  transform: none;
  color: inherit;
  font: inherit;
}

.location-row,
.location-row-shell.selected,
.location-row-shell.pending {
  /* legacy aliases */
}

.location-row-shell.selected {
  min-height: 58px;
  background: linear-gradient(180deg, rgba(236, 252, 250, .98), rgba(243, 255, 254, .96));
  border-color: rgba(33, 199, 184, .38);
  box-shadow: 0 8px 22px rgba(33, 199, 184, .13), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.location-row-shell.pending {
  border-color: rgba(33, 199, 184, .45);
  background: linear-gradient(180deg, rgba(236, 252, 250, .98), rgba(243, 255, 254, .96));
  box-shadow: 0 8px 20px rgba(33, 199, 184, .16);
}

.location-row.level-1::before,
.location-row.level-2::before {
  content: "";
  position: absolute;
  left: calc(8px + ((var(--level, 1) - 1) * 12px));
  top: 50%;
  width: 12px;
  border-top: 1px dashed #cbd4e3;
}

.expand-icon {
  width: 14px;
  height: 14px;
  color: #7b889f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.location-type-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f1f7f8;
  color: #087a78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svg-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.location-name {
  font-size: 14px;
  font-weight: 850;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-row-shell.level-0 .location-name,
.location-row.level-0 .location-name {
  font-size: 15px;
  font-weight: 850;
}

.location-row-shell.level-1 .location-name,
.location-row.level-1 .location-name {
  font-size: 14px;
  font-weight: 650;
}

.location-row-shell.level-2 .location-name,
.location-row-shell.level-3 .location-name,
.location-row-shell.level-4 .location-name,
.location-row.level-2 .location-name,
.location-row.level-3 .location-name,
.location-row.level-4 .location-name {
  font-size: 13px;
  font-weight: 600;
}

.location-row-shell.selected {
  animation: selectedPulse 280ms ease;
}

.receiving-location-body {
  margin-bottom: 14px;
}

.receiving-location-body {
  margin-bottom: 14px;
}

@keyframes selectedPulse {
  0% { box-shadow: 0 0 0 0 rgba(33, 199, 184, .28); }
  100% { box-shadow: 0 8px 22px rgba(33, 199, 184, .13), inset 0 1px 0 rgba(255, 255, 255, .8); }
}

.selected-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(33, 199, 184, .24);
}

.location-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.location-actions.compact {
  grid-template-columns: 1fr 1fr;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.row-open-button {
  height: 32px;
  min-width: 76px;
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #d4af37 0%, #9a7618 100%);
  color: #fffdf5 !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(120, 86, 10, .28);
  border: 1px solid rgba(154, 118, 24, .55);
  flex-shrink: 0;
}

.row-open-button[hidden] {
  display: none !important;
}

.row-select-button {
  height: 32px;
  min-width: 76px;
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.row-select-button[hidden] {
  display: none !important;
}

.location-card-screen .location-card-hero {
  margin-bottom: 14px;
}

.location-card-title {
  margin: 0;
  font-size: 24px;
  color: #10203f;
}

.location-card-path {
  margin: 8px 0 0;
  color: #5f6f88;
  font-size: 14px;
}

.location-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: #2f4568;
  font-size: 12px;
  font-weight: 700;
}

.location-instances-block {
  margin-bottom: 14px;
}

.location-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  margin-bottom: 12px;
}

.location-section-head h2 {
  margin: 0;
  font-size: 16px;
  color: #14223c;
}

.location-section-sub {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: #6a7b95;
}

.section-count {
  height: 26px;
  min-width: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f2ff;
  color: #1c4f91;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.location-instance-list {
  display: grid;
  gap: 8px;
}

.location-instance-row {
  width: 100%;
  border: 1px solid #dce3ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  padding: 10px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(96px, max-content);
  gap: 10px;
  align-items: center;
  text-align: left;
  box-shadow: 0 4px 12px rgba(11, 23, 51, .04);
  cursor: pointer;
}

.location-instance-row.pending {
  border-color: rgba(6, 40, 90, .35);
  box-shadow: 0 8px 18px rgba(11, 23, 51, .1);
}

.location-instance-thumb {
  width: 52px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #ecf1f7;
}

.location-instance-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.location-instance-name {
  font-size: 14px;
  font-weight: 800;
  color: #14223c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-instance-meta {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: #5f6f88;
}

.location-instance-meta strong {
  color: #1a3158;
}

.location-instance-action {
  height: 32px;
  min-width: 96px;
  max-width: 132px;
  border-radius: 10px;
  padding: 0 10px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  box-shadow: 0 4px 10px rgba(11, 23, 51, .12);
  flex-shrink: 0;
}

.location-instance-action.is-edit {
  background: linear-gradient(180deg, #1f6fd8 0%, #0d4a9f 100%);
}

.location-instance-action.is-open {
  background: linear-gradient(180deg, #d4af37 0%, #9a7618 100%);
  color: #fffdf5;
}

.location-instance-action[hidden] {
  display: none !important;
}

.location-empty-note {
  margin: 0;
  color: #6a7b95;
  font-size: 13px;
}

.secondary-button {
  height: 58px;
  border-radius: 14px;
  border: 1.3px solid #bfc8d8;
  background: rgba(255, 255, 255, .92);
  color: #14223c;
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dashboard-lang-form {
  margin-top: 8px;
}

.language-segment.compact .lang-chip {
  min-width: 52px;
  height: 34px;
  font-size: 12px;
}

.floating-back-main {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(406px, calc(100vw - 24px));
  margin: 0;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(3, 29, 67, .22);
  z-index: 40;
}

.edit-instance-screen {
  padding-bottom: 24px;
}

.edit-instance-card {
  margin: 8px 18px 28px;
  padding: 22px 14px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.985), rgba(255,255,255,0.95));
  box-shadow: 0 24px 60px rgba(0,10,32,0.42), inset 0 1px 0 rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.72);
}

.edit-title-block h1 {
  margin: 0;
  color: var(--text-main);
  font-size: 28px;
  line-height: 1.12;
  font-weight: 900;
}

.edit-title-block p {
  margin: 6px 0 14px;
  color: #5c6880;
  font-size: 14px;
  font-weight: 550;
}

.instance-main-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.photo-panel {
  position: relative;
  min-height: 185px;
  border-radius: 16px;
  overflow: hidden;
  background: #edf1f6;
  box-shadow: 0 10px 24px rgba(11,23,51,0.14), inset 0 1px 0 rgba(255,255,255,0.7);
}

.instance-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-camera-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: none;
  background: rgba(255,255,255,0.94);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.price-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  background: rgba(7, 18, 38, 0.82);
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
}

.key-fields-panel {
  display: grid;
  gap: 8px;
}

.instance-name-block {
  margin-bottom: 4px;
}

.instance-name-block .instance-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.instance-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.instance-toolbar-btn {
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  flex: 0 1 auto;
  max-width: 100%;
}

.instance-toolbar-row .language-toggle.instance-toolbar-btn {
  min-width: 52px;
  padding: 0 12px;
}

.instance-toolbar-btn.warning {
  border-color: #e8c9a8;
  background: #fff9f3;
  color: #8f4f18;
}

.instance-toolbar-btn.is-staged {
  border-color: rgba(33, 199, 184, 0.65);
  background: #eefaf8;
  color: #0b5f57;
}

.instance-meta-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  padding: 2px 0;
}

.instance-meta-item {
  padding: 12px 4px;
  border-bottom: 1px solid #e8edf4;
}

.instance-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.instance-meta-item:first-child {
  padding-top: 4px;
}

.instance-meta-label {
  color: #65728c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.instance-meta-value {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.transfer-main-card .transfer-endpoints {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.transfer-endpoint-label {
  font-size: 12px;
  font-weight: 800;
  color: #5c6880;
  margin-bottom: 6px;
}

.transfer-arrow {
  text-align: center;
  color: #7a879c;
  font-size: 18px;
  font-weight: 900;
}

.transfer-responsible-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.transfer-search-wrap {
  position: relative;
  z-index: 20;
}

.transfer-search-wrap .transfer-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
}

.receiving-footer-actions {
  margin-top: 14px;
}

.key-field {
  min-height: 56px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f9fbfe;
  padding: 7px 9px;
}

.key-label {
  color: #65728c;
  font-size: 11px;
  font-weight: 700;
}

.key-value-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.key-value-row strong,
.key-multiline {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.key-inline-link {
  text-decoration: none;
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 800;
}

.status-readonly {
  margin-top: 4px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #d8deea;
  background: #fff;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #1f3a67;
  font-size: 13px;
  font-weight: 750;
}

.sync-pill {
  margin: 0 0 8px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4f5b71;
  font-size: 12px;
  font-weight: 700;
}

.sync-pill.ok {
  color: var(--success);
}

.sync-pill.syncing,
.sync-pill.error {
  color: var(--danger);
}

.sync-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  font-size: 11px;
}

.sync-indicator.spin {
  animation: spin 900ms linear infinite;
}

.input-wrap.compact {
  height: 42px;
  border-radius: 11px;
  padding: 0 10px;
}

.input-wrap.readonly {
  background: #f5f7fb;
}

.native-select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 650;
}

.textarea-wrap {
  border: 1.2px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  padding: 8px 10px;
}

.textarea-wrap textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  min-height: 54px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-main);
  background: transparent;
}

.textarea-wrap.readonly {
  background: #f5f7fb;
}

.characteristics-block {
  margin-top: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  padding: 10px 12px;
}

.characteristics-block h3 {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 850;
}

.characteristics-grid {
  display: grid;
}

.characteristic-line {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #e5ebf3;
}

.characteristic-line:last-child {
  border-bottom: none;
}

.char-edit {
  width: 100%;
  height: 32px;
  border: 1px solid #d4deea;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text-main);
}

.instance-edit-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

.instance-name-row.compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.instance-name-row.compact .instance-name {
  font-size: 24px;
  line-height: 1.15;
}

.instance-lang-chip {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #cfdaea;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(11, 23, 51, .07);
}

[data-instance-photo-panel],
[data-draft-photo-panel] {
  cursor: pointer;
}

.form-error {
  color: var(--danger);
  margin: 8px 0;
  font-weight: 700;
}

.form-warning {
  color: var(--warning);
  margin: 8px 0;
  font-weight: 700;
}

.form-success {
  color: var(--success);
  margin: 8px 0;
  font-weight: 700;
}

.form-hint {
  color: var(--muted, #6b7c93);
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.4;
}

.remote-clients-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.remote-clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.remote-clients-table th,
.remote-clients-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: top;
}

.remote-clients-table th {
  font-weight: 700;
  color: var(--muted, #6b7c93);
}

.remote-clients-attempt {
  word-break: break-word;
  max-width: 280px;
}

.toast {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(7, 18, 38, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  z-index: 100;
}
