.hq-panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 9px;
  padding: 3px;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #f7f9fb;
}
.hq-panel-tabs button {
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #718094;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}
.hq-panel-tabs button:hover {
  background: #fff;
  color: #1769e0;
}
.hq-panel-tabs button.active {
  background: #fff;
  color: #1769e0;
  box-shadow: 0 1px 4px rgba(31, 65, 105, 0.1);
}
.hq-panel-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.hq-panel-filter label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7c8998;
  font-size: 8px;
  font-weight: 700;
}
.hq-panel-filter select {
  height: 27px;
  padding: 0 25px 0 8px;
  border: 1px solid #dfe5ed;
  border-radius: 6px;
  background: #fff;
  color: #506074;
  font-size: 8px;
}
.hq-panel-filter select:disabled {
  background: #f3f5f7;
  color: #98a3af;
}
.hq-panel-filter > span {
  color: #8d99a8;
  font: 700 8px Inter;
}

.schedule-task-content {
  min-width: 0;
}
.hq-task-title-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.hq-star-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #163d69;
  font-size: 12px;
  cursor: pointer;
}
.hq-star-toggle:not(.active) {
  opacity: 0;
  color: #7f8b99;
}
.schedule-task:hover .hq-star-toggle:not(.active),
.schedule-task:focus-within .hq-star-toggle:not(.active) {
  opacity: 1;
}
.hq-star-toggle:hover {
  color: #0b2b50;
}
.hq-important-mark {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 3px;
  color: #163d69;
  font-size: 0.95em;
  font-style: normal;
  text-decoration: none;
}
.hq-calendar-important-toggle {
  height: 32px;
  margin-left: 6px;
  padding: 0 10px;
  border: 1px solid #d8e0e9;
  border-radius: 6px;
  background: #fff;
  color: #53667d;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}
.hq-calendar-important-toggle:hover,
.hq-calendar-important-toggle.active {
  border-color: #7c9fc8;
  background: #f4f8fd;
  color: #163d69;
}
.hq-event-time {
  margin-left: auto;
  color: inherit;
  font: 700 7px Inter;
}
.hq-reference-task {
  border-color: #d7c9ff;
  background: #fbf9ff;
  cursor: default;
}
.hq-reference-task:hover {
  transform: none;
}
.hq-reference-label {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #6d4bd1;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
}
.hq-reference-task .schedule-task-state b,
.hq-reference-task .schedule-task-state small {
  color: #6d4bd1;
}

.hq-schedule-modal {
  min-width: min(760px, 82vw);
}
.modal-card:has(.hq-schedule-modal) {
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow: auto;
}
.hq-important-control {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.hq-important-control input {
  width: 16px !important;
  height: 16px;
  margin: 0 !important;
}
.hq-important-control span {
  display: grid;
  gap: 2px;
}
.hq-important-control b {
  color: #263e5b;
  font-size: 10px;
}
.hq-important-control small {
  color: #8190a2;
  font-size: 8px;
  font-weight: 400;
}
.hq-form-section {
  padding: 12px;
  border: 1px solid #e2e8ef;
  border-radius: 9px;
  background: #f8fafc;
}
.hq-form-section > b {
  display: block;
  margin-bottom: 10px;
  color: #3f5268;
  font-size: 10px;
}
.hq-inner-grid {
  gap: 10px;
}
.hq-inner-grid input,
.hq-inner-grid select {
  background: #fff;
}
.hq-computed-due {
  padding: 10px;
  border: 1px dashed #b9cce3;
  border-radius: 7px;
  background: #fff;
}
.hq-computed-due small,
.hq-computed-due b {
  display: block;
}
.hq-computed-due small {
  color: #8a96a5;
  font-size: 7.5px;
}
.hq-computed-due b {
  margin-top: 4px;
  color: #2e68ae;
  font-size: 10px;
}
.hq-schedule-settings .hq-settings-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid #e7ebf0;
  border-radius: 8px;
}
.hq-schedule-settings .schedule-settings-table {
  min-width: 760px;
}
.hq-schedule-settings thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}
.hq-document-chip {
  display: inline-flex;
  margin: 0 4px 4px 0;
  padding: 3px 6px;
  border: 1px solid #d9e4f0;
  border-radius: 10px;
  background: #f4f8fd;
  color: #4c6682;
  font-size: 7.5px;
  font-weight: 700;
}
.hq-event-important-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 7px 9px;
  border: 1px solid #dce4ed;
  border-radius: 6px;
  background: #fff;
  color: #6f7d8e;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
}
.hq-event-important-toggle.active {
  border-color: #a9bed6;
  background: #f5f8fc;
  color: #163d69;
}

.modal:has(.daily-detail-modal) {
  padding: 24px;
}
.modal-card:has(.daily-detail-modal) {
  display: flex;
  width: min(1080px, 90vw);
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
}
.modal-card:has(.daily-detail-modal) > #modalBody {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.daily-detail-modal {
  height: 100%;
  min-height: 0;
}
.daily-detail-header,
.daily-summary,
.daily-note {
  flex-shrink: 0;
}
.daily-detail-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.daily-task-column,
.daily-task-detail {
  min-height: 0;
}

@media (max-width: 1100px) {
  .hq-task-panel .schedule-panel-head {
    display: block;
  }
  .hq-task-panel .schedule-panel-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }
  .hq-calendar-important-toggle {
    order: 5;
  }
}
@media (max-width: 760px) {
  .hq-panel-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .hq-schedule-modal {
    min-width: 0;
  }
  .hq-inner-grid {
    grid-template-columns: 1fr;
  }
  .schedule-calendar-toolbar {
    flex-wrap: wrap;
  }
  .hq-calendar-important-toggle {
    margin-left: 0;
  }
  .modal:has(.daily-detail-modal) {
    padding: 12px;
  }
  .modal-card:has(.daily-detail-modal) {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }
  .daily-detail-layout {
    overflow: auto;
  }
}
