:root,
[data-theme="dark"] {
  --bg: #000000;
  --panel: #121212;
  --panel-2: #1a1410;
  --line: #2c221c;
  --text: #f6efe8;
  --muted: #a89888;
  --accent: #ff6a1a;
  --accent-dim: #c44a0e;
  --accent-soft: rgba(255, 106, 26, 0.16);
  --ok: #3dd68c;
  --warn: #f5c518;
  --bad: #e11d48;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --radius: 10px;
}

[data-theme="light"] {
  --bg: #f7f0e8;
  --panel: #ffffff;
  --panel-2: #fff7f0;
  --line: #e4d4c4;
  --text: #1c140e;
  --muted: #6d5748;
  --accent: #d9480f;
  --accent-dim: #b33a0c;
  --accent-soft: rgba(217, 72, 15, 0.12);
  --ok: #14663c;
  --warn: #9a6b00;
  --bad: #b02525;
  --shadow: 0 8px 24px rgba(28, 20, 14, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
html, body, * {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--panel-2);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--panel-2); border-radius: 8px; }
*::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 8px;
  border: 2px solid var(--panel-2);
}
*::-webkit-scrollbar-thumb:hover { background: var(--accent); }

[hidden] { display: none !important; }

#bootOverlay {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg); color: var(--muted); z-index: 50;
}

.auth-card, .placeholder, .card, .card-form, .modal-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#authScreen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-top-right {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  z-index: 6;
}
.auth-card { width: min(420px, 100%); padding: 28px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand .brand-mark { justify-content: center; margin: 0 auto 12px; }
.auth-fixed-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: fit-content;
  min-width: 0;
  min-height: 0;
  margin: 0 auto 12px;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  overflow: visible;
}
.auth-fixed-mark img,
.auth-fixed-mark img.brand-mark-default,
.auth-fixed-mark #authLogo,
.auth-fixed-mark #authLogo.brand-mark-default {
  display: block;
  height: 36px;
  width: 36px;
  max-width: 36px;
  object-fit: contain;
  border-radius: 0;
}
.auth-fixed-mark .mark-letter {
  width: 36px;
  height: 36px;
  background: transparent;
  font-size: 22px;
  border-radius: 6px;
}
.auth-brand h1 {
  margin: 8px 0 4px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.auth-brand p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-hint {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 650;
}
.auth-card button[type="submit"].auth-submit {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

label { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-size: 13px; color: var(--muted); }
input, select, textarea, button {
  font: inherit; color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
button { cursor: pointer; }
button.primary, .auth-card button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
button.ghost { background: transparent; }
button:hover { filter: brightness(1.08); }
.error { color: var(--bad); }
.muted { color: var(--muted); font-size: 13px; }
.num { text-align: right; }

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  column-gap: 24px;
  padding: 10px 22px 0 16px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
  flex: 0 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 14px 4px 6px;
  border-right: 1px solid var(--line);
}
.brand strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.15;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 360px;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.brand-mark.is-custom {
  padding: 0;
  background: transparent;
  border: 0;
}
.brand-mark img, #authLogo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: cover;
  border-radius: 12px;
}
.brand-mark img.brand-mark-default, #authLogo.brand-mark-default {
  height: 26px;
  width: 26px;
  max-width: 26px;
  object-fit: contain;
  border-radius: 0;
}
.mark-letter {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  border-radius: 8px;
  line-height: 1;
}
.tabs, .subtabs, .toolbar, .row, .top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tabs {
  flex: 0 0 auto;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.tabs button, .subtabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  position: relative;
  font-family: "Quicksand", "Nunito", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  padding: 8px 12px;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tabs button.active,
.subtabs button.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-bottom-color: var(--accent);
  box-shadow: none;
}
/* Ayarlar ana sekmeleri (Firmalar, Ürünler…): turuncu ile sarı arası amber */
#settingsTabs.subtabs button.active {
  color: #eb9218;
  background: color-mix(in srgb, #eb9218 14%, transparent);
  border-bottom-color: #d98412;
}
/* Firma formu içi (personel/adres) + firma/ürün/kullanıcı sol alt sekmeler: açık sarı */
.company-subtabs.subtabs button.active,
.company-main-tabs.subtabs button.active,
.defs-main-tabs.subtabs button.active {
  color: #c9a82e;
  background: color-mix(in srgb, #e6d06a 22%, transparent);
  border-bottom-color: #d4b83a;
}
.company-main-tabs.subtabs button.active,
.defs-main-tabs.subtabs button.active {
  border-left-color: #d4b83a;
  border-bottom-color: transparent;
}
.tabs button.active::after,
.subtabs button.active::after {
  content: none;
  display: none;
}
.top-actions { margin-left: 0; justify-content: flex-end; flex-wrap: nowrap; }
#userChip,
.user-chip {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
}
.user-chip:hover { filter: brightness(1.08); color: var(--accent); }
.user-avatar,
.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.user-avatar {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.user-avatar.lg,
.user-avatar-img.lg {
  width: 52px;
  height: 52px;
  font-size: 20px;
}
#userChipName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
}
.account-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}
.account-avatar-actions .file-btn,
.account-avatar-actions #accAvatarClear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.2;
}
.user-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-name-cell .user-avatar,
.user-name-cell .user-avatar-img {
  width: 28px;
  height: 28px;
}
.pass-field {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.pass-field input {
  flex: 1;
  min-width: 0;
  width: auto;
}
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
.pass-toggle {
  flex: 0 0 38px;
  width: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.pass-toggle:hover { border-color: var(--accent); color: var(--accent); }
.pass-toggle svg { width: 16px; height: 16px; display: block; pointer-events: none; }
.pass-toggle .icon-eye { display: none; }
.pass-toggle .icon-eye-off { display: block; }
.pass-toggle.is-on .icon-eye { display: block; }
.pass-toggle.is-on .icon-eye-off { display: none; }
.status-card.live {
  min-width: 92px;
  height: 34px;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 14px 4px 10px;
  background: transparent;
  border: 0;
  border-radius: 14px;
  white-space: nowrap;
}
.status-card.live img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
  display: block;
  flex: none;
}
.status-card.live .status-stop { display: none; }
.status-card.live.off .status-play { display: none; }
.status-card.live.off .status-stop { display: block; }
.status-card.live.on .status-play { display: block; }
.status-card.live.on .status-stop { display: none; }
.status-card.live .service-state {
  display: inline-block;
  line-height: 22px;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--muted);
}
.status-card.live.on .service-state { color: #2f9e5f; }
.status-card.live.off .service-state { color: #d64545; }
.status-card.live.on { background: rgba(47, 158, 95, .12); }
.status-card.live.off { background: rgba(214, 69, 69, .12); }
#accountDialog { width: min(420px, 94vw); }
#accountStatus.bad { color: var(--bad); }
#accountStatus.ok { color: var(--ok); }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
}
#app > main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 24px 12px;
}
main { width: 100%; max-width: none; }
.tabpanel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#tab-settings {
  overflow: hidden;
  min-height: 0;
}
#tab-settings > #settingsTabs.subtabs { flex: 0 0 auto; }
#tab-settings .settings-panel:not([hidden]) {
  flex: 1;
  min-height: 0;
}
#set-logs {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#set-companies,
#set-products,
#set-users {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}
#set-companies > .company-main-tabs,
#set-products > .defs-main-tabs,
#set-users > .company-main-tabs {
  flex: 0 0 11.5rem;
  width: 11.5rem;
  max-width: 11.5rem;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  align-self: stretch;
  gap: 4px;
  margin: 0;
  padding: 4px 12px 8px 0;
  border-right: 1px solid var(--line);
  overflow-x: visible;
  overflow-y: auto;
}
#set-companies > .company-main-tabs.subtabs button,
#set-products > .defs-main-tabs.subtabs button,
#set-users > .company-main-tabs.subtabs button {
  width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.25;
  border-bottom: 0;
  border-left: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
}
#set-companies > .company-page,
#set-products > .defs-page,
#set-users > .company-page {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding-left: 14px;
}
#set-users #userPage-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#set-logs .table-wrap,
#set-users #userPage-list .table-wrap {
  flex: 1;
  min-height: 0;
}
#set-users #userPage-form:not([hidden]) {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 4px;
}
#set-users h2 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  flex: 0 0 auto;
}
#set-users .user-form {
  max-width: none;
  width: 100%;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: none;
  overflow: hidden;
}
#set-users .users-toolbar {
  flex: 0 0 auto;
  margin: 2px 0 6px;
}
#set-users .user-form-grid label {
  gap: 2px;
  font-size: 12px;
}
#set-users .user-form-grid input,
#set-users .user-form-grid select {
  padding: 5px 8px;
  font-size: 12.5px;
  min-height: 0;
}
#set-users .uf-actions {
  position: static;
  z-index: 3;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(6px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}
