/* =========================================================
   Складской контур · дизайн-система
   Неоморфизм + glassmorphism + liquid glass
   ========================================================= */

:root {
  --font-sans: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --bg: #f1eadf;
  --bg-deep: #e8ddce;
  --bg-soft: #f7f2e9;
  --surface: rgba(250, 246, 238, 0.66);
  --surface-strong: rgba(253, 250, 245, 0.86);
  --surface-solid: #f8f3ea;
  --ink: #303237;
  --ink-soft: #575650;
  --muted: #837b70;
  --faint: #a69c8e;
  --line: rgba(83, 68, 51, 0.13);
  --line-strong: rgba(83, 68, 51, 0.22);
  --line-light: rgba(255, 255, 255, 0.7);

  --terracotta: #a65f49;
  --terracotta-deep: #884b38;
  --terracotta-soft: #d6a08d;
  --terracotta-wash: rgba(166, 95, 73, 0.11);
  --sage: #7d9279;
  --sage-deep: #637a5f;
  --sage-wash: rgba(125, 146, 121, 0.13);
  --teal: #5f827d;
  --teal-wash: rgba(95, 130, 125, 0.12);
  --amber: #b38451;
  --amber-wash: rgba(179, 132, 81, 0.13);
  --orange: #c3744e;
  --orange-wash: rgba(195, 116, 78, 0.13);
  --red: #ad5346;
  --red-wash: rgba(173, 83, 70, 0.12);
  --green: #6e8c6c;
  --green-wash: rgba(110, 140, 108, 0.13);
  --gold: #b38a4f;
  --gold-wash: rgba(179, 138, 79, 0.15);
  --slate: #78838e;
  --graphite: #4b4e53;
  --cream: #fffaf2;

  --shadow-outer: 14px 14px 34px rgba(121, 98, 70, 0.14), -12px -12px 28px rgba(255, 255, 255, 0.76);
  --shadow-outer-sm: 7px 7px 18px rgba(121, 98, 70, 0.12), -7px -7px 16px rgba(255, 255, 255, 0.75);
  --shadow-inset: inset 1px 1px 0 rgba(255, 255, 255, 0.72), inset -1px -1px 0 rgba(108, 84, 58, 0.05);
  --shadow-float: 0 28px 70px rgba(92, 70, 47, 0.18), 0 4px 16px rgba(92, 70, 47, 0.08);
  --ring: 0 0 0 3px rgba(166, 95, 73, 0.22), 0 0 0 6px rgba(166, 95, 73, 0.08);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --blur: 22px;
  --sidebar-width: 268px;
  --content-max: 1420px;
  --topbar-h: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(199, 153, 115, 0.26), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(147, 166, 140, 0.2), transparent 31%),
    radial-gradient(circle at 72% 92%, rgba(184, 130, 100, 0.16), transparent 34%),
    linear-gradient(148deg, #f5eee4 0%, #efe5d7 46%, #f4ecdf 100%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body.is-busy {
  cursor: progress;
}

body.is-busy .btn,
body.is-busy .icon-btn {
  pointer-events: none;
}

::selection {
  background: rgba(166, 95, 73, 0.22);
  color: var(--ink);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 2.3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 650;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 650;
}

h3 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.018em;
  font-weight: 650;
}

strong, b {
  font-weight: 650;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: -0.02em;
}

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

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

.text-good { color: var(--green); }
.text-bad { color: var(--red); }

/* ---------- Ambient liquid background ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.52;
  will-change: transform;
}

.ambient__blob--one {
  width: 480px;
  height: 480px;
  left: -160px;
  top: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(206, 149, 119, 0.6), rgba(181, 116, 90, 0.08) 65%);
  animation: blobDrift 24s var(--ease) infinite alternate;
}

.ambient__blob--two {
  width: 560px;
  height: 560px;
  right: -220px;
  top: 16%;
  background: radial-gradient(circle at 45% 45%, rgba(157, 173, 145, 0.42), rgba(126, 146, 121, 0.04) 70%);
  animation: blobDrift 32s var(--ease) infinite alternate-reverse;
}

.ambient__blob--three {
  width: 420px;
  height: 420px;
  left: 34%;
  bottom: -240px;
  background: radial-gradient(circle at 50% 50%, rgba(206, 170, 124, 0.4), rgba(175, 135, 94, 0.02) 70%);
  animation: blobDrift 28s var(--ease) infinite alternate;
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@keyframes blobDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(38px, -26px, 0) scale(1.08); }
  100% { transform: translate3d(-24px, 30px, 0) scale(0.96); }
}

/* ---------- Boot / fatal ---------- */

.boot-screen,
.fatal-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}

.boot-logo svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 16px 28px rgba(135, 75, 56, 0.22));
  animation: bootFloat 2.8s ease-in-out infinite;
}

.boot-brand {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.boot-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes bootFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(166, 95, 73, 0.22);
  border-top-color: var(--terracotta);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.fatal-card {
  max-width: 480px;
  padding: 38px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 14px;
}

.fatal-card__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--red-wash);
  color: var(--red);
}

.fatal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  z-index: 9999;
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  line-height: 1.4;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.page-header__main {
  max-width: 780px;
}

.page-header h1 {
  margin-top: 6px;
}

.page-header__subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 640px;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--terracotta);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.section-heading h2 {
  font-size: 17px;
}

.section-heading p {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s, gap 0.2s;
}

.text-link:hover {
  color: var(--terracotta-deep);
  gap: 8px;
}

.text-link--small {
  font-size: 12px;
}

.link-title {
  padding: 0;
  text-align: left;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}

.link-title:hover {
  color: var(--terracotta);
}

/* ---------- Glass & neomorphic surfaces ---------- */

.glass-panel,
.glass-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.72), rgba(250, 244, 235, 0.47));
  box-shadow: var(--shadow-outer), var(--shadow-inset);
  backdrop-filter: blur(var(--blur)) saturate(145%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(145%);
}

.glass-card {
  border-radius: var(--radius-lg);
}

.glass-panel {
  border-radius: var(--radius-xl);
}

.glass-card--liquid {
  overflow: hidden;
}

.glass-card--liquid::before {
  content: "";
  position: absolute;
  inset: -60% -30% auto auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
  animation: liquidShine 14s ease-in-out infinite alternate;
}

.glass-card--liquid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.24) 0%, transparent 24%, transparent 74%, rgba(255, 255, 255, 0.16) 100%);
  mix-blend-mode: soft-light;
}

@keyframes liquidShine {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  55% { transform: translate3d(-100px, 120px, 0) scale(1.3); opacity: 0.8; }
  100% { transform: translate3d(-220px, 40px, 0) scale(0.95); opacity: 0.42; }
}

.panel {
  padding: 24px;
}

.panel--flush {
  padding: 0;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.78);
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.2s, border-color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  color: #fffaf4;
  background: linear-gradient(145deg, #b46b53 0%, var(--terracotta) 46%, #95523e 100%);
  box-shadow:
    0 10px 22px rgba(145, 77, 55, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(91, 42, 29, 0.18);
}

.btn--primary:hover {
  background: linear-gradient(145deg, #bd735a 0%, #a9614a 50%, #8f4e3b 100%);
  box-shadow: 0 14px 28px rgba(145, 77, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.btn--glass {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 253, 247, 0.9), rgba(244, 236, 224, 0.64));
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
}

.btn--glass:hover {
  background: linear-gradient(145deg, #fffdf8, #f3eadc);
  box-shadow: 8px 9px 22px rgba(121, 98, 70, 0.15), -7px -7px 16px rgba(255, 255, 255, 0.8);
}

.btn--ghost {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(88, 72, 53, 0.12);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  border-color: rgba(88, 72, 53, 0.18);
}

.btn--danger {
  color: #fff8f4;
  background: linear-gradient(145deg, #b96050, #9e493b);
  box-shadow: 0 10px 22px rgba(140, 60, 48, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--danger:hover {
  background: linear-gradient(145deg, #c26756, #a04c3d);
}

.btn--danger-ghost {
  color: var(--red);
  background: var(--red-wash);
  border-color: rgba(173, 83, 70, 0.16);
}

.btn--danger-ghost:hover {
  background: rgba(173, 83, 70, 0.17);
  border-color: rgba(173, 83, 70, 0.26);
}

.btn--sm {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: 11px;
  gap: 6px;
}

.btn--xs {
  min-height: 29px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 9px;
}

.btn--lg {
  min-height: 50px;
  padding: 0 22px;
  font-size: 14.5px;
  border-radius: 16px;
}

.btn--block {
  width: 100%;
}

.btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(86, 70, 52, 0.1);
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--terracotta);
  transform: translateY(-1px);
}

.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.icon {
  flex-shrink: 0;
}

/* ---------- Badges & chips ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.005em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge svg {
  opacity: 0.8;
}

.badge--neutral { color: var(--ink-soft); background: rgba(90, 80, 68, 0.08); border-color: rgba(90, 80, 68, 0.08); }
.badge--terracotta { color: var(--terracotta-deep); background: var(--terracotta-wash); border-color: rgba(166, 95, 73, 0.16); }
.badge--sage { color: var(--sage-deep); background: var(--sage-wash); border-color: rgba(125, 146, 121, 0.18); }
.badge--teal { color: var(--teal); background: var(--teal-wash); border-color: rgba(95, 130, 125, 0.16); }
.badge--amber { color: #926730; background: var(--amber-wash); border-color: rgba(179, 132, 81, 0.18); }
.badge--orange { color: #a25b38; background: var(--orange-wash); border-color: rgba(195, 116, 78, 0.17); }
.badge--red { color: var(--red); background: var(--red-wash); border-color: rgba(173, 83, 70, 0.16); }
.badge--green { color: var(--green); background: var(--green-wash); border-color: rgba(110, 140, 108, 0.18); }
.badge--gold { color: #8f6c37; background: var(--gold-wash); border-color: rgba(179, 138, 79, 0.2); }
.badge--graphite { color: #44474d; background: rgba(75, 78, 83, 0.09); border-color: rgba(75, 78, 83, 0.1); }
.badge--slate { color: var(--slate); background: rgba(120, 131, 142, 0.11); }
.badge--sand { color: #8b6b45; background: rgba(183, 148, 107, 0.13); }
.badge--group { color: var(--ink-soft); background: rgba(255, 255, 255, 0.36); border-color: rgba(90, 78, 64, 0.1); }

.badge__dot,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(110, 140, 108, 0.12);
  flex-shrink: 0;
}

.badge--green .badge__dot,
.live-dot {
  background: var(--green);
}

.live-dot {
  display: inline-block;
  animation: livePulse 2.4s infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(110, 140, 108, 0.28); }
  50% { box-shadow: 0 0 0 5px rgba(110, 140, 108, 0); }
}

.you-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 3px;
  border-radius: 5px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: 2px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(90, 75, 58, 0.08);
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------- Avatars & stars ---------- */

.avatar {
  position: relative;
  width: var(--avatar-size, 38px);
  height: var(--avatar-size, 38px);
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32), transparent 50%),
    var(--avatar-bg, #a65f49);
  box-shadow: 0 5px 13px rgba(78, 55, 39, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff8f0;
}

.avatar__initials {
  font-size: calc(var(--avatar-size, 38px) * 0.32);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.avatar__status {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: calc(var(--avatar-size, 38px) * 0.24);
  height: calc(var(--avatar-size, 38px) * 0.24);
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  border: 2px solid var(--bg-soft);
}

.avatar__status.online { background: var(--green); }
.avatar__status.offline { background: #b3aa9d; }

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  margin-left: -7px;
  border: 2px solid rgba(250, 246, 238, 0.9);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.avatar-stack__more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid rgba(250, 246, 238, 0.9);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.star-inline,
.star-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 650;
}

.star-inline svg,
.star-count svg {
  fill: rgba(179, 138, 79, 0.16);
}

/* ---------- Logo ---------- */

.logotype {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.logo-mark {
  width: var(--logo-size, 44px);
  height: var(--logo-size, 44px);
  display: inline-block;
  filter: drop-shadow(0 8px 16px rgba(131, 79, 60, 0.2));
  flex-shrink: 0;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logotype__text {
  display: grid;
  gap: 1px;
}

.logotype__name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 600;
}

.logotype__tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  font-weight: 600;
}

.logotype--compact .logotype__name {
  font-size: 17px;
}

/* ---------- Fields & forms ---------- */

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-mark {
  color: var(--terracotta);
}

.field__control {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border-radius: 13px;
  background: rgba(255, 252, 246, 0.58);
  border: 1px solid rgba(91, 74, 55, 0.13);
  box-shadow: inset 1px 1px 3px rgba(112, 88, 62, 0.05), inset -1px -1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  color: var(--muted);
}

.field__control:focus-within {
  border-color: rgba(166, 95, 73, 0.45);
  background: rgba(255, 252, 246, 0.86);
  box-shadow: 0 0 0 3px rgba(166, 95, 73, 0.1), inset 1px 1px 3px rgba(112, 88, 62, 0.04);
}

.field__control--textarea {
  align-items: flex-start;
  padding-top: 11px;
  min-height: 86px;
}

.field__control--textarea svg {
  margin-top: 2px;
}

.field__control--file {
  cursor: pointer;
}

.field__input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  padding: 10px 0;
}

.field__input::placeholder {
  color: #a59b8d;
}

.field__input:focus {
  outline: none;
}

.filter-bar select.field__input--compact,
.requests-toolbar select.field__input--compact {
  min-width: 148px;
}

.field__input--compact {
  min-height: 42px;
  width: auto;
  padding: 0 34px 0 13px;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.58);
  border: 1px solid rgba(91, 74, 55, 0.13);
  color: var(--ink-soft);
  font-size: 12.5px;
  cursor: pointer;
}

.field__input--color {
  width: 56px;
  height: 32px;
  padding: 2px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.field__action {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}

.field__action:hover {
  color: var(--terracotta);
  background: rgba(255, 255, 255, 0.4);
}

.field__hint {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.field__label b {
  color: var(--terracotta);
}

.field--action {
  align-content: end;
}

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

textarea.field__input {
  resize: vertical;
  min-height: 66px;
}

select.field__input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23837b70' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 22px;
}

input[type="datetime-local"].field__input,
input[type="date"].field__input {
  min-height: 24px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.45;
}

.check-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(91, 74, 55, 0.24);
  background: rgba(255, 252, 246, 0.7);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.check-row input::before {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 1.8px solid var(--cream);
  border-bottom: 1.8px solid var(--cream);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s var(--ease-spring);
}

.check-row input:checked {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.check-row input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.switch-inline > input,
.setting-toggle > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-inline__track {
  width: 38px;
  height: 22px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(100, 86, 69, 0.16);
  box-shadow: inset 1px 1px 3px rgba(84, 68, 50, 0.14);
  transition: background 0.22s;
  flex-shrink: 0;
  display: block;
}

.switch-inline__track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fffaf2;
  box-shadow: 0 2px 5px rgba(87, 64, 43, 0.24);
  transition: transform 0.22s var(--ease-spring);
}

.switch-inline input:checked + .switch-inline__track {
  background: var(--terracotta);
}

.switch-inline input:checked + .switch-inline__track::after {
  transform: translateX(16px);
}

.switch-inline:has(input:focus-visible) .switch-inline__track,
.setting-toggle:has(input:focus-visible) .switch-inline__track {
  box-shadow: var(--ring);
}

.setting-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(94, 76, 57, 0.08);
  cursor: pointer;
  position: relative;
}

.setting-toggle > span:last-child {
  display: grid;
  gap: 2px;
}

.setting-toggle strong {
  font-size: 12.5px;
}

.setting-toggle small {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.setting-toggle input:checked + .switch-inline__track {
  background: var(--terracotta);
}

.setting-toggle input:checked + .switch-inline__track::after {
  transform: translateX(16px);
}

.setting-toggle--wide {
  margin-bottom: 4px;
}

.form-error,
.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.form-error {
  color: var(--red);
  background: var(--red-wash);
  border: 1px solid rgba(173, 83, 70, 0.17);
}

.form-notice {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(94, 76, 57, 0.1);
}

.form-notice svg,
.form-error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.password-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.password-meter__bar {
  display: flex;
  gap: 4px;
}

.password-meter__bar i {
  width: 24px;
  height: 4px;
  border-radius: 99px;
  background: rgba(97, 82, 64, 0.13);
  transition: background 0.2s;
}

.password-meter__bar i.is-filled:nth-child(1) { background: var(--red); }
.password-meter__bar i.is-filled:nth-child(2) { background: var(--amber); }
.password-meter__bar i.is-filled:nth-child(3) { background: var(--sage); }
.password-meter__bar i.is-filled:nth-child(4) { background: var(--green); }

.password-meter__label {
  font-size: 10px;
  color: var(--muted);
}

/* ---------- Search, segmented, filter chips ---------- */

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 240px;
  flex: 1;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  background: rgba(255, 252, 246, 0.6);
  border: 1px solid rgba(91, 74, 55, 0.12);
  color: var(--muted);
  transition: all 0.2s;
}

.search-box:focus-within {
  border-color: rgba(166, 95, 73, 0.42);
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 0 0 3px rgba(166, 95, 73, 0.09);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  padding: 10px 0;
}

.search-box input::placeholder {
  color: #a59b8d;
}

.search-box__clear {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
}

.search-box__clear:hover {
  color: var(--terracotta);
  background: rgba(166, 95, 73, 0.08);
}

.search-box--compact {
  flex: 0 1 310px;
  min-width: 210px;
  min-height: 40px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(102, 86, 68, 0.07);
  border: 1px solid rgba(90, 74, 56, 0.07);
  flex-shrink: 0;
}

.segmented__item {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.segmented__item span {
  opacity: 0.7;
  font-size: 10.5px;
}

.segmented__item:hover {
  color: var(--ink-soft);
}

.segmented__item.is-active {
  color: var(--ink);
  background: rgba(255, 252, 246, 0.88);
  box-shadow: 0 2px 7px rgba(103, 81, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid rgba(90, 74, 56, 0.09);
  background: rgba(255, 255, 255, 0.25);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-chip:hover {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
}

.filter-chip.is-active {
  color: var(--ink);
  background: rgba(255, 252, 246, 0.8);
  border-color: rgba(166, 95, 73, 0.28);
  box-shadow: 0 2px 8px rgba(115, 85, 60, 0.08);
}

.filter-chip span {
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(90, 75, 58, 0.08);
  font-size: 9.5px;
}

.filter-chip svg {
  color: var(--chip-color, currentColor);
  opacity: 0.8;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- Cards, stats, empty ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.66), rgba(247, 240, 229, 0.43));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
  backdrop-filter: blur(16px) saturate(135%);
  min-height: 124px;
  display: flex;
  flex-direction: column;
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
}

.stat-card__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--terracotta);
  box-shadow: 2px 3px 8px rgba(108, 84, 58, 0.08);
}

.stat-card--sage .stat-card__icon { color: var(--sage-deep); background: var(--sage-wash); }
.stat-card--teal .stat-card__icon { color: var(--teal); background: var(--teal-wash); }
.stat-card--amber .stat-card__icon { color: var(--amber); background: var(--amber-wash); }
.stat-card--red .stat-card__icon { color: var(--red); background: var(--red-wash); }
.stat-card--gold .stat-card__icon { color: var(--gold); background: var(--gold-wash); }
.stat-card--graphite .stat-card__icon { color: var(--graphite); background: rgba(75, 78, 83, 0.08); }

.stat-card__value {
  font-size: clamp(27px, 2.1vw, 36px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 17px 0 7px;
  color: var(--ink);
}

.stat-card__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.stat-card__hint {
  margin-top: 4px;
  font-size: 10px;
  color: var(--faint);
  line-height: 1.35;
}

.masked-value {
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--muted);
  font-weight: 600;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 22px;
  gap: 7px;
  min-height: 190px;
}

.empty-state__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--terracotta);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
  margin-bottom: 5px;
}

.empty-state h3 {
  font-size: 15px;
}

.empty-state p {
  max-width: 380px;
  font-size: 12px;
  color: var(--muted);
}

.empty-state__action {
  margin-top: 8px;
}

.score-ring {
  width: var(--score-size, 76px);
  height: var(--score-size, 76px);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  background: conic-gradient(var(--score-color, var(--terracotta)) calc(var(--score, 0) * 1%), rgba(100, 84, 66, 0.1) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 2px 4px 9px rgba(104, 82, 60, 0.08);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9f4eb, #f0e7d9);
  box-shadow: inset 1px 2px 3px rgba(108, 85, 61, 0.08), inset -1px -1px 2px rgba(255, 255, 255, 0.7);
}

.score-ring__value {
  position: relative;
  z-index: 1;
  font-size: calc(var(--score-size, 76px) * 0.27);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.formula-note {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(93, 76, 57, 0.08);
  font-size: 11.5px;
  color: var(--muted);
}

.formula-note__icon {
  color: var(--terracotta);
  flex-shrink: 0;
}

.formula-note p {
  line-height: 1.5;
}

.formula-note strong {
  color: var(--ink-soft);
}

/* ---------- Toasts ---------- */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 13px 13px 14px;
  border-radius: 15px;
  background: rgba(252, 248, 241, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.toast--success .toast__icon { background: var(--green-wash); color: var(--green); }
.toast--danger .toast__icon { background: var(--red-wash); color: var(--red); }
.toast--warning .toast__icon { background: var(--amber-wash); color: var(--amber); }

.toast__copy {
  display: grid;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
  flex: 1;
  padding-top: 2px;
}

.toast__copy strong {
  font-size: 12.5px;
}

.toast__copy span {
  color: var(--muted);
}

.toast__close {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  flex-shrink: 0;
}

.toast__close:hover {
  background: rgba(91, 74, 55, 0.07);
  color: var(--ink);
}

/* ---------- Auth screen ---------- */

.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(460px, 1.05fr) minmax(460px, 0.95fr);
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(22px, 4vw, 54px) clamp(22px, 5vw, 80px);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.auth-orb--one {
  width: 260px;
  height: 260px;
  left: 38%;
  top: 8%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 65%);
  opacity: 0.5;
}

.auth-orb--two {
  width: 160px;
  height: 160px;
  right: 4%;
  bottom: 14%;
  background: radial-gradient(circle at 30% 30%, rgba(188, 139, 109, 0.25), rgba(255, 255, 255, 0) 70%);
}

.auth-story {
  position: relative;
  z-index: 2;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  min-height: min(760px, calc(100dvh - 80px));
  padding: 10px 0;
}

.auth-story__top {
  margin-bottom: clamp(28px, 5vh, 58px);
}

.auth-story__copy h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 500;
  margin-top: 12px;
}

.auth-story__copy h1 em {
  color: var(--terracotta);
  font-style: italic;
}

.auth-story__copy p {
  max-width: 530px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.65;
}

.auth-story__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.auth-story__features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.auth-story__features svg {
  color: var(--terracotta);
}

.auth-story__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: auto;
  padding: 4px;
  border-radius: 19px;
  max-width: 510px;
}

.auth-story__stats > div {
  padding: 13px 16px;
  display: grid;
  gap: 2px;
}

.auth-story__stats > div + div {
  border-left: 1px solid rgba(90, 75, 58, 0.08);
}

.auth-story__stats strong {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.auth-story__stats span {
  font-size: 9.5px;
  color: var(--muted);
}

.auth-story__foot {
  margin-top: 18px;
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.auth-floating-card {
  display: none;
  position: absolute;
  right: -6px;
  bottom: 145px;
  width: 330px;
  padding: 18px;
  border-radius: 21px;
  transform: rotate(-2deg);
  z-index: 3;
  animation: floatCard 8s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-0.5deg) translateY(-9px); }
}

.auth-floating-card__head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
}

