/* Жалобы в кабинете руководителя — стили из демо */
#leaderComplaintsPanel {
  --bg: #eef5f8;
  --card: rgba(255,255,255,0.88);
  --card-soft: rgba(255,255,255,0.55);
  --border: rgba(45, 90, 110, 0.12);
  --text: #2a3642;
  --muted: #5c6d7a;
  --accent: #2c5282;
  --accent-soft: rgba(44, 82, 130, 0.14);
  --teal: #2c5282;
  --teal-dark: #234e77;
  --font: Comfortaa, sans-serif;
  --shadow: 0 8px 32px rgba(45, 90, 110, 0.08);
  --radius: 14px;
}
#leaderComplaintsPanel .lc-complaints-root { margin-top: 4px; }
#leaderComplaintsPanel .lc-appeals-meta .sub { margin: 0; }
#leaderComplaintsPanel .badge-demo {
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
}

    /* scoped vars already set on #leaderComplaintsPanel */
    
    
    
    
    
    .sub { color: var(--muted); font-size: 0.8rem; margin: 0 0 12px; }
    .badge-demo {
      display: inline-block;
      background: rgba(44, 82, 130, 0.12);
      color: var(--accent);
      font-size: 0.7rem;
      padding: 2px 8px;
      border-radius: 999px;
      margin-left: 6px;
      font-weight: 700;
    }
    .tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }
    .tab-btn {
      border: 1px solid var(--border);
      background: var(--card-soft);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      color: var(--text);
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
    }
    .tab-btn.active {
      background: rgba(44, 82, 130, 0.9);
      border-color: transparent;
      color: #fff;
    }

    /* admin-cabinet.css прячет .panel — явно показываем панели жалоб */
    #leaderComplaintsPanel .panel { display: block; }
    #leaderComplaintsPanel .panel[hidden] { display: none !important; }
    .leader-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-bottom: 14px;
    }
    .leader-row label { font-size: 0.85rem; color: var(--muted); }
    .leader-row select {
      flex: 1;
      min-width: 200px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      font-size: 0.9rem;
      background: var(--card);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      font-family: var(--font);
      color: var(--text);
    }
    .shops { display: flex; flex-direction: column; gap: 12px; }

    /* Круговая диаграмма тегов */
    .tag-pie-wrap {
      display: grid;
      grid-template-columns: 118px 1fr;
      gap: 12px;
      align-items: center;
    }
    @media (max-width: 520px) {
      .tag-pie-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
      }
    }
    .tag-pie {
      width: 118px;
      height: 118px;
      border-radius: 50%;
      position: relative;
      box-shadow: inset 0 0 0 1px rgba(45, 90, 110, 0.08);
    }
    .tag-pie-hole {
      position: absolute;
      inset: 26px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.92);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 0 1px rgba(45, 90, 110, 0.06);
    }
    .tag-pie-hole span {
      font-size: 18px;
      font-weight: 800;
      color: var(--accent);
      line-height: 1;
    }
    .tag-pie-hole small {
      font-size: 9px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin-top: 2px;
    }
    .tag-pie-legend {
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
      width: 100%;
    }
    .tag-pie-item {
      display: grid;
      grid-template-columns: 10px 1fr auto auto;
      gap: 6px;
      align-items: center;
      font-size: 11px;
      color: var(--text);
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 4px 6px;
      background: transparent;
      font-family: var(--font);
      text-align: left;
      width: 100%;
    }
    button.tag-pie-item {
      cursor: pointer;
    }
    button.tag-pie-item:hover {
      background: rgba(255, 255, 255, 0.55);
      border-color: var(--border);
    }
    button.tag-pie-item.active {
      background: rgba(44, 82, 130, 0.1);
      border-color: rgba(44, 82, 130, 0.35);
    }
    .tag-pie-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: block;
      flex-shrink: 0;
    }
    .tag-pie-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 600;
    }
    .tag-pie-item strong { font-weight: 800; }
    .tag-pie-item em {
      font-style: normal;
      color: var(--muted);
      font-weight: 700;
      font-size: 10px;
      min-width: 28px;
      text-align: right;
    }

    /* Сравнение лидеров */
    .compare-hint {
      font-size: 0.8rem;
      color: var(--muted);
      margin: 0 0 12px;
    }
    .cmp-list { display: flex; flex-direction: column; gap: 10px; }
    .cmp-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .cmp-head {
      width: 100%;
      display: grid;
      grid-template-columns: 36px 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 12px 14px;
      border: none;
      background: transparent;
      cursor: pointer;
      text-align: left;
      font-family: var(--font);
      color: inherit;
    }
    .cmp-head:hover { background: rgba(255,255,255,0.35); }
    .cmp-card.open .cmp-head {
      background: rgba(255,255,255,0.4);
      border-bottom: 1px solid var(--border);
    }
    .cmp-rank {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      background: var(--accent-soft);
      color: var(--accent);
      font-weight: 800;
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .cmp-rank.top1 { background: #fef3c7; color: #92400e; }
    .cmp-rank.top2 { background: rgba(148,163,184,0.35); color: #475569; }
    .cmp-rank.top3 { background: #ffedd5; color: #9a3412; }
    .cmp-name {
      font-size: 13px;
      font-weight: 800;
      line-height: 1.25;
    }
    .cmp-sub {
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
      font-weight: 600;
    }
    .cmp-total {
      font-size: 18px;
      font-weight: 800;
      color: var(--accent);
    }
    .cmp-body {
      padding: 10px 14px 14px;
      display: none;
    }
    .cmp-card.open .cmp-body { display: block; }
    .cmp-section-title {
      font-size: 11px;
      font-weight: 700;
      color: #555;
      margin: 0 0 8px;
    }
    .cmp-tags { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
    .cmp-tag {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
      padding: 6px 10px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.45);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(148, 163, 184, 0.35);
      color: var(--text);
      font-size: 11px;
      font-weight: 700;
    }
    .cmp-tag-bar-wrap {
      grid-column: 1 / -1;
      height: 8px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.22);
      overflow: hidden;
    }
    .cmp-tag-bar {
      height: 100%;
      border-radius: 999px;
      min-width: 4px;
    }
    .cmp-shops {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .cmp-shop {
      border: 1px solid var(--border);
      background: #f8fafc;
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      font-family: var(--font);
      color: var(--text);
    }
    .cmp-shop:hover { border-color: var(--teal); background: #f0fdfa; }
    .cmp-shop span {
      display: block;
      font-size: 10px;
      color: var(--muted);
      font-weight: 600;
      margin-top: 2px;
    }
    .cmp-shop-empty { font-size: 12px; color: var(--muted); }

    /* Сравнение направлений */
    .dir-list { display: flex; flex-direction: column; gap: 10px; }
    .dir-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .dir-head {
      width: 100%;
      border: 0;
      background: transparent;
      padding: 12px 14px;
      display: grid;
      grid-template-columns: 36px 1fr auto;
      gap: 10px;
      align-items: center;
      text-align: left;
      cursor: pointer;
      font-family: var(--font);
      color: var(--text);
    }
    .dir-rank {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(44, 82, 130, 0.12);
      color: var(--accent);
      font-weight: 800;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dir-rank.top1 { background: rgba(185, 28, 28, 0.14); color: #b91c1c; }
    .dir-rank.top2 { background: rgba(194, 65, 12, 0.14); color: #c2410c; }
    .dir-rank.top3 { background: rgba(161, 98, 7, 0.14); color: #a16207; }
    .dir-name { font-size: 14px; font-weight: 800; line-height: 1.25; }
    .dir-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .dir-total { font-size: 20px; font-weight: 800; color: var(--accent); }
    .dir-bar-wrap {
      grid-column: 1 / -1;
      height: 8px;
      border-radius: 999px;
      background: #e2e8f0;
      overflow: hidden;
    }
    .dir-bar { height: 100%; border-radius: 999px; }
    .dir-body { display: none; padding: 0 14px 14px; }
    .dir-card.open .dir-body { display: block; }
    .dir-section-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin: 10px 0 8px;
    }
    .dir-tags { margin-bottom: 4px; }
    .dir-shops {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .dir-shop {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(255,255,255,0.55);
      padding: 8px 10px;
      text-align: left;
      cursor: pointer;
      font-family: var(--font);
      color: var(--text);
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 8px;
      align-items: center;
    }
    .dir-shop:hover { border-color: var(--teal); background: #f0fdfa; }
    .dir-shop-rank {
      font-size: 11px;
      font-weight: 800;
      color: #b91c1c;
      min-width: 22px;
    }
    .dir-shop-main { min-width: 0; }
    .dir-shop-id { font-size: 13px; font-weight: 800; }
    .dir-shop-meta {
      font-size: 11px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .dir-shop-count { font-size: 14px; font-weight: 800; color: #b91c1c; }
    .dir-empty { font-size: 12px; color: var(--muted); }

    /* Аналитика — компактно, как теги / сравнение */
    .an-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-bottom: 8px;
    }
    .an-toolbar label { font-size: 11px; color: var(--muted); font-weight: 600; }
    .an-toolbar select {
      padding: 4px 8px;
      border: 1px solid var(--border);
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      background: var(--card);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      max-width: 100%;
      font-family: var(--font);
      color: var(--text);
    }
    .an-note {
      font-size: 10px;
      color: var(--muted);
      margin: 0 0 8px;
      line-height: 1.3;
    }
    .an-period-box {
      margin: 0 0 8px;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--card);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      font-size: 11px;
      line-height: 1.4;
      box-shadow: var(--shadow);
    }
    .an-period-box strong {
      display: block;
      font-size: 12px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 2px;
    }
    .an-period-box .dates {
      color: var(--accent);
      font-weight: 700;
    }
    .an-period-box .hint {
      color: var(--muted);
      font-size: 10px;
      margin-top: 3px;
    }
    .an-grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .an-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 8px 10px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .an-card h3 {
      margin: 0 0 6px;
      font-size: 11px;
      font-weight: 800;
      color: #555;
    }
    .an-status-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      margin-bottom: 6px;
    }
    .an-stat {
      border-radius: 8px;
      padding: 5px 4px;
      text-align: center;
    }
    .an-stat.ok { background: #ecfdf5; color: #047857; }
    .an-stat.no { background: #fef2f2; color: #b91c1c; }
    .an-stat.sp { background: #fff7ed; color: #c2410c; }
    .an-stat .n { font-size: 13px; font-weight: 800; display: block; line-height: 1.1; }
    .an-stat .l { font-size: 9px; font-weight: 700; opacity: 0.9; line-height: 1.2; }
    .an-bar-stack {
      display: flex;
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      background: #e2e8f0;
      margin-bottom: 0;
    }
    .an-bar-stack span { display: block; height: 100%; }
    .an-bar-stack .ok { background: #10b981; }
    .an-bar-stack .no { background: #ef4444; }
    .an-bar-stack .sp { background: #f59e0b; }
    .an-rank {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .an-rank-item { display: flex; flex-direction: column; gap: 4px; }
    .an-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(100px, 1.2fr) minmax(60px, 1.5fr) auto;
      gap: 6px;
      align-items: center;
      padding: 4px 8px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.45);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      color: var(--text);
      cursor: pointer;
      text-align: left;
      font-family: var(--font);
      box-shadow: none;
    }
    .an-row:hover {
      background: rgba(255, 255, 255, 0.7);
      border-color: rgba(100, 116, 139, 0.45);
    }
    .an-row.active {
      background: rgba(255, 255, 255, 0.78);
      border-color: rgba(13, 148, 136, 0.55);
      box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
    }
    .an-row > div:first-child { min-width: 0; }
    .an-row .nm {
      font-size: 10px;
      font-weight: 700;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
    }
    .an-row .sm {
      font-size: 9px;
      color: var(--muted);
      font-weight: 600;
      margin-top: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .an-row .cnt {
      min-width: 20px;
      text-align: right;
      font-size: 11px;
      font-weight: 800;
      color: var(--text);
    }
    .an-mini {
      height: 12px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.22);
      overflow: hidden;
      min-width: 0;
    }
    .an-mini i {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      height: 100%;
      padding: 0 5px;
      background: var(--bar, #e74c3c);
      border-radius: 999px;
      color: #fff;
      font-size: 9px;
      font-weight: 800;
      font-style: normal;
      min-width: 0;
      box-sizing: border-box;
    }
    .an-mini-stack {
      display: flex;
      width: 100%;
      height: 100%;
      border-radius: 999px;
      overflow: hidden;
    }
    .an-mini-stack span {
      display: block;
      height: 100%;
      min-width: 2px;
    }
    .an-mini-wrap {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .an-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 10px;
      margin: 6px 0 8px;
      padding: 8px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.4);
    }
    .an-legend-title {
      width: 100%;
      font-size: 10px;
      font-weight: 800;
      color: var(--muted);
      margin: 0 0 2px;
    }
    .an-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
      max-width: 100%;
    }
    .an-legend-swatch {
      width: 12px;
      height: 12px;
      border-radius: 3px;
      flex-shrink: 0;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
    }
    .an-legend-item span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .an-drill {
      margin-top: 6px;
      padding: 6px 8px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.42);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }
    .an-drill h4 {
      margin: 0 0 6px;
      font-size: 11px;
      font-weight: 800;
    }
    .an-chips { display: flex; flex-wrap: wrap; gap: 4px; }
    .an-chip {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 999px;
      background: #ecf0f1;
      color: #2c3e50;
      border: 1px solid var(--border);
    }
    .an-chip.teal {
      background: rgba(255, 255, 255, 0.55);
      color: var(--text);
      border: 1px solid rgba(148, 163, 184, 0.35);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }
    .an-cols {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
    }
    @media (min-width: 640px) {
      .an-cols-2 { grid-template-columns: 1fr 1fr; }
    }
    .an-sub {
      font-size: 10px;
      font-weight: 700;
      color: #666;
      margin: 0 0 4px;
    }
    .an-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 10px;
    }
    .an-table th, .an-table td {
      padding: 3px 5px;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
    }
    .an-table th { color: var(--muted); font-weight: 700; font-size: 9px; }
    .an-table .link {
      border: none;
      background: none;
      padding: 0;
      color: var(--teal-dark);
      font-weight: 800;
      font-size: 10px;
      cursor: pointer;
      font-family: var(--font);
    }
    .pct-ok { color: #047857; font-weight: 700; }
    .pct-no { color: #b91c1c; font-weight: 700; }
    .pct-sp { color: #c2410c; font-weight: 700; }
    @media (max-width: 520px) {
      .an-row {
        grid-template-columns: 1fr auto;
      }
      .an-mini { grid-column: 1 / -1; }
    }

    /* Карточка ТТ — как в кабинете */
    .tt-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 10px 12px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .tt-title {
      font-size: 13px;
      font-weight: 800;
      margin: 0 0 8px;
      line-height: 1.3;
    }
    .tt-title small {
      font-weight: 600;
      color: var(--muted);
    }
    .tt-dates {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-bottom: 8px;
    }
    .date-pill {
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 700;
      background: rgba(255, 255, 255, 0.55);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      color: var(--text);
      cursor: pointer;
      font-family: var(--font);
    }
    .date-pill:hover { background: rgba(255, 255, 255, 0.75); }
    .date-pill.active {
      background: rgba(255, 255, 255, 0.82);
      border-color: rgba(44, 82, 130, 0.45);
      color: var(--accent);
    }

    .tags-box {
      margin: 0;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.42);
      border: 1px solid var(--border);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .tags-title {
      font-size: 11px;
      font-weight: 700;
      color: #555;
      margin-bottom: 8px;
    }
    .tag-grid {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    /* Строка тега — матово-прозрачная */
    .tag-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(120px, 1.1fr) minmax(90px, 1.6fr) auto;
      align-items: center;
      gap: 8px;
      padding: 6px 8px;
      border: 1px solid rgba(148, 163, 184, 0.35);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.45);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      color: var(--text);
      cursor: pointer;
      font-family: var(--font);
      text-align: left;
      transition: background 0.12s, border-color 0.12s;
    }
    .tag-row:hover {
      background: rgba(255, 255, 255, 0.7);
      border-color: rgba(100, 116, 139, 0.45);
    }
    .tag-row.active {
      background: rgba(255, 255, 255, 0.78);
      border-color: rgba(13, 148, 136, 0.55);
      box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
    }
    .tag-row-title {
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
    }
    .tag-track {
      height: 16px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.22);
      overflow: hidden;
      display: flex;
      align-items: stretch;
    }
    .tag-fill {
      min-width: 0;
      height: 100%;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0 6px;
      color: #fff;
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }
    .tag-count {
      min-width: 22px;
      text-align: right;
      font-size: 12px;
      font-weight: 800;
      color: var(--text);
    }
    .empty {
      font-size: 12px;
      color: var(--muted);
      padding: 8px 2px;
    }

    .drill {
      margin-top: 8px;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #fff;
    }
    .drill-title {
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 8px;
      color: var(--text);
    }
    .drill-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .drill-item {
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #f8fafc;
    }
    .drill-courier {
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 4px;
    }
    .drill-meta {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px;
    }
    .drill-essence {
      font-size: 12px;
      line-height: 1.4;
      color: #334155;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .drill-action {
      margin-top: 6px;
      font-size: 11px;
      color: var(--teal-dark);
      font-weight: 600;
    }
    @media (max-width: 520px) {
      .tag-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
          "title count"
          "bar bar";
      }
      .tag-row-title { grid-area: title; }
      .tag-track { grid-area: bar; }
      .tag-count { grid-area: count; }
    }

    /* === Сводка PDF (ежедневная) === */
    .pdf-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 10px;
      align-items: center;
      margin: 0 0 10px;
    }
    .pdf-toolbar label {
      font-size: 12px;
      font-weight: 700;
      color: var(--muted);
    }
    .pdf-toolbar select {
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px 10px;
      background: #fff;
      max-width: 100%;
    }
    .pdf-btn {
      font: inherit;
      font-size: 13px;
      font-weight: 800;
      border-radius: 999px;
      border: 1px solid var(--border);
      padding: 9px 14px;
      background: #fff;
      color: var(--text);
      cursor: pointer;
    }
    .pdf-btn-primary {
      background: linear-gradient(135deg, #0f766e, #2c5282);
      border-color: transparent;
      color: #fff;
    }
    .pdf-sheet { margin-top: 4px; }
    .pdf-doc {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 14px 12px 18px;
      box-shadow: var(--shadow);
    }
    .pdf-kicker {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #0f766e;
    }
    .pdf-title {
      margin: 4px 0 0;
      font-size: 1.05rem;
      line-height: 1.25;
      color: var(--text);
    }
    .pdf-sub {
      margin: 6px 0 12px;
      font-size: 12px;
      color: var(--muted);
      font-weight: 600;
    }
    .pdf-donuts {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px 8px;
      margin-bottom: 12px;
    }
    .pdf-mini { text-align: center; }
    .pdf-donut-wrap {
      position: relative;
      width: 72px;
      height: 72px;
      margin: 0 auto 6px;
    }
    .pdf-donut-canvas {
      width: 72px;
      height: 72px;
      display: block;
      border-radius: 50%;
    }
    .pdf-donut-num {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      font-size: 14px;
      font-weight: 800;
      color: var(--text);
      pointer-events: none;
    }
    .pdf-mini-id {
      font-size: 11px;
      font-weight: 800;
      color: #334155;
      margin-bottom: 4px;
    }
    .pdf-tag-list {
      text-align: left;
      margin: 0 auto;
      max-width: 140px;
    }
    .pdf-tag-line {
      display: grid;
      grid-template-columns: 8px 1fr auto;
      gap: 4px;
      align-items: start;
      font-size: 9px;
      line-height: 1.25;
      margin-bottom: 2px;
      color: #475569;
    }
    .pdf-tag-line i {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      display: block;
      margin-top: 3px;
    }
    .pdf-tag-line span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 600;
    }
    .pdf-tag-line b {
      font-weight: 800;
      color: #0f766e;
      font-variant-numeric: tabular-nums;
    }
    .pdf-tag-more {
      font-size: 9px;
      color: var(--muted);
      font-weight: 700;
      margin-top: 2px;
    }
    .pdf-more {
      font-size: 11px;
      color: var(--muted);
      margin: 0 0 8px;
      font-weight: 600;
    }
    .pdf-table-wrap {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-radius: 12px;
      border: 1px solid var(--border);
    }
    body.lc-export-table .pdf-table-wrap,
    .pdf-table-wrap-export {
      overflow: visible !important;
      max-width: none !important;
    }
    body.lc-export-table .pdf-table th,
    #pdfExportHost .pdf-table th {
      white-space: normal;
      min-width: 84px;
      max-width: 130px;
      font-size: 9px;
      line-height: 1.2;
      vertical-align: bottom;
    }
    #pdfExportHost .pdf-table {
      width: max-content;
      min-width: 100%;
      table-layout: auto;
    }
    #pdfExportHost .pdf-donuts {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .pdf-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
      min-width: 480px;
    }
    .pdf-table th,
    .pdf-table td {
      padding: 7px 6px;
      border-bottom: 1px solid #eef2f6;
      text-align: center;
      white-space: nowrap;
    }
    .pdf-table th {
      background: #f0f7f8;
      color: #334155;
      font-weight: 800;
      font-size: 10px;
    }
    .pdf-table .pdf-tt {
      text-align: left;
      font-weight: 800;
    }
    .pdf-table .pdf-total { color: #0f766e; }
    .pdf-table .pdf-zero { color: #cbd5e1; }
    .pdf-table .pdf-foot td {
      background: #f8fafc;
      border-bottom: none;
      font-weight: 800;
    }
    .pdf-empty {
      padding: 24px 12px;
      text-align: center;
      color: var(--muted);
      font-weight: 700;
    }
    @media (min-width: 700px) {
      .pdf-donuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .pdf-donut-wrap { width: 80px; height: 80px; }
      .pdf-donut-canvas { width: 80px; height: 80px; }
    }

    .pdf-part-title {
      margin: 0 0 10px;
      font-size: 13px;
      font-weight: 800;
      color: #0f766e;
    }
    .pdf-part + .pdf-part {
      margin-top: 16px;
      padding-top: 12px;
      border-top: 1px dashed var(--border);
    }
    body.lc-export-charts .pdf-part-table { display: none !important; }
    body.lc-export-table .pdf-part-charts { display: none !important; }
    body.lc-exporting .pdf-doc {
      box-shadow: none;
      border-color: #e2e8f0;
    }
    body.lc-exporting .pdf-part + .pdf-part {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }
    .pdf-donut-canvas,
    .pdf-tag-line i,
    .pdf-btn-primary {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }

    @media print {
      body.lc-printing-pdf * { visibility: hidden !important; }
      body.lc-printing-pdf #leaderComplaintsPanel,
      body.lc-printing-pdf #leaderComplaintsPanel * { visibility: visible !important; }
      body.lc-printing-pdf .lc-wrap,
      body.lc-printing-pdf .lc-card,
      body.lc-printing-pdf #leaderComplaintsPanel {
        position: static !important;
        box-shadow: none !important;
        background: #fff !important;
      }
      body.lc-printing-pdf .no-print,
      body.lc-printing-pdf .lc-tabs,
      body.lc-printing-pdf .tabs,
      body.lc-printing-pdf .lc-appeals-meta,
      body.lc-printing-pdf .lc-header-card,
      body.lc-printing-pdf #leaderAuthScreen,
      body.lc-printing-pdf .bip-page-bg {
        display: none !important;
      }
      body.lc-printing-pdf #panelPdf { display: block !important; }
      body.lc-printing-pdf .pdf-doc {
        border: none;
        box-shadow: none;
        padding: 0;
      }
      body.lc-printing-pdf .pdf-donuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      body.lc-printing-pdf .pdf-table { min-width: 0; font-size: 9pt; }
      body.lc-printing-pdf.lc-print-charts .pdf-part-table { display: none !important; }
      body.lc-printing-pdf.lc-print-table .pdf-part-charts { display: none !important; }
      body.lc-printing-pdf .pdf-part + .pdf-part {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
      }
      * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
      }
    }
  