#set-users .uf-actions button {
  padding: 8px 14px;
  font-size: 13px;
}
#set-users .table-wrap th,
#set-users .table-wrap td {
  padding: 10px 12px;
  font-size: 13.5px;
  vertical-align: middle;
}
#set-users .user-name-cell {
  gap: 12px;
}
#set-users .user-name-cell .user-avatar,
#set-users .user-name-cell .user-avatar-img {
  width: 40px;
  height: 40px;
  font-size: 15px;
}
#set-users .row-actions {
  gap: 4px;
}
#set-users .row-actions button {
  padding: 4px 8px;
  font-size: 12px;
}
#set-users #userRows tr.user-row {
  cursor: pointer;
}
.user-form-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.95fr);
  gap: 10px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  width: 100%;
  overflow: hidden;
}
.user-form-left {
  min-width: 0;
  max-width: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.user-form-right.perm-box {
  margin: 0;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: static;
  overflow: hidden;
  max-height: none;
  height: 100%;
}
.user-form-top {
  display: grid;
  grid-template-columns: auto minmax(130px, 0.9fr) minmax(180px, 1.15fr);
  gap: 8px 10px;
  align-items: stretch;
  margin-bottom: 0;
  flex: 0 0 auto;
}
.user-form-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-top: 0;
  min-width: 78px;
  max-width: 88px;
  height: 100%;
}
.user-form-avatar .user-avatar.lg,
.user-form-avatar .user-avatar-img.lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
}
.user-form-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}
.user-form-avatar-actions .file-btn,
.user-form-avatar-actions .ghost {
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: 10.5px;
  padding: 3px 5px;
}
.user-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-content: start;
  align-self: stretch;
  margin-bottom: 0;
  min-width: 0;
}
.user-form-grid label {
  margin: 0;
}
.user-form-grid .uf-name,
.user-form-grid .uf-role,
.user-form-grid .uf-user,
.user-form-grid .uf-pass {
  grid-column: 1;
}
.user-form-grid input,
.user-form-grid select {
  width: 100%;
}
.user-group-box {
  margin: 0;
  padding: 6px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2) 80%, transparent);
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: stretch;
}
.user-group-box .ug-role {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 2px;
  font-size: 12px;
  flex: 0 0 auto;
}
.user-group-box .ug-role select {
  width: 100%;
  padding: 5px 8px;
  font-size: 12.5px;
}
.user-group-head {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
}
.user-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 0;
  align-content: start;
}
.ug-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  min-height: 0;
  height: auto;
}
.ug-card input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
.ug-card-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
}
.user-form.is-readonly .ug-card {
  cursor: default;
  opacity: 0.92;
}
.user-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow: auto;
}
.user-profile-grid label {
  margin: 0;
  gap: 2px;
  font-size: 12px;
}
.user-profile-grid .uf-wide { grid-column: 1 / -1; }
.user-profile-grid input,
.user-profile-grid select {
  width: 100%;
  padding: 5px 8px;
  font-size: 12.5px;
}
.user-signature-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  grid-column: 1 / -1;
}
.user-signature-box > span {
  font-size: 12px;
  color: var(--muted);
}
.user-signature-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.user-signature-img {
  max-height: 96px;
  max-width: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border, #d8dde6);
  border-radius: 4px;
  padding: 4px;
  flex: 0 0 auto;
}
.user-form.is-readonly .user-form-avatar-actions,
.user-form.is-readonly .perm-bulk,
.user-form.is-readonly #uSubmit {
  display: none !important;
}
.company-form.is-readonly button[type="submit"],
.company-form.is-readonly #cSubmit {
  display: none !important;
}
.user-signature-row #uSignatureEmpty {
  flex: 1 1 120px;
  min-width: 0;
}
.user-signature-row .user-form-avatar-actions {
  flex-direction: row;
  flex-wrap: wrap;
  width: auto;
  flex: 0 1 auto;
  gap: 6px;
}
.user-signature-row .user-form-avatar-actions .file-btn,
.user-signature-row .user-form-avatar-actions .ghost {
  width: auto;
  white-space: nowrap;
}
.perm-grid.perm-grid-single,
.perm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}
#set-logs .pager,
#set-users .pager { flex: 0 0 auto; }
.logs-filters { flex: 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.stat b { display: block; font-size: 22px; color: var(--accent); }
.stat.low b { color: var(--warn); }
.toolbar { margin-bottom: 12px; }
.toolbar input { flex: 1; min-width: 180px; }
.stock-filters select { min-width: 140px; max-width: 160px; }
.stock-filter-count { margin-right: 0; }
.stock-report-row {
  justify-content: flex-start;
  gap: 10px;
}
#btnStockPdf {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.stock-pdf-opt {
  flex: none;
  width: max-content;
  gap: 6px;
  white-space: nowrap;
}
.stock-pdf-opt input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
#tab-stock #stockTableWrap { flex: 1; min-height: 0; }
#tab-stock .pager { flex: 0 0 auto; }
.moves-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
}
.move-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.move-group h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.move-group .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.move-in { color: var(--ok); font-weight: 600; }
.move-out { color: var(--bad); font-weight: 600; }
#tab-stock .moves-wrap .table-wrap { flex: none; max-height: 280px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--text); }
th.sortable::after {
  content: " ▾";
  font-size: 9px;
  opacity: 0.35;
  letter-spacing: 0;
}
th.sortable.is-sorted { color: var(--accent); }
th.sortable[data-dir="asc"]::after { content: " ▲"; opacity: 1; color: var(--accent); }
th.sortable[data-dir="desc"]::after { content: " ▼"; opacity: 1; color: var(--accent); }
tr:hover td { background: var(--accent-soft); }
.session-open { color: var(--ok); font-weight: 600; }
.session-closed { color: var(--muted); }
.linkish { color: var(--accent); background: none; border: 0; padding: 0; }
th.actions, td.actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}
.row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.row-actions button {
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}
.row-actions .danger { margin-left: 8px; }
button.danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
  background: transparent;
}

