:root {
    --boga-bg: #44484d;
    --boga-white: #fff;
    --boga-gap: 72px;
	--boga-gap-top: 22px;
    --boga-sidebar-width: 190px;
    --boga-sidebar-gap: 15px;
    --boga-radius: 36px;
    --boga-shadow: 0 0 44px 4px rgba(68,72,77,0.17) inset, 0 1px 14px rgba(68,72,77,0.07);
    --boga-shadow-inset: 0 0 44px 4px rgba(68,72,77,0.09) inset;
}

/* Базовый фон */
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #23272f;
    background: var(--boga-bg);
    overflow: hidden;
}

.boga-background {
    position: fixed;
    z-index: 0;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: var(--boga-bg) url('/static/img/bg-dots.png') repeat 0 0;
}

/* Лейаут */
.boga-layout {
    position: relative;
    display: flex;
    min-height: 100vh;
    height: 100vh;
    z-index: 1;
}

/* Левое меню */
.boga-sidebar {
    width: var(--boga-sidebar-width);
    padding: 15px var(--boga-sidebar-gap) 0 20px;
    box-sizing: border-box;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}
.boga-logo-wrap {
    margin-bottom: 36px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.boga-logo {
    width: 60px; height: 60px;
    display: block;
    background: none;
}

.boga-burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2em;
    margin-bottom: 14px;
    cursor: pointer;
}
.boga-sidebar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin: 0;
    padding: 0;
}
/* Меню — современно, без плашки */

.boga-sidebar-link:hover,
.boga-sidebar-link:focus {
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 2px #babec4;
    border: 1px solid #babec4;
    background: none;
}
.boga-sidebar-link.active {
  color: #fff;
  border-radius: 8px;
  border: 1.5px solid #fff;
  background: none;
}
.boga-sidebar-link {
  display: block;
  padding: 8px 0 8px 8px;
  color: #fff;
  font-size: .7em;
  background: none;
  text-decoration: none;
  border: none;
  border-radius: 0;
  outline: none;
  transition: color 0.17s, box-shadow 0.19s, border 0.19s;
  position: relative;
}

.boga-link-top {
padding: 8px 10px 8px 8px;
 margin-right: 10px;
 color: #fff;
  font-size: .7em;
  background: none;
  text-decoration: none;
  border: none;
  border-radius: 0;
  outline: none;
  transition: color 0.17s, box-shadow 0.19s, border 0.19s;
  position: relative;
}
.boga-link-top:hover,
.boga-link-top:focus {
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 2px #babec4;
    border: 1px solid #babec4;
    background: none;
}
.boga-link-top.active {
  color: #fff;
  border-radius: 8px;
  border: 1.5px solid #fff;
  background: none;
}

/* Главная область */
.boga-main {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    padding: var(--boga-gap-top) var(--boga-gap) var(--boga-gap) var(--boga-gap);
    box-sizing: border-box;
    z-index: 2;
}
.nav {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 22px;
  list-style: none;
}
a {
  color: #f7f7f7;
  text-decoration: none;
  background-color: transparent;
}
.nav-link .active
{
  color: #fff;
  text-decoration: none;
  background-color: transparent;
}

.nav-link:hover
{
  color: #fff;
  text-decoration: none;
  background-color: transparent;
}

.nav-link {
  color: #99a1a9;
  pointer-events: none;
  cursor: default;
}
a .nav-link
{
  color: #ccc;
  text-decoration: none;
  background-color: transparent;
}

/* Контентное окно — СКРОЛЛ ТОЛЬКО ЗДЕСЬ! */
.boga-content {
    flex: 1 1 auto;
    width: 100%;
    background: var(--boga-white);
    border-radius: var(--boga-radius);
    box-shadow: 0 0 18px 2px rgba(20,25,35,0.14) inset, 0 0 44px 10px rgba(34,36,38,0.13) inset, 0 1px 14px rgba(68,72,77,0.05);
    border: 4px solid #cbdcfe94;
    padding: 48px 48px 32px 48px;
    box-sizing: border-box;
    margin: 0;
    min-height: 0;
    min-width: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    outline: 1px solid rgba(60,70,80,0.12);
    scrollbar-gutter: stable both-edges;
    padding-right: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100,100,100,0.10) transparent;
}