.auth-floating-card__head .live-dot {
  margin-left: auto;
}

.mini-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.auth-floating-card strong {
  font-size: 14px;
}

.auth-floating-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.auth-floating-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-floating-card__bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(93, 77, 58, 0.09);
  margin-top: 13px;
  overflow: hidden;
}

.auth-floating-card__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--terracotta-soft), var(--terracotta));
}

.auth-panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.auth-card {
  width: 100%;
  max-width: 540px;
  padding: clamp(24px, 3.4vw, 38px);
  border-radius: 34px;
}

.auth-card__brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.03em;
}

.auth-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  margin-bottom: 26px;
  border-radius: 13px;
  background: rgba(100, 84, 66, 0.07);
  border: 1px solid rgba(90, 74, 56, 0.06);
}

.auth-tab {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  transition: all 0.22s;
}

.auth-tab.is-active {
  color: var(--ink);
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 3px 9px rgba(105, 83, 60, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-heading {
  margin-bottom: 20px;
}

.auth-heading h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.auth-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 2px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(90, 75, 58, 0.11);
}

.auth-legal {
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.auth-card__foot {
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid rgba(90, 75, 58, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--faint);
  font-size: 9.5px;
}

.auth-panel__note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9.5px;
}

.auth-form--register {
  gap: 16px;
}

.auth-form--register .field-grid {
  gap: 12px;
}

/* =========================================================
   Каркас приложения
   ========================================================= */

.app-shell {
  min-height: 100dvh;
  position: relative;
}

.app-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

.sidebar {
  position: fixed;
  z-index: 40;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 20px 15px 15px;
  border-radius: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 91, 66, 0.18) transparent;
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 3px;
}

.sidebar__brand {
  display: block;
}

.sidebar__close {
  display: none;
}

.sidebar__org {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 3px 12px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.48);
}

.org-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--terracotta);
  background: var(--terracotta-wash);
  flex-shrink: 0;
}

.sidebar__org div {
  display: grid;
  min-width: 0;
}

.sidebar__org strong {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__org span:last-child {
  font-size: 9.5px;
  color: var(--muted);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 7px;
}

.nav-caption {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 8px 11px 5px;
}

.nav-caption--spaced {
  margin-top: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 41px;
  padding: 0 11px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  position: relative;
}

.nav-item__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.nav-item.is-active {
  color: var(--terracotta-deep);
  background: linear-gradient(120deg, rgba(255, 252, 246, 0.82), rgba(255, 248, 239, 0.48));
  box-shadow: 2px 4px 10px rgba(111, 86, 59, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-item.is-active .nav-item__icon {
  color: var(--terracotta);
  background: var(--terracotta-wash);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: var(--terracotta);
}

.nav-item__badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--terracotta);
  color: #fff8f4;
  font-size: 9.5px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.sidebar__live {
  margin: auto 2px 0;
  padding: 13px;
  border-radius: 16px;
}

.sidebar__live-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
}

.sidebar__live-head strong {
  font-weight: 650;
}

.sidebar__live p {
  color: var(--muted);
  font-size: 9.5px;
  margin: 5px 0 8px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__bottom {
  display: grid;
  gap: 7px;
  padding: 10px 2px 8px;
}

.install-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: background 0.2s;
}

.install-card:hover {
  background: rgba(255, 255, 255, 0.5);
}

.install-card__icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  flex-shrink: 0;
}

.install-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
}

.install-card strong {
  font-size: 10.5px;
}

.install-card small {
  font-size: 8.5px;
  color: var(--muted);
}

.install-card > svg {
  color: var(--faint);
}

.installed-note,
.demo-note {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9px;
  padding: 2px 7px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 8px 2px;
  border-top: 1px solid rgba(90, 75, 58, 0.08);
}

.sidebar__user-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.sidebar__user-copy strong {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-copy span {
  font-size: 9.5px;
  color: var(--muted);
}

.sidebar__user .icon-btn {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.main-shell {
  margin-left: calc(var(--sidebar-width) + 40px);
  padding: 16px 24px 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 12px 0 20px;
  border-radius: 22px;
  background: rgba(250, 246, 238, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 30px rgba(112, 88, 60, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.topbar__left,
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__menu {
  display: none;
}

.topbar__crumb {
  display: grid;
  gap: 1px;
}

.topbar__crumb span {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
  font-weight: 700;
}

.topbar__crumb strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.topbar__live-inline {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid rgba(90, 75, 58, 0.1);
}

.topbar__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(90, 75, 58, 0.07);
}

.topbar__pill:hover {
  color: var(--terracotta);
  background: rgba(255, 255, 255, 0.5);
}

.topbar__pill-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--green-wash);
  color: var(--green);
  font-size: 9px;
}

.topbar__bell {
  position: relative;
  background: rgba(255, 255, 255, 0.26);
}

.notification-count {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--terracotta);
  color: #fff8f2;
  font-size: 8.5px;
  font-weight: 700;
  border: 2px solid var(--bg-soft);
}

.user-menu-wrap {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 4px;
  border-radius: 12px;
  transition: background 0.2s;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.4);
}

.user-chip__copy {
  display: grid;
  text-align: left;
  gap: 0;
  line-height: 1.2;
}

.user-chip__copy strong {
  font-size: 11.5px;
}

.user-chip__copy small {
  font-size: 9px;
  color: var(--muted);
}

.user-chip > svg {
  color: var(--faint);
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 272px;
  padding: 8px;
  border-radius: 18px;
  z-index: 60;
  box-shadow: var(--shadow-float);
  animation: menuIn 0.18s var(--ease);
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.user-menu__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px 12px;
  border-bottom: 1px solid rgba(90, 75, 58, 0.08);
  margin-bottom: 5px;
}

.user-menu__head div {
  display: grid;
  min-width: 0;
}

.user-menu__head strong {
  font-size: 11.5px;
}

.user-menu__head span {
  font-size: 9.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.user-menu__item:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.user-menu__item--danger {
  color: var(--red);
}

.user-menu__divider {
  height: 1px;
  background: rgba(90, 75, 58, 0.08);
  margin: 5px 0;
}

.page-content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px 4px 42px;
  flex: 1;
}

.app-footer {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 12px 6px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.app-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bottom-nav {
  display: none;
}

.mobile-sheet-layer,
.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(55, 47, 38, 0.2);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mobile-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px;
  animation: sheetIn 0.28s var(--ease);
}

@keyframes sheetIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.mobile-sheet__handle {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(86, 71, 53, 0.16);
  margin: 0 auto 12px;
}

.mobile-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-sheet__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.mobile-sheet__link.is-active {
  color: var(--terracotta);
  background: var(--terracotta-wash);
  border-color: rgba(166, 95, 73, 0.16);
}

.mobile-sheet__link b {
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  border-radius: 99px;
  background: var(--terracotta);
  color: #fff8f2;
  font-size: 9px;
  padding: 1px 5px;
}

.mobile-sheet__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(90, 75, 58, 0.09);
}

.mobile-sheet__foot div {
  display: grid;
  flex: 1;
}

.mobile-sheet__foot strong {
  font-size: 11px;
}

.mobile-sheet__foot span {
  font-size: 9.5px;
  color: var(--muted);
}

.sidebar-scrim {
  display: none;
}

/* Live drawer */

.drawer-layer {
  display: flex;
  justify-content: flex-end;
  z-index: 120;
}

.live-drawer {
  width: min(430px, calc(100vw - 20px));
  height: calc(100dvh - 20px);
  margin: 10px;
  padding: 22px;
  border-radius: 26px;
  overflow-y: auto;
  animation: drawerIn 0.32s var(--ease);
}

@keyframes drawerIn {
  from { transform: translateX(34px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.live-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.live-drawer__head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
}

.live-drawer__pulse {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--green-wash);
  color: var(--green);
  font-size: 10px;
  margin-bottom: 16px;
}

.live-drawer__section {
  margin-bottom: 20px;
}

.live-drawer__section h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 9px;
}

.online-list {
  display: grid;
  gap: 4px;
}

.online-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.24);
}

.online-row__copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.online-row__copy strong {
  font-size: 11px;
}

.online-row__copy span {
  font-size: 9.5px;
  color: var(--muted);
}

.online-row__copy small {
  font-size: 9px;
  color: var(--terracotta);
}

.online-row__time {
  font-size: 8.5px;
  color: var(--faint);
  white-space: nowrap;
}

.live-drawer__activity {
  margin-bottom: 10px;
}

.live-drawer__foot {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(90, 75, 58, 0.08);
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.45;
}

/* ---------- Activity feed ---------- */

.activity-feed {
  display: grid;
  gap: 3px;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(90, 75, 58, 0.07);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row__icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
  flex-shrink: 0;
}

.activity-row--request\\.created .activity-row__icon { background: var(--amber-wash); color: var(--amber); }
.activity-row--return\\.overdue .activity-row__icon { background: var(--red-wash); color: var(--red); }
.activity-row--return\\.accepted .activity-row__icon { background: var(--green-wash); color: var(--green); }
.activity-row--request\\.issued .activity-row__icon { background: var(--terracotta-wash); color: var(--terracotta); }

.activity-row__copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.activity-row__copy p {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.activity-row__copy p strong {
  color: var(--ink);
}

.activity-row__copy > span {
  font-size: 9px;
  color: var(--muted);
}

.activity-row__copy small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8.5px;
}

.activity-type {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(90, 75, 58, 0.06);
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-feed--compact .activity-row {
  padding: 6px 0;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 22px;
  color: var(--faint);
  font-size: 10.5px;
}

/* =========================================================
   Обзор
   ========================================================= */

.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 15px;
  margin-bottom: 18px;
  font-size: 11.5px;
}

.alert-banner--red {
  background: var(--red-wash);
  border: 1px solid rgba(173, 83, 70, 0.15);
  color: var(--red);
}

.alert-banner__icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  flex-shrink: 0;
}

.alert-banner div {
  display: grid;
  flex: 1;
}

.alert-banner strong {
  font-size: 12px;
}

.alert-banner span {
  color: var(--ink-soft);
  font-size: 10px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 24px;
  padding: 36px 36px 34px;
  margin-bottom: 20px;
  min-height: 290px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 84% 16%, rgba(214, 160, 141, 0.32), transparent 34%),
    radial-gradient(circle at 65% 100%, rgba(125, 146, 121, 0.15), transparent 36%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.78), rgba(247, 237, 224, 0.5));
}

.hero-card__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(38px);
  pointer-events: none;
}

.hero-card__blob--one {
  width: 220px;
  height: 220px;
  right: 4%;
  top: -60px;
  background: rgba(216, 160, 138, 0.34);
}

.hero-card__blob--two {
  width: 180px;
  height: 180px;
  right: 33%;
  bottom: -80px;
  background: rgba(150, 169, 143, 0.18);
}

.hero-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-card h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-card h1 em {
  color: var(--terracotta);
  font-style: italic;
}

.hero-card__headline {
  margin-top: 14px;
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 520px;
}