.placeholder { padding: 48px 24px; text-align: center; }
.placeholder h2 { color: var(--accent); }
.settings-panel { margin-top: 16px; max-width: none; }
#set-users.settings-panel { margin-top: 8px; }
#set-products {
  padding-bottom: 0;
}
#set-products > .defs-page:not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#defsPage-catalog.defs-page-catalog {
  gap: 8px;
}
#defsPage-catalog.defs-page-catalog > h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 1.05rem;
}
#defsPage-catalog .def-grid {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}
#defsPage-catalog .compact-card {
  overflow: hidden;
}
#defsPage-catalog .def-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#defsPage-system.defs-page-system {
  overflow: auto;
  gap: 8px;
}
.system-defs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.stock-serial-setting h3,
.fx-rates-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}
.fx-rates-card .uf-actions,
.stock-serial-setting .uf-actions {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .system-defs-grid {
    grid-template-columns: 1fr;
  }
}
#set-companies > .company-page:not([hidden]) {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#set-brand, #set-data, #set-update { max-width: 820px; }
#set-license {
  max-width: none;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  gap: 16px;
  padding-bottom: 12px;
}
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 12px; }
.hint.warn { color: var(--bad); }
.license-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
  flex: 0 0 auto;
}
@media (max-width: 960px) {
  .license-board { grid-template-columns: 1fr; }
}
.license-form-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px 22px;
  min-width: 0;
}
.license-form-card h2 { margin: 0 0 10px; font-size: 1.1rem; }
.lic-act-wrap { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.lic-act-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.lic-act-cap { color: var(--muted); font-size: 13px; min-width: 8rem; }
.lic-act-radios { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.lic-act-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.lic-act-chip input { width: auto; margin: 0; }
.lic-machine {
  flex: 1;
  min-width: 14rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.lic-add-actions { margin-top: auto; padding-top: 4px; }
#licStatus {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}
#licStatus.ok { color: var(--ok, #3ecf8e); }
#licStatus.bad { color: var(--bad); }
#licStatus.busy {
  color: var(--muted);
}
#licStatus.busy::before {
  content: '';
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lic-spin 0.7s linear infinite;
  flex: none;
}
@keyframes lic-spin {
  to { transform: rotate(360deg); }
}
#set-license #licenseKey {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}
.license-meta {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.license-meta th,
.license-meta td {
  padding: 8px 10px;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  text-align: left;
}
.license-meta th {
  width: 40%;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding-right: 16px;
}
.license-meta td {
  color: var(--text);
  font-weight: 600;
}
#licenseMsg { margin-top: 12px; }
.lic-act-tone.online { color: var(--ok, #3ecf8e); }
.lic-act-tone.offline { color: var(--accent); }
.lic-expiry {
  font-weight: 700;
}
.lic-expiry.ok { color: var(--ok, #3ecf8e); }
.lic-expiry.warn { color: #e0a23a; }
.lic-expiry.bad { color: var(--bad); }
.license-packs-panel {
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 14px !important;
  overflow: visible;
}
.license-packs-head {
  flex: 0 0 auto;
}
.license-packs-head h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  text-align: left;
}
.license-pack-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 0;
}
.license-pack-head,
.license-pack {
  display: grid;
  grid-template-columns:
    minmax(140px, 1.4fr)
    minmax(90px, 0.7fr)
    minmax(130px, 1fr)
    minmax(120px, 1.2fr)
    minmax(110px, 0.9fr)
    auto;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
  min-width: 0;
  line-height: 1.3;
}
.license-pack-head {
  background: transparent;
  border-color: transparent;
  padding-top: 2px;
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: none;
}
.license-pack-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.license-pack-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text);
}
.license-pack-cell.lp-name {
  font-weight: 700;
  font-size: 13.5px;
}
.license-pack-cell.lp-id {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
.license-pack-cell.lp-expires {
  white-space: normal;
}
.license-pack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.license-pack-actions button {
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 6px;
  white-space: nowrap;
}
.license-pack-state {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  line-height: 1.2;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  font-weight: 700;
  flex: 0 0 auto;
}
.license-pack-state.is-active {
  border-color: color-mix(in srgb, var(--ok, #3ecf8e) 50%, var(--line));
  color: var(--ok, #3ecf8e);
  background: color-mix(in srgb, var(--ok, #3ecf8e) 14%, transparent);
}
.license-pack-state.is-pending {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.license-pack-empty {
  padding: 14px 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}
@media (max-width: 1100px) {
  .license-pack-head { display: none; }
  .license-pack {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .license-pack-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .license-pack {
    grid-template-columns: 1fr;
  }
}
#stockTableWrap th.col-check,
#stockTableWrap td.col-check {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}
#stockTableWrap .col-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
#productRows tr.is-selected {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.sv-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.sv-currency-select {
  width: auto;
  min-width: 0;
  max-width: 4.5rem;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 8px;
  height: auto;
  flex: 0 0 auto;
}
.stock-value-summary {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}
.stock-value-summary .sv-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.stock-value-summary .sv-row b {
  font-variant-numeric: tabular-nums;
}
.stock-value-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.fx-rates-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.fx-rates-box h3,
.fx-rates-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.fx-rates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 8px 0 10px;
}
.fx-rates-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
}
.fx-rates-row input {
  width: 110px;
  padding: 6px 8px;
}
.fx-rates-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}
.fx-rates-actions #fxMeta {
  margin: 0;
}
.product-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.price-with-cur {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: end;
}
.price-with-cur select {
  width: 78px;
  min-width: 78px;
}
@media (max-width: 520px) {
  .product-price-row { grid-template-columns: 1fr; }
}
dialog:has(.modal-form.product-form) {
  width: min(640px, 96vw);
}
.modal-form.product-form {
  padding: 14px 16px 12px;
  max-height: 90vh;
  overflow: auto;
}
.modal-form.product-form h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.25;
}
.modal-form.product-form > .muted.tiny {
  margin: 0 0 8px;
}
.product-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  align-items: start;
}
.product-form-span2 {
  grid-column: 1 / -1;
  min-width: 0;
}
.product-form-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}
.product-form-meta {
  display: grid;
  grid-template-columns: minmax(72px, 0.7fr) 1.15fr 1.15fr;
  gap: 8px 12px;
  min-width: 0;
}
.modal-form.product-form label {
  margin: 0;
  gap: 3px;
  font-size: 12px;
}
.modal-form.product-form input,
.modal-form.product-form select,
.modal-form.product-form textarea {
  padding: 6px 8px;
  font-size: 13px;
  min-height: 0;
}
.modal-form.product-form textarea {
  min-height: 52px;
  resize: vertical;
}
.modal-form.product-form .field-trio {
  gap: 8px;
}
.modal-form.product-form .field-trio label {
  margin: 0;
}
.modal-form.product-form .locked-field {
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.modal-form.product-form .stock-in-block {
  margin: 0;
  padding: 8px 10px;
}
.modal-form.product-form .stock-in-block h3 {
  margin: 0 0 4px;
  font-size: 12px;
}
.modal-form.product-form .stock-in-block .tiny {
  margin: 4px 0 0;
}
.modal-form.product-form .modal-actions {
  margin-top: 10px;
  padding-top: 8px;
}
@media (max-width: 560px) {
  .product-form-grid,
  .product-form-prices,
  .product-form-meta,
  .modal-form.product-form .field-trio {
    grid-template-columns: 1fr;
  }
}
#licModeStatus.ok { color: var(--ok); }
#licModeStatus.bad { color: var(--bad); }
.card, .card-form { padding: 16px; margin-bottom: 16px; }
.file-btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; color: var(--text); }

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0;
  width: min(820px, 96vw);
  max-height: 90vh;
}
dialog::backdrop { background: rgba(0,0,0,.72); }
.modal-form { padding: 20px; }
.modal-form.product-detail {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  min-height: 0;
}
.modal-form.product-detail h2,
.modal-form.product-detail p,
.modal-form.product-detail > button {
  flex: 0 0 auto;
}
.modal-form.product-detail .product-detail-desc {
  flex: 0 0 auto;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.modal-form.product-detail .product-detail-desc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.modal-form.product-detail .product-detail-desc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-form.product-detail .product-detail-desc-copy {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.modal-form.product-detail .product-detail-desc-copy:hover {
  color: var(--accent);
  border-color: var(--line);
  background: var(--panel);
}
.modal-form.product-detail .product-detail-desc-copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal-form.product-detail .product-detail-desc-body {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.modal-form.product-detail .product-detail-desc-body.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.modal-form.product-detail .product-detail-desc-body.is-expandable {
  cursor: pointer;
}
.modal-form.product-detail .product-detail-desc-body:not(.is-collapsed) {
  max-height: min(140px, 22vh);
  overflow: auto;
  cursor: pointer;
}
.modal-form.product-detail h3 {
  flex: 0 0 auto;
  margin: 12px 0 6px;
  font-size: 14px;
}
.modal-form.product-detail .modal-actions { flex: 0 0 auto; }
.modal-form.product-detail .product-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.modal-form.product-detail .product-detail-footer-spacer {
  flex: 1;
  min-width: 0;
}
.modal-form.product-detail .product-detail-footer-note {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.modal-form.product-detail .product-detail-footer-note-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.modal-form.product-detail .product-detail-footer-note-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-form.product-detail .product-detail-footer > [value="cancel"] {
  flex: 0 0 auto;
  margin-left: auto;
}
.detail-scroll {
  max-height: min(200px, 26vh);
  overflow: auto;
  flex: 0 1 auto;
  min-height: 0;
}
.detail-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

#askDialog { z-index: 60; width: min(420px, 94vw); }
#toast {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 28px;
  top: auto;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--accent);
  padding: 12px 18px;
  border-radius: 10px;
  z-index: 70;
  max-width: min(420px, 90vw);
  text-align: center;
  box-shadow: 0 12px 32px color-mix(in srgb, #000 22%, transparent);
}
#toast.bad { border-color: var(--bad); color: var(--bad); }

code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.lang-select {
  min-width: 72px;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 12px;
}
.lang-combo { display: flex; justify-content: center; margin-bottom: 8px; }
.lang-combo .lang-select { width: 88px; }
.icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  box-sizing: border-box;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-moon { fill: currentColor; stroke: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
.help-btn {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
}
.help-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.auth-foot, .app-footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}
.auth-foot { border: 0; margin-top: 16px; padding-bottom: 0; }
.def-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.def-span { grid-column: 1 / -1; }
.compact-card h3 { margin: 0 0 6px; font-size: 14px; }
.compact-card {
  padding: 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.inline-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.inline-add.tight { margin: 0 0 8px; gap: 6px; flex-shrink: 0; }
.inline-add input, .inline-add select { flex: 1; min-width: 0; }
.inline-add.tight button { flex: 0 0 auto; padding: 6px 12px; }
.def-search {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  margin: 0 0 8px;
  flex-shrink: 0;
}
.def-list { list-style: none; margin: 0; padding: 0; }
.def-list-scroll {
  flex: 1;
  max-height: none;
  min-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}
.def-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.def-list li.muted { justify-content: flex-start; border-bottom: none; cursor: default; }
.def-list.chips li { padding: 4px 0; font-size: 13px; }
.def-list.pickable li { cursor: pointer; border-radius: 6px; padding: 6px 8px; border-bottom: none; }
.def-list.pickable li:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.def-list.pickable li.active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  outline: 1px solid var(--accent);
}
.def-list button { padding: 4px 8px; font-size: 12px; }
.def-actions { display: flex; gap: 4px; flex-shrink: 0; }
.locked-field {
  margin: 0;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
}
.stock-in-block {
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.stock-in-block h3 { margin: 0 0 8px; font-size: 14px; }
.def-list .sub { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.field-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.field-trio label { margin: 8px 0; }
.tiny { font-size: 12px; margin: 0 0 8px; }
select:disabled { opacity: .55; cursor: not-allowed; }
.serial-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 4px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin: 8px 0;
}
.serial-pick label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  min-width: 0;
  background: var(--panel-2);
}
.serial-pick label:hover {
  outline: 1px solid var(--accent);
}
.serial-pick label input { margin: 0; flex: 0 0 auto; }
.serial-pick label code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.serial-pick .muted { grid-column: 1 / -1; margin: 4px; }
.serial-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.serial-toolbar > span { margin-right: auto; }
.serial-search {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.serial-toolbar label {
  flex-direction: row;
  align-items: center;
  margin: 0;
  color: var(--text);
  gap: 6px;
}
.serial-entry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 4px 2px;
}
.serial-entry-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
}
.serial-entry-row span {
  flex: 0 0 1.6em;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.serial-entry-row input {
  margin: 0;
  padding: 7px 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}
.serial-entry-row.dup input { border-color: var(--bad); }
.serial-progress { font-size: 12px; margin: 4px 0 8px; color: var(--muted); }
.serial-progress.ok { color: var(--ok); }
.serial-progress.bad { color: var(--warn); }
.move-locked {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.move-locked b { color: var(--text); }
.move-locked span { color: var(--muted); font-size: 12px; }

dialog.system-update-lock {
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  place-items: center;
}
dialog.system-update-lock[open] { display: grid; }
dialog.system-update-lock::backdrop { background: rgba(0, 0, 0, 0.78); }
.system-update-card {
  width: min(420px, 92vw);
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}
.system-update-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: system-update-spin 0.8s linear infinite;
}
@keyframes system-update-spin {
  to { transform: rotate(360deg); }
}
.system-update-card h2 { margin: 0 0 8px; font-size: 18px; }
.system-update-card p { margin: 0; color: var(--muted); }
.system-update-meter {
  margin: 18px 0 8px;
  height: 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.system-update-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.system-update-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text) !important;
  font-size: 15px;
}

td.num.low,
.qty-low,
span.low {
  color: var(--warn);
  font-weight: 700;
}

.stock-filters {
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: nowrap;
  overflow: visible;
}
.stock-filter-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}
.stock-search-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.stock-filter-extras {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}
.stock-filter-left #stockFilterCount {
  flex: 0 0 auto;
}
.stock-filter-extras .sf-combo {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
}
.sf-combo.has-value .sf-combo-btn {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.sf-combo-list .sf-combo-actions {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.sf-combo-list .sf-combo-actions button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 9px;
}
.sf-combo-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  min-width: 0;
}
.sf-combo-option:hover,
.sf-combo-option.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.sf-combo-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--accent);
  align-self: center;
}
.sf-combo-option span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  color: var(--text);
  line-height: 1.2;
}
.stock-age.is-idle,
.move-age.is-idle {
  color: #c47a12;
  font-weight: 650;
}
body[data-theme="dark"] .stock-age.is-idle,
body[data-theme="dark"] .move-age.is-idle {
  color: #e0a03a;
}
.idle-tag {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}
.stock-idle-days-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 4px;
  font-size: 13px;
}
.stock-idle-days-label input {
  width: 88px;
  padding: 6px 8px;
}
.sf-combo {
  position: relative;
}
.sf-combo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  padding: 6px 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
  min-width: 0;
  min-height: 34px;
  white-space: nowrap;
}
.sf-combo-btn::after {
  content: "▾";
  flex: 0 0 auto;
  opacity: 0.7;
  font-size: 0.85em;
}
.sf-combo-kind {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sf-combo-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--text);
  font-weight: 600;
}
.sf-combo-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  width: max(100%, 240px);
  min-width: 240px;
  max-width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 8px 24px color-mix(in srgb, #000 16%, transparent);
}
#stockFilterCompanyCombo .sf-combo-panel {
  width: min(360px, 92vw);
  min-width: 280px;
  max-width: min(420px, 92vw);
}
.sf-combo-panel[hidden] {
  display: none !important;
}
.sf-combo-search {
  width: 100%;
  margin: 0;
  padding: 7px 9px;
  font-size: 13px;
}
.sf-combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 440px;
  overflow: auto;
}
.sf-combo-list li {
  margin: 0;
}
.sf-combo-list button {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-combo-list button:hover,
.sf-combo-list button.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.sf-combo-list .sf-combo-empty {
  padding: 8px 9px;
  font-size: 12.5px;
  color: var(--muted);
}
.sf-native-wrap {
  display: none;
  margin: 0;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.sf-native-wrap > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.sf-native-select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}
.stock-tool-toggle {
  display: none;
}
.stock-filters .stock-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
  flex: 0 1 auto;
}
.stock-io-menu {
  position: relative;
  flex: 0 0 auto;
}
.stock-io-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
  white-space: nowrap;
}
.stock-io-menu-btn::after {
  content: "▾";
  flex: 0 0 auto;
  font-size: 0.85em;
  opacity: 0.7;
}
.stock-io-menu-btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.stock-io-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 80;
  width: max(100%, 200px);
  min-width: 200px;
  max-width: min(320px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 8px 24px color-mix(in srgb, #000 16%, transparent);
}
.stock-io-menu-panel[hidden] {
  display: none !important;
}
.stock-io-menu-panel button {
  width: 100%;
  display: block;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-io-menu-panel button:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.stock-filter-count { margin-left: 4px; }
.stock-report-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Dar ekran + telefon: stok araç çubuğu sade */
html.compact-stock #tab-stock {
  gap: 8px;
}
html.compact-stock #tab-stock > .stats,
html.compact-stock #tab-stock > .toolbar,
html.compact-stock #tab-stock > .pager {
  flex: 0 0 auto !important;
  min-height: 0;
}
html.compact-stock #tab-stock > .stats {
  margin-bottom: 0;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  flex: 0 0 auto !important;
}
html.compact-stock #tab-stock > .stats .stat {
  padding: 8px 10px;
}
html.compact-stock #tab-stock > .stats .stat b {
  font-size: 1.15rem;
  line-height: 1.15;
}
html.compact-stock #tab-stock > .stats .stat span {
  font-size: 11px;
}
html.compact-stock .stock-filters {
  flex: 0 0 auto !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  margin: 0 !important;
  padding: 0;
  min-height: 0 !important;
  height: auto !important;
  max-height: none;
}
html.compact-stock .stock-filter-left,
html.compact-stock .stock-actions {
  flex: 0 0 auto !important;
  width: 100%;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: auto !important;
  margin-left: 0;
  min-height: 0;
  height: auto !important;
}
html.compact-stock .stock-filter-left {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
}
html.compact-stock .stock-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
}
html.compact-stock .stock-filter-left #stockFilterCount {
  flex: 0 0 auto;
}
html.compact-stock .stock-filters,
html.compact-stock .stock-filter-left {
  overflow: visible;
}
html.compact-stock .stock-filter-extras {
  display: none !important;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  min-height: 0;
  height: auto;
  overflow: visible;
}
html.compact-stock .stock-filter-extras.is-open {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  position: relative;
  z-index: 5;
}
html.compact-stock .stock-filter-extras select,
html.compact-stock .stock-filter-extras .sf-combo {
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow: visible;
}
html.compact-stock .sf-combo-custom {
  display: none !important;
}
html.compact-stock .sf-native-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
html.compact-stock .stock-search-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
}
html.compact-stock .stock-filter-left #stockFilterCount {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12.5px;
}
html.compact-stock .stock-tool-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent);
  box-shadow: none;
}
html.compact-stock .stock-tool-toggle[aria-expanded="true"],
html.compact-stock .stock-tool-toggle.has-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
  color: var(--accent);
}
html.compact-stock .stock-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
html.compact-stock .stock-actions > button {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  padding: 9px 6px;
  font-size: 12px;
  white-space: nowrap;
}
html.compact-stock .stock-io-menu {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
}
html.compact-stock .stock-io-menu-btn {
  width: 100%;
  padding: 9px 6px;
  font-size: 12px;
}
html.compact-stock .stock-io-menu-panel {
  left: 0;
  right: 0;
  min-width: 0;
}
html.compact-stock .stock-report-row {
  display: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
html.compact-stock .stock-report-row.is-open {
  display: flex !important;
}
html.compact-stock .stock-report-row .stock-pdf-opt {
  white-space: normal;
}
html.compact-stock .stock-report-row button {
  width: 100%;
}
html.compact-stock .stock-filter-count {
  margin-left: 0;
  font-size: 12px;
}

/* Mobil: sayfa kaydırılsın, stok tablosu kendi içinde scroll olmasın */
html.compact-stock #app {
  height: auto;
  max-height: none;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.compact-stock #app > main {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 8px 10px 72px;
}
html.compact-stock .tabpanel {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  overflow: visible;
}
html.compact-stock #tab-stock {
  gap: 10px;
  overflow: visible;
}
html.compact-stock #tab-stock #stockTableWrap {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}
html.compact-stock #tab-stock #stockTableWrap table {
  width: max-content;
  min-width: 720px;
}
html.compact-stock #stockTableWrap td.actions,
html.compact-stock #stockTableWrap th.actions {
  white-space: nowrap;
  vertical-align: middle;
}
html.compact-stock #stockTableWrap .row-actions {
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 4px;
  justify-content: flex-end;
}
html.compact-stock #stockTableWrap .row-actions button {
  font-size: 11px;
  padding: 4px 6px;
  line-height: 1.15;
}
html.compact-stock #stockTableWrap .row-actions .danger {
  margin-left: 2px;
}

