* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Inter, sans-serif;
  background-color: #f3f3f3;
}

/* Общая раскладка */
.layout {
  display: flex;
  height: 100vh;
  background-color: #f3f3f3;
}

/* Сайдбар */
.sidebar {
  width: 240px;
  background-color: #fff;
  padding: 1rem 1rem 0 1rem; /* убрали нижний отступ */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-logo img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: #111;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
}

.sidebar a:hover {
  text-decoration: underline;
}

.sidebar-section-title {
  font-weight: 600;
  font-size: 13px;
  margin: 0.25rem 0 0.25rem;
  color: #555;
  padding: 0;
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-footer a {
  display: block;
  color: #111;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 6px;
}

.sidebar-footer a:hover {
  text-decoration: underline;
}

/* Область справа от сайдбара */
.content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Топбар */
.top-bar {
  height: 64px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.company-name {
  font-size: 16px;
  font-weight: 600;
}

/* Контент */
.main-content {
  padding: 2rem;
  overflow-y: auto;
}

/* Таблица */
table {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

thead {
  background-color: #fafafa;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

th {
  font-weight: 600;
  color: #333;
}

.up {
  color: green;
  margin-left: 6px;
}

.down {
  color: red;
  margin-left: 6px;
}

.btn {
  background-color: #e4e4e7;
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  color: #111;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #d4d4d8;
}

.btn.active {
  background-color: #111;
  color: #fff;
}

.month-buttons {
  display: flex;
  gap: 12px;
  margin: 1rem 0;
}

.tooltip-modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip-content {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
}

.tooltip-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
}

.tooltip-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #4b5563;
}

/* Отступ для имён менеджеров */
.sidebar .sidebar-manager {
  margin-left: 1rem;
  margin-top: 2px;
}

.message.manager {
  background: #f3f3f3;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  position: relative;
}

.tip {
  background-color: #fff8dc;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  border-left: 4px solid #f9c74f;
  font-size: 0.9rem;
}

.missing-block {
  background-color: #ffe6e6;
  padding: 1rem;
  margin-top: 2rem;
  border-radius: 12px;
  border-left: 5px solid #d00000;
}

.missing-block h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #d00000;
}

/* Блок KPI в админке */
.kpi-table input[type="text"],
.kpi-table input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fafafa;
}

.kpi-table input[type="checkbox"] {
  transform: scale(1.2);
}

.kpi-table th,
.kpi-table td {
  vertical-align: middle;
}

/* Форма выбора менеджера и месяца */
.admin-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-selector select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #fff;
}

/* График работы */
.schedule-table select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fafafa;
  font-size: 14px;
}

.schedule-table td.shift {
  background-color: #4ade80; /* зелёный */
}
.schedule-table td.weekend {
  background-color: #fca5a5; /* красный */
}
.schedule-table td.off {
  background-color: #fff; /* белый */
}

<style>
  .bracket-block {
    display: inline-block;
    position: relative;
    padding-left: 2rem;
  }

  .bracket-left {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 2.5rem;
    line-height: 1.2;
    font-family: monospace;
    user-select: none;
  }

  .bracket-label {
    position: absolute;
    bottom: -1.4rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
  }
</style>

<p style="font-size: 1.1rem;">
  <strong>Bonus</strong> =
  <span class="bracket-block">
    <span class="bracket-left">
      ⎧<br>|<br>|<br>⎩
    </span>
    <span style="display: inline-block; line-height: 1.5;">
      KPI₁<br>
      KPI₂<br>
      KPI₃<br>
      KPI₄
    </span>
    <span class="bracket-label">iBonus</span>
  </span>
  × <strong>WeBonus</strong>
</p>