.hero-card__content p {
  margin-top: 9px;
  max-width: 560px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.hero-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-card__aside {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.hero-orbit {
  position: absolute;
  right: 0;
  top: 50%;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(22%, -50%);
  pointer-events: none;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  border: 1px dashed rgba(166, 95, 73, 0.16);
}

.hero-orbit span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}

.hero-orbit span:first-child {
  top: 12px;
  left: 56px;
}

.hero-orbit span:last-child {
  bottom: 36px;
  right: 16px;
  background: var(--sage);
}

.hero-mini {
  width: min(100%, 270px);
  padding: 17px;
  border-radius: 19px;
  background: rgba(255, 253, 248, 0.52);
  transform: rotate(1deg);
}

.hero-mini__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
}

.hero-mini strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.hero-mini__meta {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  margin-top: 3px;
}

.hero-mini__badge {
  margin-top: 10px;
}

.hero-signature {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 9.5px;
  margin: -8px 0 17px 4px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(280px, 0.68fr);
  gap: 16px;
}

.focus-panel,
.live-panel,
.leaderboard-card,
.quick-panel {
  padding: 22px;
}

.focus-list {
  display: grid;
  gap: 5px;
}

.focus-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  text-align: left;
  transition: background 0.2s, transform 0.2s;
}

.focus-row:hover {
  background: rgba(255, 255, 255, 0.43);
  transform: translateX(2px);
}

.focus-row__art {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--group-color) 14%, transparent);
  color: var(--group-color);
  flex-shrink: 0;
}

.focus-row__copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.focus-row__copy strong {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.focus-row__copy span {
  font-size: 9.5px;
  color: var(--muted);
}

.focus-row__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.focus-row__side small {
  font-size: 8px;
  color: var(--faint);
}

.focus-row > .icon {
  color: var(--faint);
}

.live-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.live-panel__head h2 {
  font-size: 17px;
  margin-top: 3px;
}

.online-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.online-strip__person {
  display: inline-flex;
}

.online-strip .avatar {
  border: 2px solid rgba(249, 244, 235, 0.9);
  margin-left: -6px;
}

.online-strip .avatar:first-child {
  margin-left: 0;
}

.online-strip__more {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.42);
  border: 2px solid rgba(249, 244, 235, 0.9);
  font-size: 8.5px;
  color: var(--muted);
  margin-left: -6px;
}

.live-private {
  display: flex;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
}

.live-private svg {
  flex-shrink: 0;
  color: var(--terracotta);
}

.live-panel__foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--faint);
  font-size: 8.5px;
}

.podium--compact {
  display: grid;
  gap: 4px;
}

.podium-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
}

.podium-row.is-me {
  background: var(--terracotta-wash);
}

.podium-row__place {
  width: 18px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--faint);
  text-align: center;
}

.podium-row:nth-child(1) .podium-row__place { color: var(--gold); }

.podium-row__copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.podium-row__copy strong {
  font-size: 10.5px;
}

.podium-row__copy span {
  font-size: 8.5px;
  color: var(--muted);
}

.podium-row__score .score-ring__value {
  font-size: 12px;
}

.star-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(179, 138, 79, 0.14), rgba(255, 255, 255, 0.28));
  border: 1px solid rgba(179, 138, 79, 0.15);
}

.star-banner__icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--gold);
}

.star-banner div {
  display: grid;
  flex: 1;
  gap: 0;
}

.star-banner div span {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.star-banner div strong {
  font-size: 10.5px;
}

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

.quick-tile {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.42);
  text-align: left;
  display: grid;
  gap: 2px;
  transition: all 0.2s var(--ease);
}

.quick-tile:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 2px 5px 12px rgba(108, 84, 58, 0.08);
}

.quick-tile > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--terracotta);
  background: var(--terracotta-wash);
  margin-bottom: 4px;
}

.quick-tile strong {
  font-size: 10.5px;
}

.quick-tile small {
  font-size: 8.5px;
  color: var(--muted);
  line-height: 1.35;
}

.quick-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--faint);
  font-size: 8.5px;
}

.mobile-only {
  display: none;
}

/* =========================================================
   Каталог
   ========================================================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 18px;
  margin-bottom: 15px;
}

.catalog-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 19px;
}

.catalog-toolbar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.catalog-toolbar__meta strong {
  color: var(--ink);
}

.role-filter-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--sage-wash);
  color: var(--sage-deep);
  font-size: 10.5px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.catalog-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.72), rgba(247, 240, 229, 0.45));
  box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 11px 16px 32px rgba(113, 89, 62, 0.15), -7px -7px 16px rgba(255, 255, 255, 0.7), var(--shadow-inset);
}

.catalog-card.is-hidden {
  opacity: 0.8;
  filter: saturate(0.72);
}

.catalog-card.is-unavailable {
  opacity: 0.86;
}

.catalog-card__art {
  height: 148px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 20%, color-mix(in srgb, var(--group-color) 24%, transparent), transparent 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--group-color) 18%, #f8f1e6), rgba(245, 236, 224, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.catalog-card__art::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  right: -38px;
  top: -48px;
}

.catalog-card__art::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 26px;
  border: 1px dashed color-mix(in srgb, var(--group-color) 22%, transparent);
  left: -34px;
  bottom: -40px;
  transform: rotate(16deg);
}

.catalog-card__glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(20px);
}

.catalog-card__icon {
  position: relative;
  z-index: 1;
  color: var(--group-color);
  filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--group-color) 24%, transparent));
  transition: transform 0.4s var(--ease-spring);
}

.catalog-card:hover .catalog-card__icon {
  transform: scale(1.07) rotate(-2deg);
}

.catalog-card__badges {
  position: absolute;
  top: 11px;
  left: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 2;
}

.catalog-card__inventory {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  z-index: 2;
  opacity: 0.8;
}

.catalog-card__body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.catalog-card__group {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 700;
}

.catalog-card h3 {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.3;
}

.catalog-card__specs {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 28px;
}

.catalog-card__warehouse {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--graphite-soft);
  font-size: 9px;
  line-height: 1.25;
}

.catalog-card__warehouse svg {
  flex: none;
  color: var(--terracotta);
}

.catalog-card__warehouse span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-card__barcode {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
}

.catalog-card__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0;
  padding-top: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.catalog-card__status small {
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.availability i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}

.availability.is-in {
  color: var(--green);
}

.availability.is-in i {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 140, 108, 0.12);
}

.availability.is-out {
  color: var(--red);
}

.availability.is-out i {
  background: var(--red);
}

.catalog-card__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
}

.catalog-card__actions .btn--primary {
  flex: 1;
}

.catalog-card__actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.catalog-footnote,
.requests-footnote,
.admin-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--faint);
  font-size: 9.5px;
  margin-top: 18px;
  line-height: 1.5;
}

.admin-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* =========================================================
   Личный кабинет
   ========================================================= */

.profile-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: 26px;
}

.profile-band__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-band__identity h2 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.profile-band__identity p {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-band__meta {
  display: flex;
  gap: 18px;
}

.profile-band__meta div {
  display: grid;
  gap: 2px;
}

.profile-band__meta span {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.profile-band__meta strong {
  font-size: 10.5px;
}

.online-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-band__rating {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-band__rating div {
  display: grid;
  gap: 1px;
}

.profile-band__rating span {
  font-size: 8.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-band__rating strong {
  font-size: 10.5px;
}

.profile-band__rating small {
  font-size: 9px;
  color: var(--muted);
}

.profile-band__deadline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--terracotta);
}

.profile-band__deadline div {
  display: grid;
  flex: 1;
}

.profile-band__deadline span {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.profile-band__deadline strong {
  font-size: 11px;
  color: var(--ink);
}

.cabinet-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 20px;
}

.cabinet-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: left;
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}

.cabinet-tab:hover {
  transform: translateY(-2px);
}

.cabinet-tab.is-active {
  border-color: rgba(166, 95, 73, 0.28);
  background: linear-gradient(140deg, rgba(255, 250, 242, 0.9), rgba(246, 232, 219, 0.55));
  box-shadow: 0 10px 24px rgba(122, 87, 59, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cabinet-tab__icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
  flex-shrink: 0;
}

.cabinet-tab__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.cabinet-tab__copy strong {
  font-size: 11.5px;
}

.cabinet-tab__copy small {
  font-size: 9px;
  color: var(--muted);
}

.cabinet-tab__mark {
  margin-left: auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff8f4;
}

.cabinet-content__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding: 0 3px;
}

.cabinet-content__head p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

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

.holding-card {
  display: flex;
  overflow: hidden;
  border-radius: 20px;
  min-height: 185px;
}

.holding-card.is-overdue {
  border-color: rgba(173, 83, 70, 0.28);
  box-shadow: 0 0 0 1px rgba(173, 83, 70, 0.08), var(--shadow-outer-sm);
}

.holding-card__art {
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--group-color) 26%, transparent), transparent 55%),
    color-mix(in srgb, var(--group-color) 9%, #f8f1e6);
  color: var(--group-color);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}

.holding-card__category {
  transform: scale(0.86);
}

.holding-card__body {
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.holding-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.holding-card__group {
  font-size: 8.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.holding-card h3 {
  font-size: 14px;
  margin-top: 2px;
}

.holding-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.holding-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.holding-card__due {
  margin-top: 9px;
}

.due-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  color: var(--ink-soft);
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.28);
}

.due-line > span:nth-child(2) {
  flex: 1;
}

.due-line--overdue {
  color: var(--red);
  background: var(--red-wash);
}

.due-line--urgent,
.due-line--soon {
  color: var(--orange);
  background: var(--orange-wash);
}

.due-line--none {
  color: var(--sage-deep);
  background: var(--sage-wash);
}

.holding-card__note {
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.holding-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
}

.holding-card__foot .btn {
  margin-left: auto;
}

.waiting-label,
.permanent-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--orange);
  margin-left: auto;
}

.permanent-label {
  color: var(--sage-deep);
}

.cabinet-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* =========================================================
   Заявки
   ========================================================= */

.queue-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.queue-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.27);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.queue-strip__item > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
}

.queue-strip__item div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.queue-strip__item strong {
  font-size: 17px;
  letter-spacing: -0.04em;
}

.queue-strip__item small {
  font-size: 9.5px;
  color: var(--muted);
}

.queue-strip__item.is-alert {
  background: var(--red-wash);
  border-color: rgba(173, 83, 70, 0.13);
}

.queue-strip__item.is-alert > span {
  color: var(--red);
}

.requests-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  margin-bottom: 17px;
}

.requests-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

.request-card {
  display: flex;
  overflow: hidden;
  border-radius: 20px;
}

.request-card.is-overdue {
  border-color: rgba(173, 83, 70, 0.25);
}

.request-card__rail {
  width: 78px;
  flex-shrink: 0;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.42);
}

.request-card__rail .badge {
  font-size: 8px;
  min-height: 20px;
  padding: 1px 7px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.request-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--group-color) 13%, transparent);
  color: var(--group-color);
}

.request-card__line {
  width: 1px;
  flex: 1;
  min-height: 16px;
  background: linear-gradient(rgba(90, 75, 58, 0.12), transparent);
}

.request-card__body {
  flex: 1;
  min-width: 0;
  padding: 15px 16px;
}

.request-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.request-card__number {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.request-card__mobile-status {
  display: none;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.request-card__title h3 {
  font-size: 15px;
  margin-top: 2px;
}

.request-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.meta-person {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px 1px 1px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.request-card__timing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  text-align: right;
}

.timing-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.request-card__timing strong {
  font-size: 10.5px;
}

.request-card__note {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  line-height: 1.45;
}

.request-card__reject {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--red-wash);
  color: var(--red);
  font-size: 10px;
}

.request-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.request-card__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--faint);
  font-size: 8.5px;
}

.request-card__dates span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.request-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

/* ---------- Readonly / role notes ---------- */

.readonly-note,
.inline-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(125, 146, 121, 0.11);
  border: 1px solid rgba(125, 146, 121, 0.13);
  color: var(--sage-deep);
  font-size: 9.5px;
  line-height: 1.5;
  margin-top: 10px;
}

.inline-hint {
  margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.27);
  border-color: rgba(90, 75, 58, 0.08);
  color: var(--muted);
}

.page-error {
  max-width: 520px;
  margin: 40px auto;
  padding: 34px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

/* ---------- Page-specific error / banners ---------- */

.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 11px;
}

.status-banner--neutral {
  background: rgba(75, 78, 83, 0.08);
  border: 1px solid rgba(75, 78, 83, 0.09);
  color: var(--graphite);
}

.status-banner div {
  display: grid;
  gap: 2px;
}

.status-banner span {
  color: var(--muted);
  font-size: 10px;
}

/* =========================================================
   Рейтинг
   ========================================================= */

.rating-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 210px minmax(170px, 0.55fr);
  gap: 20px;
  align-items: center;
  padding: 34px;
  margin-bottom: 18px;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 30%, rgba(179, 138, 79, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.8), rgba(247, 237, 223, 0.5));
}

.rating-hero__glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  right: 10%;
  top: -100px;
  background: radial-gradient(circle, rgba(212, 168, 117, 0.25), transparent 68%);
  filter: blur(28px);
}

.rating-hero__copy {
  position: relative;
  z-index: 2;
}

.rating-hero__copy h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.1vw, 45px);
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.rating-hero__copy p {
  max-width: 520px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.rating-hero__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
}

.star-medal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9px;
  background: var(--gold-wash);
  color: #8b6833;
  font-size: 10px;
  font-weight: 700;
}

.rating-hero__star {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--gold);
  height: 180px;
}

.star-big {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 12px 24px rgba(179, 138, 79, 0.3));
  animation: starFloat 7s ease-in-out infinite;
}

.star-big svg {
  fill: rgba(179, 138, 79, 0.18);
}

.star-halo {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(179, 138, 79, 0.16);
}

.star-halo::before,
.star-halo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(179, 138, 79, 0.14);
}

.star-halo::before { inset: 16px; }
.star-halo::after { inset: 35px; }

@keyframes starFloat {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-8px); }
}

.rating-hero__me {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.rating-hero__me > span {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.rating-hero__me .score-ring {
  margin: 4px 0;
}

.rating-hero__me strong {
  font-size: 10px;
}

.rating-hero__me small {
  font-size: 8.5px;
  color: var(--muted);
}

.rating-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

.podium-full {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  padding: 8px 3px 3px;
  min-height: 260px;
}

.podium-place {
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.43);
  position: relative;
}

.podium-place--1 {
  padding-top: 22px;
  padding-bottom: 20px;
  background: linear-gradient(160deg, rgba(255, 252, 245, 0.65), rgba(238, 224, 203, 0.46));
  border-color: rgba(179, 138, 79, 0.2);
  box-shadow: 0 10px 25px rgba(130, 98, 58, 0.1);
}

.podium-place--2 {
  margin-bottom: 20px;
}

.podium-place--3 {
  margin-bottom: 33px;
}

.podium-place.is-me {
  outline: 1px solid rgba(166, 95, 73, 0.2);
}

.podium-place__rank {
  position: absolute;
  top: 8px;
  left: 9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.podium-place--1 .podium-place__rank {
  color: var(--gold);
  background: var(--gold-wash);
}

.podium-place__avatar {
  margin-bottom: 8px;
}

.podium-place strong {
  font-size: 11.5px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-place > span {
  font-size: 8.5px;
  color: var(--muted);
}

.podium-place__score {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.2;
  margin-top: 6px;
  color: var(--terracotta);
}

.podium-place small {
  font-size: 8px;
  color: var(--faint);
}

.podium-place__crown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--gold-wash);
  color: #8e6b35;
  font-size: 8px;
  font-weight: 650;
}

.formula-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.formula-visual div {
  padding: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.27);
  display: grid;
  grid-template-columns: 23px 1fr;
  grid-template-rows: auto auto;
  column-gap: 6px;
}

.formula-visual div > span {
  grid-row: 1 / 3;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
}

.formula-visual div:nth-child(3) > span,
.formula-visual div:nth-child(4) > span {
  color: var(--red);
}

.formula-visual strong {
  font-size: 14px;
  letter-spacing: -0.03em;
}

.formula-visual small {
  font-size: 8.5px;
  color: var(--muted);
}

.formula-text {
  margin-top: 11px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.5;
}

.formula-base {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--gold);
  font-size: 9.5px;
  line-height: 1.45;
}

.formula-base span {
  color: var(--ink-soft);
}

.leaderboard-table-card {
  margin-bottom: 16px;
}

.leaderboard-list {
  display: grid;
  gap: 3px;
}

.leaderboard-entry {
  display: grid;
  grid-template-columns: 26px 40px minmax(180px, 1.3fr) 72px 62px 78px 68px 56px;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 11px;
  transition: background 0.2s;
}

.leaderboard-entry:hover {
  background: rgba(255, 255, 255, 0.3);
}

.leaderboard-entry.is-me {
  background: var(--terracotta-wash);
}

.leaderboard-entry__rank {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--faint);
  text-align: center;
}

.leaderboard-entry__rank.is-top {
  color: var(--gold);
}

.leaderboard-entry__person {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.leaderboard-entry__person strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-entry__person span {
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-entry__stars {
  font-size: 9px;
}

.leaderboard-entry__metric {
  display: grid;
  gap: 0;
}

.leaderboard-entry__metric span {
  font-size: 8px;
  color: var(--faint);
}

.leaderboard-entry__metric strong {
  font-size: 10px;
}

.leaderboard-entry__metric.is-bad strong {
  color: var(--red);
}

.leaderboard-entry__score {
  justify-self: end;
}

.leaderboard-entry__score .score-ring__value {
  font-size: 14px;
}

.rating-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.star-history {
  display: grid;
  gap: 3px;
}

.star-history__row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.23);
}