/* Ayarlar: tüm paneller sayfa ile kaydırılsın, kırpılmasın */
html.compact-stock #tab-settings {
  overflow: visible;
  min-height: 0;
  height: auto;
}
html.compact-stock #tab-settings > #settingsTabs.subtabs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  padding: 0 2px 8px;
  margin: 0;
}
html.compact-stock #tab-settings > #settingsTabs.subtabs button {
  flex: 0 0 auto;
}
html.compact-stock #tab-settings .settings-panel:not([hidden]) {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  margin-top: 8px;
  padding-bottom: 28px;
}
html.compact-stock #set-companies,
html.compact-stock #set-products,
html.compact-stock #set-users,
html.compact-stock #set-license,
html.compact-stock #set-brand,
html.compact-stock #set-data,
html.compact-stock #set-update,
html.compact-stock #set-logs {
  flex: 0 0 auto !important;
  flex-direction: column !important;
  overflow: visible !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overscroll-behavior-y: auto;
  padding-bottom: 12px;
}
html.compact-stock #set-companies > .company-main-tabs,
html.compact-stock #set-products > .defs-main-tabs,
html.compact-stock #set-users > .company-main-tabs {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: none !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
  margin: 0 0 10px;
}
html.compact-stock #set-companies > .company-page,
html.compact-stock #set-products > .defs-page,
html.compact-stock #set-users > .company-page,
html.compact-stock #set-products > .defs-page:not([hidden]),
html.compact-stock #set-users #userPage-list,
html.compact-stock #set-users #userPage-form:not([hidden]),
html.compact-stock #set-logs {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding-left: 0;
}
html.compact-stock #set-products > h2,
html.compact-stock #set-products > .muted {
  flex: 0 0 auto;
}
html.compact-stock #set-products .def-grid,
html.compact-stock #defsPage-catalog .def-grid {
  display: flex;
  flex-direction: column;
  flex: none;
  height: auto;
  min-height: 0;
  gap: 12px;
  margin-top: 8px;
  padding-bottom: 16px;
  overflow: visible;
}
/* Her tanım kutusu sabit boy; dolunca liste içinde kayar, sayfa da kayar */
html.compact-stock #set-products .compact-card,
html.compact-stock #defsPage-catalog .compact-card {
  flex: 0 0 auto;
  height: 460px;
  max-height: 460px;
  min-height: 460px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.compact-stock #set-products .def-list-scroll,
