/* =========================================================
   СВЕЖО — панель управления
   ========================================================= */

[hidden] {
  display: none !important;
}

body.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 4%, rgba(185, 208, 190, 0.34), transparent 25rem),
    radial-gradient(circle at 4% 88%, rgba(233, 221, 201, 0.5), transparent 28rem),
    #f3efe5;
  overflow-x: clip;
}

body.admin-page.no-scroll {
  overflow: hidden;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.admin-page svg {
  fill: none;
}

.admin-page ::selection {
  background: var(--forest);
  color: var(--paper);
}

.admin-page .icon {
  width: 20px;
  height: 20px;
}

.admin-page .icon--sm {
  width: 16px;
  height: 16px;
}

.admin-page .btn {
  min-height: 46px;
  font-size: 13px;
}

.admin-page .btn--sm {
  min-height: 42px;
  padding: 0 17px;
  font-size: 12.5px;
}

.admin-page .btn--danger {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(180, 73, 53, 0.16);
}

.admin-page .btn--danger:hover {
  background: #9f3e2c;
}

.admin-page .btn.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.68);
  color: var(--ink-2);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s var(--ease);
}

.icon-btn:hover {
  border-color: rgba(18, 35, 30, 0.24);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-1px);
}

.icon-btn--sm {
  width: 32px;
  height: 32px;
  border-color: transparent;
  background: transparent;
}

.icon-btn--sm .icon {
  width: 16px;
  height: 16px;
}

.icon-btn--sm:hover {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.7);
}

.icon-btn--danger:hover {
  border-color: rgba(180, 73, 53, 0.25);
  background: rgba(246, 226, 214, 0.62);
  color: var(--danger);
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(18, 35, 30, 0.25);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
  color: var(--forest-soft);
  border-color: var(--forest-soft);
}

.text-link svg {
  transition: transform 0.22s var(--ease);
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* ---------- Логотип ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  transition: transform 0.4s var(--ease);
}

.logo:hover .logo__mark {
  transform: rotate(45deg);
}

.logo__mark svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.logo__text {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
}

.logo__text span {
  color: var(--accent);
}

.logo--light .logo__mark {
  background: var(--paper);
  color: var(--forest);
}

.logo--light .logo__text {
  color: var(--paper);
}

.logo--light .logo__text span {
  color: #eaa082;
}

/* ---------- Загрузка ---------- */

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background:
    radial-gradient(circle at 50% 38%, rgba(72, 122, 105, 0.3), transparent 18rem),
    var(--forest-deep);
  color: var(--paper);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-loader.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.boot-loader__mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.08);
  color: var(--paper);
  animation: loaderPulse 1.8s ease-in-out infinite;
}

.boot-loader__mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.boot-loader__text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.boot-loader__line {
  position: relative;
  width: 86px;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.16);
}

.boot-loader__line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateX(-100%);
  animation: loaderLine 1.5s var(--ease) infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.86; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes loaderLine {
  50%, 100% { transform: translateX(100%); }
}

/* ---------- Вход ---------- */

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.94fr);
  min-height: 100svh;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: clamp(30px, 4vw, 52px) clamp(30px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(92, 145, 125, 0.22), transparent 24rem),
    radial-gradient(circle at 8% 84%, rgba(217, 107, 69, 0.13), transparent 22rem),
    var(--forest-deep);
  color: var(--paper);
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.login-brand__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-ring {
  position: absolute;
  border: 1px solid rgba(255, 253, 248, 0.1);
  border-radius: 50%;
}

.login-ring--1 {
  top: -18vw;
  right: -14vw;
  width: 55vw;
  height: 55vw;
}

.login-ring--2 {
  top: -5vw;
  right: -1vw;
  width: 28vw;
  height: 28vw;
  border-color: rgba(255, 253, 248, 0.07);
}

.login-spark {
  position: absolute;
  color: rgba(233, 221, 201, 0.52);
}

.login-spark svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.login-spark--1 {
  top: 22%;
  right: 12%;
  width: 34px;
  height: 34px;
  animation: floatY 7s ease-in-out infinite;
}

.login-spark--2 {
  right: 30%;
  bottom: 16%;
  width: 18px;
  height: 18px;
  opacity: 0.6;
  animation: floatY 9s ease-in-out infinite reverse;
}

.login-brand__top,
.login-brand__content,
.login-brand__foot {
  position: relative;
  z-index: 1;
}

.login-brand__top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.login-brand__tag {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 253, 248, 0.18);
  color: rgba(255, 253, 248, 0.48);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand__content {
  max-width: 660px;
  padding: 52px 0;
}

.admin-page .eyebrow--light {
  color: rgba(255, 253, 248, 0.52);
}