.star-history__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold-wash);
  color: var(--gold);
}

.star-history__row div {
  display: grid;
  flex: 1;
  gap: 0;
}

.star-history__row strong {
  font-size: 10px;
}

.star-history__row span {
  font-size: 9px;
  color: var(--muted);
}

.star-history__score {
  font-size: 15px;
  font-weight: 650;
  color: var(--gold);
}

.reward-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.reward-steps li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.reward-steps li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.reward-steps li div {
  display: grid;
  gap: 1px;
}

.reward-steps strong {
  font-size: 10.5px;
}

.reward-steps p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

/* =========================================================
   Сотрудники и структура
   ========================================================= */

.people-tabs,
.settings-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 15px;
  margin-bottom: 17px;
  overflow-x: auto;
}

.people-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 37px;
  padding: 0 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: all 0.2s;
}

.people-tab:hover {
  color: var(--ink-soft);
}

.people-tab.is-active {
  color: var(--ink);
  background: rgba(255, 252, 246, 0.88);
  box-shadow: 0 3px 9px rgba(105, 83, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.people-content {
  animation: pageIn 0.3s var(--ease);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.people-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.people-toolbar__meta {
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}

.people-toolbar__meta strong {
  color: var(--ink);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.person-card {
  border-radius: 19px;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.person-card:hover {
  transform: translateY(-3px);
  box-shadow: 10px 14px 30px rgba(113, 89, 62, 0.14), -7px -7px 16px rgba(255, 255, 255, 0.7), var(--shadow-inset);
}

.person-card.is-inactive {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.person-card__link {
  display: block;
  padding: 16px;
}

.person-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-card__identity {
  min-width: 0;
  flex: 1;
}

.person-card__identity h3 {
  font-size: 13.5px;
}

.person-card__identity span {
  font-size: 9.5px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-card__arrow {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--muted);
}

.person-card__meta {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

.person-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.person-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  min-height: 22px;
}

.person-card__tags .badge {
  font-size: 8.5px;
  min-height: 20px;
  padding: 1px 7px;
}

.person-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.person-card__stats div {
  display: grid;
  gap: 1px;
}

.person-card__stats span {
  font-size: 8px;
  color: var(--faint);
}

.person-card__stats strong {
  font-size: 11px;
}

.departments-panel,
.positions-panel {
  animation: pageIn 0.3s var(--ease);
}

.section-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-toolbar h2 {
  font-size: 17px;
}

.section-toolbar p {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 3px;
  max-width: 600px;
}

.org-tree {
  display: grid;
  gap: 9px;
}

.org-node__card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 15px;
}

.org-node__children-list {
  margin-top: 7px;
  margin-left: 28px;
  padding-left: 14px;
  border-left: 1px dashed rgba(166, 95, 73, 0.2);
  display: grid;
  gap: 7px;
}

.org-node__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  flex-shrink: 0;
}

.org-node__copy {
  display: grid;
  flex: 1;
  gap: 1px;
}

.org-node__copy strong {
  font-size: 12px;
}

.org-node__copy span,
.org-node__copy small {
  font-size: 9.5px;
  color: var(--muted);
}

.org-node__children {
  font-size: 9px;
  color: var(--faint);
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.3);
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.position-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
}

.position-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--sage-wash);
  color: var(--sage-deep);
  flex-shrink: 0;
}

.position-card div {
  display: grid;
  gap: 1px;
}

.position-card strong {
  font-size: 11px;
}

.position-card span {
  font-size: 9px;
  color: var(--muted);
}

/* Employee card */

.employee-page .back-link {
  margin-bottom: 13px;
}

.employee-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr) auto;
  gap: 20px;
  align-items: center;
  padding: 25px;
  border-radius: 25px;
  margin-bottom: 16px;
}

.employee-hero__main {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.employee-hero__identity h1 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.employee-hero__identity p {
  font-size: 11px;
  color: var(--muted);
}

.employee-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.employee-hero__contacts {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
}

.employee-hero__contacts span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.employee-hero__contacts a:hover {
  color: var(--terracotta);
}

.employee-hero__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.employee-hero__score > span {
  font-size: 8.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.employee-hero__score small {
  font-size: 8px;
  color: var(--muted);
  text-align: center;
}

.employee-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.5fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.employee-main-column {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
}

.employee-side {
  display: grid;
  align-content: start;
  gap: 13px;
}

.employee-equipment {
  padding: 22px;
}

.employee-history {
  padding: 20px 22px;
}

.employee-history-list {
  display: grid;
  gap: 3px;
}

.employee-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.2);
}

.employee-history-row__icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
  color: var(--group-color);
  flex-shrink: 0;
}

.employee-history-row__copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 0;
}

.employee-history-row__copy strong {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-history-row__copy span {
  font-size: 8px;
  color: var(--muted);
}

.employee-history-row .badge {
  font-size: 8px;
  min-height: 19px;
}

.dismissal-progress {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.27);
}

.dismissal-progress__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 9.5px;
  color: var(--muted);
}

.dismissal-progress__copy strong {
  color: var(--ink);
  font-size: 10.5px;
}

.dismissal-progress__bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(97, 81, 63, 0.09);
  overflow: hidden;
}

.dismissal-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--green));
  transition: width 0.35s var(--ease);
}

.employee-equipment-list {
  display: grid;
  gap: 5px;
}

.employee-equipment-row {
  display: grid;
  grid-template-columns: 25px 34px minmax(0, 1fr) auto 58px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.employee-equipment-row.is-checked {
  background: var(--sage-wash);
  border-color: rgba(125, 146, 121, 0.14);
}

.employee-equipment-row__check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--sage-deep);
}

.employee-equipment-row__check input {
  width: 18px;
  height: 18px;
  accent-color: var(--sage);
  cursor: pointer;
}

.employee-equipment-row__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--group-color);
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
}

.employee-equipment-row__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.employee-equipment-row__copy strong {
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-equipment-row__copy span {
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-equipment-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
}

.employee-equipment-row__meta .badge {
  font-size: 8px;
  min-height: 19px;
  padding: 1px 6px;
}

.employee-equipment-row__qty {
  font-size: 8.5px;
  color: var(--muted);
  text-align: right;
}

.role-checkboxes {
  display: grid;
  gap: 5px;
    margin-bottom: 10px;
}

.role-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid rgba(90, 75, 58, 0.09);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: all 0.2s;
}

.role-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-check.is-checked {
  border-color: rgba(166, 95, 73, 0.24);
  background: var(--terracotta-wash);
}

.role-check.is-disabled {
  cursor: default;
  opacity: 0.7;
}

.role-check:has(input:focus-visible),
.group-check:has(input:focus-visible) {
  box-shadow: var(--ring);
}

.role-check__mark {
  pointer-events: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1px solid rgba(90, 75, 58, 0.2);
  background: rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
}

.role-check.is-checked .role-check__mark {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff8f4;
}

.role-check__copy {
  display: grid;
  gap: 1px;
}

.role-check__copy strong {
  font-size: 10.5px;
}

.role-check__copy small {
  font-size: 8.5px;
  color: var(--muted);
  line-height: 1.35;
}

.role-groups-preview {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.role-groups-preview > span {
  font-size: 8.5px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.role-groups-preview > div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.2s;
}

.action-row:hover {
  background: rgba(255, 255, 255, 0.35);
}

.action-row > span:first-child {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
  flex-shrink: 0;
}

.action-row div {
  display: grid;
  flex: 1;
  gap: 1px;
}

.action-row strong {
  font-size: 10.5px;
}

.action-row small {
  font-size: 8.5px;
  color: var(--muted);
}

.action-row > svg {
  color: var(--faint);
}

.action-row--danger > span:first-child {
  color: var(--red);
  background: var(--red-wash);
}

.dismissal-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-color: rgba(173, 83, 70, 0.14);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.dismissal-panel.is-flashing {
  box-shadow: 0 0 0 3px rgba(173, 83, 70, 0.16), var(--shadow-outer-sm);
  border-color: rgba(173, 83, 70, 0.32);
}

.dismissal-panel__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--red-wash);
  color: var(--red);
}

.dismissal-panel__copy {
  flex: 1;
}

.dismissal-panel__copy h2 {
  font-size: 16px;
}

.dismissal-panel__copy p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
  max-width: 680px;
  line-height: 1.5;
}

.dismissal-panel__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 7px;
  font-size: 8.5px;
  color: var(--faint);
}

.dismissal-panel__checks span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dismissal-panel__checks .is-done {
  color: var(--green);
}

/* =========================================================
   Номенклатура
   ========================================================= */

.item-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.items-filter {
  margin-bottom: 15px;
}

.items-filter .search-box {
  flex: 1 1 300px;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  text-align: left;
  padding: 12px 13px;
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  border-bottom: 1px solid rgba(90, 75, 58, 0.09);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.17);
}

.data-table td {
  padding: 10px 13px;
  border-bottom: 1px solid rgba(90, 75, 58, 0.06);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.18s;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.27);
}

.data-table .num {
  text-align: right;
  white-space: nowrap;
}

.data-table .actions-col {
  text-align: right;
}

.data-table tr.is-hidden-row {
  opacity: 0.62;
}

.table-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
}

.table-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--group-color);
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
  flex-shrink: 0;
}

.table-item div {
  display: grid;
  gap: 1px;
}

.table-item strong {
  font-size: 10.5px;
}

.table-item span {
  font-size: 8.5px;
  color: var(--muted);
}

.table-actions {
  display: inline-flex;
  gap: 3px;
  justify-content: flex-end;
}

.table-actions .icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}

.data-table--compact th,
.data-table--compact td {
  padding: 8px 10px;
  font-size: 10px;
}

.data-table--compact td strong {
  font-size: 10.5px;
}

.store-key {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--faint);
}

/* =========================================================
   Роли
   ========================================================= */

.roles-intro {
  display: flex;
  gap: 13px;
  padding: 17px 19px;
  margin-bottom: 16px;
  border-radius: 18px;
}

.roles-intro__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--terracotta);
  background: var(--terracotta-wash);
  flex-shrink: 0;
}

.roles-intro strong {
  font-size: 12.5px;
}

.roles-intro p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
  line-height: 1.5;
}

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

.role-card {
  padding: 19px;
  border-radius: 21px;
}

.role-card--admin {
  border-color: rgba(166, 95, 73, 0.2);
  background: linear-gradient(145deg, rgba(255, 250, 242, 0.76), rgba(246, 231, 216, 0.44));
}

.role-card__head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.role-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--terracotta);
  flex-shrink: 0;
}

.role-card__head div {
  flex: 1;
  min-width: 0;
}

.role-card__head h2 {
  font-size: 14px;
}

.role-card__system {
  font-size: 8px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role-card__description {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  min-height: 43px;
}

.role-card__permissions {
  display: grid;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.permission-area {
  display: grid;
  gap: 3px;
}

.permission-area > span {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  font-weight: 700;
}

.permission-area > div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.33);
  border: 1px solid rgba(90, 75, 58, 0.06);
  font-size: 8px;
  color: var(--ink-soft);
}

.permission-chip svg {
  color: var(--sage);
}

.role-card__groups {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.role-card__groups-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.role-card__groups-head > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 650;
}

.role-card__groups-head small {
  font-size: 8px;
  color: var(--faint);
}

.group-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.group-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  background: rgba(255, 255, 255, 0.2);
  font-size: 8.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.group-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.group-check__dot {
  pointer-events: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--group-color, var(--faint));
}

.group-check.is-checked {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(166, 95, 73, 0.18);
  color: var(--ink-soft);
}

.group-check > svg {
  display: none;
  color: var(--terracotta);
}

.group-check.is-checked > svg {
  display: block;
}

.group-check.is-disabled {
  cursor: default;
  opacity: 0.65;
}

.role-card__admin-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  color: var(--faint);
}

.role-card__users {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.role-card__users > span {
  font-size: 8px;
  color: var(--faint);
}

/* =========================================================
   Настройки
   ========================================================= */

.settings-content {
  display: grid;
  gap: 15px;
  animation: pageIn 0.3s var(--ease);
}

.settings-card {
  padding: 22px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-toggles {
  display: grid;
  gap: 7px;
}

.settings-info-card {
  padding: 22px;
}

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

.info-list > div {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--terracotta);
}

.info-list > div span {
  display: grid;
  gap: 1px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.info-list > div strong {
  color: var(--ink);
  font-size: 10.5px;
}

.channel-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.27);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.channel-card__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.channel-card div {
  display: grid;
  flex: 1;
  gap: 0;
}

.channel-card strong {
  font-size: 10.5px;
}

.channel-card span {
  font-size: 8.5px;
  color: var(--muted);
}

.integration-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 11px;
}

.integration-flow span {
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(90, 75, 58, 0.07);
  font-size: 9px;
  font-weight: 600;
}

.integration-flow svg {
  color: var(--faint);
}

.settings-info-card p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.backup-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.27);
  border: 1px solid rgba(255, 255, 255, 0.42);
  margin-bottom: 12px;
}

.backup-hero.is-stale {
  background: var(--amber-wash);
  border-color: rgba(179, 132, 81, 0.16);
}

.backup-hero__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
}

.backup-hero div {
  flex: 1;
}

.backup-hero strong {
  font-size: 11px;
}

.backup-hero p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px dashed rgba(90, 75, 58, 0.2);
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  color: var(--terracotta);
  transition: background 0.2s;
}

.file-upload:hover {
  background: rgba(255, 255, 255, 0.4);
}

.file-upload input {
  display: none;
}

.file-upload span {
  display: grid;
  gap: 0;
}

.file-upload strong {
  font-size: 10px;
  color: var(--ink-soft);
}

.file-upload small {
  font-size: 8px;
  color: var(--muted);
}

.backup-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 8.5px;
}

.data-table-wrap {
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid rgba(90, 75, 58, 0.07);
}

.audit-list {
  display: grid;
  gap: 3px;
}

.audit-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px;
  border-radius: 9px;
}

.audit-row:hover {
  background: rgba(255, 255, 255, 0.25);
}

.audit-row__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
  color: var(--terracotta);
  flex-shrink: 0;
}

.audit-row__copy {
  flex: 1;
  display: grid;
  gap: 0;
  min-width: 0;
}

.audit-row__copy strong {
  font-size: 9.5px;
}

.audit-row__copy span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
}

.audit-row__action {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.29);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.audit-row time {
  font-size: 8px;
  color: var(--faint);
  white-space: nowrap;
}

.danger-zone {
  padding: 20px;
  border-color: rgba(173, 83, 70, 0.13);
}

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
}

.danger-row:first-of-type {
  border-top: 0;
}

.danger-row strong {
  font-size: 10.5px;
}

.danger-row p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
  max-width: 520px;
}

/* =========================================================
   Уведомления
   ========================================================= */

.notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 15px;
  margin-bottom: 15px;
}

.notifications-toolbar__channels {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.notifications-toolbar__channels span {
  color: var(--faint);
}

.notifications-list {
  display: grid;
  gap: 8px;
}

.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border-radius: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.notification-card.is-unread {
  border-color: rgba(166, 95, 73, 0.2);
  background: linear-gradient(135deg, rgba(255, 252, 245, 0.83), rgba(249, 236, 223, 0.55));
}

.notification-card__icon {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.notification-card__icon--amber { background: var(--amber-wash); color: var(--amber); }
.notification-card__icon--teal { background: var(--teal-wash); color: var(--teal); }
.notification-card__icon--red { background: var(--red-wash); color: var(--red); }
.notification-card__icon--green { background: var(--green-wash); color: var(--green); }
.notification-card__icon--orange { background: var(--orange-wash); color: var(--orange); }
.notification-card__icon--gold { background: var(--gold-wash); color: var(--gold); }
.notification-card__icon--sage { background: var(--sage-wash); color: var(--sage-deep); }
.notification-card__icon--neutral { background: rgba(90, 80, 68, 0.08); color: var(--muted); }

.notification-card__body {
  flex: 1;
  min-width: 0;
}

.notification-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-card h3 {
  font-size: 12px;
}

.notification-card p {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 3px;
}

.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

.notification-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px;
  margin-top: 7px;
  color: var(--faint);
  font-size: 8.5px;
}

.channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--muted);
  font-size: 7.5px;
}

.channel-chip.is-error {
  color: var(--red);
  background: var(--red-wash);
}

.notification-card__actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.notifications-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.23);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  margin-top: 14px;
}

/* ---------- Misc ---------- */

.reject-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.28);
  margin-bottom: 13px;
}

.reject-summary > span:first-child {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.reject-summary div {
  display: grid;
  gap: 0;
}

.reject-summary strong {
  font-size: 10.5px;
}

.reject-summary span {
  font-size: 8.5px;
  color: var(--muted);
}

.confirm-copy {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.confirm-details {
  margin-top: 12px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.confirm-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
}

.confirm-kv span {
  color: var(--muted);
}

.confirm-kv strong {
  color: var(--ink);
  text-align: right;
}

.confirm-list {
  display: grid;
  gap: 4px;
}

.confirm-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.confirm-list span {
  color: var(--ink-soft);
}

.confirm-list strong {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted);
}

.reject-list {
  border: 0;
  padding: 0;
  margin: 0 0 13px;
  display: grid;
  gap: 5px;
}

.reject-list legend {
  font-size: 11px;
  font-weight: 650;
  padding: 0;
  margin-bottom: 7px;
}

.reject-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(90, 75, 58, 0.08);
  font-size: 9.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

.reject-option input {
  position: absolute;
  opacity: 0;
}

.reject-option__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(90, 75, 58, 0.2);
  background: rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
}