html.compact-stock #defsPage-catalog .def-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html.compact-stock #set-products .inline-add.tight {
  flex-wrap: wrap;
}
html.compact-stock #set-products .inline-add.tight input,
html.compact-stock #set-products .inline-add.tight select {
  flex: 1 1 100%;
  min-width: 0;
}
html.compact-stock #set-products .inline-add.tight button {
  width: 100%;
}
html.compact-stock #set-users .user-form,
html.compact-stock #set-users .card-form {
  max-width: none;
}
html.compact-stock #set-users .table-wrap,
html.compact-stock #set-companies .table-wrap,
html.compact-stock #set-logs .table-wrap {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
html.compact-stock #companyPage-list .table-wrap th,
html.compact-stock #companyPage-list .table-wrap td,
html.compact-stock #companyRows td {
  white-space: nowrap;
  vertical-align: middle;
}
html.compact-stock #companyRows td:first-child {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.compact-stock #companyPage-list .row-actions {
  flex-wrap: nowrap;
}
html.compact-stock #userPage-list .table-wrap th,
html.compact-stock #userPage-list .table-wrap td,
html.compact-stock #userRows td {
  white-space: nowrap;
  vertical-align: middle;
}
html.compact-stock #userPage-list .row-actions {
  flex-wrap: nowrap;
  flex-direction: row;
}
html.compact-stock #companyPeopleRows td,
html.compact-stock #companyAddressRows td,
html.compact-stock #companySub-people .table-wrap th,
html.compact-stock #companySub-people .table-wrap td,
html.compact-stock #companySub-addresses .table-wrap th,
html.compact-stock #companySub-addresses .table-wrap td {
  white-space: nowrap;
  vertical-align: middle;
}
html.compact-stock #companyPeopleRows .row-actions,
html.compact-stock #companyAddressRows .row-actions,
html.compact-stock #companySub-people .row-actions,
html.compact-stock #companySub-addresses .row-actions {
  flex-wrap: nowrap;
  flex-direction: row;
}
html.compact-stock .license-board {
  grid-template-columns: 1fr !important;
  gap: 12px;
}
html.compact-stock #licenseStatusCard {
  padding: 10px 10px;
  overflow: hidden;
  min-width: 0;
}
html.compact-stock .license-meta {
  display: block;
  width: 100%;
  font-size: 11px !important;
}
html.compact-stock .license-meta tbody {
  display: block;
}
html.compact-stock .license-meta tr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
html.compact-stock .license-meta tr:last-child {
  border-bottom: 0;
}
html.compact-stock .license-meta th,
html.compact-stock .license-meta td {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  padding: 0;
  box-sizing: border-box;
}
html.compact-stock .license-meta th {
  font-size: 10.5px !important;
  font-weight: 500;
  color: var(--muted);
  padding-right: 0;
}
html.compact-stock .license-meta td {
  font-size: 11.5px !important;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.3;
}
html.compact-stock .license-meta td b,
html.compact-stock .license-meta .lic-expiry,
html.compact-stock .license-meta .lic-act-tone {
  font-size: inherit !important;
  font-weight: 650;
}
html.compact-stock #licenseStatusCard h2 {
  font-size: 0.95rem !important;
  margin-bottom: 4px;
}
html.compact-stock #licenseStatusCard .hint,
html.compact-stock #licenseStatusCard #licenseMsg {
  font-size: 11px !important;
  margin-bottom: 6px;
  line-height: 1.35;
}
html.compact-stock .license-meta .lic-expiry {
  display: inline;
  white-space: normal;
}
html.compact-stock .lic-act-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
html.compact-stock .lic-act-cap {
  min-width: 0;
}
html.compact-stock .lic-machine {
  min-width: 0;
  width: 100%;
}
html.compact-stock .lic-add-actions {
  flex-wrap: wrap;
}
html.compact-stock .license-pack-cell {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}
html.compact-stock .placeholder {
  padding: 28px 16px;
}

