* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

.oq-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.oq-header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}
.oq-home {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #34a853;
  background: #34a853;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.oq-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}

.oq-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.05);
}
.oq-card-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.oq-left {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding-right: 6px;
}

.oq-table-head, .oq-task-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 10px;
  align-items: center;
}
.oq-table-head {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}
.oq-task-list {
  display: grid;
  gap: 8px;
}
.oq-task-row {
  padding: 6px 4px;
  border-radius: 8px;
}
.oq-task-row.active {
  background: #ecfdf3;
  border: 1px solid #86efac;
}
.oq-task-toggle {
  border: 1px solid #cbd5f5;
  background: #eef2ff;
  color: #1e293b;
  border-radius: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-weight: 600;
}
.oq-task-row.active .oq-task-toggle {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.oq-task-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.oq-analogs-col {
  text-align: left;
}
.oq-task-analogs {
  display: none;
}
.oq-task-analogs.visible {
  display: block;
}

.oq-right {
  display: grid;
  gap: 16px;
}
.oq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.oq-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}
.oq-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.oq-inline input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.oq-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.oq-btn.oq-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.oq-muted {
  color: #64748b;
  font-size: 12px;
}

.oq-modal.hidden { display: none; }
.oq-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.oq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.45);
}
.oq-modal-card {
  position: relative;
  width: min(320px, 90vw);
  margin: 18vh auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.oq-modal-card input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.oq-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 900px) {
  .oq-layout {
    grid-template-columns: 1fr;
  }
  .oq-left {
    position: static;
    max-height: none;
  }
}