.reject-option:has(input:checked) {
  border-color: rgba(173, 83, 70, 0.25);
  background: var(--red-wash);
}

.reject-option:has(input:checked) .reject-option__radio {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.request-no-due {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border-radius: 10px;
  background: var(--sage-wash);
  color: var(--sage-deep);
}

.request-no-due div {
  display: grid;
  gap: 1px;
}

.request-no-due strong {
  font-size: 10.5px;
  color: var(--ink-soft);
}

.request-no-due span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
}

.request-item-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.47);
  margin-bottom: 13px;
}

.request-item-summary__icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
  color: var(--group-color);
  flex-shrink: 0;
}

.request-item-summary div {
  display: grid;
  min-width: 0;
  gap: 0;
}

.request-item-summary > div:nth-child(2) span {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.request-item-summary strong {
  font-size: 11.5px;
}

.request-item-summary small {
  font-size: 8.5px;
  color: var(--muted);
}

.request-item-summary__availability {
  text-align: right;
  align-items: end;
  flex-shrink: 0;
}

.request-item-summary__availability strong {
  font-size: 14px;
  color: var(--green);
}

.request-item-summary__availability span {
  font-size: 8px;
  color: var(--muted);
}

/* Placeholder for dynamic content */
.item-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}

.item-detail__art {
  min-height: 220px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--group-color) 25%, transparent), transparent 58%),
    color-mix(in srgb, var(--group-color) 9%, #f7f0e5);
  color: var(--group-color);
  position: relative;
  overflow: hidden;
}

.item-detail__halo {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.item-detail__badges {
  position: absolute;
  top: 11px;
  left: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.item-detail__info {
  min-width: 0;
}

.item-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-detail__head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  margin-top: 3px;
}

.item-detail__availability {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  padding: 6px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.item-detail__availability.is-in {
  color: var(--green);
  background: var(--green-wash);
}

.item-detail__availability.is-out {
  color: var(--red);
  background: var(--red-wash);
}

.item-detail__description {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.detail-grid > div {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.23);
  border: 1px solid rgba(255, 255, 255, 0.38);
  display: grid;
  gap: 1px;
}

.detail-grid span {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.detail-grid strong {
  font-size: 9.5px;
  line-height: 1.35;
}

.barcode-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  margin-top: 11px;
}

.barcode-panel__copy {
  display: grid;
  gap: 1px;
}

.barcode-panel__copy strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.barcode-panel__copy small {
  font-size: 8px;
  color: var(--muted);
}

.barcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 130px;
}

.barcode__svg {
  width: 100%;
  max-width: 240px;
  height: 49px;
  color: var(--ink);
  fill: currentColor;
}

.barcode__label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.barcode--fallback {
  min-width: auto;
  color: var(--muted);
  font-size: 8px;
}

.barcode-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  margin: 11px 0;
}

.barcode-preview > div:first-child {
  display: grid;
  gap: 1px;
}

.barcode-preview small {
  font-size: 8px;
  color: var(--muted);
}

.barcode-preview .barcode {
  min-width: 150px;
}

.barcode-preview .barcode__svg {
  height: 38px;
}

/* Modal and detail content */
.modal {
  width: min(560px, 100%);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.91), rgba(247, 238, 226, 0.82));
  box-shadow: 0 40px 100px rgba(67, 51, 35, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  animation: modalIn 0.26s var(--ease);
  overflow: hidden;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(56, 46, 36, 0.24);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease;
}

.modal-layer.is-visible .modal {
  animation: modalIn 0.26s var(--ease);
}

.modal--sm { width: min(430px, 100%); }
.modal--md { width: min(590px, 100%); }
.modal--lg { width: min(880px, 100%); }

.modal__glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  right: -100px;
  top: -150px;
  background: radial-gradient(circle, rgba(214, 160, 141, 0.2), transparent 68%);
  pointer-events: none;
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 23px 12px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.modal__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.modal__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
}

.modal__icon--danger {
  background: var(--red-wash);
  color: var(--red);
}

.modal__title-wrap h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: 2px;
}

.modal__title-wrap p {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 3px;
  line-height: 1.45;
}

.modal__body {
  padding: 8px 23px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 13px 23px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(90, 75, 58, 0.08);
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.modal__footer .btn {
  min-height: 38px;
  font-size: 12px;
}

.modal-form {
  display: grid;
  gap: 13px;
}

.modal__body .form-error {
  margin-bottom: 11px;
}

/* Demo modal */
.demo-modal {
  display: grid;
  gap: 12px;
}

.demo-warning {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--amber-wash);
  border: 1px solid rgba(179, 132, 81, 0.14);
  color: #876332;
  font-size: 9.5px;
  line-height: 1.45;
}

.demo-warning strong {
  display: block;
  color: #705124;
}

.demo-table-wrap {
  max-height: 330px;
  overflow: auto;
  border-radius: 11px;
  border: 1px solid rgba(90, 75, 58, 0.07);
}

.demo-person {
  display: flex;
  align-items: center;
  gap: 7px;
}

.demo-person div {
  display: grid;
  gap: 0;
}

.demo-person strong {
  font-size: 9.5px;
}

.demo-person span {
  font-size: 8px;
  color: var(--muted);
}

.credential-code {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.35);
  padding: 3px 5px;
  border-radius: 4px;
  border: 1px solid rgba(90, 75, 58, 0.07);
  white-space: nowrap;
}

.credential-code--password {
  color: var(--terracotta-deep);
  letter-spacing: 0.02em;
}

.demo-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
}

.demo-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 8.5px;
}

.demo-modal__foot > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Details modal */
.request-detail {
  display: grid;
  gap: 12px;
}

.request-detail__hero {
  display: flex;
  gap: 11px;
  align-items: center;
}

.request-detail__icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
  color: var(--group-color);
  flex-shrink: 0;
}

.request-detail__hero h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin-top: 2px;
}

.request-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.request-detail__person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.request-detail__person div {
  display: grid;
  flex: 1;
  gap: 0;
}

.request-detail__person span {
  font-size: 8px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.request-detail__person strong {
  font-size: 10px;
}

.request-detail__note,
.request-detail__reject {
  display: flex;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.26);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.request-detail__reject {
  background: var(--red-wash);
  color: var(--red);
}

.request-detail__reject div {
  display: grid;
  gap: 1px;
}

.request-detail__reject strong {
  color: var(--red);
}

.request-detail__reject span {
  color: var(--ink-soft);
}

.timeline {
  border-top: 1px solid rgba(90, 75, 58, 0.08);
  padding-top: 10px;
}

.timeline h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 8px;
}

.timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  position: relative;
}

.timeline-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta-soft);
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(166, 95, 73, 0.08);
}

.timeline-row div {
  display: grid;
  flex: 1;
  gap: 0;
}

.timeline-row strong {
  font-size: 10px;
}

.timeline-row span {
  font-size: 8.5px;
  color: var(--muted);
}

.timeline-row time {
  font-size: 8px;
  color: var(--faint);
  white-space: nowrap;
}

.request-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid rgba(90, 75, 58, 0.08);
}

/* Import */
.import-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.27);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.import-help__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  flex-shrink: 0;
}

.import-help div:nth-child(2) {
  flex: 1;
}

.import-help strong {
  font-size: 10.5px;
}

.import-help p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 1px;
}

.import-help code {
  font-size: 8px;
  background: rgba(255, 255, 255, 0.4);
  padding: 0 3px;
  border-radius: 3px;
}

.import-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.import-columns span {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.29);
  color: var(--faint);
  font-size: 7.5px;
  font-family: var(--font-mono);
}

.file-name {
  font-size: 8px;
  color: var(--muted);
}

.import-preview {
  display: grid;
  gap: 12px;
}

.import-preview td small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.import-preview__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.import-preview__stats div {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 0 4px;
  padding: 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.27);
}

.import-preview__stats svg {
  grid-row: 1 / 3;
  color: var(--muted);
}

.import-preview__stats strong {
  font-size: 16px;
  line-height: 1.1;
}

.import-preview__stats span {
  font-size: 8px;
  color: var(--muted);
}

.import-preview__stats .is-good svg { color: var(--green); }
.import-preview__stats .is-bad svg { color: var(--red); }
.import-preview__stats .is-bad strong { color: var(--red); }

.import-errors {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--red-wash);
  border: 1px solid rgba(173, 83, 70, 0.12);
}

.import-errors strong {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--red);
}

.import-errors span {
  font-size: 8.5px;
  color: var(--ink-soft);
}

.import-result {
  display: grid;
  gap: 11px;
}

.import-result__banner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border-radius: 11px;
  background: var(--green-wash);
  color: var(--green);
}

.import-result__banner div {
  display: grid;
  gap: 1px;
}

.import-result__banner strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.import-result__banner span {
  font-size: 8.5px;
}

.credentials-box {
  padding: 10px;
  border-radius: 11px;
  border: 1px solid rgba(90, 75, 58, 0.09);
  background: rgba(255, 255, 255, 0.23);
  display: grid;
  gap: 8px;
}

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

.credentials-box__head strong {
  font-size: 10.5px;
}

.password-result {
  display: grid;
  gap: 10px;
}

.password-result__warning {
  display: flex;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--amber-wash);
  color: #80602f;
  font-size: 9px;
  line-height: 1.4;
}

.password-result__value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(90, 75, 58, 0.1);
}

.password-result__value code {
  flex: 1;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--terracotta-deep);
  word-break: break-all;
}

.password-result__login {
  font-size: 9.5px;
  color: var(--muted);
}

/* Groups */
.groups-modal {
  display: grid;
  gap: 15px;
}

.group-admin-list {
  display: grid;
  gap: 3px;
  max-height: 250px;
  overflow-y: auto;
}

.group-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.21);
}

.group-admin-row__dot {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--group-color) 14%, transparent);
  color: var(--group-color);
  flex-shrink: 0;
}

.group-admin-row div {
  display: grid;
  gap: 0;
}

.group-admin-row strong {
  font-size: 10px;
}

.group-admin-row span {
  font-size: 8px;
  color: var(--muted);
}

.group-add-form {
  border-top: 1px solid rgba(90, 75, 58, 0.08);
  padding-top: 12px;
}

.group-add-form h3 {
  font-size: 12px;
}

/* Warehouses */
.warehouses-modal {
  display: grid;
  gap: 13px;
}

.warehouse-admin-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.warehouse-admin-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.warehouse-admin-summary strong {
  color: var(--graphite);
  font-size: 11px;
}

.warehouse-admin-list {
  display: grid;
  gap: 4px;
  max-height: 330px;
  overflow-y: auto;
}

.warehouse-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(90, 75, 58, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.2);
}

.warehouse-admin-row.is-archived {
  opacity: 0.62;
}

.warehouse-admin-row__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: rgba(166, 95, 73, 0.1);
  color: var(--terracotta-deep);
}

.warehouse-admin-row__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.warehouse-admin-row__copy strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-admin-row__copy span {
  color: var(--muted);
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-admin-row__copy small {
  color: var(--faint);
  font-size: 8px;
}

.warehouse-admin-row__actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex: none;
}

.mini-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(166, 95, 73, 0.1);
  color: var(--terracotta-deep);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

@media (max-width: 620px) {
  .warehouse-admin-row {
    flex-wrap: wrap;
  }

  .warehouse-admin-row__copy {
    flex-basis: calc(100% - 44px);
  }

  .warehouse-admin-row__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Install guide / forgot */
.install-guide {
  display: grid;
  gap: 12px;
}

.install-guide__device {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--terracotta-wash);
}

.install-guide__phone {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--terracotta);
}

.install-guide__device strong {
  font-size: 11px;
}

.install-guide__device p {
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}

.install-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.install-steps li {
  display: flex;
  gap: 8px;
}

.install-steps li > span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.36);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--terracotta);
  flex-shrink: 0;
}

.install-steps strong {
  font-size: 10px;
}

.install-steps p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 1px;
}

.install-apk-note {
  display: flex;
  gap: 7px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.27);
  font-size: 8.5px;
  color: var(--muted);
  line-height: 1.45;
}

.install-apk-note svg {
  color: var(--terracotta);
  flex-shrink: 0;
}

.install-apk-note strong {
  color: var(--ink-soft);
}

.forgot-block {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.forgot-block__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  margin-bottom: 4px;
}

.forgot-block h3 {
  font-size: 14px;
}

.forgot-block p {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 320px;
}

.forgot-block .form-notice {
  text-align: left;
  max-width: 100%;
}

/* Demo role colors etc */
.role-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.role-fieldset legend {
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.role-fieldset legend span {
  font-size: 8px;
  color: var(--faint);
  font-weight: 400;
}

/* =========================================================
   Выбор шаблона
   ========================================================= */

.template-form {
  display: grid;
  gap: 15px;
}

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

.template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  overflow: hidden;
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 95, 73, 0.2);
}

.template-card:has(input:checked) {
  border-color: rgba(166, 95, 73, 0.45);
  box-shadow: 0 0 0 3px rgba(166, 95, 73, 0.09), var(--shadow-outer-sm);
}

.template-card:has(input:focus-visible) {
  outline: 2px solid rgba(166, 95, 73, 0.55);
  outline-offset: 3px;
}