label.check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
label.check input { width: auto; margin: 0; }
.stock-serial-setting {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}
.stock-serial-setting .stock-serial-check {
  white-space: normal;
  font-weight: 600;
}
.stock-serial-setting .tiny { margin: 0; max-width: 42rem; }
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.pager-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  margin: 0 auto;
  width: max-content;
  max-width: 100%;
}
.pager-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
}
label.pager-size {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: auto;
  flex: none;
  color: var(--muted);
  font-size: 13px;
}
.pager-size select { min-width: 72px; padding: 6px 8px; }
.pager-info {
  min-width: 9.5rem;
  text-align: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pager-nav button:disabled { opacity: 0.45; cursor: default; }

.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 0;
}
.company-form-grid label { margin: 0; }
.company-form-grid .cf-wide { grid-column: 1 / -1; }
.company-form-grid input,
.company-form-grid select { width: 100%; }
.defs-page { min-width: 0; }
.company-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.15fr);
  gap: 16px;
  align-items: start;
}
.company-col-left,
.company-col-right {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px 16px 16px;
  min-width: 0;
}
.company-col-left h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.company-subtabs { margin: 0 0 10px; }
.company-col-right.is-locked .company-subpanel {
  opacity: 0.55;
  pointer-events: none;
}
.company-sub-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.company-sub-form input {
  flex: 1 1 120px;
  min-width: 100px;
}
.company-trade-form label {
  display: block;
  margin-bottom: 8px;
}
.company-trade-form input { width: 100%; }
#companyRows tr.company-row { cursor: pointer; }
#companyRows tr.is-selected td {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
#userRows tr.user-row { cursor: pointer; }
#userRows tr.is-selected td {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
@media (max-width: 960px) {
  .company-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  #set-companies,
  #set-products,
  #set-users {
    flex-direction: column;
  }
  #set-companies > .company-main-tabs,
  #set-products > .defs-main-tabs,
  #set-users > .company-main-tabs {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 8px;
    margin: 0 0 8px;
  }
  #set-companies > .company-main-tabs.subtabs button,
  #set-products > .defs-main-tabs.subtabs button,
  #set-users > .company-main-tabs.subtabs button {
    width: auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  #set-companies > .company-main-tabs.subtabs button.active,
  #set-products > .defs-main-tabs.subtabs button.active,
  #set-users > .company-main-tabs.subtabs button.active {
    border-left-color: transparent;
    border-bottom-color: #d4b83a;
  }
  #set-companies > .company-page,
  #set-products > .defs-page,
  #set-users > .company-page {
    padding-left: 0;
  }
}
@media (max-width: 640px) {
  .company-form-grid { grid-template-columns: 1fr; }
  .company-form-grid .cf-wide { grid-column: auto; }
}
.data-path-row {
  margin: 0 0 16px;
  word-break: break-all;
}
.data-path-row code {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.data-backup-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px 18px;
}
.data-backup-box h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.data-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
@media (max-width: 1100px) {
  .user-form-body {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr);
    gap: 12px;
  }
}
@media (max-width: 900px) {
  .user-form-body { grid-template-columns: 1fr; }
  .user-form-top {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .user-form-top .user-group-box {
    grid-column: 1 / -1;
    height: auto;
  }
  .user-form-right.perm-box {
    max-height: none;
    overflow: visible;
  }
  .user-form-right.perm-box .perm-grid {
    max-height: none;
    overflow: visible;
  }
  #set-users #userPage-form:not([hidden]) {
    overflow: auto;
  }
}
@media (max-width: 640px) {
  .user-form-top {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .user-form-top .user-group-box {
    grid-column: auto;
  }
  .user-form-avatar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    max-width: none;
    min-width: 0;
    width: 100%;
    height: auto;
  }
  .user-form-avatar-actions {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .user-form-avatar-actions .file-btn,
  .user-form-avatar-actions .ghost {
    width: auto;
  }
  .user-form-grid,
  .user-profile-grid,
  .user-group-grid {
    grid-template-columns: 1fr;
  }
  .user-group-grid {
    grid-template-rows: none;
  }
  .user-form-grid .uf-name,
  .user-form-grid .uf-role,
  .user-profile-grid .uf-wide {
    grid-column: auto;
  }
  .user-signature-img {
    max-height: 80px;
    max-width: 100%;
  }
  .user-signature-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .user-signature-row .user-form-avatar-actions {
    width: 100%;
  }
  .perm-box-head {
    flex-direction: column;
    align-items: flex-start;
  }
  #set-users .uf-actions {
    position: static;
  }
  #set-users .table-wrap th,
  #set-users .table-wrap td {
    padding: 8px 8px;
    font-size: 12.5px;
  }
  #set-users .row-actions {
    flex-wrap: nowrap;
  }
}
.uf-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 6px 0 0;
  padding-top: 0;
}
.perm-box { margin: 4px 0 2px; }
.perm-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 auto;
}
.perm-bulk { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.btn-sm { padding: 4px 8px; font-size: 11.5px; }
.perm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: start;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}
.perm-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.perm-col-settings .perm-card.has-children {
  grid-column: auto;
  height: auto;
}
.perm-col-settings .perm-children,
.perm-children {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.perm-children .perm-card.has-opts {
  grid-column: span 2;
}
.perm-card.has-opts .perm-card-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
  align-items: center;
}
.perm-card.has-children { grid-column: auto; }
.perm-children {
  opacity: 1;
  transition: opacity 0.15s ease;
}
.perm-children.is-passive {
  opacity: 0.48;
}
.perm-children.is-passive .perm-card {
  pointer-events: none;
}
.perm-children[hidden] { display: none !important; }
.users-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 6px;
}
.users-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
}
.perm-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.perm-card.overridden { border-color: rgba(245, 197, 24, 0.45); }
.perm-card-name { font-size: 12px; font-weight: 650; color: var(--text); }
.perm-card-opts { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.perm-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .perm-grid { grid-template-columns: 1fr; }
}
.perm-check.is-disabled { opacity: 0.45; cursor: default; }
.you-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.help-dialog {
  width: min(980px, 96vw);
  max-height: min(92vh, 940px);
  padding: 20px 22px 18px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
}
.help-dialog h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}
.help-dialog > form > .hint,
.help-dialog .hint {
  margin: 0 0 12px;
  line-height: 1.45;
  color: var(--muted);
  font-size: 13px;
}
.help-frame-wrap {
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  height: min(68vh, 640px);
}
.help-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.help-dialog .modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.help-dialog .modal-actions a.btn,
.help-dialog .modal-actions a.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .def-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .topbar {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px 8px;
  }
  .brand {
    order: 1;
    width: 100%;
    max-width: none;
    border-right: 0;
    padding: 2px 0;
    gap: 10px;
  }
  .brand strong {
    display: block;
    -webkit-line-clamp: 2;
    max-width: none;
    font-size: 18px;
    overflow: hidden;
  }
  .top-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .tabs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .stock-filters .stock-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 800px) {
  .def-grid, .field-trio { grid-template-columns: 1fr; }
}