/* Кастомизация скроллбара */
.boga-content::-webkit-scrollbar {
    width: 7px;
    background: transparent;
}
.boga-content::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.10);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.03);
}
.boga-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 18px 0;
}

/* ----------- Media queries ----------- */
@media (max-width: 1200px) {
    .boga-main, .boga-content {
        padding-left: 32px;
        padding-right: 32px;
    }
}
@media (max-width: 900px) {
    :root { --boga-gap: 20px; --boga-sidebar-width: 62px; --boga-radius: 16px; }
    .boga-sidebar {
        width: var(--boga-sidebar-width);
        padding: 12px 0 0 0;
        align-items: center;
    }
    .boga-logo-wrap { margin-bottom: 8px; }
    .boga-logo { width: 34px; height: 34px; }
    .boga-sidebar-nav {
        display: none;
        position: absolute;
        top: 60px; left: 0;
        background: var(--boga-bg);
        z-index: 9999;
        width: 100vw;
        padding: 14px 0 10px 12px;
        box-shadow: 0 4px 22px rgba(0,0,0,0.08);
    }
    .boga-sidebar.menu-open .boga-sidebar-nav {
        display: flex;
    }
    .boga-burger {
        display: block;
    }
    .boga-content { padding: 24px 8px 18px 8px; }
}
@media (max-width: 600px) {
    .boga-footer { font-size: 0.7em; height: 30px; padding: 0 8px; }
    .boga-content { padding: 12px 2px 10px 2px; }
}

/* Футер */
.boga-footer {
    width: 100vw;
    color: #e2e2e2;
    text-align: center;
    padding: 8px 0 8px 0;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    font-size: 0.8em;
    letter-spacing: 0.01em;
    z-index: 12;
}

/* Панели и блоки */
.boga-block,
.boga-form-panel,
.boga-table-panel {
    background: var(--boga-white);
    border-radius: var(--boga-radius);
    box-shadow: var(--boga-shadow);
    padding: 32px 28px;
    margin: 0 auto 36px auto;
    max-width: 640px;
    min-width: 0;
    position: relative;
}

.boga-form-panel {
    max-width: 540px;
    padding: 32px 20px 24px 20px;
}
.boga-block h4, .boga-form-panel h4 {
    margin-bottom: 28px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
/* ====== Меню "Ещё" ====== */
.boga-sidebar-link-more, .boga-topbar-link-more {
    cursor: pointer;
    color: #fff;
    padding: 8px;
    display: inline-block;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 600;
    background: #54585c;
    user-select: none;
}
.boga-sidebar-more-popup, .boga-topbar-more-popup {
    position: absolute;
    left: 0; top: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 32px rgba(20,20,22,0.15);
    padding: 6px 0;
    min-width: 170px;
    z-index: 100;
}
.boga-sidebar-more-popup a, .boga-topbar-more-popup a {
    color: #222;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
}
.boga-sidebar-more-popup a:hover, .boga-topbar-more-popup a:hover {
    background: #f3f5f9;
}

/* ====== Модальное окно ====== */
.boga-modal {
    position: fixed;
    z-index: 1500;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(20, 20, 32, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}
.boga-modal-content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(40,40,70,0.20);
    padding: 28px 36px 20px 36px;
    min-width: 320px;
    max-width: 480px;
}
.boga-modal-content h3 {
    margin-top: 0;
    margin-bottom: 22px;
    font-weight: 600;
    font-size: 1.25em;
    color: #333;
}
.boga-modal .btn-secondary {
    margin-top: 16px;
}
.boga-sidebar-settings,
.boga-topbar-settings {
    margin-top: 12px;
    background: none;
    border: none;
    color: #f1c40f;
    font-size: 1.5em;
    cursor: pointer;
    outline: none;
    float: right;
}
.boga-menu-icon {
    margin-right: 8px;
    font-style: normal;
}

/* Стили для компонента assembler */
.boga-module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boga-module-link {
  display: block;
  padding: 10px 14px;
  background: #f2f3f8;
  border: 1px solid #ccc;
  border-radius: 12px;
  text-decoration: none;
  color: #1d1d1f;
  transition: all 0.2s ease;
  font-size: 0.95em;
}

.boga-module-link:hover {
  background: #e6eaf5;
  border-color: #999;
}