.bs-theme-picker {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.bs-theme-picker__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.bs-theme-picker__head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.bs-theme-picker__head span {
  font-size: 8.5px;
  color: var(--muted);
}

.bs-theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bs-theme-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(90, 75, 58, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
}

.bs-theme-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bs-theme-card.is-active,
.bs-theme-card:has(input:checked) {
  border-color: rgba(166, 95, 73, 0.55);
  background: rgba(166, 95, 73, 0.12);
  box-shadow: 0 0 0 2px rgba(166, 95, 73, 0.12);
}

.bs-theme-swatch {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(90, 75, 58, 0.12);
}

.bs-theme-check {
  display: none;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
  color: #fff;
}

.bs-theme-card.is-active .bs-theme-check,
.bs-theme-card:has(input:checked) .bs-theme-check {
  display: grid;
}

@media (max-width: 760px) {
  .bs-theme-card {
    flex: 1 1 calc(50% - 6px);
  }
}

.template-card > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.template-preview {
  height: 148px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.template-preview--glass {
  background:
    radial-gradient(circle at 78% 18%, rgba(212, 166, 135, 0.32), transparent 35%),
    linear-gradient(135deg, #f7f0e6, #eadfce);
}

.template-preview__rail {
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 28px;
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 2px 3px 8px rgba(101, 78, 55, 0.08);
}

.template-preview__glass-a,
.template-preview__glass-b {
  position: absolute;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 3px 5px 12px rgba(110, 85, 58, 0.09);
  backdrop-filter: blur(5px);
}

.template-preview__glass-a {
  left: 46px;
  right: 12px;
  top: 10px;
  height: 56px;
}

.template-preview__glass-b {
  left: 46px;
  top: 74px;
  width: 45%;
  bottom: 10px;
}

.template-preview__line {
  position: absolute;
  left: 101px;
  right: 23px;
  bottom: 43px;
  height: 6px;
  border-radius: 99px;
  background: rgba(88, 70, 52, 0.1);
}

.template-preview__line--short {
  bottom: 29px;
  right: 39%;
}

.template-preview--bootstrap {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.template-preview__navbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 29px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.template-preview__navbar::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  width: 48px;
  height: 9px;
  border-radius: 3px;
  background: var(--terracotta);
}

.template-preview__navbar::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 10px;
  width: 70px;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
}

.template-preview__bs-card {
  position: absolute;
  top: 41px;
  height: 50px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.template-preview__bs-card--one { left: 10px; width: calc(33.33% - 14px); }
.template-preview__bs-card--two { left: calc(33.33% + 3px); width: calc(33.33% - 14px); }
.template-preview__bs-card--three { left: calc(66.66% - 4px); right: 10px; }

.template-preview--bootstrap .template-preview__line {
  left: 11px;
  right: 11px;
  bottom: 39px;
  height: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.template-preview--bootstrap .template-preview__line--short {
  bottom: 20px;
  right: 42%;
}

.template-card__body {
  padding: 12px 6px 5px;
  display: grid;
  gap: 5px;
}

.template-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.template-card__head strong {
  font-size: 13px;
}

.template-card__body p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  min-height: 44px;
}

.template-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.template-card__tags span {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--muted);
  font-size: 8px;
}

.template-card__check {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 23px;
  height: 23px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fffaf3;
  box-shadow: 0 3px 8px rgba(130, 74, 55, 0.25);
  z-index: 2;
}

.template-card:has(input:checked) .template-card__check {
  display: grid;
}

.template-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.template-note svg {
  color: var(--terracotta);
  flex-shrink: 0;
}

.template-note strong {
  color: var(--ink-soft);
}

.template-current {
  font-size: 9.5px;
  color: var(--muted);
}

/* =========================================================
   Адаптив
   ========================================================= */

@media (max-width: 1320px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .leaderboard-entry {
    grid-template-columns: 24px 38px minmax(160px, 1.2fr) 58px 55px 68px 52px;
  }

  .leaderboard-entry__stars {
    display: none;
  }

  .auth-floating-card {
    right: 0;
    bottom: 180px;
    width: 300px;
  }
}

@media (max-width: 1180px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .hero-mini {
    width: 230px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.6fr);
  }

  .profile-band {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-band__meta {
    grid-column: 1 / -1;
    padding-top: 11px;
    border-top: 1px solid rgba(90, 75, 58, 0.07);
  }

  .profile-band__rating {
    grid-column: 2;
    grid-row: 1;
  }

  .employee-hero {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr);
  }

  .employee-hero__score {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(90, 75, 58, 0.07);
  }

  .rating-hero {
    grid-template-columns: minmax(0, 1.2fr) 160px minmax(150px, 0.5fr);
  }

  .auth-screen {
    grid-template-columns: minmax(380px, 0.95fr) minmax(430px, 1.05fr);
    gap: 26px;
  }

  .auth-floating-card {
    display: none;
  }

  .item-detail {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 280px;
  }

  .sidebar {
    left: 10px;
    top: 10px;
    bottom: 10px;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.32s var(--ease);
    z-index: 150;
  }

  .sidebar-open .sidebar {
    transform: none;
  }

  .sidebar__close {
    display: grid;
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(56, 46, 36, 0.25);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
  }

  .main-shell {
    margin-left: 0;
    padding: 10px 14px 0;
  }

  .topbar {
    top: 10px;
  }

  .topbar__menu {
    display: grid;
  }

  .topbar__live-inline {
    display: inline-flex;
  }

  .bottom-nav {
    position: fixed;
    z-index: 90;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 5px;
    border-radius: 19px;
    background: rgba(250, 246, 238, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 35px rgba(95, 72, 49, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
  }

  .bottom-nav__item {
    min-height: 48px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 600;
    transition: all 0.2s;
  }

  .bottom-nav__item.is-active {
    color: var(--terracotta);
    background: var(--terracotta-wash);
  }

  .page-content {
    padding: 24px 2px 92px;
  }

  .app-footer {
    display: none;
  }

  .toast-stack {
    bottom: calc(82px + env(safe-area-inset-bottom));
    right: 14px;
  }

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

  .employee-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.6fr);
  }

  .rating-hero {
    grid-template-columns: minmax(0, 1fr) 140px;
  }

  .rating-hero__me {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 9px;
  }

  .rating-hero__me .score-ring {
    margin: 0;
  }
}

@media (max-width: 960px) {
  .auth-screen {
    display: block;
    padding: 22px;
  }

  .auth-story {
    min-height: auto;
    max-width: 660px;
    margin: 0 auto 24px;
  }

  .auth-story__top {
    margin-bottom: 24px;
  }

  .auth-story__copy h1 {
    font-size: clamp(38px, 7vw, 60px);
  }

  .auth-story__copy p {
    margin-top: 14px;
    max-width: 600px;
  }

  .auth-story__features {
    margin-top: 16px;
  }

  .auth-story__stats,
  .auth-story__foot {
    display: none;
  }

  .auth-panel {
    max-width: 600px;
    margin: 0 auto;
  }

  .auth-card {
    max-width: 600px;
  }

  .auth-card__brand {
    display: none;
  }

  .hero-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }

  .hero-card__aside {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rating-layout {
    grid-template-columns: 1fr;
  }

  .rating-lower-grid {
    grid-template-columns: 1fr;
  }

  .employee-layout {
    grid-template-columns: 1fr;
  }

  .employee-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .employee-side .readonly-note {
    grid-column: 1 / -1;
  }

  .roles-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .profile-band__rating {
    grid-column: 1;
    grid-row: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(90, 75, 58, 0.07);
  }

  .profile-band__meta {
    grid-column: 1;
    flex-wrap: wrap;
  }

  .profile-band__deadline {
    grid-column: 1;
  }

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

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

  .item-detail__art {
    min-height: 150px;
  }

  .leaderboard-entry {
    grid-template-columns: 22px 38px minmax(140px, 1fr) 55px 55px 50px;
  }

  .leaderboard-entry__metric:nth-of-type(3) {
    display: none;
  }

  .settings-content {
    grid-template-columns: 1fr;
  }

  .channel-cards {
    grid-template-columns: 1fr;
  }

  .dismissal-panel {
    flex-wrap: wrap;
  }

  .dismissal-panel .btn {
    width: 100%;
  }
}

/* На планшетах таблица номенклатуры шире контейнера: убираем вторичные
   колонки до перехода в карточки на 760px. */
@media (min-width: 761px) and (max-width: 1400px) {
  .items-page .data-table th:nth-child(4),
  .items-page .data-table td:nth-child(4) {
    display: none;
  }
}

@media (min-width: 761px) and (max-width: 1260px) {
  .items-page .data-table th:nth-child(5),
  .items-page .data-table td:nth-child(5) {
    display: none;
  }
}

@media (min-width: 761px) and (max-width: 850px) {
  .items-page .data-table th:nth-child(2),
  .items-page .data-table td:nth-child(2) {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .main-shell {
    padding: 8px 9px 0;
  }

  .topbar {
    height: 60px;
    top: 8px;
    padding: 0 8px 0 12px;
    border-radius: 18px;
  }

  .topbar__crumb span {
    display: none;
  }

  .topbar__crumb strong {
    font-size: 12px;
  }

  .topbar__live-inline {
    display: none;
  }

  .topbar__pill {
    display: none;
  }

  .user-chip__copy,
  .user-chip > svg {
    display: none;
  }

  .user-chip {
    padding: 4px;
  }

  .page-content {
    padding: 19px 1px 88px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
    margin-bottom: 19px;
  }

  .page-header__actions {
    justify-content: flex-start;
  }

  .page-header__actions .btn {
    flex: 0 1 auto;
  }

  .hero-card {
    padding: 23px 20px;
    min-height: auto;
    border-radius: 24px;
  }

  .hero-card h1 {
    font-size: 30px;
  }

  .hero-card__headline {
    font-size: 16px;
  }

  .hero-card__content p {
    font-size: 10.5px;
  }

  .hero-card__actions .btn {
    flex: 1;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 112px;
    padding: 14px;
    border-radius: 17px;
  }

  .stat-card__value {
    font-size: 27px;
    margin-top: 13px;
  }

  .dashboard-grid {
    gap: 10px;
  }

  .focus-panel,
  .live-panel,
  .leaderboard-card,
  .quick-panel,
  .panel {
    padding: 16px;
  }

  .catalog-grid,
  .people-grid,
  .holdings-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    padding: 9px;
    gap: 8px;
  }

  .filter-bar .search-box {
    flex-basis: 100%;
  }

  .filter-bar .segmented {
    flex: 1;
    justify-content: space-between;
  }

  .filter-bar .segmented__item {
    flex: 1;
    justify-content: center;
    padding: 0 7px;
  }

  .catalog-toolbar {
    flex-direction: column;
    gap: 9px;
  }

  .catalog-toolbar__meta {
    width: 100%;
    justify-content: space-between;
    padding-top: 0;
  }

  .cabinet-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cabinet-tab {
    padding: 10px 12px;
  }

  .holding-card {
    min-height: 0;
  }

  .holding-card__art {
    width: 76px;
  }

  .holding-card__art > svg {
    width: 23px;
    height: 23px;
  }

  .holding-card__category {
    display: none;
  }

  .holding-card__top {
    gap: 7px;
  }

  .holding-card__foot {
    flex-wrap: wrap;
  }

  .holding-card__foot .btn {
    margin-left: 0;
    flex: 1;
  }

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

  .requests-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .requests-filters {
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 2px;
  }

  .requests-toolbar .search-box {
    flex: 1 1 auto;
    max-width: none;
  }

  .request-card__rail {
    width: 54px;
    padding: 10px 5px;
  }

  .request-card__rail .badge {
    display: none;
  }

  .request-card__mobile-status {
    display: flex;
  }

  .request-card__icon {
    width: 32px;
    height: 32px;
  }

  .request-card__body {
    padding: 11px;
  }

  .request-card__head {
    flex-direction: column;
    gap: 6px;
  }

  .request-card__timing {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
  }

  .request-card__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .request-card__actions {
    justify-content: flex-start;
  }

  .profile-band {
    padding: 17px;
    border-radius: 20px;
  }

  .profile-band__meta {
    gap: 12px;
  }

  .rating-hero {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 12px;
  }

  .rating-hero__star {
    display: none;
  }

  .rating-hero__me {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .podium-full {
    gap: 5px;
    min-height: 220px;
  }

  .podium-place {
    padding: 12px 6px;
  }

  .podium-place--2 {
    margin-bottom: 14px;
  }

  .podium-place--3 {
    margin-bottom: 23px;
  }

  .podium-place__score {
    font-size: 23px;
  }

  .leaderboard-entry {
    grid-template-columns: 20px 36px minmax(0, 1fr) 50px;
    gap: 7px;
    padding: 8px 6px;
  }

  .leaderboard-entry__metric {
    display: none;
  }

  .leaderboard-entry__score {
    justify-self: end;
  }

  .leaderboard-entry .score-ring {
    --score-size: 42px !important;
  }

  .leaderboard-entry__score .score-ring__value {
    font-size: 12px;
  }

  .leaderboard-table-card .section-heading {
    flex-direction: column;
  }

  .people-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .people-toolbar .search-box {
    max-width: none;
  }

  .section-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .position-grid {
    grid-template-columns: 1fr;
  }

  .employee-hero {
    grid-template-columns: 1fr;
    padding: 17px;
    gap: 12px;
  }

  .employee-hero__main {
    align-items: flex-start;
  }

  .employee-hero__contacts {
    padding-top: 9px;
    border-top: 1px solid rgba(90, 75, 58, 0.07);
  }

  .employee-hero__score {
    justify-content: flex-start;
    border-top: 0;
    padding-top: 0;
  }

  .employee-hero__identity h1 {
    font-size: 24px;
  }

  .employee-side {
    grid-template-columns: 1fr;
  }

  .employee-equipment-row {
    grid-template-columns: 22px 30px minmax(0, 1fr) 52px;
    gap: 6px;
  }

  .employee-equipment-row__meta {
    grid-column: 3 / -1;
    justify-content: flex-start;
  }

  .employee-equipment-row__qty {
    grid-column: 4;
    grid-row: 1;
  }

  .dismissal-panel {
    padding: 16px;
  }

  .dismissal-panel__icon {
    width: 42px;
    height: 42px;
  }

  .items-filter .search-box {
    flex-basis: 100%;
  }

  .items-filter select.field__input--compact,
  .filter-bar select.field__input--compact,
  .requests-toolbar select.field__input--compact {
    width: 100%;
    min-width: 0;
  }

  .item-stats {
    gap: 8px;
  }

  .table-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .table-panel .table-wrap {
    overflow: visible;
  }

  .table-panel .data-table thead {
    display: none;
  }

  .table-panel .data-table,
  .table-panel .data-table tbody,
  .table-panel .data-table tr,
  .table-panel .data-table td {
    display: block;
    width: 100%;
  }

  .table-panel .data-table tr {
    margin-bottom: 9px;
    padding: 12px;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 252, 246, 0.7), rgba(247, 240, 229, 0.42));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-outer-sm), var(--shadow-inset);
  }

  .table-panel .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .table-panel .data-table td::before {
    content: attr(data-label);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--faint);
    font-weight: 700;
    text-align: left;
  }

  .table-panel .data-table td[data-label="Позиция"] {
    display: block;
    text-align: left;
    padding-bottom: 7px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(90, 75, 58, 0.07);
  }

  .table-panel .data-table td[data-label="Позиция"]::before {
    display: none;
  }

  .table-panel .table-item {
    min-width: 0;
  }

  .table-panel .data-table .num {
    text-align: right;
  }

  .table-panel .data-table td[data-label="Действия"] {
    justify-content: flex-end;
  }

  .table-panel .data-table td[data-label="Действия"]::before {
    margin-right: auto;
  }

  .table-panel .empty-state {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 16px;
  }

  .roles-intro {
    padding: 13px;
  }

  .role-card {
    padding: 15px;
  }

  .role-card__head {
    flex-wrap: wrap;
  }

  .role-card__head > .badge {
    margin-left: auto;
  }

  .backup-hero {
    flex-wrap: wrap;
  }

  .backup-hero .btn {
    width: 100%;
  }

  .settings-card,
  .settings-info-card {
    padding: 16px;
  }

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

  .backup-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .file-upload {
    justify-content: center;
  }

  .notifications-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-card {
    flex-wrap: wrap;
    padding: 12px;
  }

  .notification-card__actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 7px;
    border-top: 1px solid rgba(90, 75, 58, 0.06);
  }

  .notification-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-note {
    margin-bottom: 70px;
  }

  .mobile-only {
    display: block;
  }

  .modal-layer {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    animation: modalUp 0.28s var(--ease);
  }

  @keyframes modalUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  .modal__header {
    padding: 17px 17px 10px;
  }

  .modal__body {
    padding: 6px 17px 16px;
  }

  .modal__footer {
    padding: 11px 17px calc(14px + env(safe-area-inset-bottom));
  }

  .modal__title-wrap h2 {
    font-size: 21px;
  }

  .modal__footer .btn {
    flex: 1;
    min-height: 42px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .item-detail__head {
    flex-direction: column;
  }

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

  .barcode-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .barcode-panel .barcode {
    width: 100%;
  }

  .request-detail__hero {
    align-items: flex-start;
  }

  .request-detail__hero h2 {
    font-size: 20px;
  }

  .request-detail__actions .btn {
    flex: 1 1 auto;
  }

  .toast-stack {
    left: 10px;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    max-width: none;
  }

  .toast {
    width: 100%;
  }

  .sidebar__live,
  .sidebar__bottom .demo-note {
    display: none;
  }

  .install-card {
    margin-top: 4px;
  }

  .app-footer {
    display: none;
  }

  .notification-count {
    border-color: var(--bg-soft);
  }
}

