* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: #1f2330;
  background: #eef2f7;
}
#app { padding: 16px; max-width: 1200px; margin: 0 auto; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px; background: #fff; border: 1px solid #d4dbe6; border-radius: 8px;
  cursor: pointer; font-weight: 500; color: #4a5568;
}
.tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.report-host { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(20,30,60,.06); }

.controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: #6b7280; }
.field input[type="date"], .field select {
  padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff;
}
.btn {
  padding: 8px 18px; background: #2563eb; color: #fff; border: none; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.btn:hover { background: #1d4ed8; }
.btn.secondary { background: #eef2f7; color: #334155; }

.resp-filter { position: relative; }
.resp-dropdown {
  position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 4px; background: #fff;
  border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px; max-height: 260px; overflow: auto;
  min-width: 240px; box-shadow: 0 6px 20px rgba(20,30,60,.12); display: none;
}
.resp-dropdown.open { display: block; }
.resp-dropdown label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; cursor: pointer; font-size: 13px; }
.resp-dropdown label:hover { background: #f1f5f9; border-radius: 6px; }
.resp-toggle { min-width: 220px; text-align: left; }

.report-header { margin: 2px 0 12px; padding-bottom: 10px; border-bottom: 2px solid #e6ebf2; }
.rh-title { font-size: 18px; font-weight: 700; color: #1f2330; }
.rh-meta { font-size: 13px; color: #4a5568; margin-top: 4px; }

.summary { color: #6b7280; font-size: 13px; margin: 6px 0 12px; }

/* режим PDF-экспорта: не рвать проект между страницами, аккуратнее отступы */
.pdf-mode .project-group { page-break-inside: avoid; break-inside: avoid; }
.pdf-mode .project-head { background: #f0f4f9; }
.pdf-mode a { color: #1d4ed8; }

.project-group { margin-bottom: 18px; border: 1px solid #e6ebf2; border-radius: 10px; overflow: hidden; }
.project-head {
  background: #f8fafc; padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.project-head a { color: #2563eb; text-decoration: none; }
.project-head a:hover { text-decoration: underline; }
.project-head .cnt { color: #94a3b8; font-weight: 500; font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 14px; border-top: 1px solid #eef2f7; vertical-align: top; }
th { font-size: 12px; color: #6b7280; font-weight: 600; background: #fff; }
td.task-title { font-weight: 500; width: 26%; }
td.task-desc { color: #475569; width: 48%; white-space: pre-wrap; }
td.resp { width: 18%; white-space: nowrap; }

.loader { padding: 30px; text-align: center; color: #94a3b8; }
.empty { padding: 26px; text-align: center; color: #94a3b8; }
.error { padding: 14px; background: #fef2f2; color: #b91c1c; border-radius: 8px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #eef2ff; color: #4338ca; margin-left: 6px; }
