body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #222;
}
header {
  background: linear-gradient(135deg, #1a3c6e, #2c5aa0);
  color: #fff;
  padding: 18px 24px;
}
.title { font-size: 22px; font-weight: 600; }
.sub { font-size: 13px; opacity: .85; margin-top: 4px; }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.periods { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { padding: 12px 24px 0; display: flex; gap: 8px; }
button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14px;
}
button.active { background: #1a3c6e; color: #fff; border-color: #1a3c6e; }
button:hover { border-color: #1a3c6e; }
.actions { display: flex; gap: 8px; }
label { font-size: 13px; }
input[type=date] { padding: 5px; border: 1px solid #cbd5e1; border-radius: 6px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin: 12px 0;
  font-size: 14px;
}
#view-sellers, #view-buyer { padding: 0 24px; }
th, td { border: 1px solid #e2e8f0; padding: 9px 12px; text-align: left; }
th { background: #f1f5f9; font-weight: 600; }
td.num { text-align: center; }
td.kp-cell { cursor: pointer; color: #1a3c6e; font-weight: 600; }
td.kp-cell:hover { background: #eaf1fb; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin-right: 4px; }
.b-warm { background: #ffe5e5; color: #a02020; }
.b-new { background: #e3f2fd; color: #1565c0; }
.b-dorm { background: #c2e6f9; color: #1a3c6e; }
.b-bad { color: #c0392b; }
.b-ok { color: #27ae60; }
.note { color: #64748b; font-size: 12px; padding: 6px 0 18px; }
#modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-box {
  background: #fff;
  border-radius: 10px;
  width: min(860px, 92vw);
  max-height: 84vh;
  overflow: auto;
  padding: 18px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#modal-close { font-size: 18px; padding: 2px 10px; }