.login-title {
  margin: 0 0 26px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5.6vw, 5.9rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.login-title em {
  color: #d7bea0;
  font-style: italic;
}

.login-brand__lead {
  max-width: 470px;
  color: rgba(255, 253, 248, 0.63);
  font-size: 14.5px;
  line-height: 1.75;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
}

.login-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 253, 248, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.055);
  color: rgba(255, 253, 248, 0.74);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(5px);
}

.login-features .icon {
  color: var(--sage-deep);
}

.login-brand__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 253, 248, 0.11);
  color: rgba(255, 253, 248, 0.42);
  font-size: 10.5px;
}

.login-brand__foot a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 253, 248, 0.7);
  transition: color 0.2s ease;
}

.login-brand__foot a:hover {
  color: var(--paper);
}

.login-brand__foot .icon {
  transition: transform 0.22s var(--ease);
}

.login-brand__foot a:hover .icon {
  transform: translateX(3px);
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 42px;
}

.login-card {
  width: 100%;
  max-width: 425px;
  animation: loginCardIn 0.8s var(--ease) both;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.login-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.login-card__sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
  background: rgba(23, 63, 53, 0.07);
  color: var(--ink);
}

.login-submit {
  margin-top: 6px;
  min-height: 54px;
}

.login-card__note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: #8b9891;
  font-size: 10px;
  line-height: 1.5;
}

.login-copyright {
  color: #9aa49e;
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.login-form .form-alert,
.form-alert {
  margin-bottom: 4px;
  padding: 11px 14px;
  border: 1px solid rgba(180, 73, 53, 0.22);
  border-radius: 11px;
  background: rgba(246, 226, 214, 0.68);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------- Каркас админки ---------- */

.admin-app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: 272px;
  padding: 28px 20px 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(78, 130, 112, 0.24), transparent 22rem),
    linear-gradient(180deg, #103129 0%, #0b241d 100%);
  color: var(--paper);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

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

.sidebar__close {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 253, 248, 0.7);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar__close:hover {
  background: rgba(255, 253, 248, 0.08);
  color: var(--paper);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 42px;
}

.sidebar-label {
  padding: 0 13px;
  margin-bottom: 10px;
  color: rgba(255, 253, 248, 0.32);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border-radius: 13px;
  color: rgba(255, 253, 248, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s var(--ease);
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transform: translateY(-50%) scaleY(0.4);
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  opacity: 0.78;
  transition: opacity 0.22s ease;
}

.nav-item:hover {
  background: rgba(255, 253, 248, 0.055);
  color: rgba(255, 253, 248, 0.9);
}

.nav-item.is-active {
  background: rgba(255, 253, 248, 0.09);
  color: var(--paper);
}

.nav-item.is-active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.nav-item.is-active .icon {
  opacity: 1;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
}

.sidebar-site {
  padding: 16px;
  border: 1px solid rgba(255, 253, 248, 0.09);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.045);
}

.sidebar-site__top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 253, 248, 0.86);
  font-size: 11px;
  font-weight: 650;
}

.sidebar-site p {
  margin-top: 8px;
  color: rgba(255, 253, 248, 0.38);
  font-size: 9.5px;
  line-height: 1.55;
}

.sidebar-site__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  color: #d7bea0;
  font-size: 10.5px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.sidebar-site__link:hover {
  color: var(--paper);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #62a47b;
  box-shadow: 0 0 0 4px rgba(98, 164, 123, 0.14);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.status-dot.is-closed {
  background: #cf8b55;
  box-shadow: 0 0 0 4px rgba(207, 139, 85, 0.16);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 4px 0;
  border-top: 1px solid rgba(255, 253, 248, 0.09);
}

.sidebar-user__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-user > div {
  min-width: 0;
}

.sidebar-user strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 253, 248, 0.9);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 253, 248, 0.38);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.sidebar-user__logout {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 50%;
  color: rgba(255, 253, 248, 0.42);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-user__logout:hover {
  background: rgba(255, 253, 248, 0.08);
  color: var(--paper);
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(8, 26, 20, 0.5);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-main {
  min-height: 100vh;
  margin-left: 272px;
}

.admin-mobilebar {
  display: none;
}

.admin-content {
  width: min(1350px, 100%);
  margin: 0 auto;
  padding: 38px 42px 26px;
}

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1350px, 100%);
  margin: 0 auto;
  padding: 26px 42px 30px;
  color: #8d9992;
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

/* ---------- Заголовки разделов ---------- */

.admin-view {
  animation: viewIn 0.45s var(--ease) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.view-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 3.5vw, 3.65rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.view-subtitle {
  max-width: 600px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* ---------- Панели и карточки ---------- */

.panel {
  border: 1px solid var(--line-soft);
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 2px 4px rgba(24, 45, 37, 0.015), 0 18px 50px rgba(24, 45, 37, 0.045);
}

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

.panel__head h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.panel__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1ede4;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

/* ---------- Статистика ---------- */

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

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 174px;
  padding: 20px 21px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 23px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 16px 42px rgba(24, 45, 37, 0.04);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(24, 45, 37, 0.08);
}

.stat-card--dark {
  border-color: transparent;
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 107, 69, 0.24), transparent 9rem),
    linear-gradient(145deg, #1a4a3e 0%, #0d2a23 100%);
  color: var(--paper);
}

.stat-card--dark::after {
  content: '';
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 253, 248, 0.1);
  border-radius: 50%;
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card__label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stat-card--dark .stat-card__label {
  color: rgba(255, 253, 248, 0.54);
}

.stat-card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1ede4;
  color: var(--forest-soft);
}