@media (max-width: 560px) {
  .auth-screen {
    padding: 16px 12px;
  }

  .auth-story {
    margin-bottom: 16px;
  }

  .auth-story__top {
    margin-bottom: 16px;
  }

  .auth-story__copy h1 {
    font-size: 34px;
  }

  .auth-story__copy p {
    font-size: 12px;
    margin-top: 10px;
  }

  .auth-story__features {
    display: none;
  }

  .auth-card {
    padding: 21px 16px;
    border-radius: 25px;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .auth-card__brand {
    margin-bottom: 16px;
    font-size: 18px;
  }

  .auth-panel__note {
    display: none;
  }

  .topbar {
    padding: 0 7px 0 9px;
  }

  .topbar__left {
    gap: 5px;
  }

  .topbar__crumb strong {
    font-size: 11px;
  }

  .topbar__actions {
    gap: 4px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .topbar__bell {
    width: 34px;
    height: 34px;
  }

  .user-chip .avatar {
    --avatar-size: 31px !important;
  }

  .page-content {
    padding-top: 16px;
  }

  .page-header h1 {
    font-size: 27px;
  }

  .page-header__subtitle {
    font-size: 11.5px;
  }

  .page-header__actions {
    gap: 6px;
  }

  .page-header__actions .btn {
    min-height: 36px;
    font-size: 11.5px;
    padding: 0 10px;
  }

  .hero-card {
    padding: 21px 16px;
  }

  .hero-card__eyebrow {
    font-size: 8px;
    flex-wrap: wrap;
  }

  .hero-card h1 {
    font-size: 27px;
  }

  .hero-card__headline {
    font-size: 14.5px;
  }

  .hero-card__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-card__actions .btn {
    width: 100%;
  }

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

  .stat-card {
    min-height: 105px;
  }

  .stat-card__value {
    font-size: 24px;
  }

  .stat-card__hint {
    display: none;
  }

  .section-heading {
    flex-wrap: wrap;
    gap: 7px;
  }

  .focus-row {
    padding: 7px 5px;
  }

  .focus-row > .icon {
    display: none;
  }

  .focus-row__side .badge {
    font-size: 8px;
    padding: 1px 6px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-tile {
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
  }

  .quick-tile > span {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  .quick-tile small {
    grid-column: 2;
  }

  .catalog-card__art {
    height: 132px;
  }

  .filter-bar .segmented {
    width: 100%;
  }

  .segmented__item {
    padding: 0 8px;
    font-size: 11px;
  }

  .page-header__actions .btn--glass,
  .page-header__actions .btn--primary {
    flex: 1;
  }

  .profile-band__identity {
    align-items: flex-start;
  }

  .profile-band__identity .avatar {
    --avatar-size: 56px !important;
  }

  .profile-band__identity h2 {
    font-size: 21px;
  }

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

  .queue-strip {
    gap: 6px;
  }

  .queue-strip__item {
    padding: 9px;
  }

  .request-card {
    position: relative;
  }

  .request-card__rail {
    width: 46px;
  }

  .request-card__rail .badge {
    display: none;
  }

  .request-card__icon {
    width: 29px;
    height: 29px;
  }

  .request-card__actions .btn {
    flex: 1;
  }

  .rating-hero {
    padding: 17px;
  }

  .rating-hero__copy h2 {
    font-size: 27px;
  }

  .podium-full {
    min-height: 190px;
  }

  .podium-place__avatar .avatar {
    --avatar-size: 44px !important;
  }

  .podium-place--1 .podium-place__avatar .avatar {
    --avatar-size: 54px !important;
  }

  .podium-place strong {
    font-size: 9.5px;
  }

  .podium-place > span,
  .podium-place small {
    display: none;
  }

  .podium-place__score {
    font-size: 20px;
  }

  .formula-visual {
    grid-template-columns: 1fr;
  }

  .people-tabs,
  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .people-tab {
    flex-shrink: 0;
  }

  .org-node__card {
    padding: 10px;
  }

  .org-node__children {
    display: none;
  }

  .org-node__children-list {
    margin-left: 15px;
    padding-left: 9px;
  }

  .employee-hero__main {
    flex-direction: column;
    gap: 9px;
  }

  .employee-hero__identity h1 {
    font-size: 23px;
  }

  .dismissal-panel {
    align-items: flex-start;
  }

  .dismissal-panel__icon {
    display: none;
  }

  .item-detail__art {
    min-height: 120px;
  }

  .item-detail__head h2 {
    font-size: 20px;
  }

  .barcode__svg {
    max-width: 100%;
  }

  .modal__title-wrap {
    gap: 8px;
  }

  .modal__icon {
    width: 32px;
    height: 32px;
  }

  .modal__title-wrap h2 {
    font-size: 19px;
  }

  .modal__title-wrap p {
    font-size: 9.5px;
  }

  .demo-modal__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .import-preview__stats {
    grid-template-columns: 1fr;
  }

  .install-guide__device {
    align-items: flex-start;
  }

  .channel-card {
    flex-wrap: wrap;
  }

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

  .danger-row .btn {
    width: 100%;
  }

  .notifications-list {
    margin-bottom: 60px;
  }

  .bottom-nav {
    left: 6px;
    right: 6px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    border-radius: 17px;
  }

  .bottom-nav__item {
    min-height: 46px;
    font-size: 7.5px;
  }

  .mobile-sheet {
    left: 6px;
    right: 6px;
    bottom: 6px;
  }

  .mobile-sheet__grid {
    grid-template-columns: 1fr;
    max-height: 47dvh;
    overflow-y: auto;
  }

  .field__control {
    min-height: 42px;
  }

  .field__input {
    font-size: 16px; /* предотвращает авто-зум iOS */
    padding: 9px 0;
  }

  .search-box input,
  .field__input--compact {
    font-size: 16px;
  }

  .search-box {
    min-height: 42px;
  }

  .btn {
    min-height: 40px;
  }

  .app-footer {
    display: none;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 88px;
  }

  .stat-card__hint {
    display: block;
  }

  .holding-card__art {
    display: none;
  }

  .cabinet-tab__copy strong {
    font-size: 10.5px;
  }

  .request-card__rail {
    display: none;
  }

  .leaderboard-entry {
    grid-template-columns: 18px 34px minmax(0, 1fr) 46px;
  }

  .podium-full {
    flex-wrap: wrap;
  }

  .podium-place {
    flex-basis: 100%;
    max-width: none;
    margin-bottom: 0;
    flex-direction: row;
    gap: 9px;
    text-align: left;
    padding: 10px;
  }

  .podium-place__avatar {
    margin: 0;
  }

  .podium-place__score {
    margin-left: auto;
  }
}

@supports (padding: env(safe-area-inset-top)) {
  .auth-screen {
    padding-top: max(clamp(16px, 4vw, 54px), env(safe-area-inset-top));
    padding-bottom: max(clamp(16px, 4vw, 54px), env(safe-area-inset-bottom));
  }

  @media (max-width: 1050px) {
    .main-shell {
      padding-top: calc(8px + env(safe-area-inset-top));
    }

    .sidebar {
      top: calc(8px + env(safe-area-inset-top));
      bottom: calc(8px + env(safe-area-inset-bottom));
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .ambient__blob,
  .star-big,
  .auth-floating-card,
  .glass-card--liquid::before {
    animation: none !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .bottom-nav,
  .app-footer,
  .ambient,
  .toast-stack,
  .page-header__actions,
  .modal-layer {
    display: none !important;
  }

  .main-shell {
    margin: 0;
    padding: 0;
  }

  body {
    background: #fff;
    color: #000;
  }

  .glass-card,
  .glass-panel,
  .panel {
    box-shadow: none;
    background: #fff;
    border: 1px solid #ddd;
  }
}

/* ---------- Production: почта, внешние пользователи ---------- */
.mail-settings-form {
  display: grid;
  gap: 11px;
}

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

.mail-server-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(90, 75, 58, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.mail-server-card legend {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.mail-server-card .field-grid {
  grid-template-columns: 1fr 1fr;
}

.mail-server-card .field--full {
  grid-column: 1 / -1;
}

.mail-server-card > .btn {
  justify-self: start;
}

.mail-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 9px;
}

.mail-inbox-list {
  display: grid;
  gap: 7px;
}

.mail-message {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.mail-message.is-accepted {
  opacity: 0.7;
}

.mail-message__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mail-message__head strong {
  font-size: 11px;
}

.mail-message__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
}

.mail-message p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
  max-height: 48px;
  overflow: hidden;
}

.mail-suggestion {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mail-suggestion > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(166, 95, 73, 0.07);
  color: var(--ink-soft);
  font-size: 8px;
}

.mail-message__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.external-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.external-note svg {
  flex: none;
  color: var(--terracotta);
  margin-top: 2px;
}

.external-note div {
  display: grid;
  gap: 2px;
}

.external-note strong {
  color: var(--ink);
  font-size: 10px;
}

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

.external-person-card {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.external-person-card.is-pending {
  border-color: rgba(183, 122, 93, 0.3);
  background: color-mix(in srgb, var(--terracotta) 5%, transparent);
}

.external-person-card.is-blocked {
  opacity: 0.67;
}

.external-person-card__top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.external-person-card__top > div {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.external-person-card__top h3 {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-person-card__top span {
  color: var(--muted);
  font-size: 9px;
}

.external-person-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 8.5px;
}

.external-person-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.external-person-card__stats {
  display: flex;
  gap: 12px;
  padding-top: 7px;
  border-top: 1px solid rgba(90, 75, 58, 0.07);
  color: var(--muted);
  font-size: 8.5px;
}

.external-person-card__stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.external-person-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.external-bookings-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.external-bookings-head > div {
  display: grid;
  gap: 1px;
  flex: 1;
}

.external-bookings-head strong {
  font-size: 12px;
}

.external-bookings-head span {
  color: var(--muted);
  font-size: 9px;
}

.external-bookings-list {
  display: grid;
  gap: 5px;
}

.external-booking-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.external-booking-row__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 7px;
  background: rgba(166, 95, 73, 0.1);
  color: var(--terracotta);
}

.external-booking-row > div {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.external-booking-row strong {
  font-size: 10px;
}

.external-booking-row span,
.external-booking-row small {
  color: var(--muted);
  font-size: 8px;
}

@media (max-width: 820px) {
  .mail-server-grid,
  .external-people-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .mail-server-card .field-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Импорт номенклатуры ---------- */
.modal--xl { width: min(1120px, 100%); }

.items-import__drop {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 32px 20px;
  text-align: center;
  border: 1px dashed rgba(166, 95, 73, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.items-import__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(166, 95, 73, 0.1);
  color: var(--terracotta);
}

.items-import__drop h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.items-import__drop p {
  max-width: 440px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.items-import__drop label {
  cursor: pointer;
}

.items-import {
  display: grid;
  gap: 11px;
}

.items-import-map {
  display: grid;
  gap: 13px;
}

.items-import-map__file {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(166, 95, 73, 0.07);
  color: var(--ink-soft);
  font-size: 9px;
}

.items-import-map__file strong {
  font-size: 10px;
}

.items-import-map__file span {
  color: var(--muted);
}

.items-import-map__head div {
  display: grid;
  gap: 1px;
}

.items-import-map__head strong {
  font-size: 12px;
}

.items-import-map__head span {
  color: var(--muted);
  font-size: 9px;
}

.items-import-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.items-import-preview {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 75, 58, 0.08);
}

.items-import-preview__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.items-import-preview__head strong {
  font-size: 11px;
}

.items-import-preview__head span {
  color: var(--muted);
  font-size: 8px;
}

.items-import-preview .table-wrap {
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 8px;
}

.items-import-preview .data-table {
  font-size: 8px;
}

.items-import-preview .data-table th,
.items-import-preview .data-table td {
  padding: 6px 8px;
  white-space: nowrap;
}

.items-import-result {
  display: grid;
  gap: 12px;
}

.items-import-result__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.items-import-result__stats div {
  display: grid;
  padding: 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(90, 75, 58, 0.07);
}

.items-import-result__stats strong {
  color: var(--terracotta-deep);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.items-import-result__stats span {
  color: var(--muted);
  font-size: 9px;
}

.items-import-errors {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(169, 88, 79, 0.18);
  border-radius: 9px;
  background: rgba(169, 88, 79, 0.05);
}

.items-import-errors > strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 10px;
}

.items-import-errors > div {
  display: flex;
  gap: 7px;
  padding-top: 5px;
  border-top: 1px solid rgba(169, 88, 79, 0.1);
  font-size: 8.5px;
}

.items-import-errors > div span {
  flex: none;
  color: var(--red);
  font-weight: 700;
}

.items-import-errors > div p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .items-import-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .items-import-fields {
    grid-template-columns: 1fr;
  }
}

/* Production auth */
.auth-server-points {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: 11px;
}

.auth-server-points span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
}

.auth-server-points svg {
  color: var(--terracotta);
}

.auth-server-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  margin-bottom: 18px;
  border-radius: 6px;
  background: rgba(166, 95, 73, 0.08);
  color: var(--terracotta-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mail-review {
  display: grid;
  gap: 12px;
}

.mail-review__message {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.mail-review__message p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.5;
  max-height: 96px;
  overflow: auto;
}

.mail-review__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 9px;
}

.mail-review__suggest span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mail-review__suggest svg {
  color: var(--terracotta);
}

/* Аватары и профиль */
.avatar__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.avatar-editor__preview { flex-shrink: 0; }
.avatar-editor__copy { display: grid; gap: 5px; justify-items: start; }
.avatar-editor__copy strong { font-size: 11px; }
.avatar-editor__copy span { color: var(--muted); font-size: 8.5px; }
.avatar-editor__copy label { cursor: pointer; }

.employee-hero__edit { justify-self: end; align-self: start; }

.group-fieldset {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 10px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 10px;
}

.group-fieldset legend {
  padding: 0 5px;
  font-size: 10px;
  font-weight: 650;
}

.group-fieldset legend span { color: var(--muted); font-weight: 400; }
.group-mode { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-soft); font-size: 9px; }
.group-mode label { display: inline-flex; align-items: center; gap: 5px; }

.org-node__actions, .position-card__actions { display: flex; gap: 2px; align-items: center; }
.org-node__actions { margin-left: auto; }
.position-card__actions { margin-left: auto; }
.org-node__groups { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.org-node__groups .mini-chip { font-size: 7.5px; }

/* Подборки */
.lists-filter { justify-content: space-between; }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.list-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.list-card__head { display: flex; align-items: center; gap: 9px; }
.list-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--terracotta); background: rgba(166, 95, 73, 0.1); flex-shrink: 0; }
.list-card__head h2 { margin: 0; font-size: 13px; }
.list-card__head span { color: var(--muted); font-size: 8px; }
.list-card__description { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.list-card__items { display: flex; flex-wrap: wrap; gap: 4px; }
.list-item-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 6px; background: rgba(255, 255, 255, 0.2); color: var(--ink-soft); font-size: 8px; }
.list-item-chip b { color: var(--terracotta); font-size: 8px; }
.list-item-chip.is-unavailable { opacity: 0.55; text-decoration: line-through; }
.list-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid rgba(90, 75, 58, 0.07); color: var(--muted); font-size: 8px; }
.list-card__foot > span { display: inline-flex; align-items: center; gap: 4px; }
.list-card__actions { display: flex; align-items: center; gap: 3px; }
.lists-note { display: flex; gap: 6px; color: var(--muted); font-size: 8.5px; padding: 4px 2px; }
.list-editor { display: grid; gap: 7px; }
.list-editor__head { display: flex; align-items: center; justify-content: space-between; }
.list-editor__head strong { font-size: 10px; }
.list-editor__rows { display: grid; gap: 5px; }
.list-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 30px; gap: 5px; align-items: center; }
.list-item-row .field__input { min-width: 0; }
.list-request-summary { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 9px; background: rgba(255, 255, 255, 0.16); }
.list-request-summary strong { display: block; font-size: 11px; }
.list-request-summary span { color: var(--muted); font-size: 8px; }

@media (max-width: 760px) {
  .lists-grid { grid-template-columns: 1fr; }
  .list-item-row { grid-template-columns: minmax(0, 1fr) 64px 30px; }
  .employee-hero__edit { justify-self: start; }
}

/* Сотрудники: карточки и список */
.person-card__link { text-decoration: none; color: inherit; }
.person-card__link h3,
.person-card__link span,
.person-card__link strong,
.person-card__link small { text-decoration: none; }
.people-toolbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.people-view-switch .segmented__item { gap: 4px; }
.people-list { overflow: hidden; padding: 0; }
.people-list__head,
.person-row { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(150px, 1fr) minmax(130px, 0.8fr) minmax(100px, 0.55fr) 24px; gap: 12px; align-items: center; padding: 9px 14px; }
.people-list__head { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid rgba(90, 75, 58, 0.08); }
.person-row { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid rgba(90, 75, 58, 0.06); transition: background 0.2s ease; }
.person-row:last-child { border-bottom: 0; }
.person-row:hover { background: rgba(255, 255, 255, 0.22); }
.person-row.is-inactive { opacity: 0.62; }
.person-row__identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person-row__identity > span:last-child { display: grid; min-width: 0; }
.person-row__identity strong { color: var(--ink); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row__identity small { color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-row__department { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8.5px; min-width: 0; }
.person-row__roles { display: flex; flex-wrap: wrap; gap: 2px; }
.person-row__stats { display: grid; gap: 1px; }
.person-row__stats strong { font-size: 12px; color: var(--terracotta); }
.person-row__stats small { color: var(--muted); font-size: 7.5px; }
.person-row__arrow { color: var(--muted); }

@media (max-width: 900px) {
  .people-list__head { display: none; }
  .person-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 10px 12px; }
  .person-row__department { grid-column: 1 / -1; }
  .person-row__roles { grid-column: 1 / -1; }
  .person-row__stats { text-align: right; }
  .person-row__arrow { display: none; }
}

/* Фотографии номенклатуры */
.catalog-card__art.has-photo { background: #2f2a26; }
.catalog-card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.96; }
.catalog-card__art.has-photo::after { content: ''; position: absolute; inset: auto 0 0; height: 55%; background: linear-gradient(transparent, rgba(30, 24, 20, 0.72)); z-index: 1; }
.catalog-card__art.has-photo .catalog-card__badges,
.catalog-card__art.has-photo .catalog-card__inventory,
.catalog-card__art.has-photo .catalog-card__glow { z-index: 2; }
.item-detail__art.has-photo { background: #2f2a26; overflow: hidden; }
.item-detail__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-detail__art.has-photo .item-detail__halo { display: none; }
.item-detail__art.has-photo .item-detail__badges { z-index: 2; }
.item-photo-editor { display: flex; align-items: center; gap: 12px; padding: 9px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 11px; background: rgba(255, 255, 255, 0.16); }
.item-photo-editor__preview { display: grid; place-items: center; width: 92px; height: 68px; overflow: hidden; border-radius: 8px; background: rgba(166, 95, 73, 0.1); color: var(--terracotta); flex-shrink: 0; }
.item-photo-editor__preview img { width: 100%; height: 100%; object-fit: cover; }
.item-photo-editor__copy { display: grid; gap: 4px; justify-items: start; }
.item-photo-editor__copy strong { font-size: 10px; }
.item-photo-editor__copy span { color: var(--muted); font-size: 8px; }
.item-photo-editor__copy > div { display: flex; align-items: center; gap: 8px; }
.item-photo-editor__copy label { cursor: pointer; }
.table-item__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Сканер штрихкода с камеры */
body.scanner-open { overflow: hidden; }
.barcode-scanner {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(28, 22, 18, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.barcode-scanner__panel {
  width: min(440px, 100%);
  max-height: 94vh;
  overflow: auto;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fbf7f0, #efe4d7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 80px rgba(20, 14, 10, 0.38);
  color: var(--ink);
}
.barcode-scanner__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.barcode-scanner__head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.03em; }
.barcode-scanner__video { position: relative; overflow: hidden; border-radius: 14px; background: #171310; aspect-ratio: 4 / 3; }
.barcode-scanner__video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.barcode-scanner__frame { position: absolute; inset: 18% 10%; border: 2px solid rgba(255, 250, 242, 0.9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(10, 8, 6, 0.18); }
.barcode-scanner__frame::before,
.barcode-scanner__frame::after { content: ''; position: absolute; width: 28px; height: 28px; border: 3px solid #fff3e4; }
.barcode-scanner__frame::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.barcode-scanner__frame::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.barcode-scanner__laser { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, #ff9a72, transparent); box-shadow: 0 0 12px #ff9a72; animation: barcode-laser 1.8s ease-in-out infinite; }
@keyframes barcode-laser { 0%, 100% { transform: translateY(-52px); opacity: 0.45; } 50% { transform: translateY(52px); opacity: 1; } }
.barcode-scanner__status { margin: 9px 0 7px; min-height: 30px; color: var(--ink-soft); font-size: 10.5px; line-height: 1.45; }
.barcode-scanner__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.barcode-scanner__hint { display: flex; gap: 5px; margin-top: 7px; color: var(--muted); font-size: 8.5px; line-height: 1.4; }
@media (max-width: 560px) {
  .barcode-scanner { padding: 8px; }
  .barcode-scanner__panel { border-radius: 16px; }
  .barcode-scanner__head h2 { font-size: 19px; }
}

/* Полная матрица ролей */
.role-card__actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.role-card__group-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.role-permission-editor { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 10px; background: rgba(255, 255, 255, 0.14); }
.role-permission-area { margin: 0; padding: 7px; border: 1px solid rgba(90, 75, 58, 0.06); border-radius: 8px; }
.role-permission-area legend { padding: 0 4px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.07em; }
.role-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.permission-check { display: flex; align-items: center; gap: 5px; padding: 4px 5px; border: 1px solid rgba(90, 75, 58, 0.07); border-radius: 6px; color: var(--ink-soft); font-size: 8px; cursor: pointer; }
.permission-check input { position: absolute; opacity: 0; pointer-events: none; }
.permission-check > span { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 4px; border: 1px solid rgba(90, 75, 58, 0.18); color: transparent; flex-shrink: 0; }
.permission-check.is-checked { border-color: rgba(166, 95, 73, 0.3); background: rgba(166, 95, 73, 0.07); }
.permission-check.is-checked > span { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
@media (max-width: 760px) { .role-permission-grid { grid-template-columns: 1fr; } }

/* Превью MDBootstrap */
.template-card--mdb .template-preview {
  background: linear-gradient(145deg, #eef3ff, #ffffff);
}
.template-preview--mdb .template-preview__mdb-pill {
  position: absolute;
  left: 16px;
  top: 38px;
  width: 58px;
  height: 14px;
  border-radius: 999px;
  background: rgba(59, 113, 202, 0.2);
}
.template-preview--mdb .template-preview__bs-card--one {
  box-shadow: 0 4px 10px rgba(38, 50, 56, 0.12);
}
.mdb-theme-picker {
  border-color: rgba(90, 75, 58, 0.1);
  background: rgba(255, 255, 255, 0.2);
}
.mdb-theme-field input[type="color"] {
  background: transparent;
}

/* Каталог: список */
.catalog-view-switch .segmented__item { gap: 4px; }
.catalog-list { overflow: hidden; padding: 0; }
.catalog-list__head,
.catalog-row { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(130px, 0.9fr) minmax(145px, 0.8fr) minmax(85px, 0.45fr) minmax(170px, auto); gap: 10px; align-items: center; padding: 9px 14px; }
.catalog-list__head { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid rgba(90, 75, 58, 0.08); }
.catalog-row { border-bottom: 1px solid rgba(90, 75, 58, 0.06); }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:hover { background: rgba(255, 255, 255, 0.2); }
.catalog-row.is-hidden { opacity: 0.55; }
.catalog-row__item { display: flex; align-items: center; gap: 9px; min-width: 0; }
.catalog-row__thumb { width: 42px; height: 42px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--group-color) 13%, transparent); color: var(--group-color); }
.catalog-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.catalog-row__copy { display: grid; gap: 2px; min-width: 0; }
.catalog-row__copy strong { font-size: 10px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-row__copy small { font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-row__group, .catalog-row__warehouse, .catalog-row__availability { min-width: 0; font-size: 8.5px; color: var(--ink-soft); }
.catalog-row__availability strong { color: var(--green); }
.catalog-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.catalog-card__model, .catalog-card__serial { margin: 2px 0 0; color: var(--ink-soft); font-size: 9px; }
.catalog-card__serial { font-family: var(--font-mono); color: var(--muted); font-size: 8px; }

/* Галерея номенклатуры */
.item-photo-editor { flex-wrap: wrap; }
.item-photo-thumbs { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.item-photo-thumb { position: relative; width: 48px; height: 42px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(90, 75, 58, 0.12); background: #fff; }
.item-photo-thumb.is-cover { border-color: var(--terracotta); box-shadow: 0 0 0 1px var(--terracotta); }
.item-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-photo-thumb button { position: absolute; right: 1px; top: 1px; width: 15px; height: 15px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(30, 24, 20, 0.72); color: #fff; cursor: pointer; padding: 0; }
.item-detail__thumbs { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; overflow-x: auto; z-index: 3; }
.item-detail__thumb { width: 42px; height: 36px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.3); cursor: pointer; flex-shrink: 0; }
.item-detail__thumb.is-active { border-color: #fff; }
.item-detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-editor { display: grid; gap: 1px; color: var(--ink-soft); font-size: 8px; }
.table-editor small { color: var(--muted); font-size: 7.5px; }
@media (max-width: 900px) {
  .catalog-list__head { display: none; }
  .catalog-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; padding: 10px 12px; }
  .catalog-row__group, .catalog-row__warehouse, .catalog-row__availability { grid-column: 1 / -1; }
  .catalog-row__actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1200px) {
  .col-editor { display: none; }
}

/* Единый левый отступ у элементов списков во всех шаблонах */
.requests-list .request-card__body,
.notifications-list .notification-card,
.audit-list .audit-row,
.mail-inbox-list .mail-message,
.external-people-list .external-person-card,
.external-bookings-list .external-booking,
.leaderboard-list > *,
.employee-history-list .employee-history-row,
.employee-equipment-list .employee-equipment-row,
.catalog-list .catalog-row,
.people-list .person-row,
.lists-grid .list-card,
.info-list > div,
.list-group-item,
.dropdown-menu .dropdown-item {
  padding-left: 16px;
}

/* Справочники автозаполнения */
.directory-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 14px; }
.directory-tabs .people-tab { flex: 0 1 auto; }
.directory-tab__count { margin-left: 3px; padding: 1px 5px; border-radius: 999px; background: rgba(90, 75, 58, 0.08); font-size: 7.5px; }
.directory-toolbar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 14px; }
.directory-search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 180px; color: var(--muted); }
.directory-search .field__input { min-height: 34px; padding-left: 0; border: 0; background: transparent; }
.directory-toolbar__count { color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.directory-list { overflow: hidden; padding: 0; }
.directory-list__head,
.directory-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 100px 74px; gap: 9px; align-items: center; padding: 9px 14px; }
.directory-list__head { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid rgba(90, 75, 58, 0.08); }
.directory-list__head span:nth-child(3) { text-align: right; }
.directory-row { border-bottom: 1px solid rgba(90, 75, 58, 0.06); }
.directory-row:last-of-type { border-bottom: 0; }
.directory-row:hover { background: rgba(255, 255, 255, 0.2); }
.directory-check { width: 15px; height: 15px; accent-color: var(--terracotta); cursor: pointer; }
.directory-row__value { display: grid; gap: 3px; min-width: 0; }
.directory-row__value strong { font-size: 10px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-row__aliases { display: flex; flex-wrap: wrap; gap: 3px; color: var(--muted); font-size: 8px; }
.directory-alias { padding: 2px 5px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 5px; background: rgba(255, 255, 255, 0.22); }
.directory-row__usage { display: grid; justify-items: end; gap: 1px; color: var(--muted); font-size: 8px; }
.directory-row__usage strong { color: var(--ink); font-size: 14px; line-height: 1; }
.directory-row__usage.is-empty strong { color: var(--faint); }
.directory-row__actions { display: flex; justify-content: flex-end; gap: 3px; }
.directory-row__delete { color: var(--red) !important; }
.directory-merge-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid rgba(90, 75, 58, 0.08); background: rgba(166, 95, 73, 0.045); color: var(--muted); font-size: 9px; }
.directory-merge-bar span { display: inline-flex; align-items: center; gap: 5px; }
.directory-help { display: grid; gap: 7px; padding: 13px 15px; margin-top: 14px; }
.directory-help > div { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 9px; line-height: 1.5; }
.directory-help svg { flex-shrink: 0; color: var(--terracotta); }
.directory-help strong { color: var(--ink-soft); }
.directory-modal-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 10px; background: rgba(255, 255, 255, 0.16); color: var(--terracotta); }
.directory-modal-head div { display: grid; gap: 2px; }
.directory-modal-head strong { color: var(--ink); font-size: 11px; }
.directory-modal-head span { color: var(--muted); font-size: 8.5px; }
.directory-merge-list { display: grid; gap: 4px; margin: 10px 0; }
.directory-merge-list div { display: grid; gap: 2px; padding: 7px 9px; border: 1px solid rgba(90, 75, 58, 0.07); border-radius: 7px; background: rgba(255, 255, 255, 0.14); }
.directory-merge-list strong { font-size: 10px; }
.directory-merge-list span { color: var(--muted); font-size: 8px; }
@media (max-width: 760px) {
  .directory-toolbar { align-items: stretch; flex-wrap: wrap; }
  .directory-toolbar__count { order: 3; width: 100%; }
  .directory-list__head { display: none; }
  .directory-row { grid-template-columns: 20px minmax(0, 1fr) 58px; padding: 10px 12px; }
  .directory-row__usage { justify-items: end; }
  .directory-row__actions { grid-column: 2 / -1; justify-content: flex-end; }
  .directory-merge-bar { align-items: flex-start; flex-direction: column; }
  .directory-row__value strong { white-space: normal; }
}

/* Кликабельные карточки и строки номенклатуры */
.catalog-card__art[data-action],
.catalog-row[data-action],
.data-table tbody tr.is-clickable { cursor: pointer; }
.catalog-card__art[data-action]:focus-visible,
.catalog-card__model-link:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}
.catalog-card__model-link {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 9px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-card__model-link:hover { color: var(--terracotta); }
.catalog-row[data-action]:hover { background: rgba(var(--mdb-primary-rgb, 166, 95, 73), 0.06); }
.data-table tbody tr.is-clickable:hover { background: rgba(166, 95, 73, 0.055); }

/* Обновлённые превью шаблонов */
.template-preview--mdb {
  background:
    radial-gradient(circle at 82% 8%, rgba(59, 113, 202, 0.22), transparent 42%),
    linear-gradient(145deg, #121c2a, #090f18) !important;
  border-color: rgba(126, 154, 184, 0.25);
}
.template-preview--mdb .template-preview__navbar {
  background: #152233;
  border-bottom-color: rgba(126, 154, 184, 0.18);
}
.template-preview--mdb .template-preview__navbar::before {
  background: var(--mdb-primary, #3b71ca);
  box-shadow: 0 0 12px rgba(59, 113, 202, 0.5);
}
.template-preview--mdb .template-preview__navbar::after {
  background: rgba(215, 230, 248, 0.28);
}
.template-preview--mdb .template-preview__bs-card {
  background: #1a2839;
  border-color: rgba(126, 154, 184, 0.2);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}
.template-preview--mdb .template-preview__line {
  background: #35475c;
}
.template-preview__mdb-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 32px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(59, 113, 202, 0.18), transparent 65%);
  border: 1px solid rgba(126, 154, 184, 0.14);
}
.template-preview__mdb-pill {
  position: absolute;
  left: 16px;
  top: 38px;
  width: 58px;
  height: 9px;
  border-radius: 999px;
  background: var(--mdb-primary, #3b71ca);
  z-index: 2;
}
.template-preview__mdb-stat {
  position: absolute;
  bottom: 14px;
  width: 25%;
  height: 40px;
  border-radius: 7px;
  background: #1e2f43;
  border: 1px solid rgba(126, 154, 184, 0.18);
}
.template-preview__mdb-stat--one { left: 11px; }
.template-preview__mdb-stat--two { left: calc(25% + 18px); }
.template-preview--mdb .template-preview__bs-card--one { left: 11px; width: calc(50% - 16px); }
.template-preview--mdb .template-preview__bs-card--two { left: calc(50% + 5px); width: calc(50% - 16px); }

/* Избранное */
.favorite-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: rgba(30, 24, 20, 0.32);
  color: rgba(255, 250, 242, 0.8);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.favorite-btn:hover { transform: translateY(-1px); color: #f3c96d; background: rgba(30, 24, 20, 0.55); }
.favorite-btn.is-active { color: #f3c96d; background: rgba(179, 138, 79, 0.2); border-color: rgba(243, 201, 109, 0.45); }
.favorite-btn.is-active svg { fill: currentColor; }
.catalog-row__actions .favorite-btn,
.data-table .favorite-btn,
.item-detail__head-actions .favorite-btn { position: static; }
.item-detail__head-actions { display: flex; align-items: center; gap: 6px; }
.favorites-grid { grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }
.cabinet-favorites { padding: 15px; margin-bottom: 14px; }
.cabinet-favorites .section-heading { margin-bottom: 10px; }
.cabinet-favorites .section-heading h2 { display: flex; align-items: center; gap: 6px; }
.cabinet-favorites .section-heading h2 svg { color: var(--gold); }
.favorites-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.favorite-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(90, 75, 58, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.favorite-mini:hover { background: rgba(255, 255, 255, 0.32); border-color: rgba(166, 95, 73, 0.22); }
.favorite-mini__art { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border-radius: 8px; background: rgba(166, 95, 73, 0.1); color: var(--terracotta); }
.favorite-mini__art img { width: 100%; height: 100%; object-fit: cover; }
.favorite-mini__copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.favorite-mini__copy strong { font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-mini__copy small { color: var(--muted); font-size: 8px; }
.favorite-mini__arrow { color: var(--muted); }
.favorites-empty { display: flex; align-items: center; gap: 7px; padding: 14px; border: 1px dashed rgba(90, 75, 58, 0.16); border-radius: 9px; color: var(--muted); font-size: 9px; }
.profile-settings-hero { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid rgba(90, 75, 58, 0.08); border-radius: 10px; background: rgba(255, 255, 255, 0.17); }
.profile-settings-hero div { display: grid; gap: 2px; }
.profile-settings-hero strong { font-size: 12px; }
.profile-settings-hero span { color: var(--muted); font-size: 8.5px; }
@media (max-width: 700px) {
  .favorites-strip { grid-template-columns: 1fr; }
  .catalog-row__actions .favorite-btn { display: none; }
}

/* Фото: квадратная сцена карточки, contain и размытая подложка */
.catalog-card__art {
  height: auto;
  aspect-ratio: 1 / 1;
}
.catalog-card__photo-blur {
  position: absolute;
  inset: -14%;
  width: 128%;
  height: 128%;
  object-fit: cover;
  filter: blur(28px) saturate(0.85);
  transform: scale(1.05);
  opacity: 0.42;
  z-index: 0;
}
.catalog-card__photo {
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  object-position: center;
  z-index: 1;
  opacity: 1;
}
.catalog-card__art.has-photo::after {
  height: 34%;
  z-index: 2;
  pointer-events: none;
}
.catalog-card__icon,
.catalog-card__glow { z-index: 1; }
.catalog-card__badges,
.catalog-card__inventory { z-index: 3; }
.favorite-btn { z-index: 5; }

/* Детальный просмотр: сцена 4:3, фото целиком */
.item-detail__art {
  aspect-ratio: 4 / 3;
  min-height: 0;
}
.item-detail__photo-blur {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(30px) saturate(0.85);
  transform: scale(1.04);
  opacity: 0.38;
  z-index: 0;
}
.item-detail__photo {
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
  object-position: center;
  z-index: 1;
  cursor: zoom-in;
}
.item-detail__thumbs { z-index: 4; }
.item-detail__badges { z-index: 3; }

/* Полноэкранный просмотр фотографий */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 16px;
  background: rgba(5, 9, 14, 0.94);
  opacity: 0;
  transition: opacity 0.16s ease;
}
.photo-lightbox.is-visible { opacity: 1; }
body.photo-lightbox-open { overflow: hidden; }
.photo-lightbox__top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #f2f6fd; }
.photo-lightbox__title { font-size: 14px; font-weight: 650; }
.photo-lightbox__close,
.photo-lightbox__nav {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(20, 30, 43, 0.7);
  color: #e8eff9;
  cursor: pointer;
}
.photo-lightbox__close:hover,
.photo-lightbox__nav:hover { background: rgba(40, 60, 82, 0.9); }
.photo-lightbox__nav { align-self: center; }
.photo-lightbox__nav--prev { grid-column: 1; }
.photo-lightbox__nav--next { grid-column: 3; }
.photo-lightbox__stage { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; display: grid; place-items: center; }
.photo-lightbox__image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42); }
.photo-lightbox__bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 58px; }
.photo-lightbox__counter { color: #9fb0c4; font-size: 10px; white-space: nowrap; }
.photo-lightbox__thumbs { display: flex; gap: 5px; overflow-x: auto; max-width: min(72vw, 720px); padding: 2px; }
.photo-lightbox__thumb { width: 48px; height: 44px; flex-shrink: 0; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #101a27; cursor: pointer; opacity: 0.65; }
.photo-lightbox__thumb.is-active { border-color: #fff; opacity: 1; }
.photo-lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .photo-lightbox { grid-template-columns: 40px minmax(0, 1fr) 40px; padding: 10px; }
  .photo-lightbox__nav { width: 36px; height: 36px; }
  .photo-lightbox__thumbs { max-width: 58vw; }
}

/* Миниатюры не обрезают фото */
.catalog-row__thumb img,
.item-photo-editor__preview img,
.item-photo-thumb img,
.item-detail__thumb img,
.favorite-mini__art img {
  object-fit: contain;
  background: rgba(18, 24, 31, 0.18);
}