/* —— Mobil / PWA —— */
.a2hs-fab {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}
.a2hs-fab:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.a2hs-fab-icon { display: inline-flex; opacity: 0.9; }
.a2hs-fab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.a2hs-fab-close:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
#pullRefreshTip {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translate3d(-50%, var(--pull-y, 0px), 0);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, #000);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transition: opacity 0.15s ease;
}
#pullRefreshTip.busy {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}
#pullRefreshTip .pull-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-top-color: var(--accent);
  flex: none;
  opacity: 0.55;
  transform: rotate(0deg);
}
#pullRefreshTip.ready .pull-spinner {
  opacity: 1;
}
#pullRefreshTip.busy .pull-spinner {
  opacity: 1;
  animation: pull-spin 0.7s linear infinite;
}
@keyframes pull-spin {
  to { transform: rotate(360deg); }
}
#app.is-pulling {
  transform: translate3d(0, var(--pull-y, 0px), 0);
  will-change: transform;
}
#app.pull-animate {
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#app.is-pulling:not(.pull-animate) {
  transition: none;
}
.first-pass-dialog,
.a2hs-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  max-width: min(420px, calc(100vw - 24px));
}
.first-pass-dialog::backdrop,
.a2hs-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

@media (max-width: 720px) {
  html, body {
    overscroll-behavior-y: none;
    height: 100%;
    height: 100dvh;
  }
  #authScreen {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .topbar {
    padding: 8px 10px 6px;
    gap: 6px;
  }
  .brand {
    order: 1;
    width: 100%;
    max-width: none;
    padding: 2px 0;
    gap: 8px;
  }
  .brand strong {
    display: block;
    font-size: 17px;
    max-width: none;
  }
  .brand-mark {
    padding: 4px;
  }
  .brand-mark img.brand-mark-default,
  #appLogo.brand-mark-default {
    height: 26px;
    width: 26px;
    max-width: 26px;
  }
  .top-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    max-width: 100%;
  }
  .tabs {
    order: 3;
    width: 100%;
    gap: 4px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button,
  .subtabs button {
    font-size: 12px;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px 6px;
  }
  /* Ayarlar ana sekmeleri: sığmayanlar 2. satıra */
  #tab-settings > #settingsTabs.subtabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 4px 2px;
    padding: 0 2px 8px;
  }
  #set-companies > .company-main-tabs.subtabs,
  #set-products > .defs-main-tabs.subtabs,
  #set-users > .company-main-tabs.subtabs {
    flex-wrap: wrap;
    overflow: visible;
  }
  .user-chip {
    max-width: none;
    padding: 4px;
  }
  #userChipName {
    display: none;
  }
  #logoutBtn,
  .help-btn,
  #themeBtn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
  }
  .status-card {
    padding: 4px 6px;
  }
  .status-card .service-state {
    display: none;
  }
  main {
    padding: 10px 10px 72px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stat {
    padding: 10px 12px;
  }
  .stat b { font-size: 1.25rem; }
  .table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 640px;
  }
  #set-users table {
    min-width: 720px;
  }
  .pager-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pager-nav {
    flex-wrap: wrap;
  }
  .user-form-card,
  .card,
  .card-form,
  .data-backup-box,
  .license-form-card {
    padding: 12px;
  }
  .perm-grid {
    grid-template-columns: 1fr;
  }
  .perm-col-settings .perm-children,
  .perm-children {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .modal-form,
  .account-dialog .modal-form {
    padding: 14px;
    max-height: min(90vh, 100%);
    overflow: auto;
  }
  dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    margin: auto;
  }
  .help-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    height: calc(100vh - 24px);
  }
  .help-frame-wrap {
    min-height: 50vh;
  }
  .auth-card {
    width: min(420px, calc(100vw - 24px));
    padding: 20px 16px;
    margin: 12px;
  }
  .auth-top-right {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
  }
  .app-footer {
    font-size: 11px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .a2hs-fab-text { display: none; }
  .row-actions {
    flex-wrap: wrap;
  }
  #stockTableWrap .row-actions {
    flex-wrap: nowrap;
  }
  #companyPage-list .row-actions {
    flex-wrap: nowrap;
  }
  #userPage-list .row-actions {
    flex-wrap: nowrap;
  }
  #companyPeopleRows .row-actions,
  #companyAddressRows .row-actions {
    flex-wrap: nowrap;
  }
  .row-actions button {
    font-size: 11px;
    padding: 5px 7px;
  }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  #langSelectApp { max-width: 56px; }
  .brand strong { display: block; font-size: 16px; }
  .user-chip #userChipName { display: none; }
}
