:root{
  --nav-bg:#f5f4ef;
  --nav-bg-hover:#6e2d12;
  --nav-text:#1a1916;
  --nav-text-hover:#dddddd;
  --nav-active-bg:#0e2419;
  --nav-active-text:#ffffff;
}
:root{
  --container-max: 1216px;   /* тот же максимум, что у основного .container */
  --container-pad: 24px;     /* горизонтальный внутренний отступ контейнера */
}

.topbar{
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 1000;
   background: var(--nav-bg);
   border-bottom: 1px solid #222;
 }
 .topbar .wrap{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 10px var(--container-pad);
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar .brand{
  display:flex;
  align-items:center;
  gap:16px;            /* было 10-12, увеличили зазор между логотипом и текстом */
  text-decoration:none;
}
.topbar .brand img{height:  22px;width:auto;display:block;}
.topbar .brand span{color:var(--nav-text);font-weight:700;letter-spacing:.2px}
.topnav{
  display:flex;
  align-items:center;
  gap:10px;            /* чуть больше расстояние между пунктами */
  margin-left:auto;
}
.topnav a{
  display:inline-flex;
  align-items:center;
  height:34px;         /* фиксируем высоту для ровной линии */
  line-height:1;
  color:var(--nav-text);
  text-decoration:none;
  padding:0 12px;      /* горизонтальный отступ */
  border-radius:8px;
  font-weight:500;
  transition:color .15s, background-color .15s, transform .04s;
}
.topnav a:hover{color:var(--nav-text-hover);background:var(--nav-bg-hover);}
.topnav a:active{transform:translateY(1px)}
.topnav a.active{background:var(--nav-active-bg);color:var(--nav-active-text);font-weight:700;}
.page-shell{
  /* высота шапки + небольшой зазор */
   padding-top: calc(var(--topbar-h, 56px) + 12px);
 }
@media (max-width:640px){.topbar .wrap{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 10px var(--container-pad);
  display: flex;
  align-items: center;
  gap: 18px;
}.topnav a{
  display:inline-flex;
  align-items:center;
  height:34px;         /* фиксируем высоту для ровной линии */
  line-height:1;
  color:var(--nav-text);
  text-decoration:none;
  padding:0 12px;      /* горизонтальный отступ */
  border-radius:8px;
  font-weight:500;
  transition:color .15s, background-color .15s, transform .04s;
}}


.page-shell > .container{
  max-width: var(--container-max);
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   Campaign Hub app-shell / sidebar
   Первичный вынос левого меню из отдельных HTML-страниц.
   ========================================================= */
:root{
  --ch-bg: #f5f4ef;
  --ch-surface: #f9f8f4;
  --ch-surface-2: #fdfcf9;
  --ch-surface-offset: #eeece5;
  --ch-divider: #d8d4c8;
  --ch-border: #cdc9bb;
  --ch-text: #1a1916;
  --ch-text-muted: #6b6860;
  --ch-text-faint: #a8a59e;
  --ch-text-inverse: #f5f4ef;
  --ch-primary: #1e4d3b;
  --ch-primary-hover: #163829;
  --ch-primary-light: #d4e6de;
  --ch-accent: #8b3a1a;
  --ch-accent-hover: #6e2d12;
  --ch-accent-light: #f0ddd4;
  --ch-ink: #1a1916;
  --ch-rule: #1a1916;
  --ch-font-display: Georgia, "Times New Roman", serif;
  --ch-font-body: "Helvetica Neue", Arial, sans-serif;
  --ch-radius-sm: 4px;
  --ch-radius-md: 8px;
  --ch-radius-lg: 12px;
  --ch-radius-full: 9999px;
  --ch-shadow-sm: 0 1px 3px rgba(26, 25, 22, 0.07);
  --ch-shadow-md: 0 4px 14px rgba(26, 25, 22, 0.09);

  --nav-min: 180px;
  --navW: max(10vw, var(--nav-min));
  --topbar-h: 72px;
}

html,
body{
  background: var(--ch-bg);
  color: var(--ch-text);
  font-family: var(--ch-font-body);
  overflow-x: hidden;
}

.cmpx-layout{
  min-height: calc(100vh - var(--topbar-h, 72px));
}

.cmpx-nav{
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--navW);
  background: var(--ch-bg);
  color: var(--ch-text);
  border-right: 2px solid var(--ch-rule);
  padding: calc(var(--topbar-h, 72px) + 12px) 10px 16px;
  z-index: 20;
  overflow-y: auto;
  box-sizing: border-box;
}

.cmpx-nav__brand-note{
  margin: 0 10px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ch-divider);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ch-text-faint);
}

.cmpx-nav__section{
  margin-bottom: 18px;
}

.cmpx-nav__label,
.cmpx-nav h3{
  color: var(--ch-text-faint);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  margin: 0 10px 8px;
}

.cmpx-nav__item,
.cmpx-nav a{
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--ch-radius-md);
  color: var(--ch-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, transform .04s ease;
}

.cmpx-nav__item:hover,
.cmpx-nav a:hover{
  background: var(--ch-surface-offset);
  color: var(--ch-text);
}

.cmpx-nav__item:active,
.cmpx-nav a:active{
  transform: translateY(1px);
}

.cmpx-nav__item.is-active,
.cmpx-nav a.is-active{
  background: var(--ch-primary-light);
  color: var(--ch-primary);
  font-weight: 700;
}

.cmpx-nav__item.is-muted{
  color: var(--ch-text-faint);
}

.cmpx-nav__item-icon{
  width: 18px;
  min-width: 18px;
  text-align: center;
  opacity: .8;
}

.cmpx-nav__divider{
  height: 1px;
  background: var(--ch-divider);
  margin: 12px 10px;
}

.cmpx-main{
  margin-left: var(--navW);
  width: calc(100vw - var(--navW));
  padding: 5px 16px 24px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.cmpx-main .section,
.cmpx-main .container{
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.cmpx-page-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cmpx-page-title{
  margin-bottom: .2rem !important;
}

.cmpx-page-subtitle{
  margin: 0;
  color: var(--ch-text-muted);
  font-size: .78rem;
}

.ch-card,
.panel-box{
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-md);
  padding: 14px;
}

.box{
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-md);
  box-shadow: none;
}

.table thead th{
  background: var(--ch-surface-offset);
  color: var(--ch-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

@media (max-width: 900px){
  :root{
    --nav-min: 64px;
    --navW: 64px;
  }

  .cmpx-nav{
    padding-left: 6px;
    padding-right: 6px;
  }

  .cmpx-nav__brand-note,
  .cmpx-nav__label,
  .cmpx-nav h3{
    display: none;
  }

  .cmpx-nav__item,
  .cmpx-nav a{
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 0;
  }

  .cmpx-nav__item-icon{
    font-size: 16px;
    opacity: 1;
  }

  .cmpx-main{
    padding-left: 10px;
    padding-right: 10px;
  }
}
