:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #24291f;
  background: #f4f5f1;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
.hidden {
  display: none !important;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.login-card {
  padding: 9vh max(10%, 50px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.login-logo {
  width: 150px;
  max-height: 100px;
  object-fit: contain;
  object-position: left;
  margin-bottom: 75px;
}
.eyebrow,
.breadcrumbs,
.side-label {
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 750;
  color: #87907c;
}
.login h1 {
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  max-width: 470px;
  margin: 18px 0;
}
.login p {
  color: #747d6c;
  line-height: 1.6;
  max-width: 410px;
}
.primary {
  background: #526b2e;
  color: white;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  padding: 15px 19px;
  font-weight: 650;
  display: inline-flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
}
.primary:hover {
  background: #3f5521;
}
.login-card .primary {
  margin: 25px 0 15px;
}
.login small {
  color: #90998a;
}
.login-aside {
  background: #344c25;
  color: #fff;
  display: flex;
  align-items: end;
  padding: 9%;
  position: relative;
  overflow: hidden;
}
.login-aside > div:last-child {
  z-index: 1;
}
.login-aside h2 {
  font-size: 40px;
  max-width: 440px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.login-aside p {
  color: #c4d3b5;
}
.orb {
  position: absolute;
  width: 570px;
  height: 570px;
  right: -120px;
  top: -90px;
  border: 90px solid #678348;
  border-radius: 50%;
  opacity: 0.65;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.sidebar {
  background: #283c20;
  color: #e7eddf;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 15px 20px;
}
.brand {
  padding: 2px 16px 30px;
  border-bottom: 1px solid #ffffff20;
}
.brand img {
  width: 106px;
  height: 52px;
  object-fit: contain;
  object-position: left;
  background: #fff;
  border-radius: 5px;
  padding: 3px;
}
.brand span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #a5b99a;
  margin-top: 12px;
}
.side-label {
  color: #9cb291;
  padding: 25px 15px 11px;
}
.nav {
  width: 100%;
  border: 0;
  background: transparent;
  color: #d3ddce;
  text-align: left;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav:hover:not(:disabled),
.nav.active {
  background: #506b37;
  color: white;
}
.nav.locked {
  opacity: 0.47;
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.lock {
  margin-left: auto;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.nav-icon,
.lock {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-foot {
  margin: auto 14px 0;
  border-top: 1px solid #ffffff20;
  padding-top: 20px;
  font-size: 12px;
  color: #d0dbc8;
}
.sidebar-foot small {
  display: block;
  color: #9aaf8f;
  margin: 7px 0 0 13px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #9dce65;
  border-radius: 50%;
  margin-right: 6px;
}
main {
  min-width: 0;
}
header {
  height: 102px;
  background: #fff;
  border-bottom: 1px solid #e7ebe3;
  padding: 24px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 {
  font-size: 25px;
  letter-spacing: -0.03em;
  margin: 7px 0 0;
}
.account {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #5b6555;
}
.quiet {
  border: 0;
  background: transparent;
  color: #5b7145;
}
.content {
  padding: 32px 42px;
  max-width: 1500px;
}
.hero {
  background: #e5eddc;
  border: 1px solid #dbe6d0;
  border-radius: 12px;
  padding: 30px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero h2 {
  font-size: 24px;
  margin: 8px 0;
}
.hero p,
.muted {
  color: #788272;
  line-height: 1.55;
}
.hero-mark {
  font-size: 65px;
  color: #b4c9a0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 35px 0 16px;
}
.section-title h2 {
  font-size: 18px;
  margin: 0;
}
.section-title span {
  font-size: 12px;
  color: #9aa393;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.card {
  background: white;
  border: 1px solid #e7ebe3;
  border-radius: 10px;
  padding: 22px;
}
.card h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}
.card p {
  font-size: 13px;
  color: #879080;
  line-height: 1.5;
  margin: 0;
}
.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #edf3e8;
  color: #627e4c;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill {
  display: inline-block;
  background: #f0f2ed;
  color: #818b79;
  border-radius: 30px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 650;
}
.pill.ok {
  background: #e6f3e0;
  color: #43722e;
}
.pill.wait {
  background: #fff2dc;
  color: #90601c;
}
.card .pill {
  margin-top: 20px;
}
.panel {
  background: #fff;
  border: 1px solid #e7ebe3;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 18px;
}
.panel h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.panel p {
  font-size: 13px;
  color: #7c8676;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin-top: 18px;
}
th {
  text-align: left;
  color: #929b8b;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 650;
}
td,
th {
  padding: 13px 10px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: middle;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
.btn {
  border: 1px solid #dce3d7;
  background: #fff;
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 12px;
  color: #3d5230;
}
.btn:hover {
  background: #f1f5ee;
}
.btn.danger {
  color: #984e42;
}
.form-row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 15px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #697363;
}
input,
select {
  background: #fff;
  border: 1px solid #dce3d7;
  border-radius: 7px;
  padding: 10px;
  color: #283122;
  min-width: 180px;
}
input[type="checkbox"] {
  min-width: 0;
}
.checkline {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 5px 0;
}
.notice {
  margin: 18px 42px 0;
  padding: 12px 16px;
  border-radius: 7px;
  background: #e6f3e0;
  color: #40662e;
  font-size: 13px;
}
.notice.error {
  background: #faeae8;
  color: #8d4137;
}
.pending {
  max-width: 620px;
  margin: 80px auto;
}
.pending .card-icon {
  margin-bottom: 20px;
}
@media (max-width: 850px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    min-height: auto;
  }
  .brand {
    padding-bottom: 12px;
  }
  .brand img {
    height: 38px;
  }
  .sidebar-foot,
  .side-label {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  .nav {
    white-space: nowrap;
    width: auto;
  }
  .nav.locked {
    display: none;
  }
  header {
    padding: 20px;
    height: auto;
  }
  .content {
    padding: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-aside {
    display: none;
  }
  .login-card {
    padding: 50px 30px;
  }
  .account {
    flex-direction: column;
    gap: 3px;
  }
}
.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.dashboard-heading h2 {
  font-size: 25px;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.dashboard-heading p {
  color: #788272;
  font-size: 14px;
  margin: 0;
}
.dashboard-heading select {
  min-width: 200px;
}
.preview-note,
.data-note {
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 17px;
}
.preview-note {
  background: #edf3e8;
  color: #4b653b;
}
.data-note {
  background: #fff8eb;
  color: #826335;
  border: 1px solid #f1e5ce;
}
.filters {
  background: white;
  border: 1px solid #e7ebe3;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters input,
.filters select {
  min-width: 145px;
  max-width: 210px;
}
.filters select:disabled {
  color: #969e91;
  background: #f5f6f3;
}
.filters .primary {
  padding: 10px 14px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid #e7ebe3;
  border-radius: 10px;
  padding: 19px;
}
.metric-label {
  font-size: 13px;
  font-weight: 700;
}
.metric strong {
  font-size: 30px;
  color: #a7b09f;
}
.metric-desc,
.metric-state {
  font-size: 12px;
  color: #879080;
}
.metric-state {
  margin-top: 7px;
  color: #a0a99b;
}
.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-card {
  min-height: 165px;
}
@media (max-width: 850px) {
  .dashboard-heading {
    align-items: start;
    flex-direction: column;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .filters > * {
    flex: 1;
  }
}

.warehouse-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.warehouse-line span {
  min-width: 200px;
}

/* Цвета логотипа и анимация его оригинальных векторных чешуек. */
:root {
  color: #302623;
  background: #f7f5f1;
}
.login {
  background: #fffdfa;
}
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hop-mark {
  width: 100%;
  height: auto;
  overflow: visible;
}
.login-brand {
  margin-bottom: 75px;
}
.remember-login {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 14px;
  color: #4a2f29;
  font-size: 14px;
}
.login-brand .hop-mark {
  width: 110px;
}
.brand-word {
  color: #4a2f29;
  font-size: 28px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.sidebar-brand .hop-mark {
  width: 68px;
  height: 53px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.sidebar-brand .brand-word {
  color: #ffcb00;
  font-size: 21px;
}
.sidebar {
  background: #382722;
  color: #f5ebe2;
}
.nav {
  color: #eddfd3;
}
.nav:hover:not(:disabled),
.nav.active {
  background: #755135;
  color: #fff;
}
.side-label {
  color: #c9b0a0;
}
.brand span,
.sidebar-foot small {
  color: #c9b0a0;
}
.sidebar-foot {
  color: #f5e7d7;
}
.login-aside {
  background: #4a2f29;
}
.login-aside .eyebrow {
  color: #e7c39f;
}
.login-aside p {
  color: #f0d4bc;
}
.orb {
  border-color: #a66a2c;
}
.primary {
  background: #70421f;
}
.primary:hover {
  background: #53301b;
}
.page-loading {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
  background: #fffdfa;
  color: #684a38;
  font-size: 14px;
  font-weight: 600;
}
.page-loading .hop-mark {
  width: 96px;
}
.loading-brand .brand-word {
  font-size: 27px;
}
.inline-loading {
  position: fixed;
  z-index: 90;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: 0 6px 24px #38272233;
  pointer-events: none;
}
.inline-loading .hop-mark {
  width: 45px;
}
/* Одна жёлтая чешуйка обходит четыре внешние позиции по кругу. */
.page-loading .hop-scale,
.inline-loading .hop-scale {
  fill: #92601d;
}
.page-loading .hop-scale:not(.scale-2),
.inline-loading .hop-scale:not(.scale-2) {
  animation: loading-light 1.6s ease-in-out infinite;
}
.page-loading .hop-scale.scale-1,
.inline-loading .hop-scale.scale-1 {
  animation-delay: 0s;
}
.page-loading .hop-scale.scale-3,
.inline-loading .hop-scale.scale-3 {
  animation-delay: -1.2s;
}
.page-loading .hop-scale.scale-4,
.inline-loading .hop-scale.scale-4 {
  animation-delay: -0.8s;
}
.page-loading .hop-scale.scale-5,
.inline-loading .hop-scale.scale-5 {
  animation-delay: -0.4s;
}
@keyframes loading-light {
  0%,
  100% {
    fill: #92601d;
  }
  12.5% {
    fill: #ffcb00;
  }
  25% {
    fill: #92601d;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-loading .hop-scale:not(.scale-2),
  .inline-loading .hop-scale:not(.scale-2) {
    animation: none;
  }
  .page-loading .hop-scale,
  .inline-loading .hop-scale {
    fill: #ffcb00;
  }
}
@media (max-width: 850px) {
  .login-brand {
    margin-bottom: 50px;
  }
  .sidebar-brand .hop-mark {
    width: 48px;
    height: 38px;
  }
}

/* Единая сетка и элементы управления для рабочих разделов. */
[hidden] {
  display: none !important;
}
:root {
  --ink: #302623;
  --muted: #786e65;
  --border: #e9e3db;
  --surface: #fffdfa;
  --accent: #70421f;
  --accent-dark: #53301b;
  --soft: #f7f2eb;
  --gold: #e8a51c;
}
body {
  color: var(--ink);
  line-height: 1.45;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #e5ab39;
  outline-offset: 2px;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #795742 transparent;
}
.sidebar nav {
  min-width: 0;
}
.sidebar-foot {
  margin-top: auto;
}
header {
  gap: 24px;
  min-width: 0;
}
header > div:first-child,
.account,
.content,
.panel,
.card,
.filters > *,
.form-row > * {
  min-width: 0;
}
.account span {
  overflow-wrap: anywhere;
  text-align: right;
}
.content {
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
  padding: clamp(22px, 2.5vw, 38px) clamp(20px, 3vw, 48px) 60px;
}
.panel,
.card,
.filters,
.metric {
  border-color: var(--border);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 2px 8px #38272208;
}
.panel {
  padding: clamp(18px, 2vw, 26px);
}
.panel h2,
.section-title h2 {
  color: var(--ink);
}
.panel p,
.card p,
.muted {
  color: var(--muted);
}
input,
select {
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  border-color: #ddd5cb;
  color: var(--ink);
}
input[type="checkbox"] {
  min-height: 0;
}
.btn {
  min-height: 38px;
  border-color: #ded4ca;
  color: #60452f;
  font-weight: 600;
  white-space: normal;
}
.btn:hover:not(:disabled) {
  background: #f8f1e8;
  border-color: #cdb7a3;
}
.btn:disabled,
.primary:disabled {
  opacity: 0.55;
}
.primary {
  background: var(--accent);
}
.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}
.form-row {
  gap: 12px;
}
.form-row label {
  flex: 1 1 180px;
}
.form-row label input,
.form-row label select {
  width: 100%;
}
.table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
}
td,
th {
  overflow-wrap: anywhere;
}
td .form-row {
  align-items: center;
}
.checkline {
  gap: 10px;
  padding: 8px 0;
}
.checkline input {
  flex: 0 0 auto;
}
.notice {
  max-width: 1670px;
  margin-inline: auto;
}

/* Справочник магазинов: общие показатели и компактные раскрывающиеся карточки. */
.stores-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.stores-intro h2 {
  margin: 7px 0 5px;
  font-size: clamp(23px, 2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.stores-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.sync-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.sync-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #609447;
  box-shadow: 0 0 0 4px #e7f2e0;
}
.sync-dot.error {
  background: #b35344;
  box-shadow: 0 0 0 4px #fbeae5;
}
.sync-dot.pending {
  background: #a86c27;
}
.sync-text {
  display: grid;
  gap: 1px;
}
.sync-label {
  color: #9c8f80;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
}
.sync-text strong {
  font-size: 12px;
}
.sync-time {
  color: var(--muted);
  font-size: 12px;
}
.sync-button {
  margin-left: 4px;
}
.stores-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stores-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.stores-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.stores-summary-item strong {
  color: #53331e;
  font-size: 25px;
  line-height: 1;
}
.stores-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 14px;
}
.stores-toolbar label:first-child {
  flex: 1 1 240px;
  max-width: 420px;
}
.stores-toolbar label:nth-child(2) {
  flex: 0 1 200px;
}
.stores-toolbar input,
.stores-toolbar select {
  width: 100%;
}
.stores-count {
  margin-left: auto;
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}
.stores-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 29rem), 1fr));
  align-items: start;
  gap: 12px;
}
.store-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 2px 8px #38272208;
}
.store-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 19px 19px 13px;
}
.store-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: #855326;
  background: #faf0df;
}
.store-heading {
  flex: 1;
  min-width: 0;
}
.store-heading h3 {
  margin: 1px 0 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.store-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.store-head .pill {
  flex: 0 0 auto;
  white-space: nowrap;
}
.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0 19px 15px 71px;
  color: #96897d;
  font-size: 12px;
}
.store-details {
  border-top: 1px solid #f0ebe4;
}
.store-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 19px;
  color: #704a2f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.store-details summary::-webkit-details-marker {
  display: none;
}
.store-details summary:hover {
  background: #faf6f0;
}
.store-toggle-icon {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.store-details[open] .store-toggle-icon {
  transform: rotate(45deg);
}
.store-details-body {
  padding: 3px 19px 18px;
}
.store-details-body h4 {
  margin: 20px 0 10px;
  font-size: 12px;
  color: #77695d;
}
.store-edit-row,
.store-add-row {
  display: flex;
  align-items: end;
  gap: 8px;
}
.store-edit-row label,
.store-add-row select {
  flex: 1;
  min-width: 0;
}
.store-edit-row input {
  width: 100%;
}
.warehouse-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(125px, 160px) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  margin: 0;
  border-top: 1px solid #f1ede7;
}
.warehouse-line span {
  min-width: 0;
  color: #51453d;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.warehouse-line select {
  width: 100%;
}
.store-add-row {
  margin-top: 10px;
}
.store-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1ede7;
}
.store-empty,
.stores-empty {
  color: var(--muted);
  font-size: 13px;
}
.stores-empty {
  padding: 35px 20px;
  text-align: center;
  border: 1px dashed #dfd5c9;
  border-radius: 12px;
  background: #fffcf8;
}

@media (max-width: 1100px) {
  .stores-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .sync-status {
    width: 100%;
  }
  .sync-text {
    flex: 1;
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    padding: 14px 14px 10px;
    overflow: visible;
  }
  .brand {
    border: 0;
    padding: 0 4px 10px;
  }
  .brand span {
    margin-top: 5px;
  }
  .sidebar nav {
    gap: 3px;
    max-width: 100%;
    padding-bottom: 3px;
    scrollbar-width: thin;
    scrollbar-color: #795742 transparent;
  }
  .nav,
  .nav.locked {
    display: flex;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 12px;
  }
  .nav .lock {
    margin-left: 0;
  }
  header {
    min-height: 82px;
    gap: 12px;
    padding: 16px 20px;
  }
  header h1 {
    font-size: 22px;
  }
  .account {
    align-items: flex-end;
    font-size: 12px;
  }
  .content {
    padding: 22px 20px 42px;
  }
  .notice {
    margin: 14px 20px 0;
  }
  .stores-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .login-card {
    padding: 36px 22px;
  }
  .login h1 {
    font-size: clamp(30px, 9vw, 40px);
  }
  .breadcrumbs {
    font-size: 9px;
  }
  .account {
    max-width: 45%;
  }
  .content {
    padding-inline: 14px;
  }
  .stores-summary {
    gap: 8px;
  }
  .stores-summary-item {
    min-height: 66px;
    padding: 12px;
  }
  .stores-summary-item strong {
    font-size: 22px;
  }
  .stores-toolbar label:first-child,
  .stores-toolbar label:nth-child(2) {
    flex: 1 1 100%;
    max-width: none;
  }
  .stores-count {
    margin-left: 0;
    padding-bottom: 0;
  }
  .store-head {
    gap: 10px;
    padding: 16px 15px 12px;
  }
  .store-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .store-meta {
    padding-left: 61px;
  }
  .store-details summary {
    padding-inline: 15px;
  }
  .store-details-body {
    padding-inline: 15px;
  }
  .warehouse-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .warehouse-name {
    grid-column: 1 / -1;
  }
  .store-edit-row,
  .store-add-row {
    flex-wrap: wrap;
  }
  .store-edit-row label,
  .store-add-row select {
    flex-basis: 100%;
  }
  .table-wrap {
    overflow: visible;
  }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    padding: 12px 0;
    border-bottom: 1px solid #eee8e0;
  }
  .table-wrap td,
  .table-wrap td:first-child {
    padding: 7px 0;
    border: 0;
  }
  .table-wrap td[data-label]::before {
    display: block;
    margin-bottom: 4px;
    color: #938679;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    content: attr(data-label);
  }
  .table-wrap .form-row > * {
    flex: 1 1 100%;
    width: 100%;
  }
  .filters > * {
    flex: 1 1 100%;
  }
  .filters input,
  .filters select {
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 360px) {
  .store-head {
    flex-wrap: wrap;
  }
  .store-heading {
    flex-basis: calc(100% - 50px);
  }
  .store-head .pill {
    margin-left: 46px;
  }
  .store-meta {
    padding-left: 15px;
  }
}

/* На телефоне все разделы доступны через компактное меню. */
.mobile-menu-toggle {
  display: none;
}
.checkline input {
  accent-color: #80512d;
}
@media (max-width: 850px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 12px;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
  .brand {
    min-width: 0;
    padding-bottom: 0;
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #ffffff2e;
    border-radius: 8px;
    background: #563b2c;
    color: #fff5e8;
    font-size: 13px;
    font-weight: 700;
  }
  .sidebar nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    padding: 12px 0 2px;
  }
  .sidebar.menu-open nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }
  .sidebar nav .side-label {
    display: block;
    grid-column: 1 / -1;
    padding: 12px 10px 5px;
  }
  .sidebar nav .nav {
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
  }
  .sidebar nav .nav .lock {
    margin-left: auto;
  }
}

/* Логотип в рабочем пространстве также служит ссылкой на обзор. */
.sidebar-brand {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.sidebar-brand:focus-visible {
  outline: 2px solid #ffcb00;
  outline-offset: 5px;
  border-radius: 4px;
}

/* Общий месячный график: горизонтальная прокрутка сохраняет читаемость на телефоне. */
.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}
.calendar-toolbar label {
  flex: 1 1 180px;
}
.calendar-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e7dfd5;
  border-radius: 10px;
  background: #fff;
}
.calendar-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}
.calendar-table th,
.calendar-table td {
  min-width: 42px;
  padding: 8px 5px;
  text-align: center;
  border-right: 1px solid #eee7df;
  border-bottom: 1px solid #eee7df;
}
.calendar-table thead th {
  background: #f8efe2;
  color: #523b2b;
}
.calendar-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 250px;
  min-width: 180px;
  max-width: 290px;
  text-align: left;
  background: #fffdfa;
  overflow-wrap: anywhere;
}
.calendar-table thead th:first-child {
  z-index: 2;
  background: #f8efe2;
}
.calendar-table th small {
  display: block;
  color: #79695c;
  font-weight: 400;
}
.calendar-table input {
  width: 19px;
  height: 19px;
  accent-color: #85552b;
  cursor: pointer;
}

/* Состояние графика видно и по цвету, и по подписям. */
.inventory-sections { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.inventory-section { border:1px solid #d8ccbd; border-radius:9px; padding:10px 15px; background:#fff; color:#563d2a; font:inherit; }
.inventory-section.active { background:#5d7137; color:#fff; border-color:#5d7137; font-weight:600; }
.inventory-section:disabled { color:#786e66; background:#f4f1ed; cursor:not-allowed; }
.calendar-summary { margin:18px 0 4px; font-weight:600; color:#384d2a; }
.calendar-legend { margin:0 0 12px; color:#65594d; font-size:.875rem; }
.calendar-table thead th.calendar-day-planned { background:#dcebcf; color:#304d24; }
.calendar-table thead th.calendar-day-empty { background:#f8efe2; }
.calendar-table tbody th.calendar-group-planned { background:#e9f3e2; }
.calendar-table tbody th.calendar-group-empty { background:#fffdfa; }
.calendar-table td.calendar-cell-planned { background:#e9f3e2; }
.calendar-table tbody th small { margin-top:4px; font-size:.75rem; }