.stat-card__icon .icon {
  width: 17px;
  height: 17px;
}

.stat-card--dark .stat-card__icon {
  background: rgba(255, 253, 248, 0.1);
  color: #e6d3b8;
}

.stat-card__value {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 3.5vw, 3.5rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.stat-card__foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 9.5px;
}

.stat-card--dark .stat-card__foot {
  color: rgba(255, 253, 248, 0.42);
}

/* ---------- Обзор ---------- */

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.chart-panel,
.site-panel {
  padding: 24px 25px;
}

.chart-panel {
  min-width: 0;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: clamp(9px, 2vw, 23px);
  height: 206px;
  margin-top: 18px;
  padding: 14px 4px 0;
  border-top: 1px solid var(--line-soft);
  background-image: linear-gradient(to top, transparent 49.6%, var(--line-soft) 50%, transparent 50.4%);
  background-size: 100% 50%;
}

.chart-bar {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.chart-bar__value {
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 700;
}

.chart-bar__track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(100%, 34px);
  flex: 1;
  border-radius: 8px;
  background: rgba(23, 63, 53, 0.045);
  overflow: hidden;
}

.chart-bar__fill {
  width: 100%;
  min-height: 5px;
  border-radius: 7px;
  background: linear-gradient(180deg, #3f7966 0%, var(--forest) 100%);
  transform-origin: bottom;
  animation: barGrow 0.8s var(--ease) both;
}

.chart-bar:last-child .chart-bar__fill {
  background: linear-gradient(180deg, #e18b69 0%, var(--accent) 100%);
}

.chart-bar.is-empty .chart-bar__fill {
  background: #d9d4c8;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.chart-bar__label {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: capitalize;
}

.chart-bar:last-child .chart-bar__label {
  color: var(--accent-dark);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(47, 122, 90, 0.16);
  border-radius: 999px;
  background: rgba(217, 230, 218, 0.55);
  color: var(--success);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-closed {
  border-color: rgba(169, 111, 31, 0.16);
  background: rgba(233, 221, 201, 0.7);
  color: var(--warning);
}

.site-panel {
  display: flex;
  flex-direction: column;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.setting-row:first-of-type {
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.setting-row strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.setting-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.site-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 17px;
  color: var(--muted);
  font-size: 9.5px;
}

.switch--sm .switch__track {
  width: 40px;
  height: 22px;
}

.switch--sm .switch__track::after {
  width: 16px;
  height: 16px;
}

.switch--sm input:checked + .switch__track::after {
  transform: translateX(18px);
}

/* ---------- Последние заявки / таблица ---------- */

.recent-panel {
  padding: 24px 25px 12px;
}

.recent-panel .panel__head {
  margin-bottom: 10px;
}

.requests-table {
  --table-cols: minmax(100px, 0.78fr) minmax(145px, 1.18fr) minmax(160px, 1.34fr) minmax(115px, 0.9fr) 118px 28px;
  display: flex;
  flex-direction: column;
}

.requests-table--compact {
  --table-cols: minmax(85px, 0.7fr) minmax(140px, 1.2fr) minmax(150px, 1.3fr) 112px 28px;
}

.request-row {
  display: grid;
  grid-template-columns: var(--table-cols);
  align-items: center;
  gap: 17px;
  width: 100%;
  min-height: 64px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  transition: background-color 0.18s ease;
}

.request-row:last-child {
  border-bottom-color: transparent;
}

.request-row:not(.request-row--head):hover {
  background: rgba(217, 230, 218, 0.28);
}

.request-row--head {
  min-height: 34px;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #8e9a93;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: default;
}

.request-cell {
  min-width: 0;
}

.request-cell strong,
.request-cell__primary {
  display: block;
  overflow: hidden;
  font-size: 11.8px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-cell small,
.request-cell__secondary {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.2px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-cell--id strong {
  font-size: 12.3px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.request-cell--status {
  justify-self: start;
}

.request-cell--chevron {
  display: grid;
  place-items: center;
  color: #9aa59f;
  transition: transform 0.2s var(--ease), color 0.2s ease;
}

.request-row:hover .request-cell--chevron {
  color: var(--forest);
  transform: translateX(3px);
}

.request-cell--chevron .icon {
  width: 17px;
  height: 17px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9.3px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--new {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status-badge--processing {
  background: rgba(233, 221, 201, 0.75);
  color: #8b6427;
}

.status-badge--confirmed {
  background: var(--sage);
  color: var(--forest-soft);
}

.status-badge--done {
  background: rgba(202, 229, 214, 0.78);
  color: var(--success);
}

.status-badge--canceled {
  background: #eceae4;
  color: #7d8882;
}

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

.requests-panel {
  padding: 20px 24px 12px;
}

.requests-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.filter-chip span {
  color: #99a49e;
  font-size: 8.5px;
  font-weight: 700;
}

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

.filter-chip.is-active {
  background: var(--forest);
  color: var(--paper);
}

.filter-chip.is-active span {
  color: rgba(255, 253, 248, 0.55);
}

.search-field {
  position: relative;
  width: min(100%, 270px);
  flex: none;
}

.search-field .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 15px;
  height: 15px;
  color: #8e9a93;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 39px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f7f3eb;
  font-size: 11px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field input::placeholder {
  color: #99a49e;
}

.search-field input:focus {
  outline: none;
  border-color: rgba(23, 63, 53, 0.36);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.07);
}

.requests-table--full {
  margin-top: 14px;
}

/* ---------- Состояния ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1ede4;
  color: var(--forest-soft);
}

.empty-state h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
}

.empty-state p {
  max-width: 350px;
  font-size: 10.5px;
  line-height: 1.55;
}

.empty-state .btn {
  margin-top: 7px;
}

.table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 170px;
  color: var(--muted);
  font-size: 11px;
}

.table-loading .spinner {
  width: 17px;
  height: 17px;
  color: var(--forest);
}

/* ---------- Прайс ---------- */

.price-panel-admin {
  padding: 22px 24px 18px;
}

.price-categories {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.price-categories::-webkit-scrollbar {
  display: none;
}

.price-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.55);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease);
}

.price-cat:hover {
  border-color: rgba(18, 35, 30, 0.2);
  color: var(--ink);
  transform: translateY(-1px);
}

.price-cat .icon {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.price-cat__count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eee9df;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.price-cat.is-active {
  border-color: transparent;
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 8px 20px rgba(23, 63, 53, 0.13);
}

.price-cat.is-active .price-cat__count {
  background: rgba(255, 253, 248, 0.13);
  color: rgba(255, 253, 248, 0.74);
}

.price-cat.is-hidden-cat {
  opacity: 0.58;
}

.price-cat.is-active.is-hidden-cat {
  opacity: 0.86;
}

.price-category-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(231, 241, 229, 0.78), rgba(233, 221, 201, 0.46));
}

.price-category-bar__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.price-category-bar h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.price-category-bar p {
  margin-top: 6px;
  max-width: 690px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.services-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px 78px 132px;
  gap: 18px;
  padding: 0 14px 9px;
  border-bottom: 1px solid var(--line);
  color: #8e9a93;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.services-head span:nth-child(2) {
  text-align: left;
}

.services-head span:nth-child(3) {
  text-align: center;
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px 78px 132px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: background-color 0.18s ease;
}

.service-row:last-child {
  border-bottom-color: transparent;
}

.service-row:hover {
  background: rgba(217, 230, 218, 0.2);
}

.service-row.is-hidden-service {
  opacity: 0.58;
}

.service-main {
  min-width: 0;
}

.service-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.service-title-line strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest-soft);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.service-badge--accent {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.service-badge--muted {
  background: #e9e5dc;
  color: #79857e;
}

.service-main p {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.service-meta {
  display: block;
  margin-top: 4px;
  color: #95a099;
  font-size: 8.5px;
}

.service-price-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.service-price-from {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.service-price-input {
  width: 96px;
  height: 38px;
  padding: 0 25px 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f5f1e8;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.service-price-input:hover {
  border-color: var(--line);
  background: var(--paper);
}

.service-price-input:focus {
  outline: none;
  border-color: rgba(23, 63, 53, 0.4);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.07);
}

.service-price-input.is-saved {
  border-color: rgba(47, 122, 90, 0.4);
  background: rgba(202, 229, 214, 0.38);
}

.service-price-input:disabled {
  opacity: 0.6;
}

.service-price-currency {
  position: absolute;
  right: 9px;
  color: var(--muted);
  font-size: 9.5px;
  pointer-events: none;
}

.service-visible {
  display: flex;
  justify-content: center;
}

.service-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.service-actions .icon-btn--sm {
  width: 30px;
  height: 30px;
}

.service-move {
  display: flex;
  flex-direction: column;
}

.service-move .icon-btn--sm {
  width: 24px;
  height: 19px;
  border-radius: 6px;
}

.service-move .icon-btn--sm .icon {
  width: 13px;
  height: 13px;
}

.panel-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #f6f2e9;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.panel-note .icon {
  margin-top: 1px;
  color: var(--ink-2);
}

/* ---------- Настройки ---------- */

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

.settings-card {
  padding: 24px 25px;
}

.settings-card--wide {
  grid-column: 1 / -1;
}

.settings-grid > .settings-card:last-child {
  grid-column: 1 / -1;
}

.settings-card__head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
}

.settings-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #f1ede4;
  color: var(--forest-soft);
}

.settings-card__icon .icon {
  width: 18px;
  height: 18px;
}

.settings-card__head > div {
  min-width: 0;
}

.settings-card__head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.settings-card__head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.8px;
  line-height: 1.5;
}

.settings-card__head .status-pill {
  margin-left: auto;
}

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

.setting-tile {
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: #f8f4ec;
}

.setting-tile__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.setting-tile strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.setting-tile p {
  max-width: 390px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.setting-tile__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--success);
  font-size: 9px;
  font-weight: 650;
}

.setting-tile__state::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.setting-tile__state.is-off {
  color: var(--warning);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.settings-form__full {
  grid-column: 1 / -1;
}

.settings-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.settings-form__foot p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.settings-form__foot--end {
  justify-content: flex-end;
}

.settings-form .input,
.settings-form .select {
  height: 47px;
  font-size: 12px;
}

.settings-form .textarea {
  min-height: 95px;
  font-size: 12px;
}

.password-hint {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.password-hint strong {
  color: var(--ink);
}

.data-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.data-card > p {
  max-width: 720px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.data-card__note {
  color: #95a099 !important;
  font-size: 9px !important;
}

.data-card code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1ede4;
  color: var(--ink-2);
  font-size: 9px;
}

/* ---------- Drawer ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(8, 26, 20, 0.46);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: min(570px, 100vw);
  background: #faf6ee;
  box-shadow: -30px 0 80px rgba(8, 26, 20, 0.2);
  visibility: hidden;
  transform: translateX(102%);
  transition: transform 0.45s var(--ease), visibility 0.45s var(--ease);
}

.drawer.is-open {
  visibility: visible;
  transform: translateX(0);
}

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 253, 248, 0.74);
}

.drawer__head .admin-eyebrow {
  margin-bottom: 8px;
}

.drawer__head h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.drawer__head #drawer-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.drawer__close {
  margin-top: 2px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(18, 35, 30, 0.18) transparent;
}

.drawer__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 253, 248, 0.86);
}

.drawer__foot .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 10.5px;
}

.drawer__foot .btn--danger {
  margin-right: auto;
}

.drawer-contact {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  margin-bottom: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--paper);
}

.drawer-contact__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.drawer-contact__main {
  min-width: 0;
}

.drawer-contact__main strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-contact__main a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  transition: color 0.2s ease;
}

.drawer-contact__main a:hover {
  color: var(--forest);
}

.drawer-contact__actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.drawer-contact__actions .icon-btn {
  width: 33px;
  height: 33px;
  background: #f5f1e8;
}

.drawer-contact__actions .icon {
  width: 15px;
  height: 15px;
}

.drawer-section {
  margin-bottom: 22px;
}

.drawer-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.drawer-section__head h3 {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drawer-status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.status-option::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.status-option:hover {
  border-color: rgba(18, 35, 30, 0.2);
  color: var(--ink);
}

.status-option.is-active {
  border-color: transparent;
  background: var(--forest);
  color: var(--paper);
}

.status-option[data-status='new'].is-active {
  background: var(--accent);
}

.status-option[data-status='processing'].is-active {
  background: #9c712e;
}

.status-option[data-status='done'].is-active {
  background: var(--success);
}

.status-option[data-status='canceled'].is-active {
  background: #7a857f;
}

.drawer-status-current {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #95a099;
  font-size: 8.8px;
}

.drawer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--line-soft);
}

.drawer-info {
  padding: 13px 14px;
  background: #fffdf8;
}

.drawer-info--full {
  grid-column: 1 / -1;
}

.drawer-info__label {
  display: block;
  color: #95a099;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.drawer-info__value {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 10.8px;
  font-weight: 550;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.drawer-info__value--soft {
  color: var(--muted);
  font-weight: 400;
}

.drawer-services {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.drawer-service {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 5px;
  border-top: 1px dashed var(--line-soft);
  font-size: 10.8px;
  font-weight: 500;
}

.drawer-service:first-child {
  padding-top: 0;
  border-top: 0;
}

.drawer-service__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-service__main > span {
  overflow-wrap: anywhere;
}

.drawer-service__main small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.35;
}

.drawer-service strong {
  flex: none;
  color: var(--forest);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-info__value--total {
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
}

.drawer-block {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--paper);
}

.drawer-block--note {
  background: #f7f0e2;
}

.drawer-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.drawer-block__head h3 {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.drawer-block__head span {
  color: #95a099;
  font-size: 8px;
}

.drawer-comment {
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fcfaf4;
  color: var(--ink-2);
  font-size: 10.8px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.drawer-block .textarea {
  min-height: 86px;
  padding: 10px 12px;
  border-color: var(--line-soft);
  background: #fcfaf4;
  font-size: 11px;
  line-height: 1.55;
}

.drawer-block .textarea:focus {
  background: var(--white);
}

.drawer-block__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.drawer-block__meta {
  color: #9aa49e;
  font-size: 8.3px;
  line-height: 1.4;
}

.drawer-block__foot .btn {
  min-height: 34px;
  padding: 0 13px;
  font-size: 9.5px;
}

.drawer-history {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.64);
}

.drawer-history h3 {
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 0 0 14px;
}

.history-item:last-child {
  padding-bottom: 0;
}

.history-item::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 4px;
  bottom: -3px;
  width: 1px;
  background: var(--line);
}

.history-item:last-child::before {
  display: none;
}

.history-item__dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  flex: none;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 1px var(--line);
}

.history-item:first-child .history-item__dot {
  background: var(--accent);
}

.history-item__main {
  min-width: 0;
}

.history-item__main strong {
  display: block;
  font-size: 9.8px;
  font-weight: 650;
  line-height: 1.4;
}

.history-item__main time {
  display: block;
  margin-top: 1px;
  color: #95a099;
  font-size: 8.3px;
}

/* ---------- Модальные окна ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 26, 20, 0.52);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.28s ease;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  border-radius: 25px;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(8, 26, 20, 0.3);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.28s ease, transform 0.34s var(--ease);
  scrollbar-width: thin;
}

.modal.is-open .modal__overlay {
  opacity: 1;
}

.modal.is-open .modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__panel--wide {
  width: min(100%, 690px);
}

.modal__panel--small {
  width: min(100%, 405px);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 26px 17px;
}

.modal__head .admin-eyebrow {
  margin-bottom: 7px;
}

.modal__head h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 2px 26px 26px;
}

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

.modal-form__full {
  grid-column: 1 / -1;
}

.modal-form .input,
.modal-form .select {
  height: 47px;
  font-size: 12px;
}

.modal-form .textarea {
  min-height: 74px;
  font-size: 12px;
}

.modal-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 4px;
}

.checkbox--inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 10.5px;
}

.checkbox--inline .checkbox__box {
  margin-top: 0;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 26px;
  border-top: 1px solid var(--line-soft);
  background: #faf7f0;
}

.modal__foot--center {
  justify-content: center;
}

.modal__foot .btn {
  min-height: 40px;
  font-size: 11px;
}

.modal--confirm .modal__panel {
  padding: 28px 26px 0;
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.confirm-icon .icon {
  width: 22px;
  height: 22px;
}

.modal--confirm h2 {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.modal--confirm > .modal__panel > p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 1.55;
}

.modal--confirm .modal__foot {
  margin: 23px -26px 0;
  border-radius: 0 0 25px 25px;
}

/* ---------- Категории ---------- */

.categories-list {
  display: flex;
  flex-direction: column;
  padding: 0 26px 20px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.category-row.is-hidden-cat {
  opacity: 0.56;
}

.category-row__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #f1ede4;
  color: var(--forest-soft);
}

.category-row__icon .icon {
  width: 16px;
  height: 16px;
}

.category-row__main {
  min-width: 0;
  flex: 1;
}

.category-row__main strong {
  display: block;
  overflow: hidden;
  font-size: 11.3px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.8px;
}

.category-row__move {
  display: flex;
  gap: 2px;
}

.category-row__actions {
  display: flex;
  gap: 2px;
}

/* ---------- Тосты ---------- */

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 210;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(355px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 253, 248, 0.11);
  border-radius: 14px;
  background: #12332a;
  color: rgba(255, 253, 248, 0.92);
  box-shadow: 0 18px 45px rgba(8, 26, 20, 0.25);
  font-size: 10.8px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toastIn 0.38s var(--ease) both;
}

.toast.is-leaving {
  animation: toastOut 0.25s ease forwards;
}

.toast .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  color: #9fd0b0;
}

.toast--error {
  background: #4a2119;
  border-color: rgba(255, 221, 209, 0.12);
}

.toast--error .icon {
  color: #f0a58c;
}

.toast--info .icon {
  color: #e0c5a3;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px); }
}

/* ---------- Адаптивность ---------- */

@media (max-width: 1250px) {
  .sidebar {
    width: 248px;
  }

  .admin-main {
    margin-left: 248px;
  }

  .admin-content {
    padding: 32px 28px 20px;
  }

  .admin-footer {
    padding: 22px 28px 26px;
  }

  .stats-grid {
    gap: 11px;
  }

  .stat-card {
    padding: 18px;
  }

  .chart-panel,
  .site-panel {
    padding: 22px;
  }

  .requests-panel {
    padding: 18px 20px 10px;
  }

  .recent-panel {
    padding: 22px 22px 10px;
  }

  .requests-table {
    --table-cols: minmax(92px, 0.75fr) minmax(135px, 1.15fr) minmax(145px, 1.3fr) minmax(105px, 0.8fr) 112px 24px;
    gap: 13px;
  }

  .requests-table--compact {
    --table-cols: minmax(80px, 0.7fr) minmax(130px, 1.15fr) minmax(135px, 1.2fr) 108px 24px;
  }

  .services-head,
  .service-row {
    grid-template-columns: minmax(0, 1fr) 140px 72px 122px;
    gap: 14px;
  }
}

@media (max-width: 1120px) {
  .login-screen {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  }

  .login-brand {
    padding: 32px;
  }

  .login-title {
    font-size: clamp(3.4rem, 6vw, 4.7rem);
  }

  .sidebar {
    z-index: 100;
    width: 278px;
    transform: translateX(-102%);
    transition: transform 0.4s var(--ease);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__close {
    display: grid;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-mobilebar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(243, 239, 229, 0.88);
    backdrop-filter: blur(16px);
  }

  .admin-mobilebar .logo__mark {
    width: 34px;
    height: 34px;
  }

  .admin-mobilebar .logo__text {
    font-size: 18px;
  }

  .admin-mobilebar .logo__mark svg {
    width: 17px;
    height: 17px;
  }

  .admin-mobilebar .icon-btn {
    width: 38px;
    height: 38px;
    background: transparent;
  }

  .admin-content {
    padding: 26px 24px 22px;
  }

  .admin-footer {
    padding: 20px 24px 26px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .site-panel {
    min-height: 220px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-card--wide,
  .settings-grid > .settings-card:last-child {
    grid-column: auto;
  }

  .data-card {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .data-card > p {
    width: 100%;
  }

  .data-card__note {
    width: auto !important;
  }
}

@media (max-width: 960px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 20px 24px;
  }

  .login-brand::before,
  .login-brand__decor,
  .login-brand__content,
  .login-brand__foot {
    display: none;
  }

  .login-brand__top {
    justify-content: space-between;
  }

  .login-panel {
    align-items: center;
    justify-content: flex-start;
    padding: 38px 22px 48px;
  }

  .login-card {
    max-width: 440px;
  }

  .login-copyright {
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 155px;
  }

  .requests-table {
    --table-cols: minmax(88px, 0.72fr) minmax(140px, 1.2fr) minmax(140px, 1.25fr) 112px 24px;
  }

  .request-cell--when {
    display: none;
  }

  .services-head {
    display: none;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr) 140px 64px 118px;
    min-height: 88px;
    padding: 14px;
  }

  .price-panel-admin {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .admin-content {
    padding: 22px 16px 18px;
  }

  .admin-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 18px 16px 24px;
  }

  .view-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .view-actions {
    width: 100%;
  }

  .view-actions .open-site-link {
    margin-left: 0;
  }

  .panel {
    border-radius: 20px;
  }

  .chart-panel,
  .site-panel,
  .recent-panel,
  .settings-card {
    padding: 19px 17px;
  }

  .chart {
    gap: 8px;
    height: 185px;
  }

  .chart-bar__track {
    width: min(100%, 28px);
  }

  .requests-panel {
    padding: 15px 14px 8px;
  }

  .requests-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: none;
  }

  .search-field {
    width: 100%;
  }

  .requests-table--full,
  .requests-table--compact {
    --table-cols: 1fr auto;
    gap: 7px 12px;
    margin-top: 8px;
  }

  .request-row--head {
    display: none;
  }

  .request-row {
    align-items: start;
    min-height: 0;
    padding: 14px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    margin-bottom: 8px;
  }

  .request-row:last-child {
    border-bottom: 1px solid var(--line-soft);
  }

  .request-cell--id {
    grid-column: 1;
    grid-row: 1;
  }

  .request-cell--client {
    grid-column: 1;
    grid-row: 2;
  }

  .request-cell--service {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 2px;
  }

  .request-cell--service .request-cell__secondary {
    display: none;
  }

  .request-cell--when {
    display: block;
    grid-column: 1;
    grid-row: 4;
  }

  .request-cell--status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .request-cell--chevron {
    display: none;
  }

  .requests-table--compact .request-cell--service {
    display: block;
  }

  .price-panel-admin {
    padding: 14px;
  }

  .price-categories {
    padding-bottom: 13px;
  }

  .price-category-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
  }

  .price-category-bar h2 {
    font-size: 1.5rem;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 10px;
  }

  .service-main {
    grid-column: 1 / -1;
  }

  .service-price-wrap {
    grid-column: 1;
  }

  .service-visible {
    grid-column: 2;
    justify-content: flex-end;
  }

  .service-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 2px;
  }

  .service-actions .icon-btn--sm {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 253, 248, 0.7);
  }

  .service-move {
    flex-direction: row;
    gap: 2px;
  }

  .service-move .icon-btn--sm {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.7);
  }

  .service-price-input {
    width: 116px;
    height: 40px;
  }

  .settings-form__grid,
  .availability-grid,
  .modal-form__grid {
    grid-template-columns: 1fr;
  }

  .settings-form__full,
  .modal-form__full {
    grid-column: auto;
  }

  .settings-form__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-form__foot .btn {
    width: 100%;
  }

  .settings-card__head {
    flex-wrap: wrap;
  }

  .settings-card__head .status-pill {
    margin-left: 53px;
  }

  .drawer {
    width: 100vw;
  }

  .drawer__head {
    padding: 20px 18px 16px;
  }

  .drawer__body {
    padding: 18px 18px 24px;
  }

  .drawer__foot {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .drawer__foot .btn--danger {
    margin-right: 0;
  }

  .drawer__foot .btn {
    flex: 1;
    min-width: 120px;
  }

  .drawer-info-grid {
    grid-template-columns: 1fr;
  }

  .drawer-info--full {
    grid-column: auto;
  }

  .modal {
    padding: 12px;
  }

  .modal__panel {
    max-height: calc(100svh - 24px);
    border-radius: 21px;
  }

  .modal__head {
    padding: 21px 18px 15px;
  }

  .modal-form {
    padding: 2px 18px 20px;
  }

  .modal__foot {
    padding: 14px 18px;
  }

  .modal--confirm .modal__panel {
    padding: 24px 20px 0;
  }

  .modal--confirm .modal__foot {
    margin: 20px -20px 0;
    border-radius: 0 0 21px 21px;
  }

  .categories-list {
    padding: 0 18px 16px;
  }

  .category-row {
    flex-wrap: wrap;
  }

  .category-row__main {
    flex-basis: calc(100% - 52px);
  }

  .category-row__move,
  .category-row__actions {
    margin-left: 48px;
  }

  .category-row__move {
    order: 5;
  }

  .toasts {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 520px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 138px;
  }

  .stat-card__value {
    font-size: 2.8rem;
  }

  .admin-mobilebar {
    padding: 0 14px;
  }

  .login-panel {
    padding: 32px 16px 36px;
  }

  .login-card h2 {
    font-size: 2.5rem;
  }

  .login-brand__tag {
    display: none;
  }

  .chart-panel .panel__head,
  .site-panel .panel__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .chart {
    gap: 5px;
    height: 165px;
  }

  .chart-bar__value {
    font-size: 8.5px;
  }

  .chart-bar__label {
    font-size: 8px;
  }

  .drawer__foot .btn {
    flex-basis: 100%;
  }

  .drawer-contact {
    flex-wrap: wrap;
  }

  .drawer-contact__actions {
    margin-left: 0;
    width: 100%;
  }

  .drawer-contact__actions .icon-btn {
    width: 36px;
    height: 36px;
  }

  .drawer-block__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-block__foot .btn {
    width: 100%;
  }

  .status-option {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .admin-view,
  .chart-bar__fill,
  .toast,
  .boot-loader__mark,
  .boot-loader__line::after,
  .login-spark {
    animation: none !important;
  }

  .drawer,
  .modal__panel,
  .sidebar,
  .sidebar-scrim,
  .drawer-overlay,
  .modal__overlay {
    transition: none !important;
  }
}
